InstallExtension() public méthode

public InstallExtension ( ExtensionConfigurationInput context, string slot, Microsoft.WindowsAzure.Management.Compute.Models.DeploymentGetResponse deployment, Microsoft.WindowsAzure.Management.Compute.Models.DeploymentGetResponse peerDeployment ) : Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration
context ExtensionConfigurationInput
slot string
deployment Microsoft.WindowsAzure.Management.Compute.Models.DeploymentGetResponse
peerDeployment Microsoft.WindowsAzure.Management.Compute.Models.DeploymentGetResponse
Résultat Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration
        public void ExecuteCommand()
        {
            ValidateParameters();
            ExtensionConfigurationInput context = new ExtensionConfigurationInput
            {
                Version           = Version,
                ProviderNameSpace = ProviderNamespace,
                Type = ExtensionName,
                CertificateThumbprint = CertificateThumbprint,
                ThumbprintAlgorithm   = ThumbprintAlgorithm,
                X509Certificate       = X509Certificate,
                PublicConfiguration   = PublicConfiguration,
                PrivateConfiguration  = PrivateConfiguration,
                Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1))
            };

            var secondSlotDeployment = GetDeployment(this.Slot == DeploymentSlotType.Production ? DeploymentSlotType.Staging : DeploymentSlotType.Production);

            Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration secondSlotExtensionConfiguration =
                secondSlotDeployment != null ? secondSlotDeployment.ExtensionConfiguration : null;

            var extConfig = ExtensionManager.InstallExtension(context, Slot, Deployment.ExtensionConfiguration, secondSlotExtensionConfiguration);

            ChangeDeployment(extConfig);
        }
        public void ExecuteCommand()
        {
            ValidateParameters();
            ExtensionConfigurationInput context = new ExtensionConfigurationInput
            {
                ProviderNameSpace = ProviderNamespace,
                Type = ExtensionName,
                CertificateThumbprint = CertificateThumbprint,
                ThumbprintAlgorithm   = ThumbprintAlgorithm,
                X509Certificate       = X509Certificate,
                PublicConfiguration   = PublicConfiguration,
                PrivateConfiguration  = PrivateConfiguration,
                Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1))
            };
            var extConfig = ExtensionManager.InstallExtension(context, Slot, Deployment.ExtensionConfiguration);

            ChangeDeployment(extConfig);
        }
        public void ExecuteCommand()
        {
            ValidateParameters();

            var configurations = GetConfigurations();

            var extConfig           = Deployment == null ? null : Deployment.ExtensionConfiguration;
            var secondSlotExtConfig = PeerDeployment == null ? null : PeerDeployment.ExtensionConfiguration;

            // The later configuration will override the previous one
            foreach (var config in configurations)
            {
                extConfig = ExtensionManager.InstallExtension(config, Slot, extConfig, secondSlotExtConfig);
                extConfig = PostProcessExtensionConfigAfterInstallExtension(config, extConfig);
            }

            ChangeDeployment(extConfig);
        }