public static BaristaServiceApplication Create(string name, BaristaService service, SPIisWebServiceApplicationPool appPool)
        {
            #region validation
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (service == null)
            {
                throw new ArgumentNullException("service");
            }
            if (appPool == null)
            {
                throw new ArgumentNullException("appPool");
            }
            #endregion

            // create the service application
            var serviceApplication = new BaristaServiceApplication(name, service, appPool);
            serviceApplication.Update();

            // register the supported endpoints
            serviceApplication.AddServiceEndpoint("http", SPIisWebServiceBindingType.Http);
            serviceApplication.AddServiceEndpoint("https", SPIisWebServiceBindingType.Https, "secure");

            return(serviceApplication);
        }
Ejemplo n.º 2
0
 public BaristaServiceInstance(SPServer server, BaristaService service)
     : base(server, service)
 {
     Name = ServiceInstanceName;
 }
 private BaristaServiceApplication(string name, BaristaService service, SPIisWebServiceApplicationPool appPool)
     : base(name, service, appPool)
 {
 }