Class TransportHeader
Represents a transport (HTTP) header description used to match or construct HTTP message.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
[DataContract(Namespace = "http://schemas.nevatech.com/sentinet/2011/02")]
public sealed class TransportHeader : IValidator, IEquatable<TransportHeader>, IExtensibleDataObject
Constructors
TransportHeader()
Declaration
public TransportHeader()
Properties
ErrorMessage
Gets the summary of validation errors.
Declaration
public string ErrorMessage { get; }
Property Value
| Type | Description |
|---|---|
| string |
ExtensionData
Gets or sets ExtensionDataObject that enables serialization roundtrips.
Declaration
public ExtensionDataObject ExtensionData { get; set; }
Property Value
| Type | Description |
|---|---|
| ExtensionDataObject |
IsRequired
Gets flag indicating that header must be explicitly provided by the service caller.
Declaration
public bool IsRequired { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
Header is required if it defines a constant value to be matched or it does NOT provide a default value for the header variable.
Name
Gets or sets the header name.
Declaration
[DataMember]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Value
Gets or sets the header matching value or default value that is used if header is not provided.
Declaration
[DataMember(EmitDefaultValue = false)]
public string Value { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
VariableName
Gets or sets the token (variable) name storing headers value. If variable name is not set than header actual value must match or be set to Value property.
Declaration
[DataMember(EmitDefaultValue = false)]
public string VariableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Equals(TransportHeader)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(TransportHeader other)
Parameters
| Type | Name | Description |
|---|---|---|
| TransportHeader | other | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | True, if objects are equal. False, if objects are not equal. |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | True, if objects are equal. False, if objects are not equal. |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | Hash code of the current instance. |
Overrides
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |
Overrides
Validate()
Evaluates the state of this object.
Declaration
public bool Validate()
Returns
| Type | Description |
|---|---|
| bool | True if state is valid; otherwise, false. |
Validate(bool)
Evaluates the state of this object.
Declaration
public bool Validate(bool requireVariableOrValue)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | requireVariableOrValue | Flag indicating that variable name or header value should be provided. |
Returns
| Type | Description |
|---|---|
| bool | True if state is valid; otherwise, false. |