2 // generic.cs: Support classes for generics to reduce differences from GMCS
5 // Raja R Harinath <rharinath@novell.com>
7 // (C) 2006 Novell, Inc.
10 using System.Reflection;
11 using System.Reflection.Emit;
12 using System.Collections;
16 public abstract class GenericConstraints
18 public abstract string TypeParameter {
22 public bool IsReferenceType {
23 get { throw new NotSupportedException (); }
27 public abstract class Constraints : GenericConstraints
29 public Constraints Clone ()
31 throw new NotImplementedException ();
34 public abstract Location Location {
38 public abstract void VerifyClsCompliance ();
41 public class TypeParameter : MemberCore, IMemberContainer
43 public TypeParameter (DeclSpace parent, DeclSpace decl, string name,
44 Constraints constraints, Attributes attrs, Location loc)
45 : base (parent, new MemberName (name, loc), attrs)
47 throw new NotImplementedException ();
50 public static string GetSignatureForError (TypeParameter[] tp)
52 throw new NotImplementedException ();
59 public override bool Define ()
64 public override void ApplyAttributeBuilder (Attribute a,
65 CustomAttributeBuilder cb)
67 throw new NotImplementedException ();
70 public override AttributeTargets AttributeTargets {
71 get { throw new NotImplementedException (); }
74 public override string[] ValidAttributeTargets {
76 return new string [] { "type parameter" };
80 public Constraints Constraints {
86 public override string DocCommentHeader {
87 get { throw new NotImplementedException (); }
90 public bool Resolve (DeclSpace ds)
92 throw new NotImplementedException ();
95 public bool DefineType (IResolveContext ec)
97 throw new NotImplementedException ();
100 public bool DefineType (IResolveContext ec, MethodBuilder builder,
101 MethodInfo implementing, bool is_override)
103 throw new NotImplementedException ();
106 public bool CheckDependencies ()
108 throw new NotImplementedException ();
111 public bool UpdateConstraints (IResolveContext ec, Constraints new_constraints)
113 throw new NotImplementedException ();
120 Type IMemberContainer.Type {
121 get { throw new NotImplementedException (); }
124 string IMemberContainer.Name {
125 get { throw new NotImplementedException (); }
128 MemberCache IMemberContainer.BaseCache {
129 get { throw new NotImplementedException (); }
132 bool IMemberContainer.IsInterface {
133 get { throw new NotImplementedException (); }
136 MemberList IMemberContainer.GetMembers (MemberTypes mt, BindingFlags bf)
138 throw new NotImplementedException ();
141 public bool IsSubclassOf (Type t)
143 throw new NotImplementedException ();
146 public MemberList FindMembers (MemberTypes mt, BindingFlags bf,
147 MemberFilter filter, object criteria)
149 throw new NotImplementedException ();
153 public class TypeParameterExpr : TypeExpr
155 public override string Name {
156 get { throw new NotImplementedException (); }
159 public override string FullName {
160 get { throw new NotImplementedException (); }
163 public TypeParameterExpr (TypeParameter type_parameter, Location loc)
165 throw new NotImplementedException ();
168 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
174 public class TypeParameterName : SimpleName
176 Attributes attributes;
178 public TypeParameterName (string name, Attributes attrs, Location loc)
184 public Attributes OptAttributes {
191 public class ConstructedType : TypeExpr
193 public ConstructedType (FullNamedExpression fname, TypeArguments args, Location l)
195 throw new NotImplementedException ();
198 public ConstructedType (Type t, TypeParameter[] type_params, Location l)
200 throw new NotImplementedException ();
203 public ConstructedType (Type t, TypeArguments args, Location l)
205 throw new NotImplementedException ();
208 public override string Name {
209 get { throw new NotImplementedException (); }
212 public override string FullName {
213 get { throw new NotImplementedException (); }
216 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
218 throw new NotImplementedException ();
221 public bool CheckConstraints (IResolveContext ec)
223 throw new NotImplementedException ();
227 public class GenericMethod : DeclSpace
229 public GenericMethod (NamespaceEntry ns, DeclSpace parent, MemberName name,
230 Expression return_type, Parameters parameters)
231 : base (ns, parent, name, null)
233 throw new NotImplementedException ();
236 public override TypeBuilder DefineType ()
238 throw new NotImplementedException ();
241 public override bool Define ()
243 throw new NotImplementedException ();
246 public bool DefineType (EmitContext ec, MethodBuilder mb,
247 MethodInfo implementing, bool is_override)
249 throw new NotImplementedException ();
252 public void EmitAttributes ()
254 throw new NotImplementedException ();
257 public override bool DefineMembers ()
259 throw new NotImplementedException ();
262 internal static void Error_ParameterNameCollision (Location loc, string name, string collisionWith)
266 public override MemberCache MemberCache {
267 get { throw new NotImplementedException (); }
270 public override AttributeTargets AttributeTargets {
272 return AttributeTargets.Method | AttributeTargets.ReturnValue;
276 public override string DocCommentHeader {
280 public new void VerifyClsCompliance ()
282 throw new NotImplementedException ();
286 public class TypeArguments
288 public TypeArguments (Location loc)
290 throw new NotImplementedException ();
293 public TypeArguments (Location loc, params Expression[] types)
295 throw new NotImplementedException ();
298 public void Add (Expression type)
300 throw new NotImplementedException ();
303 public void Add (TypeArguments new_args)
305 throw new NotImplementedException ();
308 public bool Resolve (IResolveContext ec)
310 throw new NotImplementedException ();
313 public Type[] Arguments {
314 get { throw new NotImplementedException (); }
318 get { throw new NotImplementedException (); }
321 public bool IsUnbound {
322 get { throw new NotImplementedException (); }
325 public TypeParameterName[] GetDeclarations ()
327 throw new NotImplementedException ();
330 public string GetSignatureForError ()
332 throw new NotImplementedException ();
335 public TypeArguments Clone ()
337 throw new NotImplementedException ();
341 public class TypeInferenceContext
343 public void ExactInference (Type u, Type v)
345 throw new NotImplementedException ();
348 public Type InflateGenericArgument (Type t)
350 throw new NotImplementedException ();