2 // support.cs: Support routines to work around the fact that System.Reflection.Emit
3 // can not introspect types that are being constructed
6 // Miguel de Icaza (miguel@ximian.com)
8 // (C) 2001 Ximian, Inc (http://www.ximian.com)
11 using System.Reflection.Emit;
12 using System.Reflection;
18 public interface ParameterData {
19 Type ParameterType (int pos);
21 string ParameterDesc (int pos);
24 public class ReflectionParameters : ParameterData {
27 public ReflectionParameters (ParameterInfo [] pi)
32 public Type ParameterType (int pos)
34 return pi [pos].ParameterType;
37 public string ParameterDesc (int pos)
39 StringBuilder sb = new StringBuilder ();
47 sb.Append (TypeManager.CSharpName (ParameterType (pos)));
49 return sb.ToString ();
61 public class InternalParameters : ParameterData {
64 public InternalParameters (Type [] pars)
78 public Type ParameterType (int pos)
86 public string ParameterDesc (int pos)
88 return TypeManager.CSharpName (ParameterType (pos));