コード例 #1
0
        // remove static methods (T.ReferenceEquals() is not possible)
        public override List <IMethod> GetMethods()
        {
            List <IMethod> list = base.GetMethods();

            if (list != null)
            {
                list.RemoveAll(delegate(IMethod m) { return(m.IsStatic || m.IsConstructor); });
                if (typeParameter.HasConstructableConstraint || typeParameter.HasValueTypeConstraint)
                {
                    list.Add(new Constructor(ModifierEnum.Public, this,
                                             DefaultTypeParameter.GetDummyClassForTypeParameter(typeParameter)));
                }
            }
            return(list);
        }
コード例 #2
0
 static void AddTypeParametersForCtrlSpace(ArrayList result, IEnumerable <ITypeParameter> typeParameters)
 {
     foreach (ITypeParameter p in typeParameters)
     {
         DefaultClass c = DefaultTypeParameter.GetDummyClassForTypeParameter(p);
         if (p.Method != null)
         {
             c.Documentation = "Type parameter of " + p.Method.Name;
         }
         else
         {
             c.Documentation = "Type parameter of " + p.Class.Name;
         }
         result.Add(c);
     }
 }