/// <summary> /// Initializes a new instance of the <see cref="T:Composestar.StarLight.ContextInfo.ArgumentInfo"/> class. /// </summary> /// <param name="type">The type.</param> /// <param name="value">The value.</param> /// <param name="ordinal">The ordinal.</param> /// <param name="argumentAttributes">The argument attributes.</param> internal ArgumentInfo(Type type, Object value, short ordinal, ArgumentAttributes argumentAttributes) { _type = type; _value = value; _ordinal = ordinal; _argumentAttributes = argumentAttributes; }
public void AddArgument(short ordinal, Type argumentType, ArgumentAttributes argumentAttributes, object value) { ArgumentInfo ai = new ArgumentInfo(argumentType, value, ordinal, argumentAttributes); ai.BookKeeping = _bookkeeping; ai.AutoBookKeeping = _autobk; if (_arguments.ContainsKey(ordinal)) { _arguments[ordinal] = ai; } else { _arguments.Add(ordinal, ai); } }
/// <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); } }