public void DestroyService(TectureServiceBase serviceBase) { serviceBase.ServiceManager = null; serviceBase.Pipeline = null; serviceBase.ChannelMultiplexer = null; var st = serviceBase.GetType(); if (serviceBase is INoContext) { if (_noContextServicesCache.ContainsKey(st)) { _noContextServicesCache.Remove(st); } } if (serviceBase is IWithContext) { if (_contextServices.ContainsKey(st)) { var lst = _contextServices[st]; lst.RemoveAll(d => d.ServiceBaseInstance == serviceBase); } } _allServices.Remove(serviceBase); }
public void DestroyService(TectureServiceBase serviceBase) { serviceBase.ServiceManager = null; serviceBase.Pipeline = null; serviceBase.ChannelMultiplexer = null; var st = serviceBase.GetType(); if (_noContextServicesCache.ContainsKey(st)) { _noContextServicesCache.Remove(st); } _allServices.Remove(serviceBase); }