Struct EntityTag
Structure for the HTTP entity tag
Inherited Members
Namespace:FubarDev.WebDavServer.Model.Headers
Assembly:FubarDev.WebDavServer.dll
Syntax
public struct EntityTag : IEquatable<EntityTag>
Constructors
| Improve this Doc View SourceEntityTag(Boolean)
Initializes a new instance of the EntityTag struct.
Declaration
public EntityTag(bool isWeak)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isWeak | Is the entity tag weak? |
Fields
| Improve this Doc View SourcePropertyName
The default property name for the getetag
WebDAV property
Declaration
public static readonly XName PropertyName
Field Value
Type | Description |
---|---|
XName |
Properties
| Improve this Doc View SourceIsEmpty
Gets a value indicating whether the entity tag structure is empty
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsWeak
Gets a value indicating whether the entity tag is weak
Declaration
public bool IsWeak { get; }
Property Value
Type | Description |
---|---|
Boolean |
Value
Gets the entity tag
Declaration
[NotNull]
public string Value { get; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceAsStrong()
Returns this entity tag as a new strong entity tag
Declaration
public EntityTag AsStrong()
Returns
Type | Description |
---|---|
EntityTag | The new strong entity tag |
AsWeak()
Returns this entity tag as a new weak entity tag
Declaration
public EntityTag AsWeak()
Returns
Type | Description |
---|---|
EntityTag | The new weak entity tag |
Equals(EntityTag)
Declaration
public bool Equals(EntityTag other)
Parameters
Type | Name | Description |
---|---|---|
EntityTag | other |
Returns
Type | Description |
---|---|
Boolean |
Implements
| Improve this Doc View SourceEquals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceFromXml(XElement)
Extracts an entity tag from the XML of a GetETagProperty
Declaration
public static EntityTag FromXml([CanBeNull] XElement element)
Parameters
Type | Name | Description |
---|---|---|
XElement | element | The XML of a GetETagProperty |
Returns
Type | Description |
---|---|
EntityTag | The found entity tag |
Remarks
Returns a new strong entity tag when element is null.
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceParse(String)
Parses the entity tags as passed in the HTTP header
Declaration
public static IEnumerable<EntityTag> Parse([NotNull] string s)
Parameters
Type | Name | Description |
---|---|---|
String | s | The textual entity tag representation |
Returns
Type | Description |
---|---|
IEnumerable<EntityTag> | The found entity tags |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceToXml()
Creates a GetETagProperty XML from this entity tag
Declaration
[NotNull]
public XElement ToXml()
Returns
Type | Description |
---|---|
XElement | The new XElement |
Update()
Returns an updated entity tag with a new Value
Declaration
public EntityTag Update()
Returns
Type | Description |
---|---|
EntityTag | The updated entity tag |
Operators
| Improve this Doc View SourceEquality(EntityTag, EntityTag)
Compares two entity tags for their equality
Declaration
public static bool operator ==(EntityTag x, EntityTag y)
Parameters
Type | Name | Description |
---|---|---|
EntityTag | x | The first entity tag to compare |
EntityTag | y | The second entity tag to compare |
Returns
Type | Description |
---|---|
Boolean | true when both entity tags are of equal value |
Inequality(EntityTag, EntityTag)
Compares two entity tags for their inequality
Declaration
public static bool operator !=(EntityTag x, EntityTag y)
Parameters
Type | Name | Description |
---|---|---|
EntityTag | x | The first entity tag to compare |
EntityTag | y | The second entity tag to compare |
Returns
Type | Description |
---|---|
Boolean | true when both entity tags are not of equal value |