Example #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);
        }
Example #2
0
 private 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);
     }
 }