public T Get(ActivityContext context)
 {
     if (context == null)
     {
         throw FxTrace.Exception.ArgumentNull("context");
     }
     return(context.GetValue <T>((LocationReference)this));
 }
예제 #2
0
        // Soft-Link: This method is referenced through reflection by
        // ExpressionUtilities.TryRewriteLambdaExpression.  Update that
        // file if the signature changes.
        public object Get(ActivityContext context)
        {
            if (context == null)
            {
                throw FxTrace.Exception.ArgumentNull(nameof(context));
            }

            return(context.GetValue <object>((LocationReference)this));
        }
예제 #3
0
 public T Get <T>(ActivityContext context)
 {
     if (context == null)
     {
         throw FxTrace.Exception.ArgumentNull("context");
     }
     this.ThrowIfNotInTree();
     return(context.GetValue <T>(this.RuntimeArgument));
 }
예제 #4
0
 // Soft-Link: This method is referenced through reflection by
 // ExpressionUtilities.TryRewriteLambdaExpression.  Update that
 // file if the signature changes.
 public T Get <T>(ActivityContext context)
 {
     return(context.GetValue <T>(this));
 }
예제 #5
0
 // Soft-Link: This method is referenced through reflection by
 // ExpressionUtilities.TryRewriteLambdaExpression.  Update that
 // file if the signature changes.
 public object Get(ActivityContext context)
 {
     return(context.GetValue <object>(this));
 }
예제 #6
0
 /// <summary>
 /// Gets the specified context.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <returns>System.Nullable&lt;System.Object&gt;.</returns>
 /// <remarks>
 /// Soft-Link: This method is referenced through reflection by
 /// ExpressionUtilities.TryRewriteLambdaExpression.  Update that
 /// file if the signature changes.
 /// </remarks>
 public object?Get(ActivityContext context) => context?.GetValue <object>(this);