Esempio n. 1
0
        /// <summary>
        /// </summary>
        /// <param name="type">
        /// </param>
        /// <param name="typeResolver">
        /// </param>
        public SynthesizedEnumToStringMethod(IType type, ITypeResolver typeResolver)
            : base("ToString", type, typeResolver.System.System_String, isOverride: true)
        {
            object[] code;
            IList<object> tokenResolutions;
            IList<IType> locals;
            IList<IParameter> parameters;
            EnumGen.GetEnumToStringMethod(type, typeResolver, out code, out tokenResolutions, out locals, out parameters);

            this._methodBody = new SynthesizedMethodBodyDecorator(
                null,
                locals,
                MethodBodyBank.Transform(code).ToArray());

            this._parameters = parameters;
            this._tokenResolutions = tokenResolutions;
        }
Esempio n. 2
0
        /// <summary>
        /// </summary>
        /// <param name="type">
        /// </param>
        /// <param name="typeResolver">
        /// </param>
        public SynthesizedMultiDimArrayGetMethod(IType type, ITypeResolver typeResolver)
            : base("Get", type, type.GetElementType())
        {
            object[]           code;
            IList <object>     tokenResolutions;
            IList <IType>      locals;
            IList <IParameter> parameters;

            ArrayMultiDimensionGen.GetMultiDimensionArrayGet(type, typeResolver, out code, out tokenResolutions, out locals, out parameters);

            this._methodBody = new SynthesizedMethodBodyDecorator(
                null,
                locals,
                MethodBodyBank.Transform(code).ToArray());

            this._parameters       = parameters;
            this._tokenResolutions = tokenResolutions;
        }
Esempio n. 3
0
        /// <summary>
        /// </summary>
        /// <param name="type">
        /// </param>
        /// <param name="typeResolver">
        /// </param>
        public SynthesizedMultiDimArrayCtorMethod(IType arrayType, ITypeResolver typeResolver)
            : base(arrayType, ".ctor")
        {
            this.typeResolver = typeResolver;

            object[]           code;
            IList <object>     tokenResolutions;
            IList <IType>      locals;
            IList <IParameter> parameters;

            ArrayMultiDimensionGen.GetMultiDimensionArrayCtor(arrayType, typeResolver, out code, out tokenResolutions, out locals, out parameters);

            this._methodBody = new SynthesizedMethodBodyDecorator(
                null,
                locals,
                MethodBodyBank.Transform(code).ToArray());

            this._parameters       = parameters;
            this._tokenResolutions = tokenResolutions;
        }