Class UriValueExtractor
Implements an object value extractor that retrieves a part from the provided relative URI by matching it with a parsing URI template and then binding the result with a binding URI template.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Processing
Assembly: Nevatech.Vsb.Repository.dll
Syntax
[DataContract(Namespace = "http://schemas.nevatech.com/sentinet/2011/02")]
public sealed class UriValueExtractor : ValueExtractorBase, IValidator, IEquatable<ValueExtractorBase>, IExtensibleDataObject
Remarks
URI template syntax: https://msdn.microsoft.com/en-us/library/bb675245(v=vs.110).aspx
Constructors
UriValueExtractor()
Declaration
public UriValueExtractor()
Fields
ElementName
Name of the root element when object is serialized to XML.
Declaration
public const string ElementName = "EXTRACT-URI"
Field Value
| Type | Description |
|---|---|
| string |
Properties
BindingTemplate
Gets or sets the URI template that will be used to create the result value. Only variables from the ParsingTemplate can be used.
Declaration
[DataMember]
public string BindingTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Examples
"{shoe}", "make/{shoe}/{bed=simple}", "{shoe},boy,{boat},{bed}"
ParsingTemplate
Gets or sets the URI template that will be used to parse the relating URI value. If template does not match the provided value the result is Null.
Declaration
[DataMember]
public string ParsingTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Examples
"find/{shoe}/{boat=null}?x={bed}"
Methods
Equals(ValueExtractorBase)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(ValueExtractorBase other)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueExtractorBase | other | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | True if the specified object is equal to the current object; otherwise, false. |
Overrides
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 the specified object is equal to the current object; otherwise, false. |
Overrides
Extract(MessagePipelineContext, object)
Extracts and formats a value from provided object.
Declaration
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public override object Extract(MessagePipelineContext context, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| MessagePipelineContext | context | Provides the message processing context. |
| object | value | An object to extract value from. |
Returns
| Type | Description |
|---|---|
| object | A value extracted from the object. |
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 string representation of the object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | String representing the object's content. |
Overrides
Validate()
Evaluates the state of the object.
Declaration
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public override bool Validate()
Returns
| Type | Description |
|---|---|
| bool | True if state is valid; otherwise, false. |