/// <summary> /// Resource handler /// </summary> /// <returns></returns> protected override ResourceHandlerTool GetResourceHandler() { var svcMgr = ApplicationServiceContext.Current.GetService <IServiceManager>(); if (this.m_resourceHandler == null) { this.m_resourceHandler = new Rest.Common.ResourceHandlerTool( svcMgr.GetAllTypes().Where(t => !t.IsAbstract && !t.IsInterface && typeof(IApiResourceHandler).IsAssignableFrom(t)), typeof(IAmiServiceContract)); } return(this.m_resourceHandler); }
/// <summary> /// Get resource handler /// </summary> /// <returns></returns> protected override ResourceHandlerTool GetResourceHandler() { if (this.m_resourceHandler == null) { this.m_resourceHandler = new Rest.Common.ResourceHandlerTool( typeof(PatientResourceHandler).Assembly.ExportedTypes .Union(AppDomain.CurrentDomain.GetAssemblies().Where(a => !a.IsDynamic).SelectMany(a => { try { return(a.ExportedTypes); } catch { return(Type.EmptyTypes); } })) .OfType <Type>() .Where(t => t != null && !t.IsAbstract && !t.IsInterface && typeof(IApiResourceHandler).IsAssignableFrom(t)) .ToList(), typeof(IHdsiServiceContract)); } return(this.m_resourceHandler); }