DotNetOpenAuth.Core Internal state consistency checks that throw an internal error exception when they fail. Validates some expression describing the acceptable condition evaluates to true. The expression that must evaluate to true to avoid an internal error exception. The message to include with the exception. Validates some expression describing the acceptable condition evaluates to true. The expression that must evaluate to true to avoid an internal error exception. The unformatted message. Formatting arguments. Throws an internal error exception. The message. Throws an internal error exception. Nothing. This method always throws. An internal error exception that should never be caught. Initializes a new instance of the class. Initializes a new instance of the class. The message. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). A message part encoder that translates between byte[] and base64web encoded strings. An interface describing how various objects can be serialized and deserialized between their object and string forms. Implementations of this interface must include a default constructor and must be thread-safe. Encodes the specified value. The value. Guaranteed to never be null. The in string form, ready for message transport. Decodes the specified value. The string value carried by the transport. Guaranteed to never be null, although it may be empty. The deserialized form of the given string. Thrown when the string value given cannot be decoded into the required object type. Encodes the specified value. The value. Guaranteed to never be null. The in string form, ready for message transport. Decodes the specified value. The string value carried by the transport. Guaranteed to never be null, although it may be empty. The deserialized form of the given string. Thrown when the string value given cannot be decoded into the required object type. Provides RSA encryption of symmetric keys to protect them from a theft of the persistent store. A persistent store for rotating symmetric cryptographic keys. Implementations should persist it in such a way that the keys are shared across all servers on a web farm, where applicable. The store should consider protecting the persistent store against theft resulting in the loss of the confidentiality of the keys. One possible mitigation is to asymmetrically encrypt each key using a certificate installed in the server's certificate store. Gets the key in a given bucket and handle. The bucket name. Case sensitive. The key handle. Case sensitive. The cryptographic key, or null if no matching key was found. Gets a sequence of existing keys within a given bucket. The bucket name. Case sensitive. A sequence of handles and keys, ordered by descending . Stores a cryptographic key. The name of the bucket to store the key in. Case sensitive. The handle to the key, unique within the bucket. Case sensitive. The key to store. Thrown in the event of a conflict with an existing key in the same bucket and with the same handle. Removes the key. The bucket name. Case sensitive. The key handle. Case sensitive. The persistent store for asymmetrically encrypted symmetric keys. The memory cache of decrypted keys. The asymmetric algorithm to use encrypting/decrypting the symmetric keys. Initializes a new instance of the class. The data store. The asymmetric protection to apply to symmetric keys. Must include the private key. Gets the key in a given bucket and handle. The bucket name. Case sensitive. The key handle. Case sensitive. The cryptographic key, or null if no matching key was found. Gets a sequence of existing keys within a given bucket. The bucket name. Case sensitive. A sequence of handles and keys, ordered by descending . Stores a cryptographic key. The name of the bucket to store the key in. Case sensitive. The handle to the key, unique within the bucket. Case sensitive. The key to store. Removes the key. The bucket name. Case sensitive. The key handle. Case sensitive. Decrypts the specified key. The bucket. The handle. The encrypted key. The decrypted key. An encrypted key and its decrypted equivalent. A cryptographic key and metadata concerning it. Backing field for the property. Backing field for the property. Initializes a new instance of the class. The cryptographic key. The expires UTC. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. The parameter is null. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Gets the key. Gets the expiration date of this key (UTC time). Initializes a new instance of the class. The encrypted key. The decrypted key. Invariant conditions. Gets the encrypted key. Thrown by a hosting application or web site when a cryptographic key is created with a bucket and handle that conflicts with a previously stored and unexpired key. Initializes a new instance of the class. Initializes a new instance of the class. The inner exception to include. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. Code contract for the interface. Gets the key in a given bucket and handle. The bucket name. Case sensitive. The key handle. Case sensitive. The cryptographic key, or null if no matching key was found. Gets a sequence of existing keys within a given bucket. The bucket name. Case sensitive. A sequence of handles and keys, ordered by descending . Stores a cryptographic key. The name of the bucket to store the key in. Case sensitive. The handle to the key, unique within the bucket. Case sensitive. The key to store. Thrown in the event of a conflict with an existing key in the same bucket and with the same handle. Removes the key. The bucket name. Case sensitive. The key handle. Case sensitive. A in-memory store of crypto keys. How frequently to check for and remove expired secrets. An in-memory cache of decrypted symmetric keys. The key is the bucket name. The value is a dictionary whose key is the handle and whose value is the cached key. The last time the cache had expired keys removed from it. Gets the key in a given bucket and handle. The bucket name. Case sensitive. The key handle. Case sensitive. The cryptographic key, or null if no matching key was found. Gets a sequence of existing keys within a given bucket. The bucket name. Case sensitive. A sequence of handles and keys, ordered by descending . Stores a cryptographic key. The name of the bucket to store the key in. Case sensitive. The handle to the key, unique within the bucket. Case sensitive. The key to store. Thrown in the event of a conflict with an existing key in the same bucket and with the same handle. Removes the key. The bucket name. Case sensitive. The key handle. Case sensitive. Cleans the expired keys from memory cache if the cleaning interval has passed. Weeds out expired keys from the in-memory cache. A compact binary serialization class. The -derived type to serialize/deserialize. A serializer for -derived types The DataBag-derived type that is to be serialized/deserialized. A serializer for -derived types The DataBag-derived type that is to be serialized/deserialized. Serializes the specified message. The message to serialize. Must not be null. A non-null, non-empty value. Deserializes a . The instance to deserialize into The message that contains the serialized value. Must not be null. The serialized form of the to deserialize. Must not be null or empty. The name of the parameter whose value is to be deserialized. Used for error message generation. The length of the nonce to include in tokens that can be decoded once only. The message description cache to use for data bag types. The minimum allowable lifetime for the key used to encrypt/decrypt or sign this databag. The symmetric key store with the secret used for signing/encryption of verification codes and refresh tokens. The bucket for symmetric keys. The crypto to use for signing access tokens. The crypto to use for encrypting access tokens. A value indicating whether the data in this instance will be protected against tampering. The nonce store to use to ensure that this instance is only decoded once. The maximum age of a token that can be decoded; useful only when is true. A value indicating whether the data in this instance will be protected against eavesdropping. A value indicating whether the data in this instance will be GZip'd. Initializes a new instance of the class. The crypto service provider with the asymmetric key to use for signing or verifying the token. The crypto service provider with the asymmetric key to use for encrypting or decrypting the token. A value indicating whether the data in this instance will be GZip'd. The maximum age of a token that can be decoded; useful only when is true. The nonce store to use to ensure that this instance is only decoded once. Initializes a new instance of the class. The crypto key store used when signing or encrypting. The bucket in which symmetric keys are stored for signing/encrypting data. A value indicating whether the data in this instance will be protected against tampering. A value indicating whether the data in this instance will be protected against eavesdropping. A value indicating whether the data in this instance will be GZip'd. The required minimum lifespan within which this token must be decodable and verifiable; useful only when and/or is true. The maximum age of a token that can be decoded; useful only when is true. The nonce store to use to ensure that this instance is only decoded once. Initializes a new instance of the class. A value indicating whether the data in this instance will be protected against tampering. A value indicating whether the data in this instance will be protected against eavesdropping. A value indicating whether the data in this instance will be GZip'd. The maximum age of a token that can be decoded; useful only when is true. The nonce store to use to ensure that this instance is only decoded once. Serializes the specified message, including compression, encryption, signing, and nonce handling where applicable. The message to serialize. Must not be null. A non-null, non-empty value. Deserializes a , including decompression, decryption, signature and nonce validation where applicable. The instance to initialize with deserialized data. The message that contains the serialized value. Must not be null. The serialized form of the to deserialize. Must not be null or empty. The name of the parameter whose value is to be deserialized. Used for error message generation. Serializes the instance to a buffer. The message. The buffer containing the serialized data. Deserializes the instance from a buffer. The message instance to initialize with data from the buffer. The data buffer. Determines whether the signature on this instance is valid. The signed data. The signature. The symmetric secret handle. null when using an asymmetric algorithm. true if the signature is valid; otherwise, false. Calculates the signature for the data in this verification code. The bytes to sign. The symmetric secret handle. null when using an asymmetric algorithm. The calculated signature. Encrypts the specified value using either the symmetric or asymmetric encryption algorithm as appropriate. The value. Receives the symmetric secret handle. null when using an asymmetric algorithm. The encrypted value. Decrypts the specified value using either the symmetric or asymmetric encryption algorithm as appropriate. The value. The symmetric secret handle. null when using an asymmetric algorithm. The decrypted value. Initializes a new instance of the class. The crypto service provider with the asymmetric key to use for signing or verifying the token. The crypto service provider with the asymmetric key to use for encrypting or decrypting the token. A value indicating whether the data in this instance will be GZip'd. The maximum age of a token that can be decoded; useful only when is true. The nonce store to use to ensure that this instance is only decoded once. Initializes a new instance of the class. The crypto key store used when signing or encrypting. The bucket in which symmetric keys are stored for signing/encrypting data. A value indicating whether the data in this instance will be protected against tampering. A value indicating whether the data in this instance will be protected against eavesdropping. A value indicating whether the data in this instance will be GZip'd. The minimum age. The maximum age of a token that can be decoded; useful only when is true. The nonce store to use to ensure that this instance is only decoded once. Serializes the instance to a buffer. The message. The buffer containing the serialized data. Deserializes the instance from a buffer. The message instance to initialize with data from the buffer. The data buffer. Cached details on the response from a direct web request to a remote party. Details on the incoming response from a direct web request to a remote party. The encoding to use in reading a response that does not declare its own content encoding. Initializes a new instance of the class. Initializes a new instance of the class. The original request URI. The response to initialize from. The network stream is used by this class directly. Initializes a new instance of the class. The request URI. The final URI to respond to the request. The headers. The status code. Type of the content. The content encoding. Returns a that represents the current . A that represents the current . Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Creates a text reader for the response stream. The text reader, initialized for the proper encoding. Gets an offline snapshot version of this instance. The maximum bytes from the response stream to cache. A snapshot version of this instance. If this instance is a creating a snapshot will automatically close and dispose of the underlying response stream. If this instance is a , the result will be the self same instance. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets the type of the content. Gets the content encoding. Gets the URI of the initial request. Gets the URI that finally responded to the request. This can be different from the in cases of redirection during the request. Gets the headers that must be included in the response to the user agent. The headers in this collection are not meant to be a comprehensive list of exactly what should be sent, but are meant to augment whatever headers are generally included in a typical response. Gets the HTTP status code to use in the HTTP response. Gets the body of the HTTP response. A seekable, repeatable response stream. Initializes a new instance of the class. Initializes a new instance of the class. The request URI. The response. The maximum bytes to read. Initializes a new instance of the class. The request URI. The final URI to respond to the request. The headers. The status code. Type of the content. The content encoding. The response stream. Creates a text reader for the response stream. The text reader, initialized for the proper encoding. Gets the body of the response as a string. The entire body of the response. Gets an offline snapshot version of this instance. The maximum bytes from the response stream to cache. A snapshot version of this instance. If this instance is a creating a snapshot will automatically close and dispose of the underlying response stream. If this instance is a , the result will be the self same instance. Sets the response to some string, encoded as UTF-8. The string to set the response to. Caches the network stream and closes it if it is open. The response whose stream is to be cloned. The maximum bytes to cache. The seekable Stream instance that contains a copy of what was returned in the HTTP response. Gets a value indicating whether the cached response stream was truncated to a maximum allowable length. Gets the body of the HTTP response. Gets or sets the cached response stream. Code contract for the class. Manages sending direct messages to a remote party and receiving responses. The content-type used on HTTP POST requests where the POST entity is a URL-encoded series of key=value pairs. The content-type used for JSON serialized objects. The "text/javascript" content-type that some servers return instead of the standard one. The content-type for plain text. The HTML that should be returned to the user agent as part of a 301 Redirect. A string that should be used as the first argument to string.Format, where the {0} should be replaced with the URL to redirect to. The template for indirect messages that require form POST to forward through the user agent. We are intentionally using " instead of the html single quote ' below because the HtmlEncode'd values that we inject will only escape the double quote, so only the double-quote used around these values is safe. The encoding to use when writing out POST entity strings. A default set of XML dictionary reader quotas that are relatively safe from causing unbounded memory consumption. The content-type used on HTTP POST requests where the POST entity is a URL-encoded series of key=value pairs. This includes the character encoding. A list of binding elements in the order they must be applied to outgoing messages. A list of binding elements in the order they must be applied to incoming messages. The default cache of message descriptions to use unless they are customized. This is a perf optimization, so that we don't reflect over every message type every time a channel is constructed. A cache of reflected message types that may be sent or received on this channel. A tool that can figure out what kind of message is being received so it can be deserialized. Backing store for the property. Backing field for the property. Initializes a new instance of the class. A class prepared to analyze incoming messages and indicate what concrete message types can deserialize from it. The binding elements to use in sending and receiving messages. The order they are provided is used for outgoing messgaes, and reversed for incoming messages. Sends an indirect message (either a request or response) or direct message response for transmission to a remote party and ends execution on the current page or handler. The one-way message to send Thrown by ASP.NET in order to prevent additional data from the page being sent to the client and corrupting the response. Requires an HttpContext.Current context. Sends an indirect message (either a request or response) or direct message response for transmission to a remote party and skips most of the remaining ASP.NET request handling pipeline. Not safe to call from ASP.NET web forms. The one-way message to send Requires an HttpContext.Current context. This call is not safe to make from an ASP.NET web form (.aspx file or code-behind) because ASP.NET will render HTML after the protocol message has been sent, which will corrupt the response. Use the method instead for web forms. Prepares an indirect message (either a request or response) or direct message response for transmission to a remote party. The one-way message to send The pending user agent redirect based message to be sent as an HttpResponse. Gets the protocol message embedded in the given HTTP request, if present. The deserialized message, if one is found. Null otherwise. Requires an HttpContext.Current context. Thrown when is null. Gets the protocol message embedded in the given HTTP request, if present. The expected type of the message to be received. The deserialized message, if one is found. Null otherwise. True if the expected message was recognized and deserialized. False otherwise. Requires an HttpContext.Current context. Thrown when is null. Thrown when a request message of an unexpected type is received. Gets the protocol message embedded in the given HTTP request, if present. The expected type of the message to be received. The request to search for an embedded message. The deserialized message, if one is found. Null otherwise. True if the expected message was recognized and deserialized. False otherwise. Thrown when is null. Thrown when a request message of an unexpected type is received. Gets the protocol message embedded in the current HTTP request. The expected type of the message to be received. The deserialized message. Never null. Requires an HttpContext.Current context. Thrown when is null. Thrown if the expected message was not recognized in the response. Gets the protocol message embedded in the given HTTP request. The expected type of the message to be received. The request to search for an embedded message. The deserialized message. Never null. Thrown if the expected message was not recognized in the response. Gets the protocol message that may be embedded in the given HTTP request. The request to search for an embedded message. The deserialized message, if one is found. Null otherwise. Sends a direct message to a remote party and waits for the response. The expected type of the message to be received. The message to send. The remote party's response. Thrown if no message is recognized in the response or an unexpected type of message is received. Sends a direct message to a remote party and waits for the response. The message to send. The remote party's response. Guaranteed to never be null. Thrown if the response does not include a protocol message. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Verifies the integrity and applicability of an incoming message. The message just received. Thrown when the message is somehow invalid. This can be due to tampering, replay attack or expiration, among other things. Prepares an HTTP request that carries a given message. The message to send. The prepared to send the request. This method must be overridden by a derived class, unless the method is overridden and does not require this method. Queues a message for sending in the response stream where the fields are sent in the response stream in querystring style. The message to send as a response. The pending user agent redirect based message to be sent as an HttpResponse. This method implements spec OAuth V1.0 section 5.3. Gets the protocol message that may be in the given HTTP response. The response that is anticipated to contain an protocol message. The deserialized message parts, if found. Null otherwise. Thrown when the response is not valid. This method should NOT be called by derived types except when sending ONE WAY request messages. Prepares a message for transmit by applying signatures, nonces, etc. The message to prepare for sending. Gets the HTTP context for the current HTTP request. An HttpContextBase instance. Gets the current HTTP request being processed. The HttpRequestInfo for the current request. Requires an context. Thrown if HttpContext.Current == null. Checks whether a given HTTP method is expected to include an entity body in its request. The HTTP method. true if the HTTP method is supposed to have an entity; false otherwise. Applies message prescribed HTTP response headers to an outgoing web response. The message. The HTTP response. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Fires the event. The message about to be encoded and sent. Gets the direct response of a direct HTTP request. The web request. The response to the web request. Thrown on network or protocol errors. Submits a direct request message to some remote party and blocks waiting for an immediately reply. The request message. The response message, or null if the response did not carry a message. Typically a deriving channel will override to customize this method's behavior. However in non-HTTP frameworks, such as unit test mocks, it may be appropriate to override this method to eliminate all use of an HTTP transport. Called when receiving a direct response message, before deserialization begins. The HTTP direct response. The newly instantiated message, prior to deserialization. Gets the protocol message that may be embedded in the given HTTP request. The request to search for an embedded message. The deserialized message, if one is found. Null otherwise. Deserializes a dictionary of values into a message. The dictionary of values that were read from an HTTP request or response. Information about where the message was directed. Null for direct response messages. The deserialized message, or null if no message could be recognized in the provided data. Queues an indirect message for transmittal via the user agent. The message to send. The pending user agent redirect based message to be sent as an HttpResponse. Encodes an HTTP response that will instruct the user agent to forward a message to some remote third party using a 301 Redirect GET method. The message to forward. The pre-serialized fields from the message. if set to true the redirect will contain the message payload in the #fragment portion of the URL rather than the ?querystring. The encoded HTTP response. Encodes an HTTP response that will instruct the user agent to forward a message to some remote third party using a form POST method. The message to forward. The pre-serialized fields from the message. The encoded HTTP response. Gets the protocol message that may be in the given HTTP response. The response that is anticipated to contain an protocol message. The deserialized message parts, if found. Null otherwise. Thrown when the response is not valid. Prepares an HTTP request that carries a given message. The message to send. The prepared to send the request. This method must be overridden by a derived class, unless the method is overridden and does not require this method. Queues a message for sending in the response stream where the fields are sent in the response stream in querystring style. The message to send as a response. The pending user agent redirect based message to be sent as an HttpResponse. This method implements spec OAuth V1.0 section 5.3. Serializes the given message as a JSON string. The message to serialize. A JSON string. Deserializes from flat data from a JSON object. A JSON string. The simple "key":"value" pairs from a JSON-encoded object. Prepares a message for transmit by applying signatures, nonces, etc. The message to prepare for sending. This method should NOT be called by derived types except when sending ONE WAY request messages. Prepares to send a request to the Service Provider as the query string in a GET request. The message to be transmitted to the ServiceProvider. The web request ready to send. This method is simply a standard HTTP Get request with the message parts serialized to the query string. This method satisfies OAuth 1.0 section 5.2, item #3. Prepares to send a request to the Service Provider as the query string in a HEAD request. The message to be transmitted to the ServiceProvider. The web request ready to send. This method is simply a standard HTTP HEAD request with the message parts serialized to the query string. This method satisfies OAuth 1.0 section 5.2, item #3. Prepares to send a request to the Service Provider as the payload of a POST request. The message to be transmitted to the ServiceProvider. The web request ready to send. This method is simply a standard HTTP POST request with the message parts serialized to the POST entity with the application/x-www-form-urlencoded content type This method satisfies OAuth 1.0 section 5.2, item #2 and OpenID 2.0 section 4.1.2. Prepares to send a request to the Service Provider as the query string in a PUT request. The message to be transmitted to the ServiceProvider. The web request ready to send. This method is simply a standard HTTP PUT request with the message parts serialized to the query string. Prepares to send a request to the Service Provider as the query string in a DELETE request. The message to be transmitted to the ServiceProvider. The web request ready to send. This method is simply a standard HTTP DELETE request with the message parts serialized to the query string. Sends the given parameters in the entity stream of an HTTP request. The HTTP request. The parameters to send. This method calls and closes the request stream, but does not call . Sends the given parameters in the entity stream of an HTTP request in multi-part format. The HTTP request. The parameters to send. This method calls and closes the request stream, but does not call . Verifies the integrity and applicability of an incoming message. The message just received. Thrown when the message is somehow invalid. This can be due to tampering, replay attack or expiration, among other things. Allows preprocessing and validation of message data before an appropriate message type is selected or deserialized. The received message data. Performs additional processing on an outgoing web request before it is sent to the remote server. The request. Customizes the binding element order for outgoing and incoming messages. The outgoing order. The incoming order. No binding elements can be added or removed from the channel using this method. Only a customized order is allowed. Thrown if a binding element is new or missing in one of the ordered lists. Ensures a consistent and secure set of binding elements and sorts them as necessary for a valid sequence of operations. The binding elements provided to the channel. The properly ordered list of elements. Thrown when the binding elements are incomplete or inconsistent with each other. Puts binding elements in their correct outgoing message processing order. The first protection type to compare. The second protection type to compare. -1 if should be applied to an outgoing message before . 1 if should be applied to an outgoing message before . 0 if it doesn't matter. Verifies that all required message parts are initialized to values prior to sending the message to a remote party. The message to verify. Thrown when any required message part does not have a value. Determines whether a given ordered list of binding elements includes every binding element in this channel exactly once. The list of binding elements to test. true if the given list is a valid description of a binding element ordering; otherwise, false. An event fired whenever a message is about to be encoded and sent. Gets or sets an instance to a that will be used when submitting HTTP requests and waiting for responses. This defaults to a straightforward implementation, but can be set to a mock object for testing purposes. Gets or sets the maximum allowable size for a 301 Redirect response before we send a 200 OK response with a scripted form POST with the parameters instead in order to ensure successfully sending a large payload to another server that might have a maximum allowable size restriction on its GET request. The default value is 2048. Gets or sets the message descriptions. Gets a tool that can figure out what kind of message is being received so it can be deserialized. Gets the binding elements used by this channel, in no particular guaranteed order. Gets the binding elements used by this channel, in the order applied to outgoing messages. Gets the binding elements used by this channel, in the order applied to incoming messages. Gets or sets a value indicating whether this instance is disposed. true if this instance is disposed; otherwise, false. Gets or sets a tool that can figure out what kind of message is being received so it can be deserialized. Gets or sets the cache policy to use for direct message requests. Default is . Gets or sets the XML dictionary reader quotas. The XML dictionary reader quotas. Prevents a default instance of the ChannelContract class from being created. Gets the protocol message that may be in the given HTTP response. The response that is anticipated to contain an protocol message. The deserialized message parts, if found. Null otherwise. Thrown when the response is not valid. Queues a message for sending in the response stream where the fields are sent in the response stream in querystring style. The message to send as a response. The pending user agent redirect based message to be sent as an HttpResponse. This method implements spec V1.0 section 5.3. HMAC-SHA algorithm names that can be passed to the method. The name of the HMAC-SHA1 algorithm. The name of the HMAC-SHA256 algorithm. The name of the HMAC-SHA384 algorithm. The name of the HMAC-SHA512 algorithm. Creates an HMAC-SHA algorithm with the specified name and key. A name from the available choices in the static const members of this class. The secret key used as the HMAC. The HMAC algorithm instance. Well known HTTP headers. The Authorization header, which specifies the credentials that the client presents in order to authenticate itself to the server. The WWW-Authenticate header, which is included in HTTP 401 Unauthorized responses to help the client know which authorization schemes are supported. The Content-Type header, which specifies the MIME type of the accompanying body data. An interface that allows direct request messages to capture the details of the HTTP request they arrived on. The interface that classes must implement to be serialized/deserialized as protocol or extension messages. Checks the message state for conformity to the protocol specification and throws an exception if the message is invalid. Some messages have required fields, or combinations of fields that must relate to each other in specialized ways. After deserializing a message, this method checks the state of the message to see if it conforms to the protocol. Note that this property should not check signatures or perform any state checks outside this scope of this particular message. Thrown if the message is invalid. Gets the version of the protocol or extension this message is prepared to implement. Implementations of this interface should ensure that this property never returns null. Gets the extra, non-standard Protocol parameters included in the message. Implementations of this interface should ensure that this property never returns null. Gets the HTTP headers of the request. May be an empty collection, but must not be null. Contract class for the interface. Checks the message state for conformity to the protocol specification and throws an exception if the message is invalid. Some messages have required fields, or combinations of fields that must relate to each other in specialized ways. After deserializing a message, this method checks the state of the message to see if it conforms to the protocol. Note that this property should not check signatures or perform any state checks outside this scope of this particular message. Thrown if the message is invalid. Gets the HTTP headers of the request. May be an empty collection, but must not be null. Gets the version of the protocol or extension this message is prepared to implement. Implementations of this interface should ensure that this property never returns null. Gets the extra, non-standard Protocol parameters included in the message. Implementations of this interface should ensure that this property never returns null. An interface that allows indirect response messages to specify HTTP transport specific properties. Gets a value indicating whether the payload for the message should be included in the redirect fragment instead of the query string or POST entity. An interface that appears on messages that need to retain a description of what their literal payload was when they were deserialized. Gets or sets the original message parts, before any normalization or default values were assigned. Code contract for the interface. Gets or sets the original message parts, before any normalization or default values were assigned. A set of flags that can control the behavior of an individual web request. Indicates that default behavior is required. Indicates that any response from the remote server, even those with HTTP status codes that indicate errors, should not result in a thrown exception. Even with this flag set, should be thrown when an HTTP protocol error occurs (i.e. timeouts). Indicates that the HTTP request must be completed entirely using SSL (including any redirects). Extension methods for types. Caches the results of enumerating over a given object so that subsequence enumerations don't require interacting with the object a second time. The type of element found in the enumeration. The enumerable object. Either a new enumerable object that caches enumerated results, or the original, object if no caching is necessary to avoid additional CPU work. This is designed for use on the results of generator methods (the ones with yield return in them) so that only those elements in the sequence that are needed are ever generated, while not requiring regeneration of elements that are enumerated over multiple times. This can be a huge performance gain if enumerating multiple times over an expensive generator method. Some enumerable types such as collections, lists, and already-cached generators do not require any (additional) caching, and this method will simply return those objects rather than caching them to avoid double-caching. A wrapper for types and returns a caching from its method. The type of element in the sequence. The results from enumeration of the live object that have been collected thus far. The original generator method or other enumerable object whose contents should only be enumerated once. The enumerator we're using over the generator method's results. The sync object our caching enumerators use when adding a new live generator method result to the cache. Although individual enumerators are not thread-safe, this should be thread safe so that multiple enumerators can be created from it and used from different threads. Initializes a new instance of the EnumerableCache class. The generator. Returns an enumerator that iterates through the collection. A that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. An enumerator that uses cached enumeration results whenever they are available, and caches whatever results it has to pull from the original object. The parent enumeration wrapper class that stores the cached results. The position of this enumerator in the cached list. Initializes a new instance of the EnumeratorCache class. The parent cached enumerable whose GetEnumerator method is calling this constructor. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Advances the enumerator to the next element of the collection. true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. The collection was modified after the enumerator was created. Sets the enumerator to its initial position, which is before the first element in the collection. The collection was modified after the enumerator was created. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. An exception to call out a configuration or runtime failure on the part of the (web) application that is hosting this library. This exception is used rather than for those errors that should never be caught because they indicate a major error in the app itself or its configuration. It is an internal exception to assist in making it uncatchable. Initializes a new instance of the class. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). An interface that allows direct response messages to specify HTTP transport specific properties. Gets the HTTP status code that the direct response should be sent with. Gets the HTTP headers to add to the response. May be an empty collection, but must not be null. An interface that extension messages must implement. Contract class for the interface. Gets the HTTP status code that the direct response should be sent with. Gets the HTTP headers to add to the response. May be an empty collection, but must not be null. Code contract for the interface. Prevents a default instance of the class from being created. Checks the message state for conformity to the protocol specification and throws an exception if the message is invalid. Some messages have required fields, or combinations of fields that must relate to each other in specialized ways. After deserializing a message, this method checks the state of the message to see if it conforms to the protocol. Note that this property should not check signatures or perform any state checks outside this scope of this particular message. Thrown if the message is invalid. Gets the version of the protocol or extension this message is prepared to implement. Gets the extra, non-standard Protocol parameters included in the message. Implementations of this interface should ensure that this property never returns null. Undirected messages that serve as direct responses to direct requests. The interface that classes must implement to be serialized/deserialized as protocol messages. Gets the level of protection this message requires. Gets a value indicating whether this is a direct or indirect message. Gets the originating request message that caused this response to be formed. An empty dictionary. Useful for avoiding memory allocations in creating new dictionaries to represent empty ones. The type of the key. The type of the value. The singleton instance of the empty dictionary. Prevents a default instance of the EmptyDictionary class from being created. Adds an element with the provided key and value to the . The object to use as the key of the element to add. The object to use as the value of the element to add. is null. An element with the same key already exists in the . The is read-only. Determines whether the contains an element with the specified key. The key to locate in the . true if the contains an element with the key; otherwise, false. is null. Removes the element with the specified key from the . The key of the element to remove. true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the original . is null. The is read-only. Gets the value associated with the specified key. The key whose value to get. When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. true if the object that implements contains an element with the specified key; otherwise, false. is null. Adds an item to the . The object to add to the . The is read-only. Removes all items from the . The is read-only. Determines whether the contains a specific value. The object to locate in the . true if is found in the ; otherwise, false. Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. is null. is less than 0. is multidimensional. -or- is equal to or greater than the length of . -or- The number of elements in the source is greater than the available space from to the end of the destination . -or- Type cannot be cast automatically to the type of the destination . Removes the first occurrence of a specific object from the . The object to remove from the . true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . The is read-only. Returns an enumerator that iterates through the collection. A that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets an containing the values in the . An containing the values in the object that implements . Gets the number of elements contained in the . The number of elements contained in the . Gets a value indicating whether the is read-only. true if the is read-only; otherwise, false. Gets an containing the keys of the . An containing the keys of the object that implements . Gets or sets the value with the specified key. The key being read or written. Nothing. It always throws. An enumerator that always generates zero elements. The singleton instance of this empty enumerator. Prevents a default instance of the class from being created. Advances the enumerator to the next element of the collection. true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. The collection was modified after the enumerator was created. Sets the enumerator to its initial position, which is before the first element in the collection. The collection was modified after the enumerator was created. Gets the current element in the collection. The current element in the collection. The enumerator is positioned before the first element of the collection or after the last element. An empty, read-only list. The type the list claims to include. The singleton instance of the empty list. Prevents a default instance of the EmptyList class from being created. Determines the index of a specific item in the . The object to locate in the . The index of if found in the list; otherwise, -1. Inserts an item to the at the specified index. The zero-based index at which should be inserted. The object to insert into the . is not a valid index in the . The is read-only. Removes the item at the specified index. The zero-based index of the item to remove. is not a valid index in the . The is read-only. Adds an item to the . The object to add to the . The is read-only. Removes all items from the . The is read-only. Determines whether the contains a specific value. The object to locate in the . true if is found in the ; otherwise, false. Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. is null. is less than 0. is multidimensional. -or- is equal to or greater than the length of . -or- The number of elements in the source is greater than the available space from to the end of the destination . -or- Type cannot be cast automatically to the type of the destination . Removes the first occurrence of a specific object from the . The object to remove from the . true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . The is read-only. Returns an enumerator that iterates through the collection. A that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets the number of elements contained in the . The number of elements contained in the . Gets a value indicating whether the is read-only. true if the is read-only; otherwise, false. Gets or sets the at the specified index. The index of the element in the list to change. Nothing. It always throws. A collection of error checking and reporting methods. Wraps an exception in a new . The inner exception to wrap. The error message for the outer exception. The string formatting arguments, if any. The newly constructed (unthrown) exception. Throws an internal error exception. The error message. Nothing. But included here so callers can "throw" this method for C# safety. Always thrown. Checks a condition and throws an internal error exception if it evaluates to false. The condition to check. The message to include in the exception, if created. Thrown if evaluates to false. Checks a condition and throws an internal error exception if it evaluates to false. The condition to check. The message to include in the exception, if created. The formatting arguments. Thrown if evaluates to false. Checks a condition and throws an if it evaluates to false. The condition to check. The message to include in the exception, if created. Thrown if evaluates to false. Checks a condition and throws a if it evaluates to false. The condition to check. The message to include in the exception, if created. Thrown if evaluates to false. Checks a condition and throws a if it evaluates to false. The condition to check. The message to include in the exception, if created. The string formatting arguments for . Thrown if evaluates to false. Checks a condition and throws an if it evaluates to false. The condition to check. The message to include in the exception, if created. The formatting arguments. Thrown if evaluates to false. Throws a if some evaluates to false. True to do nothing; false to throw the exception. The error message for the exception. The string formatting arguments, if any. Thrown if evaluates to false. Throws a if some evaluates to false. True to do nothing; false to throw the exception. The message being processed that would be responsible for the exception if thrown. The error message for the exception. The string formatting arguments, if any. Thrown if evaluates to false. Throws a if some evaluates to false. True to do nothing; false to throw the exception. The error message for the exception. The string formatting arguments, if any. Thrown if evaluates to false. Throws a . The message to set in the exception. The formatting arguments of the message. An InternalErrorException, which may be "thrown" by the caller in order to satisfy C# rules to show that code will never be reached, but no value actually is ever returned because this method guarantees to throw. Always thrown. Throws a . The message for the exception. The string formatting arguments for . Nothing. It's just here so the caller can throw this method for C# compilation check. Throws a if some condition is false. The expression to evaluate. A value of false will cause the exception to be thrown. The message for the exception. The string formatting arguments for . Thrown when is false. Verifies something about the argument supplied to a method. The condition that must evaluate to true to avoid an exception. The message to use in the exception if the condition is false. The string formatting arguments, if any. Thrown if evaluates to false. Throws an . Name of the parameter. The message to use in the exception if the condition is false. The string formatting arguments, if any. Never returns anything. It always throws. Verifies something about the argument supplied to a method. The condition that must evaluate to true to avoid an exception. Name of the parameter. The message to use in the exception if the condition is false. The string formatting arguments, if any. Thrown if evaluates to false. Verifies that some given value is not null. The value to check. Name of the parameter, which will be used in the , if thrown. Thrown if is null. Verifies that some string is not null and has non-zero length. The value to check. Name of the parameter, which will be used in the , if thrown. Thrown if is null. Thrown if has zero length. Verifies that != null. Thrown if == null Obtains a value from the dictionary if possible, or throws a if it's missing. The type of key in the dictionary. The type of value in the dictionary. The dictionary. The key to use to look up the value. The message to claim is invalid if the key cannot be found. The value for the given key. An interface that messages wishing to perform custom serialization/deserialization may implement to be notified of events. Called when the message is about to be transmitted, before it passes through the channel binding elements. Called when the message has been received, after it passes through the channel binding elements. Code contract for the class. Creates a text reader for the response stream. The text reader, initialized for the proper encoding. Gets an offline snapshot version of this instance. The maximum bytes from the response stream to cache. A snapshot version of this instance. If this instance is a creating a snapshot will automatically close and dispose of the underlying response stream. If this instance is a , the result will be the self same instance. Gets the body of the HTTP response. A protocol message that supports adding extensions to the payload for transmission. Gets the list of extensions that are included with this message. Implementations of this interface should ensure that this property never returns null. Code contract for the interface. Prevents a default instance of the class from being created. Checks the message state for conformity to the protocol specification and throws an exception if the message is invalid. Some messages have required fields, or combinations of fields that must relate to each other in specialized ways. After deserializing a message, this method checks the state of the message to see if it conforms to the protocol. Note that this property should not check signatures or perform any state checks outside this scope of this particular message. Thrown if the message is invalid. Gets the list of extensions that are included with this message. Implementations of this interface should ensure that this property never returns null. Gets the level of protection this message requires. Gets a value indicating whether this is a direct or indirect message. Gets the version of the protocol or extension this message is prepared to implement. Implementations of this interface should ensure that this property never returns null. Gets the extra, non-standard Protocol parameters included in the message. Implementations of this interface should ensure that this property never returns null. An internal exception to throw if an internal error within the library requires an abort of the operation. This exception is internal to prevent clients of the library from catching what is really an unexpected, potentially unrecoverable exception. Initializes a new instance of the class. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). An interface implemented by -derived types that support binary serialization. Serializes the instance to the specified stream. The stream. Initializes the fields on this instance from the specified stream. The stream. Code Contract for the interface. Serializes the instance to the specified stream. The stream. Initializes the fields on this instance from the specified stream. The stream. A KeyedCollection whose item -> key transform is provided via a delegate to its constructor, and null items are disallowed. The type of the key. The type of the item. The delegate that returns a key for the given item. Initializes a new instance of the KeyedCollectionDelegate class. The delegate that gets the key for a given item. When implemented in a derived class, extracts the key from the specified element. The element from which to extract the key. The key for the specified element. Represents a single part in a HTTP multipart POST request. The "Content-Disposition" string. The two-character \r\n newline character sequence to use. Initializes a new instance of the class. The content disposition of the part. Creates a part that represents a simple form field. The name of the form field. The value. The constructed part. Creates a part that represents a file attachment. The name of the form field. The path to the file to send. Type of the content in HTTP Content-Type format. The constructed part. Creates a part that represents a file attachment. The name of the form field. Name of the file as the server should see it. Type of the content in HTTP Content-Type format. The content of the file. The constructed part. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Serializes the part to a stream. The stream writer. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets or sets the content disposition. The content disposition. Gets the key=value attributes that appear on the same line as the Content-Disposition. The content attributes. Gets the headers that appear on subsequent lines after the Content-Disposition. Gets or sets the content of the part. Gets the length of this entire part. Useful for calculating the ContentLength HTTP header to send before actually serializing the content. A live network HTTP response The network response object, used to initialize this instance, that still needs to be closed if applicable. The incoming network response stream. A value indicating whether a stream reader has already been created on this instance. Initializes a new instance of the class. The request URI. The response. Creates a text reader for the response stream. The text reader, initialized for the proper encoding. Gets an offline snapshot version of this instance. The maximum bytes from the response stream to cache. A snapshot version of this instance. If this instance is a creating a snapshot will automatically close and dispose of the underlying response stream. If this instance is a , the result will be the self same instance. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets the body of the HTTP response. An ASP.NET MVC structure to represent the response to send to the user agent when the controller has finished its work. The outgoing web response to send when the ActionResult is executed. Initializes a new instance of the class. The response. Enables processing of the result of an action method by a custom type that inherits from . The context in which to set the response. An exception to represent errors in the local or remote implementation of the protocol that includes the response message that should be returned to the HTTP client to comply with the protocol specification. An exception to represent errors in the local or remote implementation of the protocol. Initializes a new instance of the class. Initializes a new instance of the class. A message describing the specific error the occurred or was detected. Initializes a new instance of the class. A message describing the specific error the occurred or was detected. The inner exception to include. Initializes a new instance of the class such that it can be sent as a protocol message response to a remote caller. The human-readable exception message. The message that was the cause of the exception. May be null. The inner exception to include. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. Gets the message that caused the exception. The channel that produced the error response message, to be used in constructing the actual HTTP response. Initializes a new instance of the class such that it can be sent as a protocol message response to a remote caller. The channel to use when encoding the response message. The message to send back to the HTTP client. The message that was the cause of the exception. May be null. The inner exception. The message for the exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. Creates the HTTP response to forward to the client to report the error. The HTTP response. Gets the protocol message to send back to the client to report the error. Code contract for the type. Initializes a new instance of the class. Encodes the specified value. The value. Guaranteed to never be null. The in string form, ready for message transport. Decodes the specified value. The string value carried by the transport. Guaranteed to never be null, although it may be empty. The deserialized form of the given string. Thrown when the string value given cannot be decoded into the required object type. A message part encoder that has a special encoding for a null value. Gets the string representation to include in a serialized message when the message part has a null value. An interface describing how various objects can be serialized and deserialized between their object and string forms. Implementations of this interface must include a default constructor and must be thread-safe. Encodes the specified value as the original value that was formerly decoded. The value. Guaranteed to never be null. The in string form, ready for message transport. A cache of instances. A dictionary of reflected message types and the generated reflection information. Initializes a new instance of the class. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets a instance prepared for the given message type. A type that implements . The protocol version of the message. A instance. Gets a instance prepared for the given message type. The message for which a should be obtained. A instance. Gets the dictionary that provides read/write access to a message. The message. The dictionary. Gets the dictionary that provides read/write access to a message. The message. A value indicating whether this message dictionary will retrieve original values instead of normalized ones. The dictionary. A struct used as the key to bundle message type and version. Backing store for the property. Backing store for the property. Initializes a new instance of the struct. Type of the message. The message version. Implements the operator ==. The first object to compare. The second object to compare. The result of the operator. Implements the operator !=. The first object to compare. The second object to compare. The result of the operator. Indicates whether this instance and a specified object are equal. Another object to compare to. true if and this instance are the same type and represent the same value; otherwise, false. Returns the hash code for this instance. A 32-bit signed integer that is the hash code for this instance. Gets the message type. Gets the message version. Allows a custom class or struct to be serializable between itself and a string representation. Initializes a new instance of the class. The implementing type to use for serializing this type. Gets the default encoder to use for the declaring class. A message factory that automatically selects the message type based on the incoming data. A tool to analyze an incoming message to figure out what concrete class is designed to deserialize it and instantiates that class. Analyzes an incoming request message payload to discover what kind of message is embedded in it and returns the type, or null if no match is found. The intended or actual recipient of the request message. The name/value pairs that make up the message payload. A newly instantiated -derived object that this message can deserialize to. Null if the request isn't recognized as a valid protocol message. Analyzes an incoming request message payload to discover what kind of message is embedded in it and returns the type, or null if no match is found. The message that was sent as a request that resulted in the response. The name/value pairs that make up the message payload. A newly instantiated -derived object that this message can deserialize to. Null if the request isn't recognized as a valid protocol message. The request message types and their constructors to use for instantiating the messages. The response message types and their constructors to use for instantiating the messages. The value is a dictionary, whose key is the type of the constructor's lone parameter. Initializes a new instance of the class. Adds message types to the set that this factory can create. The message types that this factory may instantiate. Analyzes an incoming request message payload to discover what kind of message is embedded in it and returns the type, or null if no match is found. The intended or actual recipient of the request message. The name/value pairs that make up the message payload. A newly instantiated -derived object that this message can deserialize to. Null if the request isn't recognized as a valid protocol message. Analyzes an incoming request message payload to discover what kind of message is embedded in it and returns the type, or null if no match is found. The message that was sent as a request that resulted in the response. The name/value pairs that make up the message payload. A newly instantiated -derived object that this message can deserialize to. Null if the request isn't recognized as a valid protocol message. Gets the message type that best fits the given incoming request data. The recipient of the incoming data. Typically not used, but included just in case. The data of the incoming message. The message type that matches the incoming data; or null if no match. May be thrown if the incoming data is ambiguous. Gets the message type that best fits the given incoming direct response data. The request message that prompted the response data. The data of the incoming message. The message type that matches the incoming data; or null if no match. May be thrown if the incoming data is ambiguous. Instantiates the given request message type. The message description. The recipient. The instantiated message. Never null. Instantiates the given request message type. The message description. The request that resulted in this response. The instantiated message. Never null. Gets the hierarchical distance between a type and a type it derives from or implements. The base type or interface. The concrete class that implements the . The distance between the two types. 0 if the types are equivalent, 1 if the type immediately derives from or implements the base type, or progressively higher integers. Counts how many strings are in the intersection of two collections. The first collection. The second collection. The string comparison method to use. A non-negative integer no greater than the count of elements in the smallest collection. Finds constructors for response messages that take a given request message type. The message description. Type of the request message. A sequence of matching constructors. Contract class for the IDataBagFormatter interface. The type of DataBag to serialize. Prevents a default instance of the class from being created. Serializes the specified message. The message to serialize. Must not be null. A non-null, non-empty value. Deserializes a . The instance to deserialize into The message that contains the serialized value. Must not be nulll. The serialized form of the to deserialize. Must not be null or empty. Name of the message part whose value is to be deserialized. Used for exception messages. A serializer for -derived types The DataBag-derived type that is to be serialized/deserialized. Initializes a new instance of the class. The crypto service provider with the asymmetric key to use for signing or verifying the token. The crypto service provider with the asymmetric key to use for encrypting or decrypting the token. A value indicating whether the data in this instance will be GZip'd. The maximum age of a token that can be decoded; useful only when is true. The nonce store to use to ensure that this instance is only decoded once. Initializes a new instance of the class. The crypto key store used when signing or encrypting. The bucket in which symmetric keys are stored for signing/encrypting data. A value indicating whether the data in this instance will be protected against tampering. A value indicating whether the data in this instance will be protected against eavesdropping. A value indicating whether the data in this instance will be GZip'd. The minimum age. The maximum age of a token that can be decoded; useful only when is true. The nonce store to use to ensure that this instance is only decoded once. Serializes the instance to a buffer. The message. The buffer containing the serialized data. Deserializes the instance from a buffer. The message instance to initialize with data from the buffer. The data buffer. A channel that uses the standard message factory. The message types receivable by this channel. The protocol versions supported by this channel. Initializes a new instance of the class. The message types that might be encountered. All the possible message versions that might be encountered. The binding elements to use in sending and receiving messages. The order they are provided is used for outgoing messgaes, and reversed for incoming messages. Generates all the message descriptions for a given set of message types and versions. The message types. The message versions. The cache to use when obtaining the message descriptions. The generated/retrieved message descriptions. Gets or sets a tool that can figure out what kind of message is being received so it can be deserialized. Gets or sets the message descriptions. Gets or sets a tool that can figure out what kind of message is being received so it can be deserialized. A collection of message parts that will be serialized into a single string, to be set into a larger message. The default version for DataBags. The backing field for the property. A dictionary to contain extra message data. Initializes a new instance of the class. Initializes a new instance of the class. The DataBag version. Checks the message state for conformity to the protocol specification and throws an exception if the message is invalid. Some messages have required fields, or combinations of fields that must relate to each other in specialized ways. After deserializing a message, this method checks the state of the message to see if it conforms to the protocol. Note that this property should not check signatures or perform any state checks outside this scope of this particular message. Thrown if the message is invalid. Checks the message state for conformity to the protocol specification and throws an exception if the message is invalid. Some messages have required fields, or combinations of fields that must relate to each other in specialized ways. After deserializing a message, this method checks the state of the message to see if it conforms to the protocol. Note that this property should not check signatures or perform any state checks outside this scope of this particular message. Thrown if the message is invalid. Gets the version of the protocol or extension this message is prepared to implement. Implementations of this interface should ensure that this property never returns null. Gets the extra, non-standard Protocol parameters included in the message. Implementations of this interface should ensure that this property never returns null. Gets or sets the nonce. The nonce. Gets or sets the UTC creation date of this token. The UTC creation date. Gets or sets the signature. The signature. Gets or sets the message that delivered this DataBag instance to this host. Gets the type of this instance. The type of the bag. This ensures that one token cannot be misused as another kind of token. Translates between a and the number of seconds between it and 1/1/1970 12 AM The reference date and time for calculating time stamps. Initializes a new instance of the class. Encodes the specified value. The value. Guaranteed to never be null. The in string form, ready for message transport. Decodes the specified value. The string value carried by the transport. Guaranteed to never be null, although it may be empty. The deserialized form of the given string. Thrown when the string value given cannot be decoded into the required object type. The interface that classes must implement to be serialized/deserialized as protocol or extension messages that uses POST multi-part data for binary content. Implemented by messages that have explicit recipients (direct requests and all indirect messages). Gets the preferred method of transport for the message. For indirect messages this will likely be GET+POST, which both can be simulated in the user agent: the GET with a simple 301 Redirect, and the POST with an HTML form in the response with javascript to automate submission. Gets the URL of the intended receiver of this message. Gets the parts of the message that carry binary data. A list of parts. Never null. Gets a value indicating whether this message should be sent as multi-part POST. The contract class for the interface. Prevents a default instance of the class from being created. Checks the message state for conformity to the protocol specification and throws an exception if the message is invalid. Some messages have required fields, or combinations of fields that must relate to each other in specialized ways. After deserializing a message, this method checks the state of the message to see if it conforms to the protocol. Note that this property should not check signatures or perform any state checks outside this scope of this particular message. Thrown if the message is invalid. Gets the parts of the message that carry binary data. A list of parts. Never null. Gets a value indicating whether this message should be sent as multi-part POST. Gets the version of the protocol or extension this message is prepared to implement. Implementations of this interface should ensure that this property never returns null. Gets the extra, non-standard Protocol parameters included in the message. Implementations of this interface should ensure that this property never returns null. Gets the preferred method of transport for the message. For indirect messages this will likely be GET+POST, which both can be simulated in the user agent: the GET with a simple 301 Redirect, and the POST with an HTML form in the response with javascript to automate submission. Gets the URL of the intended receiver of this message. Gets the level of protection this message requires. Gets a value indicating whether this is a direct or indirect message. The data packet sent with Channel events. Initializes a new instance of the class. The message behind the fired event.. Gets the message that caused the event to fire. An in-memory nonce store. Useful for single-server web applications. NOT for web farms. Describes the contract a nonce store must fulfill. Stores a given nonce and timestamp. The context, or namespace, within which the must be unique. The context SHOULD be treated as case-sensitive. The value will never be null but may be the empty string. A series of random characters. The UTC timestamp that together with the nonce string make it unique within the given . The timestamp may also be used by the data store to clear out old nonces. True if the context+nonce+timestamp (combination) was not previously in the database. False if the nonce was stored previously with the same timestamp and context. The nonce must be stored for no less than the maximum time window a message may be processed within before being discarded as an expired message. This maximum message age can be looked up via the property, accessible via the property. How frequently we should take time to clear out old nonces. The maximum age a message can be before it is discarded. This is useful for knowing how long used nonces must be retained. A list of the consumed nonces. A lock object used around accesses to the field. Where we're currently at in our periodic nonce cleaning cycle. Initializes a new instance of the class. Initializes a new instance of the class. The maximum age a message can be before it is discarded. Stores a given nonce and timestamp. The context, or namespace, within which the must be unique. A series of random characters. The timestamp that together with the nonce string make it unique. The timestamp may also be used by the data store to clear out old nonces. True if the nonce+timestamp (combination) was not previously in the database. False if the nonce was stored previously with the same timestamp. The nonce must be stored for no less than the maximum time window a message may be processed within before being discarded as an expired message. If the binding element is applicable to your channel, this expiration window is retrieved or set using the property. Clears consumed nonces from the cache that are so old they would be rejected if replayed because it is expired. A contract for handling. Implementations of this interface must be thread safe. Determines whether this instance can support the specified options. The set of options that might be given in a subsequent web request. true if this instance can support the specified options; otherwise, false. Prepares an that contains an POST entity for sending the entity. The that should contain the entity. The stream the caller should write out the entity data to. Thrown for any network error. The caller should have set the and any other appropriate properties before calling this method. Callers must close and dispose of the request stream when they are done writing to it to avoid taking up the connection too long and causing long waits on subsequent requests. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. Prepares an that contains an POST entity for sending the entity. The that should contain the entity. The options to apply to this web request. The stream the caller should write out the entity data to. Thrown for any network error. The caller should have set the and any other appropriate properties before calling this method. Callers must close and dispose of the request stream when they are done writing to it to avoid taking up the connection too long and causing long waits on subsequent requests. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. Processes an and converts the to a instance. The to handle. An instance of describing the response. Thrown for any network error. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. The value, if set, should be Closed before throwing. Processes an and converts the to a instance. The to handle. The options to apply to this web request. An instance of describing the response. Thrown for any network error. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. The value, if set, should be Closed before throwing. Code contract for the type. Determines whether this instance can support the specified options. The set of options that might be given in a subsequent web request. true if this instance can support the specified options; otherwise, false. Prepares an that contains an POST entity for sending the entity. The that should contain the entity. The stream the caller should write out the entity data to. Thrown for any network error. The caller should have set the and any other appropriate properties before calling this method. Callers must close and dispose of the request stream when they are done writing to it to avoid taking up the connection too long and causing long waits on subsequent requests. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. Prepares an that contains an POST entity for sending the entity. The that should contain the entity. The options to apply to this web request. The stream the caller should write out the entity data to. Thrown for any network error. The caller should have set the and any other appropriate properties before calling this method. Callers must close and dispose of the request stream when they are done writing to it to avoid taking up the connection too long and causing long waits on subsequent requests. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. Processes an and converts the to a instance. The to handle. An instance of describing the response. Thrown for any network error. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. The value, if set, should be Closed before throwing. Processes an and converts the to a instance. The to handle. The options to apply to this web request. An instance of describing the response. Thrown for any network error. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. The value, if set, should be Closed before throwing. A binding element that checks/verifies a nonce message part. An interface that must be implemented by message transforms/validators in order to be included in the channel stack. Prepares a message for sending based on the rules of this channel binding element. The message to prepare for sending. The protections (if any) that this binding element applied to the message. Null if this binding element did not even apply to this binding element. Implementations that provide message protection must honor the properties where applicable. Performs any transformation on an incoming message that may be necessary and/or validates an incoming message based on the rules of this channel binding element. The incoming message to process. The protections (if any) that this binding element applied to the message. Null if this binding element did not even apply to this binding element. Thrown when the binding element rules indicate that this message is invalid and should NOT be processed. Implementations that provide message protection must honor the properties where applicable. Gets or sets the channel that this binding element belongs to. This property is set by the channel when it is first constructed. Gets the protection commonly offered (if any) by this binding element. This value is used to assist in sorting binding elements in the channel stack. These are the characters that may be chosen from when forming a random nonce. The persistent store for nonces received. The length of generated nonces. Initializes a new instance of the class. The store where nonces will be persisted and checked. Initializes a new instance of the class. The store where nonces will be persisted and checked. A value indicating whether zero-length nonces will be allowed. Applies a nonce to the message. The message to apply replay protection to. The protections (if any) that this binding element applied to the message. Null if this binding element did not even apply to this binding element. Verifies that the nonce in an incoming message has not been seen before. The incoming message. The protections (if any) that this binding element applied to the message. Null if this binding element did not even apply to this binding element. Thrown when the nonce check revealed a replayed message. Generates a string of random characters for use as a nonce. The nonce string. Gets the protection that this binding element provides messages. Gets or sets the channel that this binding element belongs to. Gets or sets the strength of the nonce, which is measured by the number of nonces that could theoretically be generated. The strength of the nonce is equal to the number of characters that might appear in the nonce to the power of the length of the nonce. Gets or sets a value indicating whether empty nonces are allowed. Default is false. Applied to fields and properties that form a key/value in a protocol message. The overridden name to use as the serialized name for the property. Initializes a new instance of the class. Initializes a new instance of the class. A special name to give the value of this member in the serialized message. When null or empty, the name of the member will be used in the serialized message. Gets the name of the serialized form of this member in the message. Gets or sets the level of protection required by this member in the serialized message. Message part protection must be provided and verified by the channel binding element(s) that provide security. Gets or sets a value indicating whether this member is a required part of the serialized message. Gets or sets a value indicating whether the string value is allowed to be empty in the serialized message. Default is true. Gets or sets an IMessagePartEncoder custom encoder to use to translate the applied member to and from a string. Gets or sets the minimum version of the protocol this attribute applies to and overrides any attributes with lower values for this property. Defaults to 0.0. Gets or sets the maximum version of the protocol this attribute applies to. Defaults to int.MaxValue for the major version number. Specifying on another attribute on the same member automatically turns this attribute off. This property should only be set when a property is totally dropped from a newer version of the protocol. Gets or sets the minimum version of the protocol this attribute applies to and overrides any attributes with lower values for this property. Defaults to 0.0. Gets or sets the maximum version of the protocol this attribute applies to. Defaults to int.MaxValue for the major version number. Specifying on another attribute on the same member automatically turns this attribute off. This property should only be set when a property is totally dropped from a newer version of the protocol. Categorizes the various types of channel binding elements so they can be properly ordered. The order of these enum values is significant. Each successive value requires the protection offered by all the previous values in order to be reliable. For example, message expiration is meaningless without tamper protection to prevent a user from changing the timestamp on a message. No protection. A binding element that signs a message before sending and validates its signature upon receiving. A binding element that enforces a maximum message age between sending and processing on the receiving side. A binding element that prepares messages for replay detection and detects replayed messages on the receiving side. All forms of protection together. Code Contract for the interface. Prevents a default instance of the class from being created. Prepares a message for sending based on the rules of this channel binding element. The message to prepare for sending. The protections (if any) that this binding element applied to the message. Null if this binding element did not even apply to this binding element. Implementations that provide message protection must honor the properties where applicable. Performs any transformation on an incoming message that may be necessary and/or validates an incoming message based on the rules of this channel binding element. The incoming message to process. The protections (if any) that this binding element applied to the message. Null if this binding element did not even apply to this binding element. Thrown when the binding element rules indicate that this message is invalid and should NOT be processed. Implementations that provide message protection must honor the properties where applicable. Gets or sets the channel that this binding element belongs to. This property is set by the channel when it is first constructed. Gets the protection commonly offered (if any) by this binding element. This value is used to assist in sorting binding elements in the channel stack. An exception thrown when a message is received for the second time, signalling a possible replay attack. Initializes a new instance of the class. The replayed message. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. An exception thrown when a message is received that exceeds the maximum message age limit. Initializes a new instance of the class. The date the message expired. The expired message. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. An exception thrown when a signed message does not pass signature validation. Initializes a new instance of the class. The message with the invalid signature. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. The contract a message that has an allowable time window for processing must implement. All replay-protected messages must also be set to expire so the nonces do not have to be stored indefinitely. The contract a message that has an allowable time window for processing must implement. All expiring messages must also be signed to prevent tampering with the creation date. Gets or sets the UTC date/time the message was originally sent onto the network. The property setter should ensure a UTC date/time, and throw an exception if this is not possible. Thrown when a DateTime that cannot be converted to UTC is set. Gets the context within which the nonce must be unique. The value of this property must be a value assigned by the nonce consumer to represent the entity that generated the nonce. The value must never be null but may be the empty string. This value is treated as case-sensitive. Gets or sets the nonce that will protect the message from replay attacks. A property store of details of an incoming HTTP request. This serves a very similar purpose to , except that ASP.NET does not let us fully initialize that class, so we have to write one of our one. The HTTP verb in the request. The full request URL. The HTTP headers. The variables defined in the query part of the URL. The POSTed form variables. The server variables collection. Initializes a new instance of the class. The request. The request URI. Initializes a new instance of the class. The HTTP method. The request URI. The form variables. The HTTP headers. Initializes a new instance of the class. Details on the incoming HTTP request. Initializes a new instance of the class. The request. Initializes a new instance of the class. The HTTP method. The request URI. The headers. The input stream. Creates an instance that describes the specified HTTP request. The request. The request URI. An instance of . Creates an instance that describes the specified HTTP request. The listener request. An instance of . Creates an instance that describes the specified HTTP request. The HTTP request. An instance of . Creates an instance that describes the specified HTTP request. The HTTP method. The request URI. The form variables. The HTTP headers. An instance of . Creates an instance that describes the specified HTTP request. The HTTP method. The request URI. The headers. The input stream. An instance of . Reads name=value pairs from the POSTed form entity when the HTTP headers indicate that that is the payload of the entity. The HTTP method. The headers. A function that returns the input stream. The non-null collection of form variables. Adds HTTP headers to a . The collection to be modified with added entries. The collection to read from. Gets the HTTP method. Gets the headers. Gets the URL. Gets the raw URL. Gets the form. Gets the query string. Gets the server variables. Code contract for the interface. Prevents a default instance of the class from being created. Analyzes an incoming request message payload to discover what kind of message is embedded in it and returns the type, or null if no match is found. The intended or actual recipient of the request message. The name/value pairs that make up the message payload. A newly instantiated -derived object that this message can deserialize to. Null if the request isn't recognized as a valid protocol message. Analyzes an incoming request message payload to discover what kind of message is embedded in it and returns the type, or null if no match is found. The message that was sent as a request that resulted in the response. The name/value pairs that make up the message payload. A newly instantiated -derived object that this message can deserialize to. Null if the request isn't recognized as a valid protocol message. The contract a message that is signed must implement. This type might have appeared in the DotNetOpenAuth.Messaging.Bindings namespace since it is only used by types in that namespace, but all those types are internal and this is the only one that was public. Gets or sets the message signature. Serializes/deserializes OAuth messages for/from transit. The specific -derived type that will be serialized and deserialized using this class. Initializes a new instance of the MessageSerializer class. The specific -derived type that will be serialized and deserialized using this class. Creates or reuses a message serializer for a given message type. The type of message that will be serialized/deserialized. A message serializer for the given message type. Reads JSON as a flat dictionary into a message. The message dictionary to fill with the JSON-deserialized data. The JSON reader. Reads the data from a message instance and writes an XML/JSON encoding of it. The message to be serialized. The writer to use for the serialized form. Use to create the instance capable of emitting JSON. Reads XML/JSON into a message dictionary. The message to deserialize into. The XML/JSON to read into the message. Thrown when protocol rules are broken by the incoming message. Use to create the instance capable of reading JSON. Reads the data from a message instance and returns a series of name=value pairs for the fields that must be included in the message. The message to be serialized. The dictionary of values to send for the message. Reads name=value pairs into a message. The name=value pairs that were read in from the transport. The message to deserialize into. Thrown when protocol rules are broken by the incoming message. Determines whether the specified type is numeric. The type to test. true if the specified type is numeric; otherwise, false. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Argument's {0}.{1} property is required but is empty or null.. Looks up a localized string similar to Unable to send all message data because some of it requires multi-part POST, but IMessageWithBinaryData.SendAsMultipart was false.. Looks up a localized string similar to HttpContext.Current is null. There must be an ASP.NET request in process for this operation to succeed.. Looks up a localized string similar to DataContractSerializer could not be initialized on message type {0}. Is it missing a [DataContract] attribute?. Looks up a localized string similar to DataContractSerializer could not be initialized on message type {0} because the DataContractAttribute.Namespace property is not set.. Looks up a localized string similar to Decoding failed due to data corruption.. Looks up a localized string similar to An instance of type {0} was expected, but received unexpected derived type {1}.. Looks up a localized string similar to The directed message's Recipient property must not be null.. Looks up a localized string similar to The given set of options is not supported by this web request handler.. Looks up a localized string similar to Unable to instantiate the message part encoder/decoder type {0}.. Looks up a localized string similar to Error while deserializing message {0}.. Looks up a localized string similar to Error occurred while sending a direct message or getting the response.. Looks up a localized string similar to This exception was not constructed with a root request message that caused it.. Looks up a localized string similar to This exception must be instantiated with a recipient that will receive the error message, or a direct request message instance that this exception will respond to.. Looks up a localized string similar to Expected {0} message but received no recognizable message.. Looks up a localized string similar to The message part {0} was expected in the {1} message but was not found.. Looks up a localized string similar to The message expired at {0} and it is now {1}.. Looks up a localized string similar to Failed to add extra parameter '{0}' with value '{1}'.. Looks up a localized string similar to At least one of GET or POST flags must be present.. Looks up a localized string similar to This method requires a current HttpContext. Alternatively, use an overload of this method that allows you to pass in information without an HttpContext.. Looks up a localized string similar to Messages that indicate indirect transport must implement the {0} interface.. Looks up a localized string similar to Insecure web request for '{0}' aborted due to security requirements demanding HTTPS.. Looks up a localized string similar to The {0} message required protections {{{1}}} but the channel could only apply {{{2}}}.. Looks up a localized string similar to The customized binding element ordering is invalid.. Looks up a localized string similar to Some part(s) of the message have invalid values: {0}. Looks up a localized string similar to The incoming message had an invalid or missing nonce.. Looks up a localized string similar to An item with the same key has already been added.. Looks up a localized string similar to Message too large for a HTTP GET, and HTTP POST is not allowed for this message type.. Looks up a localized string similar to The {0} message does not support extensions.. Looks up a localized string similar to The value for {0}.{1} on member {1} was expected to derive from {2} but was {3}.. Looks up a localized string similar to Error while reading message '{0}' parameter '{1}' with value '{2}'.. Looks up a localized string similar to Message parameter '{0}' with value '{1}' failed to base64 decode.. Looks up a localized string similar to Error while preparing message '{0}' parameter '{1}' for sending.. Looks up a localized string similar to This message has a timestamp of {0}, which is beyond the allowable clock skew for in the future.. Looks up a localized string similar to Missing decryption key for bucket "{0}" handle "{1}". Looks up a localized string similar to A non-empty string was expected.. Looks up a localized string similar to A message response is already queued for sending in the response stream.. Looks up a localized string similar to This message has already been processed. This could indicate a replay attack in progress.. Looks up a localized string similar to This channel does not support replay protection.. Looks up a localized string similar to The following message parts had constant value requirements that were unsatisfied: {0}. Looks up a localized string similar to The following required non-empty parameters were empty in the {0} message: {1}. Looks up a localized string similar to The following required parameters were missing from the {0} message: {1}. Looks up a localized string similar to The binding element offering the {0} protection requires other protection that is not provided.. Looks up a localized string similar to The list is empty.. Looks up a localized string similar to The list contains a null element.. Looks up a localized string similar to An HttpContext.Current.Session object is required.. Looks up a localized string similar to Message signature was incorrect.. Looks up a localized string similar to This channel does not support signing messages. To support signing messages, a derived Channel type must override the Sign and IsSignatureValid methods.. Looks up a localized string similar to This message factory does not support message type(s): {0}. Looks up a localized string similar to The stream must have a known length.. Looks up a localized string similar to The stream's CanRead property returned false.. Looks up a localized string similar to The stream's CanWrite property returned false.. Looks up a localized string similar to Expected at most 1 binding element to apply the {0} protection, but more than one applied.. Looks up a localized string similar to The maximum allowable number of redirects were exceeded while requesting '{0}'.. Looks up a localized string similar to Unexpected buffer length.. Looks up a localized string similar to The array must not be empty.. Looks up a localized string similar to The empty string is not allowed.. Looks up a localized string similar to Expected direct response to use HTTP status code {0} but was {1} instead.. Looks up a localized string similar to Message parameter '{0}' had unexpected value '{1}'.. Looks up a localized string similar to Expected message {0} parameter '{1}' to have value '{2}' but had '{3}' instead.. Looks up a localized string similar to Expected message {0} but received {1} instead.. Looks up a localized string similar to Unexpected message type received.. Looks up a localized string similar to A null key was included and is not allowed.. Looks up a localized string similar to A null or empty key was included and is not allowed.. Looks up a localized string similar to A null value was included for key '{0}' and is not allowed.. Looks up a localized string similar to The type {0} or a derived type was expected, but {1} was given.. Looks up a localized string similar to {0} property has unrecognized value {1}.. Looks up a localized string similar to The URL '{0}' is rated unsafe and cannot be requested this way.. Looks up a localized string similar to This blob is not a recognized encryption format.. Looks up a localized string similar to The HTTP verb '{0}' is unrecognized and unsupported.. Looks up a localized string similar to '{0}' messages cannot be received with HTTP verb '{1}'.. Looks up a localized string similar to Redirects on POST requests that are to untrusted servers is not supported.. Looks up a localized string similar to Web request to '{0}' failed.. A grab-bag of utility methods useful for the channel stack of the protocol. The uppercase alphabet. The lowercase alphabet. The set of base 10 digits. The set of digits and alphabetic letters (upper and lowercase). All the characters that are allowed for use as a base64 encoding character. All the characters that are allowed for use as a base64 encoding character in the "web safe" context. The set of digits, and alphabetic letters (upper and lowercase) that are clearly visually distinguishable. The length of private symmetric secret handles. This value needn't be high, as we only expect to have a small handful of unexpired secrets at a time, and handle recycling is permissible. The cryptographically strong random data generator used for creating secrets. The random number generator is thread-safe. A pseudo-random data generator (NOT cryptographically strong random data) The default lifetime of a private secret. A character array containing just the = character. A character array containing just the , character. A character array containing just the " character. The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. A set of escaping mappings that help secure a string from javscript execution. The characters to escape here are inspired by http://code.google.com/p/doctype/wiki/ArticleXSSInJavaScript Transforms an OutgoingWebResponse to an MVC-friendly ActionResult. The response to send to the user agent. The instance to be returned by the Controller's action method. Transforms an OutgoingWebResponse to a Web API-friendly HttpResponseMessage. The response to send to the user agent. The instance to be returned by the Web API method. Gets the original request URL, as seen from the browser before any URL rewrites on the server if any. Cookieless session directory (if applicable) is also included. The URL in the user agent's Location bar. Strips any and all URI query parameters that start with some prefix. The URI that may have a query with parameters to remove. The prefix for parameters to remove. A period is NOT automatically appended. Either a new Uri with the parameters removed if there were any to remove, or the same Uri instance if no parameters needed to be removed. Sends a multipart HTTP POST request (useful for posting files). The HTTP request. The request handler. The parts to include in the POST entity. The HTTP response. Assembles a message comprised of the message on a given exception and all inner exceptions. The exception. The assembled message. Flattens the specified sequence of sequences. The type of element contained in the sequence. The sequence of sequences to flatten. A sequence of the contained items. Cuts off precision beyond a second on a DateTime value. The value. A DateTime with a 0 millisecond component. Adds a name-value pair to the end of a given URL as part of the querystring piece. Prefixes a ? or & before first element as necessary. The UriBuilder to add arguments to. The name of the parameter to add. The value of the argument. If the parameters to add match names of parameters that already are defined in the query string, the existing ones are not replaced. Adds a set of values to a collection. The type of value kept in the collection. The collection to add to. The values to add to the collection. Tests whether two timespans are within reasonable approximation of each other. One TimeSpan. The other TimeSpan. The allowable margin of error. true if the two TimeSpans are within of each other. Compares to string values for ordinal equality in such a way that its execution time does not depend on how much of the value matches. The first value. The second value. A value indicating whether the two strings share ordinal equality. In signature equality checks, a difference in execution time based on how many initial characters match MAY be used as an attack to figure out the expected signature. It is therefore important to make a signature equality check's execution time independent of how many characters match the expected value. See http://codahale.com/a-lesson-in-timing-attacks/ for more information. Gets the URL to the root of a web site, which may include a virtual directory path. An absolute URI. Creates the XML reader settings to use for reading XML from untrusted sources. The new instance of . The default values set here are based on recommendations from http://msdn.microsoft.com/en-us/magazine/ee335713.aspx Clears any existing elements in a collection and fills the collection with a given set of values. The type of value kept in the collection. The collection to modify. The new values to fill the collection. Strips any and all URI query parameters that serve as parts of a message. The URI that may contain query parameters to remove. The message description whose parts should be removed from the URL. A cleaned URL. Sends a multipart HTTP POST request (useful for posting files) but doesn't call GetResponse on it. The HTTP request. The request handler. The parts to include in the POST entity. Assembles the content of the HTTP Authorization or WWW-Authenticate header. The scheme. The fields to include. A value prepared for an HTTP header. Parses the authorization header. The scheme. Must not be null or empty. The authorization header. May be null or empty. A sequence of key=value pairs discovered in the header. Never null, but may be empty. Encodes a symmetric key handle and the blob that is encrypted/signed with that key into a single string that can be decoded by . The cryptographic key handle. The encrypted/signed blob. The combined encoded value. Extracts the key handle and encrypted blob from a string previously returned from . The containing message. The message part. The value previously returned from . The crypto key handle. The encrypted/signed data. Gets a buffer of random data (not cryptographically strong). The length of the sequence to generate. The generated values, which may contain zeros. Gets a cryptographically strong random sequence of values. The length of the sequence to generate. The generated values, which may contain zeros. Gets a cryptographically strong random sequence of values. The length of the byte sequence to generate. A base64 encoding of the generated random data, whose length in characters will likely be greater than . Gets a random string made up of a given set of allowable characters. The length of the desired random string. The allowable characters. A random string. Computes the hash of a string. The hash algorithm to use. The value to hash. The encoding to use when converting the string to a byte array. A base64 encoded string. Computes the hash of a sequence of key=value pairs. The hash algorithm to use. The data to hash. The encoding to use when converting the string to a byte array. A base64 encoded string. Computes the hash of a sequence of key=value pairs. The hash algorithm to use. The data to hash. The encoding to use when converting the string to a byte array. A base64 encoded string. Encrypts a byte buffer. The buffer to encrypt. The symmetric secret to use to encrypt the buffer. Allowed values are 128, 192, or 256 bytes in length. The encrypted buffer Decrypts a byte buffer. The buffer to decrypt. The symmetric secret to use to decrypt the buffer. Allowed values are 128, 192, and 256. The encrypted buffer Encrypts a string. The text to encrypt. The symmetric secret to use to encrypt the buffer. Allowed values are 128, 192, and 256. The encrypted buffer Decrypts a string previously encrypted with . The text to decrypt. The symmetric secret to use to decrypt the buffer. Allowed values are 128, 192, and 256. The encrypted buffer Performs asymmetric encryption of a given buffer. The asymmetric encryption provider to use for encryption. The buffer to encrypt. The encrypted data. Performs asymmetric decryption of a given buffer. The asymmetric encryption provider to use for decryption. The buffer to decrypt. The decrypted data. Gets a key from a given bucket with the longest remaining life, or creates a new one if necessary. The crypto key store. The bucket where the key should be found or stored. The minimum remaining life required on the returned key. The required size of the key, in bits. A key-value pair whose key is the secret's handle and whose value is the cryptographic key. Compresses a given buffer. The buffer to compress. The compression algorithm to use. The compressed data. Decompresses a given buffer. The buffer to decompress. The compression algorithm used. The decompressed data. Converts to data buffer to a base64-encoded string, using web safe characters and with the padding removed. The data buffer. A web-safe base64-encoded string without padding. Decodes a (web-safe) base64-string back to its binary buffer form. The base64-encoded string. May be web-safe encoded. A data buffer. Adds a set of HTTP headers to an instance, taking care to set some headers to the appropriate properties of The headers to add. The instance to set the appropriate values to. Adds a set of HTTP headers to an instance, taking care to set some headers to the appropriate properties of The headers to add. The instance to set the appropriate values to. Copies the contents of one stream to another. The stream to copy from, at the position where copying should begin. The stream to copy to, at the position where bytes should be written. The maximum bytes to copy. The total number of bytes copied. Copying begins at the streams' current positions. The positions are NOT reset after copying is complete. Creates a snapshot of some stream so it is seekable, and the original can be closed. The stream to copy bytes from. A seekable stream with the same contents as the original. Clones an in order to send it again. The request to clone. The newly created instance. Clones an in order to send it again. The request to clone. The new recipient of the request. The newly created instance. Tests whether two arrays are equal in contents and ordering. The type of elements in the arrays. The first array in the comparison. May be null. The second array in the comparison. May be null. True if the arrays equal; false otherwise. Tests whether two arrays are equal in contents and ordering, guaranteeing roughly equivalent execution time regardless of where a signature mismatch may exist. The first array in the comparison. May not be null. The second array in the comparison. May not be null. True if the arrays equal; false otherwise. Guaranteeing equal execution time is useful in mitigating against timing attacks on a signature or other secret. Tests two sequences for same contents and ordering. The type of elements in the arrays. The first sequence in the comparison. May not be null. The second sequence in the comparison. May not be null. True if the arrays equal; false otherwise. Tests two unordered collections for same contents. The type of elements in the collections. The first collection in the comparison. May not be null. The second collection in the comparison. May not be null. True if the collections have the same contents; false otherwise. Tests whether two dictionaries are equal in length and contents. The type of keys in the dictionaries. The type of values in the dictionaries. The first dictionary in the comparison. May not be null. The second dictionary in the comparison. May not be null. True if the arrays equal; false otherwise. Concatenates a list of name-value pairs as key=value&key=value, taking care to properly encode each key and value for URL transmission according to RFC 3986. No ? is prefixed to the string. The dictionary of key/values to read from. The formulated querystring style string. Adds a set of name-value pairs to the end of a given URL as part of the querystring piece. Prefixes a ? or & before first element as necessary. The UriBuilder to add arguments to. The arguments to add to the query. If null, is not changed. If the parameters to add match names of parameters that already are defined in the query string, the existing ones are not replaced. Adds a set of name-value pairs to the end of a given URL as part of the fragment piece. Prefixes a # or & before first element as necessary. The UriBuilder to add arguments to. The arguments to add to the query. If null, is not changed. If the parameters to add match names of parameters that already are defined in the fragment, the existing ones are not replaced. Adds parameters to a query string, replacing parameters that match ones that already exist in the query string. The UriBuilder to add arguments to. The arguments to add to the query. If null, is not changed. Extracts the recipient from an HttpRequestInfo. The request to get recipient information from. The recipient. Thrown if the HTTP request is something we can't handle. Gets the enum value for a given HTTP verb. The HTTP verb. A enum value that is within the . Thrown if the HTTP request is something we can't handle. Gets the HTTP verb to use for a given enum value. The HTTP method. An HTTP verb, such as GET, POST, PUT, or DELETE. Copies some extra parameters into a message. The message to copy the extra data into. The extra data to copy into the message. May be null to do nothing. Collects a sequence of key=value pairs into a dictionary. The type of the key. The type of the value. The sequence. A dictionary. Converts a to an IDictionary<string, string>. The NameValueCollection to convert. May be null. The generated dictionary, or null if is null. If a null key is encountered, its value is ignored since Dictionary<string, string> does not allow null keys. Converts a to an IDictionary<string, string>. The NameValueCollection to convert. May be null. A value indicating whether a null key in the should be silently skipped since it is not a valid key in a Dictionary. Use true to throw an exception if a null key is encountered. Use false to silently continue converting the valid keys. The generated dictionary, or null if is null. Thrown if is true and a null key is encountered. Converts a dictionary to a The existing dictionary. The new collection. Sorts the elements of a sequence in ascending order by using a specified comparer. The type of the elements of source. The type of the key returned by keySelector. A sequence of values to order. A function to extract a key from an element. A comparison function to compare keys. An System.Linq.IOrderedEnumerable<TElement> whose elements are sorted according to a key. Determines whether the specified message is a request (indirect message or direct request). The message in question. true if the specified message is a request; otherwise, false. Although an may implement the interface, it may only be doing that for its derived classes. These objects are only requests if their property is non-null. Determines whether the specified message is a direct response. The message in question. true if the specified message is a direct response; otherwise, false. Although an may implement the interface, it may only be doing that for its derived classes. These objects are only requests if their property is non-null. Writes a buffer, prefixed with its own length. The binary writer. The buffer. Reads a buffer that is prefixed with its own length. The binary reader positioned at the buffer length. The maximum size of the buffer that should be permitted. Although the stream will indicate the size of the buffer, this mitigates data corruption or DoS attacks causing the web server to allocate too much memory for a small data packet. The read buffer. Constructs a Javascript expression that will create an object on the user agent when assigned to a variable. The untrusted names and untrusted values to inject into the JSON object. if set to true the values will NOT be escaped as if it were a pure string. The Javascript JSON object as a string. Serializes the given message as a JSON string. The message to serialize. The cached message descriptions to use for reflection. A JSON string. Serializes the given message as a JSON string. The message to serialize. The cached message descriptions to use for reflection. The encoding to use. Defaults to A JSON string. Deserializes a JSON object into a message. The buffer containing the JSON string. The message to deserialize the object into. The cache of message descriptions. The encoding that the JSON bytes are in. Prepares what SHOULD be simply a string value for safe injection into Javascript by using appropriate character escaping. The untrusted string value to be escaped to protected against XSS attacks. May be null. The escaped string, surrounded by single-quotes. Escapes a string according to the URI data string rules given in RFC 3986. The value to escape. The escaped value. The method is supposed to take on RFC 3986 behavior if certain elements are present in a .config file. Even if this actually worked (which in my experiments it doesn't), we can't rely on every host actually having this configuration element present. Ensures that UTC times are converted to local times. Unspecified kinds are unchanged. The date-time to convert. The date-time in local time. Ensures that local times are converted to UTC times. Unspecified kinds are unchanged. The date-time to convert. The date-time in UTC time. Gets the query data from the original request (before any URL rewriting has occurred.) The request. A containing all the parameters in the query string. Gets a value indicating whether the request's URL was rewritten by ASP.NET or some other module. The request. A value indicating whether there is evidence that the URL of the request has been changed to some internal server (farm) representation. true if this request's URL was rewritten; otherwise, false. Gets the public facing URL for the given incoming HTTP request. The request. The server variables to consider part of the request. The URI that the outside world used to create this request. Although the value can be obtained from , it's useful to be able to pass them in so we can simulate injected values from our unit tests since the actual property is a read-only kind of . Gets the public facing URL for the given incoming HTTP request. The request. The URI that the outside world used to create this request. Gets the query or form data from the original request (before any URL rewriting has occurred.) The request. A set of name=value pairs. Creates a symmetric algorithm for use in encryption/decryption. The symmetric key to use for encryption/decryption. A symmetric algorithm. The available compression algorithms. The Deflate algorithm. The GZip algorithm. A class to convert a into an . The type of objects being compared. The comparison method to use. Initializes a new instance of the ComparisonHelper class. The comparison method to use. Compares two instances of . The first object to compare. The second object to compare. Any of -1, 0, or 1 according to standard comparison rules. A message expiration enforcing binding element that supports messages implementing the interface. Initializes a new instance of the class. Sets the timestamp on an outgoing message. The outgoing message. The protections (if any) that this binding element applied to the message. Null if this binding element did not even apply to this binding element. Reads the timestamp on a message and throws an exception if the message is too old. The incoming message. The protections (if any) that this binding element applied to the message. Null if this binding element did not even apply to this binding element. Thrown if the given message has already expired. Thrown when the binding element rules indicate that this message is invalid and should NOT be processed. Gets the protection offered by this binding element. Gets or sets the channel that this binding element belongs to. Gets the maximum age a message implementing the interface can be before being discarded as too old. A pair of conversion functions to map some type to a string and back again. The mapping function that converts some custom type to a string. The mapping function that converts some custom type to the original string (possibly non-normalized) that represents it. The mapping function that converts a string to some custom type. Initializes a new instance of the struct. The mapping function that converts some custom value to a string. The mapping function that converts some custom value to its original (non-normalized) string. May be null if the same as the function. The mapping function that converts a string to some custom value. Initializes a new instance of the struct. The encoder. A mapping between serialized key names and instances describing those key/values pairs. A mapping between the serialized key names and their describing instances. Initializes a new instance of the class. Type of the message. The message version. Returns a that represents this instance. A that represents this instance. Gets a dictionary that provides read/write access to a message. The message the dictionary should provide access to. The dictionary accessor to the message Gets a dictionary that provides read/write access to a message. The message the dictionary should provide access to. A value indicating whether this message dictionary will retrieve original values instead of normalized ones. The dictionary accessor to the message Ensures the message parts pass basic validation. The key/value pairs of the serialized message. Tests whether all the required message parts pass basic validation for the given data. The key/value pairs of the serialized message. A value indicating whether the provided data fits the message's basic requirements. Verifies that a given set of keys include all the required parameters for this message type or throws an exception. The names of all parameters included in a message. if set to true an exception is thrown on failure with details. A value indicating whether the provided data fits the message's basic requirements. Thrown when required parts of a message are not in if is true. Ensures the protocol message parts that must not be empty are in fact not empty. A dictionary of key/value pairs that make up the serialized message. if set to true an exception is thrown on failure with details. A value indicating whether the provided data fits the message's basic requirements. Thrown when required parts of a message are not in if is true. Checks that a bunch of message part values meet the constant value requirements of this message description. The part values. if set to true, this method will throw on failure. A value indicating whether all the requirements are met. Reflects over some -implementing type and prepares to serialize/deserialize instances of that type. Gets the mapping between the serialized key names and their describing instances. Gets the message version this instance was generated from. Gets the type of message this instance was generated from. The type of the described message. Gets the constructors available on the message type. Wraps an instance in a dictionary that provides access to both well-defined message properties and "extra" name/value pairs that have no properties associated with them. The instance manipulated by this dictionary. The instance that describes the message type. Whether original string values should be retrieved instead of normalized ones. Initializes a new instance of the class. The message instance whose values will be manipulated by this dictionary. The message description. A value indicating whether this message dictionary will retrieve original values instead of normalized ones. Adds a named value to the message. The serialized form of the name whose value is being set. The serialized form of the value. Thrown if already has a set value in this message. Thrown if is null. Checks whether some named parameter has a value set in the message. The serialized form of the message part's name. True if the parameter by the given name has a set value. False otherwise. Removes a name and value from the message given its name. The serialized form of the name to remove. True if a message part by the given name was found and removed. False otherwise. Gets some named value if the key has a value. The name (in serialized form) of the value being sought. The variable where the value will be set. True if the key was found and was set. False otherwise. Sets a named value in the message. The name-value pair to add. The name is the serialized form of the key. Removes all values in the message. Removes all items from the . The is read-only. This method cannot be implemented because keys are not guaranteed to be removed since some are inherent to the type of message that this dictionary provides access to. Checks whether a named value has been set on the message. The name/value pair. True if the key exists and has the given value. False otherwise. Copies all the serializable data from the message to a key/value array. The array to copy to. The index in the to begin copying to. Removes a named value from the message if it exists. The serialized form of the name and value to remove. True if the name/value was found and removed. False otherwise. Gets an enumerator that generates KeyValuePair<string, string> instances for all the key/value pairs that are set in the message. The enumerator that can generate the name/value pairs. Gets an enumerator that generates KeyValuePair<string, string> instances for all the key/value pairs that are set in the message. The enumerator that can generate the name/value pairs. Saves the data in a message to a standard dictionary. The generated dictionary. Loads data from a dictionary into the message. The data to load into the message. Gets the message this dictionary provides access to. Gets the description of the type of message this dictionary provides access to. Gets the number of explicitly set values in the message. Gets a value indicating whether this message is read only. Gets all the keys that have values associated with them. Gets the set of official message part names that have non-null values associated with them. Gets the keys that are in the message but not declared as official OAuth properties. Gets all the values. Gets the serializer for the message this dictionary provides access to. Gets or sets a value for some named value. The serialized form of a name for the value to read or write. The named value. If the key matches a declared property or field on the message type, that type member is set. Otherwise the key/value is stored in a dictionary for extra (weakly typed) strings. Thrown when setting a value that is not allowed for a given . Describes an individual member of a message and assists in its serialization. A map of converters that help serialize custom objects to string values and back again. A map of instantiated custom encoders used to encode/decode message parts. The string-object conversion routines to use for this individual message part. The property that this message part is associated with, if aplicable. The field that this message part is associated with, if aplicable. The type of the message part. (Not the type of the message itself). The default (uninitialized) value of the member inherent in its type. Initializes static members of the class. Initializes a new instance of the class. A property or field of an implementing type that has a attached to it. The attribute discovered on that describes the serialization requirements of the message part. Sets the member of a given message to some given value. Used in deserialization. The message instance containing the member whose value should be set. The string representation of the value to set. Gets the normalized form of a value of a member of a given message. Used in serialization. The message instance to read the value from. The string representation of the member's value. Gets the value of a member of a given message. Used in serialization. The message instance to read the value from. A value indicating whether the original value should be retrieved (as opposed to a normalized form of it). The string representation of the member's value. Gets whether the value has been set to something other than its CLR type default value. The message instance to check the value on. True if the value is not the CLR default value. Adds a pair of type conversion functions to the static conversion map. The custom type to convert to and from strings. The function to convert the custom type to a string. The mapping function that converts some custom value to its original (non-normalized) string. May be null if the same as the function. The function to convert a string to the custom type. Creates a that resorts to and for the conversion. The type to create the mapping for. The value mapping. Creates the default encoder for a given type. The type to create a for. A struct. Figures out the CLR default value for a given type. The type whose default value is being sought. Either null, or some default value like 0 or 0.0. Checks whether a type is a nullable value type (i.e. int?) The type in question. True if this is a nullable value type. Retrieves a previously instantiated encoder of a given type, or creates a new one and stores it for later retrieval as well. The message part encoder type. An instance of the desired encoder. Gets the value of the message part, without converting it to/from a string. The message instance to read from. The value of the member. Sets the value of a message part directly with a given value. The message instance to read from. The value to set on the this part. Converts a string representation of the member's value to the appropriate type. The string representation of the member's value. An instance of the appropriate type for setting the member. Converts the member's value to its string representation. The value of the member. A value indicating whether a string matching the originally decoded string should be returned (as opposed to a normalized string). The string representation of the member's value. Validates that the message part and its attribute have agreeable settings. Thrown when a non-nullable value type is set as optional. Gets or sets the name to use when serializing or deserializing this parameter in a message. Gets or sets whether this message part must be signed. Gets or sets a value indicating whether this message part is required for the containing message to be valid. Gets or sets a value indicating whether the string value is allowed to be empty in the serialized message. Gets or sets a value indicating whether the field or property must remain its default value. Gets or sets a value indicating whether this part is defined as a constant field and can be read without a message instance. Gets the static constant value for this message part without a message instance. Gets the type of the declared member. An exception thrown when messages cannot receive all the protections they require. Initializes a new instance of the class. The message whose protection requirements could not be met. The protection requirements that were fulfilled. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. A protocol message (request or response) that passes from this to a remote party via the user agent using a redirect or form POST submission, OR a direct message response. An instance of this type describes the HTTP response that must be sent in response to the current HTTP request. It is important that this response make up the entire HTTP response. A hosting ASPX page should not be allowed to render its normal HTML output after this response is sent. The normal rendered output of an ASPX page can be canceled by calling after this message is sent on the response stream. The encoder to use for serializing the response body. Initializes a new instance of the class. Initializes a new instance of the class based on the contents of an . The to clone. The maximum bytes to read from the response stream. Creates a text reader for the response stream. The text reader, initialized for the proper encoding. Automatically sends the appropriate response to the user agent and ends execution on the current page or handler. Typically thrown by ASP.NET in order to prevent additional data from the page being sent to the client and corrupting the response. Requires a current HttpContext. Automatically sends the appropriate response to the user agent and ends execution on the current page or handler. The context of the HTTP request whose response should be set. Typically this is . Typically thrown by ASP.NET in order to prevent additional data from the page being sent to the client and corrupting the response. Automatically sends the appropriate response to the user agent and ends execution on the current page or handler. The context of the HTTP request whose response should be set. Typically this is . Typically thrown by ASP.NET in order to prevent additional data from the page being sent to the client and corrupting the response. Automatically sends the appropriate response to the user agent and signals ASP.NET to short-circuit the page execution pipeline now that the response has been completed. Not safe to call from ASP.NET web forms. Requires a current HttpContext. This call is not safe to make from an ASP.NET web form (.aspx file or code-behind) because ASP.NET will render HTML after the protocol message has been sent, which will corrupt the response. Use the method instead for web forms. Automatically sends the appropriate response to the user agent and signals ASP.NET to short-circuit the page execution pipeline now that the response has been completed. Not safe to call from ASP.NET web forms. The context of the HTTP request whose response should be set. Typically this is . This call is not safe to make from an ASP.NET web form (.aspx file or code-behind) because ASP.NET will render HTML after the protocol message has been sent, which will corrupt the response. Use the method instead for web forms. Automatically sends the appropriate response to the user agent and signals ASP.NET to short-circuit the page execution pipeline now that the response has been completed. Not safe to call from ASP.NET web forms. The context of the HTTP request whose response should be set. Typically this is . This call is not safe to make from an ASP.NET web form (.aspx file or code-behind) because ASP.NET will render HTML after the protocol message has been sent, which will corrupt the response. Use the method instead for web forms. Submits this response to a WCF response context. Only available when no response body is included. The response context to apply the response to. Automatically sends the appropriate response to the user agent. The response to set to this message. Gets the URI that, when requested with an HTTP GET request, would transmit the message that normally would be transmitted via a user agent redirect. The channel to use for encoding. The URL that would transmit the original message. This URL may exceed the normal 2K limit, and should therefore be broken up manually and POSTed as form fields when it exceeds this length. This is useful for desktop applications that will spawn a user agent to transmit the message rather than cause a redirect. Sets the response to some string, encoded as UTF-8. The string to set the response to. Type of the content. May be null. Automatically sends the appropriate response to the user agent and signals ASP.NET to short-circuit the page execution pipeline now that the response has been completed. The context of the HTTP request whose response should be set. Typically this is . If set to false, this method calls rather than to avoid a . Automatically sends the appropriate response to the user agent and signals ASP.NET to short-circuit the page execution pipeline now that the response has been completed. The context of the HTTP request whose response should be set. Typically this is . If set to false, this method calls rather than to avoid a . Gets the headers that must be included in the response to the user agent. The headers in this collection are not meant to be a comprehensive list of exactly what should be sent, but are meant to augment whatever headers are generally included in a typical response. Gets the body of the HTTP response. Gets a value indicating whether the response stream is incomplete due to a length limitation imposed by the HttpWebRequest or calling method. Gets or sets the body of the response as a string. Gets the HTTP status code to use in the HTTP response. Gets or sets a reference to the actual protocol message that is being sent via the user agent. The methods available for the local party to send messages to a remote party. See OAuth 1.0 spec section 5.2. No HTTP methods are allowed. In the HTTP Authorization header as defined in OAuth HTTP Authorization Scheme (OAuth HTTP Authorization Scheme). As the HTTP POST request body with a content-type of application/x-www-form-urlencoded. Added to the URLs in the query part (as defined by [RFC3986] (Berners-Lee, T., “Uniform Resource Identifiers (URI): Generic Syntax,” .) section 3). Added to the URLs in the query part (as defined by [RFC3986] (Berners-Lee, T., “Uniform Resource Identifiers (URI): Generic Syntax,” .) section 3). Added to the URLs in the query part (as defined by [RFC3986] (Berners-Lee, T., “Uniform Resource Identifiers (URI): Generic Syntax,” .) section 3). Added to the URLs in the query part (as defined by [RFC3986] (Berners-Lee, T., “Uniform Resource Identifiers (URI): Generic Syntax,” .) section 3). The flags that control HTTP verbs. The type of transport mechanism used for a message: either direct or indirect. A message that is sent directly from the Consumer to the Service Provider, or vice versa. A message that is sent from one party to another via a redirect in the user agent. Encodes and decodes the as an integer of total seconds. Initializes a new instance of the class. Encodes the specified value. The value. Guaranteed to never be null. The in string form, ready for message transport. Decodes the specified value. The string value carried by the transport. Guaranteed to never be null, although it may be empty. The deserialized form of the given string. Thrown when the string value given cannot be decoded into the required object type. A paranoid HTTP get/post request engine. It helps to protect against attacks from remote server leaving dangling connections, sending too much data, causing requests against internal servers, etc. Protections include: * Conservative maximum time to receive the complete response. * Only HTTP and HTTPS schemes are permitted. * Internal IP address ranges are not permitted: 127.*.*.*, 1::* * Internal host names are not permitted (periods must be found in the host name) If a particular host would be permitted but is in the blacklist, it is not allowed. If a particular host would not be permitted but is in the whitelist, it is allowed. The set of URI schemes allowed in untrusted web requests. The collection of blacklisted hosts. The collection of regular expressions used to identify additional blacklisted hosts. The collection of whitelisted hosts. The collection of regular expressions used to identify additional whitelisted hosts. The maximum redirections to follow in the course of a single request. The maximum number of bytes to read from the response of an untrusted server. The handler that will actually send the HTTP request and collect the response once the untrusted server gates have been satisfied. Initializes a new instance of the class. Initializes a new instance of the class. The chained web request handler. Determines whether this instance can support the specified options. The set of options that might be given in a subsequent web request. true if this instance can support the specified options; otherwise, false. Prepares an that contains an POST entity for sending the entity. The that should contain the entity. The options to apply to this web request. The writer the caller should write out the entity data to. Thrown for any network error. The caller should have set the and any other appropriate properties before calling this method. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. Processes an and converts the to a instance. The to handle. The options to apply to this web request. An instance of describing the response. Thrown for any network error. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. The value, if set, should be Closed before throwing. Prepares an that contains an POST entity for sending the entity. The that should contain the entity. The writer the caller should write out the entity data to. Processes an and converts the to a instance. The to handle. An instance of describing the response. Thrown for any network error. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. The value, if set, should be Closed before throwing. Determines whether an IP address is the IPv6 equivalent of "localhost/127.0.0.1". The ip address to check. true if this is a loopback IP address; false otherwise. Determines whether the given host name is in a host list or host name regex list. The host name. The list of host names. The list of regex patterns of host names. true if the specified host falls within at least one of the given lists; otherwise, false. Determines whether a given host is whitelisted. The host name to test. true if the host is whitelisted; otherwise, false. Determines whether a given host is blacklisted. The host name to test. true if the host is blacklisted; otherwise, false. Verify that the request qualifies under our security policies The request URI. If set to true, only web requests that can be made entirely over SSL will succeed. Thrown when the URI is disallowed for security reasons. Determines whether a URI is allowed based on scheme and host name. No requireSSL check is done here The URI to test for whether it should be allowed. true if [is URI allowable] [the specified URI]; otherwise, false. Prepares the request by setting timeout and redirect policies. The request to prepare. true if this is a POST request whose headers have not yet been sent out; false otherwise. Gets or sets the default maximum bytes to read in any given HTTP request. Default is 1MB. Cannot be less than 2KB. Gets or sets the total number of redirections to allow on any one request. Default is 10. Gets or sets the time allowed to wait for single read or write operation to complete. Default is 500 milliseconds. Gets or sets the time allowed for an entire HTTP request. Default is 5 seconds. Gets a collection of host name literals that should be allowed even if they don't pass standard security checks. Gets a collection of host name regular expressions that indicate hosts that should be allowed even though they don't pass standard security checks. Gets a collection of host name literals that should be rejected even if they pass standard security checks. Gets a collection of host name regular expressions that indicate hosts that should be rejected even if they pass standard security checks. Gets the configuration for this class that is specified in the host's .config file. The default handler for transmitting instances and returning the responses. The set of options this web request handler supports. The value to use for the User-Agent HTTP header. Determines whether this instance can support the specified options. The set of options that might be given in a subsequent web request. true if this instance can support the specified options; otherwise, false. Prepares an that contains an POST entity for sending the entity. The that should contain the entity. The writer the caller should write out the entity data to. Thrown for any network error. The caller should have set the and any other appropriate properties before calling this method. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. Prepares an that contains an POST entity for sending the entity. The that should contain the entity. The options to apply to this web request. The writer the caller should write out the entity data to. Thrown for any network error. The caller should have set the and any other appropriate properties before calling this method. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. Processes an and converts the to a instance. The to handle. An instance of describing the response. Thrown for any network error. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. The value, if set, should be Closed before throwing. Processes an and converts the to a instance. The to handle. The options to apply to this web request. An instance of describing the response. Thrown for any network error. Implementations should catch and wrap it in a to abstract away the transport and provide a single exception type for hosts to catch. The value, if set, should be Closed before throwing. Determines whether an exception was thrown because of the remote HTTP server returning HTTP 417 Expectation Failed. The caught exception. true if the failure was originally caused by a 417 Exceptation Failed error; otherwise, false. Initiates a POST request and prepares for sending data. The HTTP request with information about the remote party to contact. The stream where the POST entity can be written. Prepares an HTTP request. The request. true if this is a POST request whose headers have not yet been sent out; false otherwise. An immutable description of a URL that receives messages. Initializes a new instance of the class. The URL of this endpoint. The HTTP method(s) allowed. Initializes a new instance of the class. The URL of this endpoint. The HTTP method(s) allowed. Gets the URL of this endpoint. Gets the HTTP method(s) allowed. Represents the section in the host's .config file that configures this library's settings. The name of the section under which this library's settings must be found. The name of the <openid> sub-element. The name of the <oauth> sub-element. Initializes a new instance of the class. Gets a named section in this section group, or null if no such section is defined. The name of the section to obtain. The desired section, or null if it could not be obtained. Gets the messaging configuration element. Gets the reporting configuration element. Represents the <messaging> element in the host's .config file. The name of the <webResourceUrlProvider> sub-element. The name of the <untrustedWebRequest> sub-element. The name of the attribute that stores the association's maximum lifetime. The name of the attribute that stores the maximum allowable clock skew. The name of the attribute that indicates whether to disable SSL requirements across the library. The name of the attribute that controls whether messaging rules are strictly followed. The default value for the property. 2KB, recommended by OpenID group The name of the attribute that controls the maximum length of a URL before it is converted to a POST payload. Gets the name of the @privateSecretMaximumAge attribute. The name of the <messaging> sub-element. Gets the configuration section from the .config file. Gets the actual maximum message lifetime that a program should allow. The sum of the and property values. Gets or sets the maximum lifetime of a private symmetric secret, that may be used for signing or encryption. The default value is 28 days (twice the age of the longest association). Gets or sets the time between a message's creation and its receipt before it is considered expired. The default value value is 3 minutes. Smaller timespans mean lower tolerance for delays in message delivery. Larger timespans mean more nonces must be stored to provide replay protection. The maximum age a message implementing the interface can be before being discarded as too old. This time limit should NOT take into account expected time skew for servers across the Internet. Time skew is added to this value and is controlled by the property. Gets or sets the maximum clock skew. The default value is 10 minutes. Smaller timespans mean lower tolerance for time variance due to server clocks not being synchronized. Larger timespans mean greater chance for replay attacks and larger nonce caches. For example, if a server could conceivably have its clock d = 5 minutes off UTC time, then any two servers could have their clocks disagree by as much as 2*d = 10 minutes. Gets or sets a value indicating whether SSL requirements within the library are disabled/relaxed. Use for TESTING ONLY. Gets or sets a value indicating whether messaging rules are strictly adhered to. true by default. Strict will require that remote parties adhere strictly to the specifications, even when a loose interpretation would not compromise security. true is a good default because it shakes out interoperability bugs in remote services so they can be identified and corrected. But some web sites want things to Just Work more than they want to file bugs against others, so false is the setting for them. Gets or sets the configuration for the class. The untrusted web request. Gets or sets the maximum allowable size for a 301 Redirect response before we send a 200 OK response with a scripted form POST with the parameters instead in order to ensure successfully sending a large payload to another server that might have a maximum allowable size restriction on its GET request. The default value is 2048. Gets or sets the embedded resource retrieval provider. The embedded resource retrieval provider. Represents the <reporting> element in the host's .config file. The name of the @enabled attribute. The name of the @minimumReportingInterval attribute. The name of the @minimumFlushInterval attribute. The name of the @includeFeatureUsage attribute. The name of the @includeEventStatistics attribute. The name of the @includeLocalRequestUris attribute. The name of the @includeCultures attribute. The name of the <reporting> sub-element. The default value for the @minimumFlushInterval attribute. Initializes a new instance of the class. Gets the configuration section from the .config file. Gets or sets a value indicating whether this reporting is enabled. true if enabled; otherwise, false. Gets or sets the maximum frequency that reports will be published. Gets or sets the maximum frequency the set can be flushed to disk. Gets or sets a value indicating whether to include a list of library features used in the report. true to include a report of features used; otherwise, false. Gets or sets a value indicating whether to include statistics of certain events such as authentication success and failure counting, and can include remote endpoint URIs. true to include event counters in the report; otherwise, false. Gets or sets a value indicating whether to include a few URLs to pages on the hosting web site that host DotNetOpenAuth components. Gets or sets a value indicating whether to include the cultures requested by the user agent on pages that host DotNetOpenAuth components. A configuration collection of trusted OP Endpoints. The name of the "rejectAssertionsFromUntrustedProviders" element. Initializes a new instance of the class. Initializes a new instance of the class. The elements to initialize the collection with. When overridden in a derived class, creates a new . A new . Gets the element key for a specified configuration element when overridden in a derived class. The to return the key for. An that acts as the key for the specified . Gets or sets a value indicating whether any login attempt coming from an OpenID Provider Endpoint that is not on this whitelist of trusted OP Endpoints will be rejected. If the trusted providers list is empty and this value is true, all assertions are rejected. A configuration element that records a trusted Provider Endpoint. The name of the attribute that stores the value. Initializes a new instance of the class. Gets or sets the OpenID Provider Endpoint (aka "OP Endpoint") that this relying party trusts. A collection of . The type that all types specified in the elements must derive from. Initializes a new instance of the TypeConfigurationCollection class. Initializes a new instance of the TypeConfigurationCollection class. The elements that should be added to the collection initially. Creates instances of all the types listed in the collection. if set to true then internal types may be instantiated. A sequence of instances generated from types in this collection. May be empty, but never null. When overridden in a derived class, creates a new . A new . Gets the element key for a specified configuration element when overridden in a derived class. The to return the key for. An that acts as the key for the specified . Represents an element in a .config file that allows the user to provide a @type attribute specifying the full type that provides some service used by this library. A constraint on the type the user may provide. The name of the attribute whose value is the full name of the type the user is specifying. The name of the attribute whose value is the path to the XAML file to deserialize to obtain the type. Initializes a new instance of the TypeConfigurationElement class. Creates an instance of the type described in the .config file. The value to return if no type is given in the .config file. The newly instantiated type. Creates an instance of the type described in the .config file. The value to return if no type is given in the .config file. if set to true then internal types may be instantiated. The newly instantiated type. Creates the instance from xaml. The stream of xaml to deserialize. The deserialized object. This exists as its own method to prevent the CLR's JIT compiler from failing to compile the CreateInstance method just because the PresentationFramework.dll may be missing (which it is on some shared web hosts). This way, if the XamlSource attribute is never used, the PresentationFramework.dll never need be present. Gets or sets the full name of the type. The full name of the type, such as: "ConsumerPortal.Code.CustomStore, ConsumerPortal". Gets or sets the path to the XAML file to deserialize to obtain the instance. Gets the type described in the .config file. Gets a value indicating whether this type has no meaningful type to instantiate. Represents the section of a .config file where security policies regarding web requests to user-provided, untrusted servers is controlled. Gets the name of the @timeout attribute. Gets the name of the @readWriteTimeout attribute. Gets the name of the @maximumBytesToRead attribute. Gets the name of the @maximumRedirections attribute. Gets the name of the @whitelistHosts attribute. Gets the name of the @whitelistHostsRegex attribute. Gets the name of the @blacklistHosts attribute. Gets the name of the @blacklistHostsRegex attribute. Gets or sets the read/write timeout after which an HTTP request will fail. Gets or sets the timeout after which an HTTP request will fail. Gets or sets the maximum bytes to read from an untrusted web server. Gets or sets the maximum redirections that will be followed before an HTTP request fails. Gets or sets the collection of hosts on the whitelist. Gets or sets the collection of hosts on the blacklist. Gets or sets the collection of regular expressions that describe hosts on the whitelist. Gets or sets the collection of regular expressions that describe hosts on the blacklist. Represents a collection of child elements that describe host names either as literal host names or regex patterns. Initializes a new instance of the class. Creates a new child host name element. A new . Gets the element key for a specified configuration element. The to return the key for. An that acts as the key for the specified . Gets all the members of the collection assuming they are all literal host names. Gets all the members of the collection assuming they are all host names regex patterns. Represents the name of a single host or a regex pattern for host names. Gets the name of the @name attribute. Initializes a new instance of the class. Initializes a new instance of the class. The default value of the property. Gets or sets the name of the host on the white or black list. An interface that provides URLs from which embedded resources can be obtained. Gets the URL from which the given manifest resource may be downloaded by the user agent. Some type in the assembly containing the desired resource. Manifest name of the desired resource. An absolute URL. A general logger for the entire DotNetOpenAuth library. Because this logger is intended for use with non-localized strings, the overloads that take have been removed, and is used implicitly. The instance that is to be used by this static Logger for the duration of the appdomain. Backing field for the property. Backing field for the property. Backing field for the property. Backing field for the property. Backing field for the property. Backing field for the property. Backing field for the property. Backing field for the property. Backing field for the property. Backing field for the property. Creates an additional logger on demand for a subsection of the application. A name that will be included in the log file. The instance created with the given name. Creates the main logger for the library, and emits an INFO message that is the name and version of the library. A name that will be included in the log file. The instance created with the given name. Creates an additional logger on demand for a subsection of the application. A type whose full name that will be included in the log file. The instance created with the given type name. Discovers the presence of Log4net.dll and other logging mechanisms and returns the best available logger. The name of the log to initialize. The instance of the logger to use. Gets the logger for general library logging. Gets the logger for service discovery and selection events. Gets the logger for Messaging events. Gets the logger for Channel events. Gets the logger for binding elements and binding-element related events on the channel. Gets the logger specifically used for logging verbose text on everything about the signing process. Gets the logger for HTTP-level events. Gets the logger for events logged by ASP.NET controls. Gets the logger for high-level OpenID events. Gets the logger for high-level OAuth events. Gets the logger for high-level InfoCard events. The ILog interface is use by application to log messages into the log4net framework. Use the to obtain logger instances that implement this interface. The static method is used to get logger instances. This class contains methods for logging at different levels and also has properties for determining if those logging levels are enabled in the current configuration. This interface can be implemented in different ways. This documentation specifies reasonable behavior that a caller can expect from the actual implementation, however different implementations reserve the right to do things differently. Simple example of logging messages ILog log = LogManager.GetLogger("application-log"); log.Info("Application Start"); log.Debug("This is a debug message"); if (log.IsDebugEnabled) { log.Debug("This is another debug message"); } Nicko Cadell Gert Driesen Log a message object with the level. Log a message object with the level. The message object to log. This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the level. If this logger is DEBUG enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the form instead. Log a message object with the level including the stack trace of the passed as a parameter. The message object to log. The exception to log, including its stack trace. See the form for more detailed information. Log a formatted string with the level. Logs a formatted message string with the level. A String containing zero or more format items An Object array containing zero or more objects to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Log a message object with the level. Logs a message object with the level. This method first checks if this logger is INFO enabled by comparing the level of this logger with the level. If this logger is INFO enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the form instead. The message object to log. Logs a message object with the INFO level including the stack trace of the passed as a parameter. The message object to log. The exception to log, including its stack trace. See the form for more detailed information. Log a formatted message string with the level. Logs a formatted message string with the level. A String containing zero or more format items An Object array containing zero or more objects to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Log a message object with the level. Log a message object with the level. This method first checks if this logger is WARN enabled by comparing the level of this logger with the level. If this logger is WARN enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the form instead. The message object to log. Log a message object with the level including the stack trace of the passed as a parameter. The message object to log. The exception to log, including its stack trace. See the form for more detailed information. Log a formatted message string with the level. Logs a formatted message string with the level. A String containing zero or more format items An Object array containing zero or more objects to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Log a message object with the level. Logs a message object with the level. The message object to log. This method first checks if this logger is ERROR enabled by comparing the level of this logger with the level. If this logger is ERROR enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the form instead. Log a message object with the level including the stack trace of the passed as a parameter. The message object to log. The exception to log, including its stack trace. See the form for more detailed information. Log a formatted message string with the level. Logs a formatted message string with the level. A String containing zero or more format items An Object array containing zero or more objects to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Log a message object with the level. Log a message object with the level. This method first checks if this logger is FATAL enabled by comparing the level of this logger with the level. If this logger is FATAL enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the form instead. The message object to log. Log a message object with the level including the stack trace of the passed as a parameter. The message object to log. The exception to log, including its stack trace. See the form for more detailed information. Log a formatted message string with the level. Logs a formatted message string with the level. A String containing zero or more format items An Object array containing zero or more objects to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Logs a formatted message string with the level. A String containing zero or more format items An Object to format An Object to format An Object to format The message is formatted using the string.Format method. See for details of the syntax of the format string and the behavior of the formatting. This method does not take an object to include in the log event. To pass an use one of the methods instead. Checks if this logger is enabled for the level. true if this logger is enabled for events, false otherwise. This function is intended to lessen the computational cost of disabled log debug statements. For some ILog interface log, when you write: log.Debug("This is entry number: " + i ); You incur the cost constructing the message, string construction and concatenation in this case, regardless of whether the message is logged or not. If you are worried about speed (who isn't), then you should write: if (log.IsDebugEnabled) { log.Debug("This is entry number: " + i ); } This way you will not incur the cost of parameter construction if debugging is disabled for log. On the other hand, if the log is debug enabled, you will incur the cost of evaluating whether the logger is debug enabled twice. Once in and once in the . This is an insignificant overhead since evaluating a logger takes about 1% of the time it takes to actually log. This is the preferred style of logging. Alternatively if your logger is available statically then the is debug enabled state can be stored in a static variable like this: private static readonly bool isDebugEnabled = log.IsDebugEnabled; Then when you come to log you can write: if (isDebugEnabled) { log.Debug("This is entry number: " + i ); } This way the debug enabled state is only queried once when the class is loaded. Using a private static readonly variable is the most efficient because it is a run time constant and can be heavily optimized by the JIT compiler. Of course if you use a static readonly variable to hold the enabled state of the logger then you cannot change the enabled state at runtime to vary the logging that is produced. You have to decide if you need absolute speed or runtime flexibility. Checks if this logger is enabled for the level. true if this logger is enabled for events, false otherwise. For more information see . Checks if this logger is enabled for the level. true if this logger is enabled for events, false otherwise. For more information see . Checks if this logger is enabled for the level. true if this logger is enabled for events, false otherwise. For more information see . Checks if this logger is enabled for the level. true if this logger is enabled for events, false otherwise. For more information see . Returns a new log4net logger if it exists, or returns null if the assembly cannot be found. The created instance. Creates the log4net.LogManager. Call ONLY after log4net.dll is known to be present. The created instance. Returns a new logger that does nothing when invoked. The created instance. See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . See . Returns a new logger that uses the class if sufficient CAS permissions are granted to use it, otherwise returns false. The created instance. See . See . See . See . See . Represents a read-only dictionary. The type of the key. The type of the value. Contains base dictionary. Initializes a new instance of the class. The base dictionary. Adds an element with the provided key and value to the . The object to use as the key of the element to add. The object to use as the value of the element to add. is null. An element with the same key already exists in the . The is read-only. Determines whether the contains an element with the specified key. The key to locate in the . true if the contains an element with the key; otherwise, false. is null. Removes the element with the specified key from the . The key of the element to remove. true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the original . is null. The is read-only. Gets the value associated with the specified key. The key whose value to get. When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. true if the object that implements contains an element with the specified key; otherwise, false. is null. Adds an item to the . The object to add to the . The is read-only. Removes all items from the . The is read-only. Determines whether the contains a specific value. The object to locate in the . true if is found in the ; otherwise, false. Copies to. The array. Index of the array. Removes the first occurrence of a specific object from the . The object to remove from the . true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . The is read-only. Returns an enumerator that iterates through the collection. A that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets an containing the keys of the . An containing the keys of the object that implements . Gets an containing the values in the . An containing the values in the object that implements . Gets the number of elements contained in the . The number of elements contained in the . Gets a value indicating whether the is read-only. true if the is read-only; otherwise, false. Gets or sets the element with the specified key. The key being read or written. The element with the specified key. is null. The property is retrieved and is not found. The property is set and the is read-only. The statistical reporting mechanism used so this library's project authors know what versions and features are in use. A UTF8 encoder that doesn't emit the preamble. Used for mid-stream writers. A value indicating whether reporting is desirable or not. Must be logical-AND'd with !. A value indicating whether reporting experienced an error and cannot be enabled. A value indicating whether the reporting class has been initialized or not. The object to lock during initialization. The isolated storage to use for collecting data in between published reports. The GUID that shows up at the top of all reports from this user/machine/domain. The recipient of collected reports. The outgoing HTTP request handler to use for publishing reports. A few HTTP request hosts and paths we've seen. Cultures that have come in via HTTP requests. Features that have been used. A collection of all the observations to include in the report. The named events that we have counters for. The lock acquired while considering whether to publish a report. The time that we last published reports. Initializes static members of the class. Initializes a new instance of the class. Records an event occurrence. Name of the event. The category within the event. Null and empty strings are allowed, but considered the same. Records an event occurence. The object whose type name is the event name to record. The category within the event. Null and empty strings are allowed, but considered the same. Records the use of a feature by name. The feature. Records the use of a feature by object type. The object whose type is the feature to set as used. Records the use of a feature by object type. The object whose type is the feature to set as used. Some dependency used by . Records the use of a feature by object type. The object whose type is the feature to set as used. Some dependency used by . Some dependency used by . Records statistics collected from incoming requests. The request. Called by every internal/public method on this class to give periodic operations a chance to run. Initializes Reporting if it has not been initialized yet. Assembles a report for submission. A stream that contains the report. Sends the usage reports to the library authors. A value indicating whether submitting the report was successful. Interprets the reporting response as a log message if possible. The line from the HTTP response to interpret as a log message. Sends the stats report asynchronously, and careful to not throw any unhandled exceptions. Gets the isolated storage to use for reporting. An isolated storage location appropriate for our host. Gets a unique, pseudonymous identifier for this particular web site or application. A GUID that will serve as the identifier. The identifier is made persistent by storing the identifier in isolated storage. If an existing identifier is not found, a new one is created, persisted, and returned. Sanitizes the name of the file so it only includes valid filename characters. The filename to sanitize. The filename, with any and all invalid filename characters replaced with the hyphen (-) character. Gets or sets a value indicating whether this reporting is enabled. true if enabled; otherwise, false. Setting this property to true may have no effect if reporting has already experienced a failure of some kind. Gets the observed features. Gets the configuration to use for reporting. A set of values that persist the set to disk. The isolated persistent storage. The persistent reader. The persistent writer. The total set of elements. The maximum number of elements to track before not storing new elements. The set of new elements added to the since the last flush. The time the last flush occurred. A flag indicating whether the set has changed since it was last flushed. Initializes a new instance of the class. The storage location. Name of the file. The maximum number of elements to track. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Adds a value to the set. The value. Flushes any newly added values to disk. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets a value indicating whether the hashset has reached capacity and is not storing more elements. true if this instance is full; otherwise, false. Gets the name of the file. The name of the file. A feature usage counter. The separator to use between category names and their individual counters. The isolated persistent storage. The persistent reader. The persistent writer. The time the last flush occurred. The in-memory copy of the counter. A flag indicating whether the set has changed since it was last flushed. Initializes a new instance of the class. The storage location. Name of the file. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Increments the counter. The category within the event. Null and empty strings are allowed, but considered the same. Flushes any newly added values to disk. Resets all counters. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets the name of the file. The name of the file. Argument validation checks that throw some kind of ArgumentException when they fail (unless otherwise noted). Validates that a given parameter is not null. The type of the parameter The value. Name of the parameter. The tested value, guaranteed to not be null. Validates that a parameter is not null or empty. The value. Name of the parameter. The validated value. Validates that an array is not null or empty. The type of the elements in the sequence. The value. Name of the parameter. Validates that an argument is either null or is a sequence with no null elements. The type of elements in the sequence. The sequence. Name of the parameter. Validates some expression describing the acceptable range for an argument evaluates to true. The expression that must evaluate to true to avoid an . Name of the parameter. The message to include with the exception. Validates some expression describing the acceptable condition for an argument evaluates to true. The expression that must evaluate to true to avoid an . Name of the parameter. The message to include with the exception. Validates some expression describing the acceptable condition for an argument evaluates to true. The expression that must evaluate to true to avoid an . Name of the parameter. The unformatted message. Formatting arguments. Validates some expression describing the acceptable condition for an argument evaluates to true. The expression that must evaluate to true to avoid an . Validates some expression describing the acceptable condition for an argument evaluates to true. The expression that must evaluate to true to avoid an . The message to include with the exception. Validates some expression describing the acceptable condition for an argument evaluates to true. The expression that must evaluate to true to avoid an . The unformatted message. Formatting arguments. Validates that some argument describes a type that is or derives from a required type. The type that the argument must be or derive from. The type given in the argument. Name of the parameter. Validates some expression describing the acceptable condition for an argument evaluates to true. The expression that must evaluate to true to avoid an . The message. Throws an if a condition does not evaluate to true. The expression that must evaluate to true to avoid an . The message. Throws an Name of the parameter. The message. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The configuration-specified type {0} must be public, and is not.. Looks up a localized string similar to The configuration XAML reference to {0} requires a current HttpContext to resolve.. Looks up a localized string similar to The current IHttpHandler is not one of types: {0}. An embedded resource URL provider must be set in your .config file.. Looks up a localized string similar to The empty string is not allowed.. Looks up a localized string similar to The argument has an unexpected value.. Looks up a localized string similar to The property {0} must be set before this operation is allowed.. Looks up a localized string similar to This object contains a response body, which is not supported.. Looks up a localized string similar to No current HttpContext was detected, so an {0} instance must be explicitly provided or specified in the .config file. Call the constructor overload that takes an {0}.. Utility methods for working with URIs. Tests a URI for the presence of an OAuth payload. The URI to test. The prefix. True if the URI contains an OAuth message. Determines whether some is using HTTPS. The Uri being tested for security. true if the URI represents an encrypted request; otherwise, false. Equivalent to UriBuilder.ToString() but omits port # if it may be implied. Equivalent to UriBuilder.Uri.ToString(), but doesn't throw an exception if the Host has a wildcard. The UriBuilder to render as a string. The string version of the Uri. Validates that a URL will be resolvable at runtime. The page hosting the control that receives this URL as a property. If set to true the page is in design-time mode rather than runtime mode. The URI to check. Thrown if the given URL is not a valid, resolvable URI. A grab-bag utility class. The base namespace for this library from which all other namespaces derive. The web.config file-specified provider of web resource URLs. Tests for equality between two objects. Safely handles the case where one or both are null. The type of objects been checked for equality. The first object. The second object. true if the two objects are equal; false otherwise. Prepares a dictionary for printing as a string. The type of the key. The type of the value. The dictionary or sequence of name-value pairs. An object whose ToString method will perform the actual work of generating the string. The work isn't done until (and if) the method is actually called, which makes it great for logging complex objects without being in a conditional block. Offers deferred ToString processing for a list of elements, that are assumed to generate just a single-line string. The type of elements contained in the list. The list of elements. An object whose ToString method will perform the actual work of generating the string. Offers deferred ToString processing for a list of elements. The type of elements contained in the list. The list of elements. if set to true, special formatting will be applied to the output to make it clear where one element ends and the next begins. An object whose ToString method will perform the actual work of generating the string. Gets the web resource URL from a Page or object. Some type in resource assembly. Name of the manifest resource. An absolute URL Gets a human-readable description of the library name and version, including whether the build is an official or private one. Gets the assembly file version of the executing assembly, otherwise falls back to the assembly version. Manages an individual deferred ToString call. The type of object to be serialized as a string. The object that will be serialized if called upon. The method used to serialize to string form. Initializes a new instance of the DelayedToString class. The object that may be serialized to string form. The method that will serialize the object if called upon. Returns a that represents the current . A that represents the current .