ZeroInstall.Store.FeedUriExtensions.ToStringPointer C# (CSharp) Method

ToStringPointer() public static method

Wraps a FeedUri pointer in a string pointer.
public static ToStringPointer ( [ pointer ) : PropertyPointer
pointer [
return PropertyPointer
        public static PropertyPointer<string> ToStringPointer([NotNull] this PropertyPointer<FeedUri> pointer)
        {
            #region Sanity checks
            if (pointer == null) throw new ArgumentNullException(nameof(pointer));
            #endregion

            return new PropertyPointer<string>(
                getValue: () => pointer.Value?.ToStringRfc(),
                setValue: value => pointer.Value = (value == null) ? null : new FeedUri(value),
                defaultValue: pointer.DefaultValue?.ToStringRfc());
        }
    }
FeedUriExtensions