Ejemplo n.º 1
0
 public RuntimeTypeRef(RuntimePackage package, Type declaredType)
 {
     Package      = package;
     DeclaredType = declaredType;
     State        = new RuntimeState(declaredType);
     Key          = RuntimeTypeKey.From(package.RegionKey, declaredType.Name);
 }
Ejemplo n.º 2
0
        public override T Get(RuntimeTypeKey key, bool strict = true)
        {
            T type;

            ExpectNot(_typesByKey.TryGetValue(key, out type) && strict, "Unknown domain key: " + Text.Of(key));

            return(type);
        }
Ejemplo n.º 3
0
        private T GetPackageType <T>(RuntimeTypeKey key, Func <RuntimePackage, RuntimeTypeSetBase <T> > selectTypes, bool strict = true) where T : RuntimeType
        {
            var packageType = this
                              .Select(package => selectTypes(package).Get(key, strict: false))
                              .FirstOrDefault(type => type != null);

            ExpectNot(strict && packageType == null, $"Failed to resolve {typeof(T)} by key: {key}");

            return(packageType);
        }
Ejemplo n.º 4
0
 public AreaType GetArea(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Areas, strict));
 }
Ejemplo n.º 5
0
 public EventType GetEvent(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Events, strict));
 }
Ejemplo n.º 6
0
        public AreaType GetArea(RuntimeTypeKey key, bool strict = true)
        {
            var region = Get(key.Region, strict);

            return(region?.GetArea(key, strict));
        }
Ejemplo n.º 7
0
 public FlowType GetFlow(RuntimeTypeKey key, bool strict = true)
 {
     return(Regions.GetFlow(key, strict));
 }
Ejemplo n.º 8
0
 public RequestType GetRequest(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Requests, strict));
 }
Ejemplo n.º 9
0
        public WebApiType GetWebApi(RuntimeTypeKey key, bool strict = true)
        {
            var region = Get(key.Region, strict);

            return(region?.GetWebApi(key, strict));
        }
Ejemplo n.º 10
0
 public TopicType GetTopic(RuntimeTypeKey key, bool strict = true)
 {
     return(Packages.GetTopic(key, strict));
 }
Ejemplo n.º 11
0
 public QueryType GetQuery(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Queries, strict));
 }
Ejemplo n.º 12
0
 public AreaType GetArea(RuntimeTypeKey key, bool strict = true)
 {
     return(Packages.GetArea(key, strict));
 }
Ejemplo n.º 13
0
 public EventType GetEvent(RuntimeTypeKey key, bool strict = true)
 {
     return(Packages.GetEvent(key, strict));
 }
Ejemplo n.º 14
0
 public DurableType GetDurable(RuntimeTypeKey key, bool strict = true)
 {
     return(Packages.GetDurable(key, strict));
 }
Ejemplo n.º 15
0
 public WebApiType GetWebApi(RuntimeTypeKey key, bool strict = true)
 {
     return(Packages.GetWebApi(key, strict));
 }
Ejemplo n.º 16
0
 public RequestType GetRequest(RuntimeTypeKey key, bool strict = true)
 {
     return(Packages.GetRequest(key, strict));
 }
Ejemplo n.º 17
0
 public FlowType GetFlow(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Flows, strict));
 }
Ejemplo n.º 18
0
 public QueryType GetQuery(RuntimeTypeKey key, bool strict = true)
 {
     return(Packages.GetQuery(key, strict));
 }
Ejemplo n.º 19
0
 public TopicType GetTopic(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Topics, strict));
 }
Ejemplo n.º 20
0
 public ViewType GetView(RuntimeTypeKey key, bool strict = true)
 {
     return(Packages.GetView(key, strict));
 }
Ejemplo n.º 21
0
 public ViewType GetView(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Views, strict));
 }
Ejemplo n.º 22
0
 public WebApiType GetWebApi(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.WebApis, strict));
 }
Ejemplo n.º 23
0
        public QueryType GetQuery(RuntimeTypeKey key, bool strict = true)
        {
            var region = Get(key.Region, strict);

            return(region?.GetQuery(key, strict));
        }
Ejemplo n.º 24
0
        public FlowType GetFlow(RuntimeTypeKey key, bool strict = true)
        {
            var region = Get(key.Region, strict);

            return(region?.GetFlow(key, strict));
        }
Ejemplo n.º 25
0
        public DurableType GetDurable(RuntimeTypeKey key, bool strict = true)
        {
            var region = Get(key.Region, strict);

            return(region?.GetDurable(key, strict));
        }
Ejemplo n.º 26
0
 public override T this[RuntimeTypeKey key] => _typesByKey[key];
Ejemplo n.º 27
0
        public EventType GetEvent(RuntimeTypeKey key, bool strict = true)
        {
            var region = Get(key.Region, strict);

            return(region?.GetEvent(key, strict));
        }
Ejemplo n.º 28
0
 public override bool Contains(RuntimeTypeKey key)
 {
     return(_typesByKey.ContainsKey(key));
 }
Ejemplo n.º 29
0
        public TopicType GetTopic(RuntimeTypeKey key, bool strict = true)
        {
            var region = Get(key.Region, strict);

            return(region?.GetTopic(key, strict));
        }
Ejemplo n.º 30
0
 public DurableType GetDurable(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Durable, strict));
 }