Beispiel #1
0
 public CSharpUnresolvedType(CSharpSolution solution, CSharpNamespace ns, IReadOnlyList <CSharpNamespace> usings, string name)
 {
     this.solution = solution;
     this.ns       = ns;
     this.usings   = usings;
     this.Name     = name;
 }
Beispiel #2
0
 public CSharpNamespace(CSharpNamespace root, string name)
 {
     if (root != null)
     {
         this.Name = $"{root.Name}.{name}";
     }
     else
     {
         this.Name = name;
     }
     this.Names = name.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries);
 }
Beispiel #3
0
 public CSharpObject(CSharpNamespace ns, IReadOnlyList <CSharpNamespace> usings, string name, CSharpObjectType objectType, IReadOnlyList <CSharpUnresolvedType> implements, bool isPublic, bool isStatic, bool isAbstract, bool isPartial, IReadOnlyList <CSharpObject> classes, IReadOnlyList <CSharpObject> structs, IReadOnlyList <CSharpObject> interfaces, IReadOnlyList <CSharpEnum> enums, IReadOnlyList <CSharpDelegate> delegates, IReadOnlyList <CSharpProperty> properties, IReadOnlyList <CSharpMethod> methods, IReadOnlyList <CSharpAttribute> attributes)
 {
     this.Namespace       = ns;
     this.Usings          = usings;
     this.Name            = name;
     this.ObjectType      = objectType;
     this.Implements      = implements;
     this.IsPublic        = isPublic;
     this.IsStatic        = isStatic;
     this.IsAbstract      = isAbstract;
     this.IsPartial       = isPartial;
     this.InnerClasses    = classes;
     this.InnerStructs    = structs;
     this.InnerInterfaces = interfaces;
     this.InnerEnums      = enums;
     this.InnerDelegates  = delegates;
     this.Properties      = properties;
     this.Methods         = methods.Where(x => x.Name != name).ToArray();
     this.Constructors    = methods.Where(x => x.Name == name).ToArray();
     this.Attributes      = attributes;
 }
Beispiel #4
0
 public CSharpDelegate(CSharpNamespace ns, IReadOnlyList <CSharpNamespace> usings, string name, CSharpUnresolvedType returnType, bool isPublic, IReadOnlyList <CSharpParameter> parameters, IReadOnlyList <CSharpAttribute> attributes)
     : base(ns, usings, name, CSharpObjectType.Delegate, Array.Empty <CSharpUnresolvedType>(), isPublic, false, false, false, Array.Empty <CSharpObject>(), Array.Empty <CSharpObject>(), Array.Empty <CSharpObject>(), Array.Empty <CSharpEnum>(), Array.Empty <CSharpDelegate>(), Array.Empty <CSharpProperty>(), Array.Empty <CSharpMethod>(), attributes)
 {
     this.ReturnType = returnType;
     this.Parameters = parameters;
 }
Beispiel #5
0
 public CSharpEnum(CSharpSolution solution, CSharpNamespace ns, IReadOnlyList <CSharpNamespace> usings, string name, Type type, bool isPublic, IReadOnlyList <CSharpEnumValue> values, IReadOnlyList <CSharpAttribute> attributes)
     : base(ns, usings, name, CSharpObjectType.Enum, new CSharpUnresolvedType[] { new CSharpUnresolvedType(solution, ns, usings, type.Name) }, isPublic, false, false, false, Array.Empty <CSharpObject>(), Array.Empty <CSharpObject>(), Array.Empty <CSharpObject>(), Array.Empty <CSharpEnum>(), Array.Empty <CSharpDelegate>(), Array.Empty <CSharpProperty>(), Array.Empty <CSharpMethod>(), attributes)
 {
     this.Type   = type;
     this.Values = values;
 }