Class QValueListExtensions
Provides extension methods for QValueList.
Inherited Members
Namespace: EmbedIO.Utilities
Syntax
public static class QValueListExtensions
Methods
TryNegotiateContentEncoding(QValueList, Boolean, out CompressionMethod, out String)
Attempts to proactively negotiate a compression method for a response, based on the contents of a QValueList.
Declaration
public static bool TryNegotiateContentEncoding(this QValueList this, bool preferCompression, out CompressionMethod compressionMethod, out string compressionMethodName)
Parameters
| Type | Name | Description |
|---|---|---|
| QValueList | this | The QValueList on which this method is called. |
| Boolean | preferCompression | true if sending compressed data is preferred over sending non-compressed data; otherwise, false. |
| CompressionMethod | compressionMethod | When this method returns, the compression method to use for the response, if content negotiation is successful. This parameter is passed uninitialized. |
| String | compressionMethodName | When this method returns, the name of the compression method, if content negotiation is successful. This parameter is passed uninitialized. |
Returns
| Type | Description |
|---|---|
| Boolean | true if content negotiation is successful; otherwise, false. |
Remarks
If this is empty, this method always returns true,
setting compressionMethod to None
and compressionMethodName to None.