Transform() public method

Transforms a string in the short form of logging command line options to a LoggingPolicies enumeration.
public Transform ( System.Management.Automation.EngineIntrinsics engineIntrinsics, object inputData ) : object
engineIntrinsics System.Management.Automation.EngineIntrinsics Provides access to the APIs for managing the transformation context.
inputData object The parameter argument that is to be transformed.
return object
Ejemplo n.º 1
0
        public void TransformUnsupportedLoggingValue()
        {
            var attr = new LoggingPoliciesAttribute();

            Assert.AreEqual <int>(0, (int)attr.Transform(null, 0));
        }
Ejemplo n.º 2
0
        public void TransformStringLoggingValue()
        {
            var attr = new LoggingPoliciesAttribute();

            Assert.AreEqual <LoggingPolicies>(Default, (LoggingPolicies)attr.Transform(null, "oiceWARMUP"));
        }
Ejemplo n.º 3
0
        public void TransformNullLoggingValue()
        {
            var attr = new LoggingPoliciesAttribute();

            Assert.IsNull(attr.Transform(null, null));
        }
Ejemplo n.º 4
0
 public void TransformUnsupportedLoggingValue()
 {
     var attr = new LoggingPoliciesAttribute();
     Assert.AreEqual<int>(0, (int)attr.Transform(null, 0));
 }
Ejemplo n.º 5
0
 public void TransformStringLoggingValue()
 {
     var attr = new LoggingPoliciesAttribute();
     Assert.AreEqual<LoggingPolicies>(Default, (LoggingPolicies)attr.Transform(null, "oiceWARMUP"));
 }
Ejemplo n.º 6
0
 public void TransformNullLoggingValue()
 {
     var attr = new LoggingPoliciesAttribute();
     Assert.IsNull(attr.Transform(null, null));
 }