• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# BatchAccountContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中BatchAccountContext的典型用法代码示例。如果您正苦于以下问题:C# BatchAccountContext类的具体用法?C# BatchAccountContext怎么用?C# BatchAccountContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BatchAccountContext类属于命名空间,在下文中一共展示了BatchAccountContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: DownloadVMFileOptions

        public DownloadVMFileOptions(BatchAccountContext context, string poolName, string vmName, string vmFileName, PSVMFile vmFile, string destinationPath, 
            Stream stream, IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, poolName, vmName, vmFileName, vmFile, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(destinationPath) && stream == null)
            {
                throw new ArgumentNullException(Resources.NoDownloadDestination);
            }

            this.DestinationPath = destinationPath;
            this.Stream = stream;
        }
开发者ID:shuainie,项目名称:azure-powershell,代码行数:11,代码来源:DownloadVMFileOptions.cs


示例17: WorkItemOperationParameters

        public WorkItemOperationParameters(BatchAccountContext context, string workItemName, PSCloudWorkItem workItem,
            IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(workItemName) && workItem == null)
            {
                throw new ArgumentNullException(Resources.NoWorkItem);
            }

            this.WorkItemName = workItemName;
            this.WorkItem = workItem;
        }
开发者ID:shuainie,项目名称:azure-powershell,代码行数:11,代码来源:WorkItemOperationParameters.cs


示例18: VMUserOperationParameters

        public VMUserOperationParameters(BatchAccountContext context, string poolName, string vmName, string vmUserName,
            IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(poolName) || string.IsNullOrWhiteSpace(vmName) || string.IsNullOrWhiteSpace(vmUserName))
            {
                throw new ArgumentNullException(Resources.NoVMUser);
            }

            this.PoolName = poolName;
            this.VMName = vmName;
            this.VMUserName = vmUserName;
        }
开发者ID:shuainie,项目名称:azure-powershell,代码行数:12,代码来源:VMUserOperationParameters.cs


示例19: ComputeNodeUserOperationParameters

        public ComputeNodeUserOperationParameters(BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName,
            IEnumerable<BatchClientBehavior> additionalBehaviors = null) : base(context, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(poolId) || string.IsNullOrWhiteSpace(computeNodeId) || string.IsNullOrWhiteSpace(computeNodeUserName))
            {
                throw new ArgumentNullException(Resources.NoComputeNodeUser);
            }

            this.PoolId = poolId;
            this.ComputeNodeId = computeNodeId;
            this.ComputeNodeUserName = computeNodeUserName;
        }
开发者ID:docschmidt,项目名称:azure-powershell,代码行数:12,代码来源:ComputeNodeUserOperationParameters.cs


示例20: DownloadNodeFileOptions

        public DownloadNodeFileOptions(BatchAccountContext context, string jobId, string taskId, string poolId, string computeNodeId, string nodeFileName,
            PSNodeFile nodeFile, string destinationPath, Stream stream, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
            : base(context, jobId, taskId, poolId, computeNodeId, nodeFileName, nodeFile, additionalBehaviors)
        {
            if (string.IsNullOrWhiteSpace(destinationPath) && stream == null)
            {
                throw new ArgumentNullException(Resources.NoDownloadDestination);
            }

            this.DestinationPath = destinationPath;
            this.Stream = stream;
        }
开发者ID:FrankSiegemund,项目名称:azure-powershell,代码行数:12,代码来源:DownloadNodeFileOptions.cs



注:本文中的BatchAccountContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BatchClient类代码示例发布时间:2022-05-24
下一篇:
C# Basket类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap