JsonProperty GetJsonProperty(Type type, JsonProperty mappedProperty, SensitiveDataAttribute attribute)
 {
     return new JsonProperty()
     {
         DeclaringType = type,
         PropertyName = GetEmittedPropertyName(mappedProperty, attribute),
         UnderlyingName = mappedProperty.UnderlyingName,
         PropertyType = typeof(string),
         ValueProvider = new SensitiveDataValueProvider(mappedProperty.UnderlyingName, SaltGenerator),
         Readable = true,
     };
 }
示例#2
0
 JsonProperty GetJsonProperty(Type type, JsonProperty mappedProperty, SensitiveDataAttribute attribute)
 {
     return(new JsonProperty()
     {
         DeclaringType = type,
         PropertyName = GetEmittedPropertyName(mappedProperty, attribute),
         UnderlyingName = mappedProperty.UnderlyingName,
         PropertyType = typeof(string),
         ValueProvider = new SensitiveDataValueProvider(mappedProperty.UnderlyingName, SaltGenerator),
         Readable = true,
     });
 }
 private string GetEmittedPropertyName(JsonProperty originalProperty, SensitiveDataAttribute attribute)
 {
     return attribute.EmittedPropertyName.Clear() ?? $"{originalProperty.PropertyName}_encr";
 }
示例#4
0
 private string GetEmittedPropertyName(JsonProperty originalProperty, SensitiveDataAttribute attribute)
 {
     return(attribute.EmittedPropertyName.Clear() ?? $"{originalProperty.PropertyName}_encr");
 }