コード例 #1
0
ファイル: TypeEntity.Structure.cs プロジェクト: menozz/lens
        /// <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
ファイル: TypeEntity.cs プロジェクト: TrickyCat/lens
        /// <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;
        }