Common.Password.FromPlainString C# (CSharp) Method

FromPlainString() public static method

public static FromPlainString ( string value ) : Password
value string
return Password
        public static Password FromPlainString(string value)
        {
            Require.NotEmpty(value, nameof(value));
            return new Password { Value = value };
        }

Usage Example

Example #1
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            var jsonObject = JObject.Load(reader);
            var password   = jsonObject["Value"].ToString();

            return(Password.FromPlainString(password));
        }