public void SetValue <T>(InOutArgument <T> argument, T value)
 {
     this.ThrowIfDisposed();
     if (argument != null)
     {
         argument.ThrowIfNotInTree();
         this.SetValueCore <T>(argument.RuntimeArgument, value);
     }
 }
 public T GetValue <T>(InOutArgument <T> argument)
 {
     this.ThrowIfDisposed();
     if (argument == null)
     {
         throw FxTrace.Exception.ArgumentNull("argument");
     }
     argument.ThrowIfNotInTree();
     return(this.GetValueCore <T>(argument.RuntimeArgument));
 }
Beispiel #3
0
        public static InOutArgument <T> FromVariable(Variable <T> variable)
        {
            InOutArgument <T>     argument  = new InOutArgument <T>();
            VariableReference <T> reference = new VariableReference <T> {
                Variable = variable
            };

            argument.Expression = reference;
            return(argument);
        }
 public static InOutArgument CreateReference(InOutArgument argumentToReference, string referencedArgumentName)
 {
     if (argumentToReference == null)
     {
         throw FxTrace.Exception.ArgumentNull("argumentToReference");
     }
     if (string.IsNullOrEmpty(referencedArgumentName))
     {
         throw FxTrace.Exception.ArgumentNullOrEmpty("referencedArgumentName");
     }
     return((InOutArgument)ActivityUtilities.CreateReferenceArgument(argumentToReference.ArgumentType, ArgumentDirection.InOut, referencedArgumentName));
 }
 public static InArgument CreateReference(InOutArgument argumentToReference, string referencedArgumentName)
 {
     if (argumentToReference == null)
     {
         throw FxTrace.Exception.ArgumentNull("argumentToReference");
     }
     if (string.IsNullOrEmpty(referencedArgumentName))
     {
         throw FxTrace.Exception.ArgumentNullOrEmpty("referencedArgumentName");
     }
     return (InArgument) ActivityUtilities.CreateReferenceArgument(argumentToReference.ArgumentType, ArgumentDirection.In, referencedArgumentName);
 }
Beispiel #6
0
        //[SuppressMessage(FxCop.Category.Design, FxCop.Rule.ConsiderPassingBaseTypesAsParameters,
        //    Justification = "Generic needed for type inference")]
        public void SetValue <T>(InOutArgument <T> argument, T value)
        {
            ThrowIfDisposed();

            if (argument == null)
            {
                // We want to shortcut if the argument is null
                return;
            }

            argument.ThrowIfNotInTree();

            SetValueCore(argument.RuntimeArgument, value);
        }
Beispiel #7
0
        public static OutArgument CreateReference(InOutArgument argumentToReference, string referencedArgumentName)
        {
            if (argumentToReference == null)
            {
                throw FxTrace.Exception.ArgumentNull("argumentToReference");
            }

            if (string.IsNullOrEmpty(referencedArgumentName))
            {
                throw FxTrace.Exception.ArgumentNullOrEmpty("referencedArgumentName");
            }

            // Note that we explicitly pass Out since we want an OutArgument created
            return (OutArgument)ActivityUtilities.CreateReferenceArgument(argumentToReference.ArgumentType, ArgumentDirection.Out, referencedArgumentName);
        }
Beispiel #8
0
        //[SuppressMessage(FxCop.Category.Design, FxCop.Rule.ConsiderPassingBaseTypesAsParameters,
        //    Justification = "Subclass needed to enforce rules about which directions can be referenced.")]
        public static InArgument CreateReference(InOutArgument argumentToReference, string referencedArgumentName)
        {
            if (argumentToReference == null)
            {
                throw FxTrace.Exception.ArgumentNull(nameof(argumentToReference));
            }

            if (string.IsNullOrEmpty(referencedArgumentName))
            {
                throw FxTrace.Exception.ArgumentNullOrEmpty(nameof(referencedArgumentName));
            }

            // Note that we explicitly pass In since we want an InArgument created
            return((InArgument)ActivityUtilities.CreateReferenceArgument(argumentToReference.ArgumentType, ArgumentDirection.In, referencedArgumentName));
        }
Beispiel #9
0
 public static InOutArgument CreateReference(InOutArgument argumentToReference, string referencedArgumentName)
 {
     throw new NotImplementedException();
 }
Beispiel #10
0
 public void SetValue <T> (InOutArgument <T> argument, T value)
 {
     throw new NotImplementedException();
 }
Beispiel #11
0
 public T GetValue <T> (InOutArgument <T> argument)
 {
     throw new NotImplementedException();
 }
Beispiel #12
0
		public static OutArgument CreateReference (InOutArgument argumentToReference, string referencedArgumentName)
		{
			throw new NotImplementedException ();
		}