private void ValidateService(ServiceInfo info) { if (info.InterfaceType.GetInterface(typeof(IService).FullName) == null) throw new ElideException("Service type should be derived from IService."); if (info.Type.GetInterface(info.InterfaceType.FullName) == null) throw new ElideException("Service type should be derived from {0}.", info.InterfaceType); }
private void InitializeRegService(ServiceInfo info) { var serv = ServiceInstances[info.InterfaceType] as IExtService; if (serv == null) throw new ElideException("Service '{0}' doesn't implement IRegService interface.", info.Type); info.RegSections.ForEach(s => serv.CreateExtReader(s).Read(Sections.First(se => se.Name == s))); }