/// <summary> /// Gets the service host types. /// </summary> /// <returns></returns> public IList <ServiceHostType> GetServiceHostTypes() { var list = new List <ServiceHostType>(); using (var conn = new SqlConnection(WcfServiceHelper.GetConfigurationConnectionString())) { conn.Open(); var context = new StoredProceduresDataContext(conn); var results = context.sp_GetAllServiceHostTypes(); foreach (var result in results) { var item = new ServiceHostType { ClassName = result.ServiceHostTypeClassName, FriendlyName = result.ServiceHostTypeFriendlyName, Type_id = result.ServiceHostType_id }; list.Add(item); } conn.Close(); conn.Dispose(); } return(list); }
public void set(ServiceHostType svchostType, Type service_type) { _svc_hosts_type = svchostType; wcf_service = service_type; get_interface(); _load_host_type(); }
public void set(ServiceHostType svchostType, Type service_type) { _svc_hosts_type = svchostType; wcf_service = service_type; get_interface(); _load_host_type(); }
private static ServiceHost GetServiceHost(ServiceHostType selectedServiceHostType) { Type serviceHostType; switch (selectedServiceHostType) { case ServiceHostType.Categories: serviceHostType = typeof(CategoriesService); break; default: serviceHostType = typeof(OrdersService); break; } return new ServiceHost(serviceHostType); }
public WCFServiceHostLoader() { _svc_hosts_type = ServiceHostType.soap; }
public WCFServiceHostLoader() { _svc_hosts_type = ServiceHostType.soap; }
public object SetHostType(ServiceHostType hosttype, Func <object> startmethod) { _host_type = hosttype; _wcf_host.set(_host_type, typeof(T)); return(startmethod()); }