Class GraphObfuscationContractResolver
Newtonsoft JSON resolver that uses Graph Obfuscation attribute to serialize data for logging purposes.
Inherited Members
Namespace: Microsoft.Graph.Communications.Common.Telemetry.Obfuscation
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
public class GraphObfuscationContractResolver : ODataResolver
Constructors
GraphObfuscationContractResolver(IObfuscationEngine, Boolean, ObfuscationMember[])
Initializes a new instance of the GraphObfuscationContractResolver class.
Declaration
public GraphObfuscationContractResolver(IObfuscationEngine engine, bool addOdataType = true, ObfuscationMember[] members = null)
Parameters
Type | Name | Description |
---|---|---|
IObfuscationEngine | engine | The obfuscation engine. |
Boolean | addOdataType | If true, attach the @odata.type property, otherwise only attach this property if it's already present as a first class property. |
ObfuscationMember[] | members | The predefined set of obfuscation members. When specified this GraphObfuscationContractResolver will cache the members and check the cache for the ObfuscationTag. |
Methods
CreateMemberValueProvider(MemberInfo)
Declaration
protected override IValueProvider CreateMemberValueProvider(MemberInfo member)
Parameters
Type | Name | Description |
---|---|---|
MemberInfo | member |
Returns
Type | Description |
---|---|
Newtonsoft.Json.Serialization.IValueProvider |
ResolveContract(Type)
Declaration
public override JsonContract ResolveContract(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |
Returns
Type | Description |
---|---|
Newtonsoft.Json.Serialization.JsonContract |