示例#1
0
        public override void ExecuteCmdlet()
        {
            WebsitesClient = WebsitesClient ?? new WebsitesClient(CurrentSubscription, WriteDebug);

            switch (Type)
            {
            case WebsiteDiagnosticType.Site:
                WebsitesClient.DisableSiteDiagnostic(
                    Name,
                    WebServerLogging,
                    DetailedErrorMessages,
                    FailedRequestTracing);
                break;

            case WebsiteDiagnosticType.Application:
                WebsitesClient.DisableApplicationDiagnostic(Name, Output);
                break;

            default:
                throw new PSArgumentException();
            }

            if (PassThru.IsPresent)
            {
                WriteObject(true);
            }
        }
        public override void ExecuteCmdlet()
        {
            if (!File.IsPresent && !Storage.IsPresent)
            {
                WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.FileSystem);
                WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageTable);
            }
            else
            {
                if (File.IsPresent)
                {
                    WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.FileSystem, Slot);
                }

                if (Storage.IsPresent)
                {
                    WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageTable, Slot);
                }
            }

            if (PassThru.IsPresent)
            {
                WriteObject(true);
            }
        }
示例#3
0
        public override void ExecuteCmdlet()
        {
            WebsitesClient = WebsitesClient ?? new WebsitesClient(CurrentSubscription, WriteDebug);

            if (!File.IsPresent && !Storage.IsPresent)
            {
                WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.FileSystem);
                WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageTable);
            }
            else
            {
                if (File.IsPresent)
                {
                    WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.FileSystem);
                }

                if (Storage.IsPresent)
                {
                    WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageTable);
                }
            }

            if (PassThru.IsPresent)
            {
                WriteObject(true);
            }
        }