Auto status change to "Under Review"
| @@ -7,7 +7,7 namespace Implab.Components { | |||||
| 7 | /// </summary> |
|
7 | /// </summary> | |
| 8 | public class ServiceLocator: Disposable, IServiceLocator, IServiceProvider { |
|
8 | public class ServiceLocator: Disposable, IServiceLocator, IServiceProvider { | |
| 9 | // запись о сервисе |
|
9 | // запись о сервисе | |
| 10 |
|
|
10 | class ServiceEntry : IDisposable { | |
| 11 | public object service; // сервис |
|
11 | public object service; // сервис | |
| 12 | public bool shared; // признак того, что сервис НЕ нужно освобождать |
|
12 | public bool shared; // признак того, что сервис НЕ нужно освобождать | |
| 13 | public Func<object> activator; // активатор сервиса при первом обращении |
|
13 | public Func<object> activator; // активатор сервиса при первом обращении | |
| @@ -90,11 +90,9 namespace Implab | |||||
| 90 | } |
|
90 | } | |
| 91 |
|
91 | |||
| 92 | public static void Dispose(object obj) { |
|
92 | public static void Dispose(object obj) { | |
| 93 |
if (obj is IDisposable) |
|
93 | if (obj is IDisposable) | |
| 94 | Dispose((IDisposable)obj); |
|
94 | Dispose((IDisposable)obj); | |
| 95 | } else if (obj is IEnumerable) { |
|
95 | ||
| 96 | DisposeCollection((IEnumerable)obj); |
|
|||
| 97 | } |
|
|||
| 98 | } |
|
96 | } | |
| 99 |
|
97 | |||
| 100 | [DebuggerStepThrough] |
|
98 | [DebuggerStepThrough] | |
General Comments 3
ok, latest stable version should be in default
You need to be logged in to leave comments.
Login now
