Inheritance: SPIisWebServiceApplication, IGlymaNodeServiceApp
        public static NodeServiceApplication Create(string name, NodeService service, SPIisWebServiceApplicationPool appPool)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            if (service == null)
            {
                throw new ArgumentNullException("service");
            }

            if (appPool == null)
            {
                throw new ArgumentNullException("appPool");
            }

            // Create the service application.
            NodeServiceApplication serviceApplication = new NodeServiceApplication(name, service, appPool);
            serviceApplication.Update();

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

            return serviceApplication;
        }
        public static NodeServiceApplication Create(string name, NodeService service, SPIisWebServiceApplicationPool appPool)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            if (service == null)
            {
                throw new ArgumentNullException("service");
            }

            if (appPool == null)
            {
                throw new ArgumentNullException("appPool");
            }

            // Create the service application.
            NodeServiceApplication serviceApplication = new NodeServiceApplication(name, service, appPool);

            serviceApplication.Update();

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

            return(serviceApplication);
        }
Exemple #3
0
        public SPServiceApplication CreateApplication(string name, Type serviceApplicationType, SPServiceProvisioningContext provisioningContext)
        {
            if (serviceApplicationType != typeof(NodeServiceApplication))
            {
                throw new NotSupportedException();
            }

            if (provisioningContext == null)
            {
                throw new ArgumentNullException("provisioningContext");
            }

            // If the service doesn't already exist, create it.
            NodeServiceApplication serviceApp = this.Farm.GetObject(name, this.Id, serviceApplicationType) as NodeServiceApplication;

            if (serviceApp == null)
            {
                serviceApp = NodeServiceApplication.Create(name, this, provisioningContext.IisWebServiceApplicationPool);
            }

            return(serviceApp);
        }