/// <summary> /// Create a ServiceHost with accompanying creation data. /// </summary> /// <typeparam name="TService">Type of WCF Service to create.</typeparam> /// <param name="func">Function creating an instance of the ServiceHost type with accompanying creation data.</param> /// <param name="serviceType">Type of WCF Service to be hosted.</param> /// <param name="baseAddresses">Base addresses for WCF ServiceHost endpoints.</param> /// <returns>Created ServiceHost with accompanying creation data.</returns> static public ServiceHostCreationData CreateWithData <TService>(Func <WCFServiceCreationData <TService> > func, Type serviceType, params Uri[] baseAddresses) { // Get the host creation function and creation data. WCFServiceCreationData <TService> hostdata = func(); // Instantiate the host. DbusServiceHost host = DbusServiceHost.Create(hostdata.func, serviceType, baseAddresses); // Package up the data. ServiceHostCreationData hostcreation = new ServiceHostCreationData(host, hostdata.CreationParams); return(hostcreation); }
public ServiceHostCreationData(DbusServiceHost Host, DbusServiceCreationParams CreationParams) { this.Host = Host; this.CreationParams = CreationParams; }