當前位置: 首頁>>代碼示例>>C#>>正文


C# BatchAccountContext類代碼示例

本文整理匯總了C#中BatchAccountContext的典型用法代碼示例。如果您正苦於以下問題:C# BatchAccountContext類的具體用法?C# BatchAccountContext怎麽用?C# BatchAccountContext使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BatchAccountContext類屬於命名空間,在下文中一共展示了BatchAccountContext類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AssertBatchAccountContextsAreEqual

        public static void AssertBatchAccountContextsAreEqual(BatchAccountContext context1, BatchAccountContext context2)
        {
            if (context1 == null)
            {
                Assert.Null(context2);
                return;
            }
            if (context2 == null)
            {
                Assert.Null(context1);
                return;
            }

            Assert.Equal<string>(context1.AccountEndpoint, context2.AccountEndpoint);
            Assert.Equal<string>(context1.AccountName, context2.AccountName);
            Assert.Equal<string>(context1.Id, context2.Id);
            Assert.Equal<string>(context1.Location, context2.Location);
            Assert.Equal<string>(context1.PrimaryAccountKey, context2.PrimaryAccountKey);
            Assert.Equal<string>(context1.ResourceGroupName, context2.ResourceGroupName);
            Assert.Equal<string>(context1.SecondaryAccountKey, context2.SecondaryAccountKey);
            Assert.Equal<string>(context1.State, context2.State);
            Assert.Equal<string>(context1.Subscription, context2.Subscription);
            Assert.Equal<string>(context1.TagsTable, context2.TagsTable);
            Assert.Equal<string>(context1.TaskTenantUrl, context2.TaskTenantUrl);
        }
開發者ID:Indhukrishna,項目名稱:azure-powershell,代碼行數:25,代碼來源:BatchTestHelpers.cs

示例2: NodeFileOperationParameters

        public NodeFileOperationParameters(BatchAccountContext context, string jobId, string taskId, string poolId, string computeNodeId, string nodeFileName,
            PSNodeFile nodeFile, IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, additionalBehaviors)
        {
            PSNodeFileType? nodeFileType = null;

            if (nodeFile != null)
            {
                nodeFileType = PSNodeFileType.PSNodeFileInstance;
            }
            else if (!string.IsNullOrWhiteSpace(nodeFileName))
            {
                if (!string.IsNullOrWhiteSpace(jobId) && !string.IsNullOrWhiteSpace(taskId))
                {
                    nodeFileType = PSNodeFileType.Task;
                }
                else if (!string.IsNullOrWhiteSpace(poolId) && !string.IsNullOrWhiteSpace(computeNodeId))
                {
                    nodeFileType = PSNodeFileType.ComputeNode;
                }
            }

            if (nodeFileType == null)
            {
                throw new ArgumentException(Resources.NoNodeFile);
            }
            this.NodeFileType = nodeFileType.Value;

            this.JobId = jobId;
            this.TaskId = taskId;
            this.PoolId = poolId;
            this.ComputeNodeId = computeNodeId;
            this.NodeFileName = nodeFileName;
            this.NodeFile = nodeFile;
        }
開發者ID:docschmidt,項目名稱:azure-powershell,代碼行數:34,代碼來源:NodeFileOperationParameters.cs

示例3: GetAllPoolsLifetimeStatistics

        /// <summary>
        /// Gets all pools lifetime summary statistics
        /// </summary>
        /// <param name="context">The account to use.</param>
        /// <param name="additionBehaviors">Additional client behaviors to perform.</param>
        public PSPoolStatistics GetAllPoolsLifetimeStatistics(BatchAccountContext context, IEnumerable<BatchClientBehavior> additionBehaviors = null)
        {
            PoolOperations poolOperations = context.BatchOMClient.PoolOperations;

            WriteVerbose(string.Format(Resources.GetAllPoolsLifetimeStatistics));

            PoolStatistics poolStatistics = poolOperations.GetAllPoolsLifetimeStatistics(additionBehaviors);
            PSPoolStatistics psPoolStatistics = new PSPoolStatistics(poolStatistics);
            return psPoolStatistics;
        }
開發者ID:Azure,項目名稱:azure-powershell,代碼行數:15,代碼來源:BatchClient.Pools.cs

示例4: NewJobScheduleParameters

        public NewJobScheduleParameters(BatchAccountContext context, string jobScheduleId, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
            : base(context, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(jobScheduleId))
            {
                throw new ArgumentNullException("jobScheduleId");
            }

            this.JobScheduleId = jobScheduleId;
        }
開發者ID:Azure,項目名稱:azure-powershell,代碼行數:10,代碼來源:NewJobScheduleParameters.cs

示例5: NewPoolParameters

        public NewPoolParameters(BatchAccountContext context, string poolId, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
            : base(context, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(poolId))
            {
                throw new ArgumentNullException("poolId");
            }

            this.PoolId = poolId;
        }
