Class ZipRequestOptionsBase
Base class for request options classes, providing a common and extensible interface for all requests.
Inheritance
Inherited Members
Namespace: Yort.Zip.InStore
Assembly: Yort.Zip.InStore.dll
Syntax
public abstract class ZipRequestOptionsBase
Methods
| Improve this Doc View SourceApplyDefaults(ZipClientConfiguration)
Applies default values from the ZipClientConfiguration specified to this request, where appropriate.
Declaration
public virtual void ApplyDefaults(ZipClientConfiguration config)
Parameters
Type | Name | Description |
---|---|---|
ZipClientConfiguration | config | A ZipClientConfiguration to read default values from. |
Remarks
Defaults should only be used for values that are not otherwise set (null).
The base version of this method is a no-op, it must be overridden by derived classes to implement the defaults specific to their request format.
This method is called (by ZipClient) before the Validate() method, and should be robust to null/missing/out of range values.
GetCustomHttpHeaders()
Returns a list of key value pairs to be applied as HTTP headers to HTTP request for this request type.
Declaration
public virtual Dictionary<string, string> GetCustomHttpHeaders()
Returns
Type | Description |
---|---|
Dictionary<String, String> | A dictionary containing key/value pairs to be applied as custom HTTP headers, or null if no custom headers apply. |
Remarks
By default returns null indicating there are no custom headers. Can be overridden by derived types to specify otherwise.
Validate()
Validates the properties of this request match the known design time requirements, i.e are all required properties provided.
Declaration
public abstract void Validate()
Remarks
Throws exceptions (typically ArgumentException, ArgumentNullException or ArgumentOutOfRangeException) if any property is in a known invalid state.