// Soft-Link: This method is referenced through reflection by // ExpressionUtilities.TryRewriteLambdaExpression. Update that // file if the signature changes. //[SuppressMessage(FxCop.Category.Design, FxCop.Rule.ConsiderPassingBaseTypesAsParameters, //Justification = "Generic needed for type inference")] public T GetValue <T>(InOutArgument <T> argument) { ThrowIfDisposed(); if (argument == null) { throw Microsoft.CoreWf.Internals.FxTrace.Exception.ArgumentNull("argument"); } argument.ThrowIfNotInTree(); return(GetValueCore <T>(argument.RuntimeArgument)); }
//[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); }
//[SuppressMessage(FxCop.Category.Design, FxCop.Rule.ConsiderPassingBaseTypesAsParameters, //Justification = "Subclass needed to enforce rules about which directions can be referenced.")] public static InOutArgument CreateReference(InOutArgument argumentToReference, string referencedArgumentName) { if (argumentToReference == null) { throw Microsoft.CoreWf.Internals.FxTrace.Exception.ArgumentNull("argumentToReference"); } if (string.IsNullOrEmpty(referencedArgumentName)) { throw Microsoft.CoreWf.Internals.FxTrace.Exception.ArgumentNullOrEmpty("referencedArgumentName"); } return((InOutArgument)ActivityUtilities.CreateReferenceArgument(argumentToReference.ArgumentType, ArgumentDirection.InOut, referencedArgumentName)); }
//[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 Microsoft.CoreWf.Internals.FxTrace.Exception.ArgumentNull("argumentToReference"); } if (string.IsNullOrEmpty(referencedArgumentName)) { throw Microsoft.CoreWf.Internals.FxTrace.Exception.ArgumentNullOrEmpty("referencedArgumentName"); } // Note that we explicitly pass In since we want an InArgument created return((InArgument)ActivityUtilities.CreateReferenceArgument(argumentToReference.ArgumentType, ArgumentDirection.In, referencedArgumentName)); }