2 // generic.cs: Support classes for generics to reduce differences from GMCS
5 // Raja R Harinath <rharinath@novell.com>
7 // Copyright 2006 Novell, Inc.
10 using System.Reflection;
11 using System.Reflection.Emit;
12 using System.Collections;
16 public enum SpecialConstraint
23 public abstract class GenericConstraints
25 public bool HasValueTypeConstraint {
27 throw new NotImplementedException ();
31 public abstract string TypeParameter {
35 public bool IsReferenceType {
36 get { throw new NotSupportedException (); }
40 public class Constraints : GenericConstraints
42 public Constraints (string name, ArrayList constraints, Location loc)
46 public Constraints Clone ()
48 throw new NotImplementedException ();
51 public Location Location {
52 get { return Location.Null; }
55 public override string TypeParameter {
56 get { throw new NotImplementedException (); }
59 public void VerifyClsCompliance ()
64 public class TypeParameter : MemberCore, IMemberContainer
66 public TypeParameter (DeclSpace parent, DeclSpace decl, string name,
67 Constraints constraints, Attributes attrs, Location loc)
68 : base (parent, new MemberName (name, loc), attrs)
70 throw new NotImplementedException ();
73 public static string GetSignatureForError (TypeParameter[] tp)
75 throw new NotImplementedException ();
82 public override bool Define ()
87 public override void ApplyAttributeBuilder (Attribute a,
88 CustomAttributeBuilder cb)
90 throw new NotImplementedException ();
93 public override AttributeTargets AttributeTargets {
94 get { throw new NotImplementedException (); }
97 public override string[] ValidAttributeTargets {
99 return new string [] { "type parameter" };
103 public Constraints Constraints {
109 public override string DocCommentHeader {
110 get { throw new NotImplementedException (); }
113 public bool Resolve (DeclSpace ds)
115 throw new NotImplementedException ();
118 public bool DefineType (IResolveContext ec)
120 throw new NotImplementedException ();
123 public bool DefineType (IResolveContext ec, MethodBuilder builder,
124 MethodInfo implementing, bool is_override)
126 throw new NotImplementedException ();
129 public bool CheckDependencies ()
131 throw new NotImplementedException ();
134 public bool UpdateConstraints (IResolveContext ec, Constraints new_constraints)
136 throw new NotImplementedException ();
144 get { throw new NotImplementedException (); }
147 string IMemberContainer.Name {
148 get { throw new NotImplementedException (); }
151 MemberCache IMemberContainer.BaseCache {
152 get { throw new NotImplementedException (); }
155 bool IMemberContainer.IsInterface {
156 get { throw new NotImplementedException (); }
159 MemberList IMemberContainer.GetMembers (MemberTypes mt, BindingFlags bf)
161 throw new NotImplementedException ();
164 public bool IsSubclassOf (Type t)
166 throw new NotImplementedException ();
169 public MemberList FindMembers (MemberTypes mt, BindingFlags bf,
170 MemberFilter filter, object criteria)
172 throw new NotImplementedException ();
176 public class TypeParameterExpr : TypeExpr
178 public TypeParameterExpr (TypeParameter type_parameter, Location loc)
180 throw new NotImplementedException ();
183 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
188 public TypeParameter TypeParameter {
190 throw new NotImplementedException ();
195 public class TypeParameterName : SimpleName
197 Attributes attributes;
199 public TypeParameterName (string name, Attributes attrs, Location loc)
205 public Attributes OptAttributes {
212 public class GenericTypeExpr : TypeExpr
214 public GenericTypeExpr (DeclSpace t, Location l)
216 throw new NotImplementedException ();
219 public GenericTypeExpr (Type t, TypeArguments args, Location l)
221 throw new NotImplementedException ();
224 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
226 throw new NotImplementedException ();
229 public bool CheckConstraints (IResolveContext ec)
231 throw new NotImplementedException ();
235 public class GenericMethod : DeclSpace
237 public GenericMethod (NamespaceEntry ns, DeclSpace parent, MemberName name,
238 Expression return_type, Parameters parameters)
239 : base (ns, parent, name, null)
241 throw new NotImplementedException ();
244 public override TypeBuilder DefineType ()
246 throw new NotImplementedException ();
249 public override bool Define ()
251 throw new NotImplementedException ();
254 public bool DefineType (EmitContext ec, MethodBuilder mb,
255 MethodInfo implementing, bool is_override)
257 throw new NotImplementedException ();
260 public void EmitAttributes ()
262 throw new NotImplementedException ();
265 internal static void Error_ParameterNameCollision (Location loc, string name, string collisionWith)
269 public override MemberCache MemberCache {
270 get { throw new NotImplementedException (); }
273 public override AttributeTargets AttributeTargets {
275 return AttributeTargets.Method | AttributeTargets.ReturnValue;
279 public override string DocCommentHeader {
283 public new void VerifyClsCompliance ()
285 throw new NotImplementedException ();
289 public class TypeArguments
293 public TypeArguments ()
295 args = new ArrayList ();
298 public TypeArguments (params Expression[] types)
300 args = new ArrayList (types);
303 public void Add (Expression type)
307 public void Add (TypeArguments new_args)
311 public bool Resolve (IResolveContext ec)
313 throw new NotImplementedException ();
316 public Type[] Arguments {
317 get { throw new NotImplementedException (); }
326 public TypeParameterName[] GetDeclarations ()
328 throw new NotImplementedException ();
331 public string GetSignatureForError ()
333 throw new NotImplementedException ();
336 public TypeArguments Clone ()
338 throw new NotImplementedException ();
342 public class TypeInferenceContext
344 public void ExactInference (Type u, Type v)
346 throw new NotImplementedException ();
349 public Type InflateGenericArgument (Type t)
351 throw new NotImplementedException ();