Glyma.NodeServiceApp.NodeServiceClient.DeleteDomain C# (CSharp) Method

DeleteDomain() public method

public DeleteDomain ( GlymaSessionConfiguration configuration, System.Guid domainId ) : int
configuration TransactionalNodeService.Common.GlymaSessionConfiguration
domainId System.Guid
return int
        public int DeleteDomain(GlymaSessionConfiguration configuration, Guid domainId)
        {
            int result = 0;

            // run the call against the application proxy
            NodeServiceApplicationProxy.Invoke(_serviceContext,
                proxy => result = proxy.DeleteDomain(configuration, domainId));

            return result;
        }

Usage Example

        public int DeleteDomain(string callingUrl, Guid domainId)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, domainId, null, SPGlymaRightFactory.Instance.RootMapCreateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.DeleteDomain(configuration, domainId));
                }
            }
        }
All Usage Examples Of Glyma.NodeServiceApp.NodeServiceClient::DeleteDomain