Пример #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;
        }