"景先生毕设|www.jxszl.com

C# CloudServiceProject类代码示例

2023-12-29 17:44编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中CloudServiceProject类的典型用法代码示例。如果您正苦于以下问题:C#CloudServiceProject类的具体用法?C#CloudServiceProject怎么用?C#CloudServiceProject使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:AddAzureCacheWorkerRoleProcess publicWorkerRoleAddAzureCacheWorkerRoleProcess(stringworkerRoleName,intinstances,stringrootPath) { //Createcacheworkerrole. ActioncacheWorkerRoleAction=CacheConfigurationFactory.GetCacheRoleConfigurationAction( AzureTool.GetAzureSdkVersion()); CloudServiceProjectcloudServiceProject=newCloudServiceProject(rootPath,null); RoleInfogenericWorkerRole=cloudServiceProject.AddWorkerRole( Path.Combine(Resources.GeneralScaffolding,RoleType.WorkerRole.ToString()), workerRoleName, instances); //Dedicatetheworkerroleforcaching. cacheWorkerRoleAction(cloudServiceProject.Paths.RootPath,genericWorkerRole); cloudServiceProject.Reload(); WorkerRolecacheWorkerRole=cloudServiceProject.Components.GetWorkerRole(genericWorkerRole.Name); //Writeoutput SafeWriteOutputPSObject( cacheWorkerRole.GetType().FullName, Parameters.CacheWorkerRoleName,genericWorkerRole.Name, Parameters.Instances,genericWorkerRole.InstanceCount ); returncloudServiceProject.Components.GetWorkerRole(workerRoleName); }
原文链接:http://www.jxszl.com/biancheng/C/556781.html