Esempio n. 1
0
        /// <summary>
        /// Adds a new <typeparamref name="TItem"/> with the <paramref name="name"/>, <paramref name="constraints"/>,
        /// and <paramref name="requiresConstructor"/> provided.
        /// </summary>
        /// <param name="name">The name of the constraint.</param>
        /// <param name="constraints">The type-reference constraints for the resulted <paramref name="TItem"/>.</param>
        /// <param name="requiresConstructor">Whether or not the resulted <typeparamref name="TItem"/>
        /// has a null-constructor constraint.</param>
        /// <returns>A new <typeparamref name="TItem"/> named <paramref name="name"/> and
        /// has the null constructor constraint based upon <paramref name="requiresConstructor"/>
        /// and additional constraints as expressed by <paramref name="constraints"/>.</returns>
        public override ITypeParameterMember <TParentDom> AddNew(string name, ITypeReferenceCollection constraints, bool requiresConstructor, TypeParameterSpecialCondition specialCondition)
        {
            TypeParameterMember <TParentDom> item = new TypeParameterMember <TParentDom>(name, this.TargetDeclaration);

            item.RequiresConstructor = requiresConstructor;
            item.Constraints.AddRange(constraints.ToArray());
            item.SpecialCondition = specialCondition;
            this._Add(item.Name, item);
            return(item);
        }
Esempio n. 2
0
 public ParameterTypeReference(TypeParameterMember <TDom, TParent> reference)
     : base(reference)
 {
 }