Represents base class for all Azure cmdlets.
Inheritance: System.Management.Automation.PSCmdlet, IDisposable
Exemplo n.º 1
0
 static void SafeAddToJobRepository(this AzurePSCmdlet cmdlet, Job job)
 {
     try
     {
         cmdlet.JobRepository.Add(job);
     }
     catch
     {
         // ignore errors in adding the job to the repository
     }
 }
Exemplo n.º 2
0
 public static void ExecuteWithProcessing(this AzurePSCmdlet cmdlt)
 {
     cmdlt.InvokeBeginProcessing();
     cmdlt.ExecuteCmdlet();
     cmdlt.InvokeEndProcessing();
 }
Exemplo n.º 3
0
        public static void DisableDataCollection(this AzurePSCmdlet cmdlt)
        {
            PropertyInfo dynField = (typeof(AzurePSCmdlet)).GetProperty("_dataCollectionProfile", BindingFlags.NonPublic | BindingFlags.Instance);

            dynField.SetValue(cmdlt, new AzurePSDataCollectionProfile(false));
        }
Exemplo n.º 4
0
        public static void EnableDataCollection(this AzurePSCmdlet cmdlt)
        {
            FieldInfo dynField = (typeof(AzurePSCmdlet)).GetField("_dataCollectionProfile", BindingFlags.NonPublic | BindingFlags.Static);

            dynField.SetValue(cmdlt, new AzurePSDataCollectionProfile(true));
        }