public HttpDescriptorServiceHost(ICremaHost cremaHost, int port, CremaService service) : base(cremaHost, typeof(HttpDescriptorService), address, port) { var binding = CremaServiceItemHost.CreateWebHttpBinding(); this.service = service; var endpoint = this.AddServiceEndpoint(typeof(IHttpDescriptorService), binding, string.Empty); endpoint.Behaviors.Add(new WebHttpBehavior()); this.Description.Behaviors.Add(new InstanceProviderBehavior()); #if DEBUG if (Environment.OSVersion.Platform != PlatformID.Unix) { this.Description.Behaviors.Add(new ServiceMetadataBehavior()); this.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexHttpBinding(), "mex"); } #endif }
public DescriptorService(CremaService service, ICremaHost cremaHost) { this.service = service; this.cremaHost = cremaHost; }