Class SimpleConvertingProperty<T>
Simple converting property
Inheritance
SimpleConvertingProperty<T>
Inherited Members
Namespace:FubarDev.WebDavServer.Props
Assembly:FubarDev.WebDavServer.dll
Syntax
public abstract class SimpleConvertingProperty<T> : SimpleTypedProperty<T>, ITypedWriteableProperty<T>, ITypedReadableProperty<T>, IUntypedWriteableProperty, IUntypedReadableProperty, IProperty
Type Parameters
| Name | Description |
|---|---|
| T | The type to be converted from or to |
Constructors
| Improve this Doc View SourceSimpleConvertingProperty(XName, String, Int32, IPropertyConverter<T>, XName[])
Initializes a new instance of the SimpleConvertingProperty<T> class.
Declaration
protected SimpleConvertingProperty([NotNull] XName name, [CanBeNull] string language, int cost, [NotNull] IPropertyConverter<T> converter, params XName[] alternativeNames)
Parameters
| Type | Name | Description |
|---|---|---|
| XName | name | The property name |
| String | language | The language for the property value |
| Int32 | cost | The cost to get the properties value |
| IPropertyConverter<T> | converter | The converter to copy the value to/from an XElement |
| XName[] | alternativeNames | The alternative names |
Properties
| Improve this Doc View SourceConverter
Gets the converter to be used to copy to/from an XElement
Declaration
[NotNull]
protected IPropertyConverter<T> Converter { get; }
Property Value
| Type | Description |
|---|---|
| IPropertyConverter<T> |
Methods
| Improve this Doc View SourceGetXmlValueAsync(CancellationToken)
Gets the XElement for this property
Declaration
public override Task<XElement> GetXmlValueAsync(CancellationToken ct)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | ct | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<XElement> | The XElement for this property |
Overrides
| Improve this Doc View SourceSetXmlValueAsync(XElement, CancellationToken)
Sets the XElement for the property
Declaration
public override Task SetXmlValueAsync(XElement element, CancellationToken ct)
Parameters
| Type | Name | Description |
|---|---|---|
| XElement | element | The XElement to be set |
| CancellationToken | ct | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | The async task |