Generate() public method

public Generate ( ) : void
return void
Example #1
0
        public void Generate()
        {
            if (setMethod != null)
            {
                setMethod.Generate();
                builder.SetSetMethod(setMethod.MethodBuilder);
            }

            if (getMethod != null)
            {
                getMethod.Generate();
                builder.SetGetMethod(getMethod.MethodBuilder);
            }
        }
Example #2
0
        public void Generate()
        {
            if (addMethod == null)
            {
                throw new InvalidOperationException("Event add method was not created");
            }
            if (removeMethod == null)
            {
                throw new InvalidOperationException("Event remove method was not created");
            }
            addMethod.Generate();
            eventBuilder.SetAddOnMethod(addMethod.MethodBuilder);

            removeMethod.Generate();
            eventBuilder.SetRemoveOnMethod(removeMethod.MethodBuilder);
        }