示例#1
0
 public RuntimeTypeRef(RuntimePackage package, Type declaredType)
 {
     Package      = package;
     DeclaredType = declaredType;
     State        = new RuntimeState(declaredType);
     Key          = RuntimeTypeKey.From(package.RegionKey, declaredType.Name);
 }
示例#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);
        }
示例#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);
        }
示例#4
0
 public AreaType GetArea(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Areas, strict));
 }
示例#5
0
 public EventType GetEvent(RuntimeTypeKey key, bool strict = true)
 {
     return(GetPackageType(key, package => package.Events, strict));
 }
示例#6
0
        public AreaType GetArea(RuntimeTypeKey key, bool strict = true)
        {
            var region = Get(key.Region, strict);

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

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

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

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

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

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

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