開發者ID:Azure,項目名稱:azure-powershell,代碼行數:10,代碼來源:NewPoolParameters.cs

示例6: BatchClientParametersBase

        protected BatchClientParametersBase(BatchAccountContext context, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            this.Context = context;
            this.AdditionalBehaviors = additionalBehaviors;
        }
開發者ID:docschmidt,項目名稱:azure-powershell,代碼行數:10,代碼來源:BatchClientParametersBase.cs

示例7: ChangeOSVersionParameters

        public ChangeOSVersionParameters(BatchAccountContext context, string poolId, PSCloudPool pool, string targetOSVersion,
            IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, poolId, pool, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(targetOSVersion))
            {
                throw new ArgumentNullException("targetOSVersion");
            }

            this.TargetOSVersion = targetOSVersion;
        }
開發者ID:Azure,項目名稱:azure-powershell,代碼行數:10,代碼來源:ChangeOSVersionParameters.cs

示例8: NewTaskParameters

        public NewTaskParameters(BatchAccountContext context, string jobId, PSCloudJob job, string taskId, IEnumerable<BatchClientBehavior> additionalBehaviors = null) 
            : base(context, jobId, job, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(taskId))
            {
                throw new ArgumentNullException("taskId");
            }

            this.TaskId = taskId;
        }
開發者ID:injyzarif,項目名稱:azure-powershell,代碼行數:10,代碼來源:NewTaskParameters.cs

示例9: AutoScaleParameters

        public AutoScaleParameters(BatchAccountContext context, string poolId, PSCloudPool pool, string autoScaleFormula,
            IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, poolId, pool, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(autoScaleFormula))
            {
                throw new ArgumentNullException("autoScaleFormula");
            }

            this.AutoScaleFormula = autoScaleFormula;
        }
開發者ID:docschmidt,項目名稱:azure-powershell,代碼行數:10,代碼來源:AutoScaleParameters.cs

示例10: NewWorkItemParameters

        public NewWorkItemParameters(BatchAccountContext context, string workItemName, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
            : base(context, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(workItemName))
            {
                throw new ArgumentNullException("poolName");
            }

            this.WorkItemName = workItemName;
        }
開發者ID:shuainie,項目名稱:azure-powershell,代碼行數:10,代碼來源:NewWorkItemParameters.cs

示例11: NewBulkTaskParameters

        public NewBulkTaskParameters(BatchAccountContext context, string jobId, PSCloudJob job, PSCloudTask[] tasks, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
            : base(context, jobId, job, additionalBehaviors)
        {
            if (tasks == null)
            {
                throw new ArgumentNullException("taskCollection");
            }

            this.Tasks = tasks;
        }
開發者ID:Azure,項目名稱:azure-powershell,代碼行數:10,代碼來源:NewBulkTaskParameters.cs

示例12: JobOperationParameters

        public JobOperationParameters(BatchAccountContext context, string jobId, PSCloudJob job,
            IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(jobId) && job == null)
            {
                throw new ArgumentNullException(Resources.NoJob);
            }

            this.JobId = jobId;
            this.Job = job;
        }
開發者ID:FrankSiegemund,項目名稱:azure-powershell,代碼行數:11,代碼來源:JobOperationParameters.cs

示例13: DownloadRemoteDesktopProtocolFileOptions

        public DownloadRemoteDesktopProtocolFileOptions(BatchAccountContext context, string poolId, string computeNodeId, PSComputeNode computeNode, string destinationPath,
            Stream stream, IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, poolId, computeNodeId, computeNode, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(destinationPath) && stream == null)
            {
                throw new ArgumentNullException(Resources.NoDownloadDestination);
            }

            this.DestinationPath = destinationPath;
            this.Stream = stream;
        }
開發者ID:Azure,項目名稱:azure-powershell,代碼行數:11,代碼來源:DownloadRemoteDesktopProtocolFileOptions.cs

示例14: PoolOperationParameters

        public PoolOperationParameters(BatchAccountContext context, string poolName, PSCloudPool pool,
            IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(poolName) && pool == null)
            {
                throw new ArgumentNullException(Resources.NoPool);
            }

            this.PoolName = poolName;
            this.Pool = pool;
        }
開發者ID:shuainie,項目名稱:azure-powershell,代碼行數:11,代碼來源:PoolOperationParameters.cs

示例15: NewCertificateParameters

        public NewCertificateParameters(BatchAccountContext context, string filePath, byte[] rawData,
            IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(filePath) && rawData == null)
            {
                throw new ArgumentException(Resources.NoCertificateData);
            }

            this.FilePath = filePath;
            this.RawData = rawData;
        }
開發者ID:docschmidt,項目名稱:azure-powershell,代碼行數:11,代碼來源:NewCertificateParameters.cs


注:本文中的BatchAccountContext類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。