예제 #1
0
        /// <summary>
        /// Creates a new constructor with the given argument types.
        /// </summary>
        internal ConstructorEntity CreateConstructor(string[] argTypes = null, bool prepare = true)
        {
            var ce = new ConstructorEntity(this)
            {
                ArgumentTypes = argTypes == null ? null : argTypes.Select(Context.ResolveType).ToArray(),
            };

            _Constructors.Add(ce);
            Context.UnprocessedMethods.Add(ce);

            if (prepare)
                ce.PrepareSelf();
            else
                Context.UnpreparedTypeContents.Add(ce);

            return ce;
        }
예제 #2
0
        /// <summary>
        /// Creates a new constructor with the given argument types.
        /// </summary>
        internal ConstructorEntity CreateConstructor(string[] argTypes = null, bool prepare = true)
        {
            var ce = new ConstructorEntity(this)
            {
                ArgumentTypes = argTypes?.Select(Context.ResolveType).ToArray(),
            };

            _constructors.Add(ce);
            Context.UnprocessedMethods.Add(ce);

            if (prepare)
            {
                ce.PrepareSelf();
            }
            else
            {
                Context.UnpreparedTypeContents.Add(ce);
            }

            return(ce);
        }
예제 #3
0
        /// <summary>
        /// Creates a new constructor with the given argument types.
        /// </summary>
        internal ConstructorEntity CreateConstructor(string[] argTypes = null, bool prepare = false)
        {
            var ce = new ConstructorEntity
            {
                ArgumentTypes = argTypes == null ? null : argTypes.Select(Context.ResolveType).ToArray(),
                ContainerType = this,
            };
            _Constructors.Add(ce);

            if(prepare)
                ce.PrepareSelf();

            return ce;
        }