Пример #1
0
 public PropertyIdentifier(string name, bool hasGet, bool hasSet, TypeIdentifier typeId)
     : base(name)
 {
     _typeId = typeId;
     HasGet = hasGet;
     HasSet = hasSet;
 }
Пример #2
0
 public DeclaredType(TypeIdentifier name, Namespace ns)
     : base(name)
 {
     Namespace = ns;
     Summary = new List<IComment>();
     Interfaces = new List<IReferencable>();
 }
Пример #3
0
 public MethodIdentifier(string name, TypeIdentifier[] parameters, bool isStatic, bool isPublic, bool isConstructor, TypeIdentifier typeId)
     : base(name)
 {
     _typeId        = typeId;
     _parameters    = parameters;
     _isStatic      = isStatic;
     _isPublic      = isPublic;
     _isConstructor = isConstructor;
 }
Пример #4
0
 public MethodIdentifier(string name, TypeIdentifier[] parameters, bool isStatic, bool isPublic,
                         TypeIdentifier typeId)
     : base(name)
 {
     this.typeId     = typeId;
     this.parameters = parameters;
     this.isStatic   = isStatic;
     this.isPublic   = isPublic;
 }
Пример #5
0
        public static DeclaredType Unresolved(TypeIdentifier typeIdentifier, Type type, Namespace ns)
        {
            var declaredType = new DeclaredType(typeIdentifier, ns) { IsResolved = false, representedType = type };

            if (type.BaseType != null)
                declaredType.ParentType = Unresolved(
                    Identifier.FromType(type.BaseType),
                    type.BaseType,
                    Namespace.Unresolved(Identifier.FromNamespace(type.BaseType.Namespace)));

            IEnumerable<Type> interfaces = GetInterfaces(type);

            foreach (Type face in interfaces)
            {
                declaredType.Interfaces.Add(
                    Unresolved(
                        Identifier.FromType(face),
                        face,
                        Namespace.Unresolved(Identifier.FromNamespace(face.Namespace))));
            }

            return declaredType;
        }
Пример #6
0
 public static DeclaredType Unresolved(TypeIdentifier typeIdentifier, Namespace ns)
 {
     return new DeclaredType(typeIdentifier, ns) { IsResolved = false };
 }
Пример #7
0
 public EnumIdentifier(string name, TypeIdentifier typeId)
     : base(name)
 {
     _typeId = typeId;
 }
Пример #8
0
 public EventIdentifier(string name, TypeIdentifier typeId) : base(name)
 {
     this.typeId = typeId;
 }
Пример #9
0
        public static DeclaredType Unresolved(TypeIdentifier typeIdentifier, Type declaration, Namespace ns)
        {
            var declaredType = new DeclaredType(typeIdentifier, ns) { IsResolved = false, declaration = declaration };

            if (declaration.BaseType != null)
            {
                declaredType.ParentType = Unresolved(
                    IdentifierFor.Type(declaration.BaseType),
                    declaration.BaseType,
                    Namespace.Unresolved(IdentifierFor.Namespace(declaration.BaseType.Namespace)));
            }

            IEnumerable<Type> interfaces = GetInterfaces(declaration);

            foreach (Type face in interfaces)
            {
                declaredType.Interfaces.Add(
                    Unresolved(IdentifierFor.Type(face), face, Namespace.Unresolved(IdentifierFor.Namespace(face.Namespace))));
            }

            return declaredType;
        }
Пример #10
0
 public static MethodIdentifier FromException(string name, TypeIdentifier typeId, Exception ex)
 {
     return(new MethodIdentifier(name, new TypeIdentifier[] {}, false, false, typeId));
 }
Пример #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeclaredType"/> class.
 /// </summary>
 /// <param name="name">
 /// The name.
 /// </param>
 /// <param name="ns">
 /// The ns.
 /// </param>
 public DeclaredType(TypeIdentifier name, Namespace ns)
     : base(name)
 {
     this.Namespace = ns;
     this.Interfaces = new List<IReferencable>();
 }