Caliburn.Micro.PhoneContainer.RegisterWithPhoneService C# (CSharp) Метод

RegisterWithPhoneService() публичный Метод

Registers the service as a singleton stored in the phone state.
public RegisterWithPhoneService ( Type service, string phoneStateKey, Type implementation ) : void
service System.Type The service.
phoneStateKey string The phone state key.
implementation System.Type The implementation.
Результат void
        public void RegisterWithPhoneService(Type service, string phoneStateKey, Type implementation) {
            RegisterHandler(service, null, () => {
                var phoneService = (IPhoneService)GetInstance(typeof(IPhoneService), null);

                if(phoneService.State.ContainsKey(phoneStateKey ?? service.FullName)) {
                    return phoneService.State[phoneStateKey ?? service.FullName];
                }

                return BuildInstance(implementation);
            });
        }