internal static string ToSerializedValue(this FeatureSupportStatus value)
        {
            switch (value)
            {
            case FeatureSupportStatus.NotAvailable:
                return("NotAvailable");

            case FeatureSupportStatus.UnsupportedDeviceVersion:
                return("UnsupportedDeviceVersion");

            case FeatureSupportStatus.Supported:
                return("Supported");
            }
            return(null);
        }
 /// <summary>
 /// Initializes a new instance of the Feature class.
 /// </summary>
 /// <param name="name">The name of the feature.</param>
 /// <param name="status">The feature support status. Possible values
 /// include: 'NotAvailable', 'UnsupportedDeviceVersion',
 /// 'Supported'</param>
 public Feature(string name, FeatureSupportStatus status)
 {
     Name   = name;
     Status = status;
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the Feature class.
 /// </summary>
 /// <param name="name">The name of the feature.</param>
 /// <param name="status">The feature support status. Possible values
 /// include: 'NotAvailable', 'UnsupportedDeviceVersion',
 /// 'Supported'</param>
 public Feature(string name, FeatureSupportStatus status)
 {
     Name   = name;
     Status = status;
     CustomInit();
 }
 /// <summary>
 /// Converts the <paramref name="sourceValue" /> parameter to the <paramref name="destinationType" /> parameter using <paramref
 /// name="formatProvider" /> and <paramref name="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="FeatureSupportStatus" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => FeatureSupportStatus.CreateFrom(sourceValue);