TriAxis.RunSharp.CodeGen.Arg C# (CSharp) Method

Arg() public method

ThisOffset is applied inside
public Arg ( int parameterIndex ) : ContextualOperand
parameterIndex int
return ContextualOperand
		public ContextualOperand Arg(int parameterIndex)
		{
			return new ContextualOperand(new _Arg(ThisOffset + parameterIndex, Context.ParameterTypes[parameterIndex]), TypeMapper);
		}
#endregion

Same methods

CodeGen::Arg ( string name ) : ContextualOperand

Usage Example

Example #1
0
        public EventGen WithStandardImplementation()
        {
            if ((object)handler == null)
            {
                if (IsStatic)
                {
                    handler = owner.Private.Static.Field(type, name);
                }
                else
                {
                    handler = owner.Private.Field(type, name);
                }

                CodeGen g = AddMethod();
                g.AssignAdd(handler, g.Arg("handler"));
                adder.GetMethodBuilder().SetImplementationFlags(MethodImplAttributes.IL | MethodImplAttributes.Managed | MethodImplAttributes.Synchronized);

                g = RemoveMethod();
                g.AssignSubtract(handler, g.Arg("handler"));
                remover.GetMethodBuilder().SetImplementationFlags(MethodImplAttributes.IL | MethodImplAttributes.Managed | MethodImplAttributes.Synchronized);
            }
            ;

            return(this);
        }
All Usage Examples Of TriAxis.RunSharp.CodeGen::Arg