diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-04-14 06:23:25 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-04-14 06:23:25 +0300 |
| commit | 8f738753289dcb7118162122c5404d2a02b305f7 (patch) | |
| tree | aba06cb5c9def702af9cf791ce0a65cb2684af07 /Software/Visual_Studio/Tango.Core/DI | |
| parent | 76ebe53d89a1b0cbf21d66dc9f26dc95cc7b3be9 (diff) | |
| download | Tango-8f738753289dcb7118162122c5404d2a02b305f7.tar.gz Tango-8f738753289dcb7118162122c5404d2a02b305f7.zip | |
FSE Tup/Tfp & WaitForReconnection.
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/DI')
| -rw-r--r-- | Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs b/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs index ef9ed4959..9ddf588f0 100644 --- a/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs +++ b/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs @@ -239,6 +239,20 @@ namespace Tango.Core.DI return; } } + else + { + //Try get by inherited.. + registeredType = _registeredTypes.Select(x => x.Value).SingleOrDefault(x => type.IsAssignableFrom(x.InterfaceType)); + + if (registeredType != null) + { + if (registeredType.Instance != null) + { + callback(registeredType.Instance); + return; + } + } + } _waitingRetrivals.Add(new Tuple<Type, Action<object>>(type, callback)); } |
