Exemple #1
0
 /// <summary>
 /// Sets the target in the given JoinPointContext to obj. This static method is useful
 /// to store a target that is on the stack, because we cannot directly place the JoinPointContext
 /// object before it on the stack.
 /// </summary>
 /// <param name="obj">The target object to store.</param>
 /// <param name="context">The JoinPointContext to store it in.</param>
 public static void SetTarget(object obj, JoinPointContext context)
 {
     if (context != null)
     {
         context.StartTarget = obj;
     }
 }
Exemple #2
0
 /// <summary>
 /// Sets the return value in the given JoinPointContext to obj. This static method is useful
 /// to store a return value that is on the stack, because we cannot directly place the JoinPointContext
 /// object before it on the stack.
 /// </summary>
 /// <param name="obj">The object to store as return value.</param>
 /// <param name="context">The join point context it applies to.</param>
 public static void SetReturnValue(Object obj, JoinPointContext context)
 {
     if (context != null)
     {
         context.ReturnValue = obj;
     }
 }
Exemple #3
0
 /// <summary>
 /// Adds the argument of a method to the list of arguments in the given JoinPointContext.
 /// This static method is useful to add an argument that is on the stack, because we cannot
 /// directly place the JoinPointContext object before it on the stack.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <param name="ordinal">The ordinal.</param>
 /// <param name="argumentType">Type of the argument.</param>
 /// <param name="argumentAttributes">The argument attributes.</param>
 /// <param name="context">The context.</param>
 public static void AddArgument(object value, short ordinal, Type argumentType, ArgumentAttributes argumentAttributes, JoinPointContext context)
 {
     if (context != null)
     {
         context.AddArgument(ordinal, argumentType, argumentAttributes, value);
     }
 }