public static DayNamerServiceApplication Create(string name, DayNamerService service, SPIisWebServiceApplicationPool appPool)
        {
            //This method creates the custom service application

            #region validation checks

            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
            DayNamerServiceApplication serviceApplication = new DayNamerServiceApplication(name, service, appPool);
            serviceApplication.Update();

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

            return(serviceApplication);
        }
コード例 #2
0
 public DayNamerServiceInstance(SPServer server, DayNamerService service)
     : base(server, service)
 {
 }
 private DayNamerServiceApplication(string name, DayNamerService service, SPIisWebServiceApplicationPool appPool)
     : base(name, service, appPool)
 {
 }