2 // typespec.cs: Type specification
4 // Authors: Marek Safar (marek.safar@gmail.com)
6 // Dual licensed under the terms of the MIT X11 or GNU GPL
8 // Copyright 2010 Novell, Inc
12 using System
.Collections
.Generic
;
16 public class TypeSpec
: MemberSpec
19 protected MemberCache cache
;
21 public TypeSpec (MemberKind kind
, ITypeDefinition definition
, Type info
, string name
, Modifiers modifiers
)
22 : base (kind
, definition
, name
, modifiers
)
27 public TypeSpec BaseType { get; set; }
29 public override Type DeclaringType
{
30 get { return info.DeclaringType; }
33 public Type MetaInfo
{
37 public MemberCache MemberCache
{
40 // cache = new MemberCache (BaseType);
42 // ((ITypeDefinition) definition).LoadMembers (cache);
50 public interface ITypeDefinition
: IMemberDefinition
52 void LoadMembers (MemberCache cache
);
55 class InternalType : TypeSpec
57 public static readonly TypeSpec AnonymousMethod = new InternalType ("anonymous method");
58 public static readonly TypeSpec Arglist = new InternalType ("__arglist");
59 // public static readonly TypeSpec Dynamic = new DynamicType ();
60 public static readonly TypeSpec MethodGroup = new InternalType ("method group");
62 protected InternalType (string name)
63 : base (null, null, name, Modifiers.PUBLIC)
65 // cache = MemberCache.Empty;