/// <summary> /// Initializes a new instance of the <see cref="GenericDateTimeRfc1123Property"/> class. /// </summary> /// <param name="name">The property name</param> /// <param name="cost">The cost to query the properties value</param> /// <param name="getValueAsyncFunc">The function to get the property value</param> /// <param name="setValueAsyncFunc">The function to set the property value</param> /// <param name="alternativeNames">Alternative property names</param> public GenericDateTimeRfc1123Property(XName name, int cost, GetPropertyValueAsyncDelegate <DateTime> getValueAsyncFunc, SetPropertyValueAsyncDelegate <DateTime> setValueAsyncFunc, params XName[] alternativeNames) : base(name, null, cost, new DateTimeRfc1123Converter(), getValueAsyncFunc, setValueAsyncFunc, alternativeNames) { }
/// <summary> /// Initializes a new instance of the <see cref="LastModifiedProperty"/> class. /// </summary> /// <param name="propValue">The initial property value</param> /// <param name="setValueAsyncFunc">The delegate to set the value asynchronously</param> public LastModifiedProperty(DateTime propValue, SetPropertyValueAsyncDelegate <DateTime> setValueAsyncFunc) : base(PropertyName, 0, ct => Task.FromResult(propValue), setValueAsyncFunc, WebDavXml.Dav + "lastmodified") { }
/// <summary> /// Initializes a new instance of the <see cref="GenericProperty{T}"/> class. /// </summary> /// <param name="name">The property name</param> /// <param name="language">The language for the property value</param> /// <param name="cost">The cost to query the properties value</param> /// <param name="converter">The converter to convert to/from the underlying property value</param> /// <param name="getValueAsyncFunc">The function to get the property value</param> /// <param name="setValueAsyncFunc">The function to set the property value</param> /// <param name="alternativeNames">Alternative property names</param> public GenericProperty([NotNull] XName name, [CanBeNull] string language, int cost, [NotNull] IPropertyConverter <T> converter, GetPropertyValueAsyncDelegate <T> getValueAsyncFunc, SetPropertyValueAsyncDelegate <T> setValueAsyncFunc, params XName[] alternativeNames) : base(name, language, cost, converter, alternativeNames) { _getValueAsyncFunc = getValueAsyncFunc; _setValueAsyncFunc = setValueAsyncFunc; }
/// <summary> /// Initializes a new instance of the <see cref="GenericStringProperty"/> class. /// </summary> /// <param name="name">The property name</param> /// <param name="language">The language for the property value</param> /// <param name="cost">The cost to query the properties value</param> /// <param name="getValueAsyncFunc">The function to get the property value</param> /// <param name="setValueAsyncFunc">The function to set the property value</param> /// <param name="alternativeNames">Alternative property names</param> public GenericStringProperty(XName name, string language, int cost, GetPropertyValueAsyncDelegate <string> getValueAsyncFunc, SetPropertyValueAsyncDelegate <string> setValueAsyncFunc, params XName[] alternativeNames) : base(name, language, cost, new StringConverter(), getValueAsyncFunc, setValueAsyncFunc, alternativeNames) { }
/// <summary> /// Initializes a new instance of the <see cref="CreationDateProperty"/> class. /// </summary> /// <param name="propValue">The initial property value</param> /// <param name="setValueAsyncFunc">The delegate to set the value asynchronously</param> public CreationDateProperty(DateTimeOffset propValue, SetPropertyValueAsyncDelegate <DateTimeOffset> setValueAsyncFunc) : base(PropertyName, 0, ct => Task.FromResult(propValue), setValueAsyncFunc) { }