/// <summary> /// Transforms a string in the short form of logging command line options to a <see cref="LoggingPolicies"/> enumeration. /// </summary> /// <param name="engineIntrinsics">Provides access to the APIs for managing the transformation context.</param> /// <param name="inputData">The parameter argument that is to be transformed.</param> /// <returns>The transformed object.</returns> public override object Transform(EngineIntrinsics engineIntrinsics, object inputData) { if (null == inputData) { return null; } var converter = new LoggingPoliciesConverter(); if (converter.CanConvertFrom(inputData.GetType())) { var mode = converter.ConvertFrom(inputData); return mode; } // Return the source data for other transformations in the chain. return inputData; }
/// <summary> /// Transforms a string in the short form of logging command line options to a <see cref="LoggingPolicies"/> enumeration. /// </summary> /// <param name="engineIntrinsics">Provides access to the APIs for managing the transformation context.</param> /// <param name="inputData">The parameter argument that is to be transformed.</param> /// <returns>The transformed object.</returns> public override object Transform(EngineIntrinsics engineIntrinsics, object inputData) { if (null == inputData) { return(null); } var converter = new LoggingPoliciesConverter(); if (converter.CanConvertFrom(inputData.GetType())) { var mode = converter.ConvertFrom(inputData); return(mode); } // Return the source data for other transformations in the chain. return(inputData); }