Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the AvailableFeature class.
 /// </summary>
 /// <param name="name">The feature name</param>
 /// <param name="state">The feature state. Possible values include:
 /// 'Enabled', 'Disabled'</param>
 /// <param name="extendedState">The feature extended state. Possible
 /// values include: 'Enabled', 'DisabledByAdmin',
 /// 'UserNotLicensed'</param>
 /// <param name="additionalInfo">Additional feature information</param>
 public AvailableFeature(string name, FeatureState state, FeatureExtendedState extendedState, AdditionalFeatureInfo additionalInfo = default(AdditionalFeatureInfo))
 {
     Name           = name;
     State          = state;
     ExtendedState  = extendedState;
     AdditionalInfo = additionalInfo;
     CustomInit();
 }
        internal static string ToSerializedValue(this FeatureExtendedState value)
        {
            switch (value)
            {
            case FeatureExtendedState.Enabled:
                return("Enabled");

            case FeatureExtendedState.DisabledByAdmin:
                return("DisabledByAdmin");

            case FeatureExtendedState.UserNotLicensed:
                return("UserNotLicensed");
            }
            return(null);
        }