123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- using System;
- namespace Wayne.Lib
- {
-
-
-
-
- public interface IServiceLocator
- {
-
-
-
-
-
- TServiceContract GetService<TServiceContract>();
-
-
-
-
-
-
- TServiceContract GetService<TServiceContract>(string serviceId);
-
-
-
-
-
- object GetService(Type serviceType);
-
-
-
-
-
-
- object GetService(Type serviceType, string serviceId);
-
-
-
-
-
-
-
- TServiceContract GetServiceOrDefault<TServiceContract>(CreateDefaultService<TServiceContract> func);
-
-
-
-
-
-
-
-
- TServiceContract GetServiceOrDefault<TServiceContract>(CreateDefaultService<TServiceContract> func, string serviceId);
-
-
-
-
-
-
-
- [Obsolete("Use ServiceActivator.Create<T> instead")]
- T CreateInstance<T>(params object[] additionalParameter) where T : class;
-
-
-
-
-
-
-
-
- [Obsolete("Use ServiceActivator.Create<T> instead")]
- T CreateInstance<T>(string serviceId, params object[] additionalParameter) where T : class;
-
-
-
-
-
-
-
- object CreateInstance(Type typeToInstantiate, params object[] additionalParameter);
-
-
-
-
-
-
-
-
- object CreateInstance(Type typeToInstantiate, string serviceId, params object[] additionalParameter);
-
-
-
-
-
- T TryGetService<T>();
-
-
-
-
-
-
- T TryGetService<T>(string serviceId);
-
-
-
-
-
- object TryGetService(Type serviceType);
-
-
-
-
-
-
- object TryGetService(Type serviceType, string serviceId);
-
- }
-
-
-
-
-
- public delegate T CreateDefaultService<T>();
- }
|