Esempio n. 1
0
        protected TypeModel(NamespaceModel @namespace, string name)
        {
            Guard.ArgumentNotNull(() => @namespace);
            Guard.ArgumentNotNullOrEmpty(() => name);

            Namespace = @namespace;
            Name      = name;
        }
Esempio n. 2
0
        public bool HasParent(NamespaceModel @namespace)
        {
            if (Parent == null)
            {
                return(false);
            }

            return(Parent == @namespace || Parent.HasParent(@namespace));
        }
Esempio n. 3
0
        public NamespaceModel(NamespaceModel parent, string name)
        {
            Guard.ArgumentNotNullOrEmpty(() => name);

            Parent     = parent;
            Name       = name;
            Namespaces = new List <NamespaceModel>();
            Types      = new List <TypeModel>();
        }
Esempio n. 4
0
        public ServiceModel(ApplicationModel application, string name)
        {
            Guard.ArgumentNotNull(() => application);
            Guard.ArgumentNotNullOrEmpty(() => name);

            Application   = application;
            Name          = name;
            RootNamespace = new NamespaceModel(null, $"{application.Name}.{Name}");
        }
Esempio n. 5
0
 public InterfaceModel(NamespaceModel @namespace, string name)
     : base(@namespace, name)
 {
     ImplementedInterfaces = new List <InterfaceModel>();
     GenericTypes          = new List <TypeModel>();
     Attributes            = new List <InterfaceModel>();
     Properties            = new List <PropertyModel>();
     Methods = new List <MethodModel>();
 }
Esempio n. 6
0
 static SystemTypes()
 {
     SystemGenericCollectionsNamespace = SystemNamespace.AddNamespace("Collections").AddNamespace("Generic");
     SystemLinqNamespace           = SystemNamespace.AddNamespace("Linq");
     SystemThreadingTasksNamespace = SystemNamespace.AddNamespace("Threading").AddNamespace("Tasks");
     KledexDomainNamespace         = KledexNamespace.AddNamespace("Domain");
     KledexQueryNamespace          = KledexNamespace.AddNamespace("Queries");
     KledexCommandNamespace        = KledexNamespace.AddNamespace("Commands");
     Guid = Parse("Guid");
 }
Esempio n. 7
0
        public NamespaceModel AddNamespace(string name)
        {
            var ns = Namespaces.FirstOrDefault(n => n.Name == name);

            if (ns == null)
            {
                ns = new NamespaceModel(this, name);
                Namespaces.Add(ns);
            }
            return(ns);
        }
Esempio n. 8
0
 public ClassModel(NamespaceModel @namespace, string name)
     : base(@namespace, name)
 {
     Constructors = new List <MethodModel>();
 }
Esempio n. 9
0
 public EnumerationModel(NamespaceModel @namespace, string name)
     : base(@namespace, name)
 {
     Literals = new List <Literal>();
 }