C# Класс Microsoft.WindowsAzure.Commands.Utilities.CloudService.CloudServiceProject

Class that encapsulates all of the info about a service, to which we can add roles. This is all in memory, so no disk operations occur.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddRoleRuntime ( CloudProjectPathInfo paths, string roleName, string runtimeType, string runtimeVersion, string manifest = null ) : void

Add the specified runtime to a role, checking that the runtime and version are currently available int he cloud

AddWebRole ( string scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
AddWorkerRole ( string scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
ChangeRolePermissions ( RoleInfo role ) : void
ChangeServiceName ( string newName, CloudProjectPathInfo paths ) : void
CloudServiceProject ( ) : Common.System
CloudServiceProject ( string cloudConfigurationFullPath ) : Common.System
CloudServiceProject ( string rootPath, string scaffoldingPath ) : Common.System
CloudServiceProject ( string rootPath, string name, string scaffoldingPath ) : Common.System
GenerateScaffolding ( string scaffolding, string roleName, object>.Dictionary parameters ) : void

Generates scaffolding for role.

GetCloudRuntimes ( CloudProjectPathInfo paths, string manifest ) : CloudRuntimeCollection

Retrieve currently available cloud runtimes

Reload ( ) : void

Reloads the cloud service project configuration from the disk.

ResolveRuntimePackageUrls ( string manifest = null ) : string

Resolves the service runtimes into downloadable URLs.

SetRoleInstances ( CloudProjectPathInfo paths, string roleName, int instances ) : void

Sets the role instance count

SetRoleVMSize ( CloudProjectPathInfo paths, string roleName, string VMSize ) : void

Sets the role VMSize

StartEmulators ( bool launchBrowser, ComputeEmulatorMode mode, string &roleInformation, string &warning ) : void

Starts azure emulator for this service.

This methods removes all deployments already in the emulator.

StopEmulators ( string &warning ) : void

Приватные методы

Метод Описание
AddRoleCore ( string scaffolding, RoleInfo role ) : void

Adds the given role to both config files and the service def.

ConfigureNewService ( ServiceComponents components, CloudProjectPathInfo paths, string serviceName ) : void
CreateDefaultParameters ( RoleInfo role ) : object>.Dictionary
CreateNewService ( string serviceRootPath, string serviceName ) : void
CreatePackage ( DevEnv type ) : void
GetRoleName ( string name, string defaultName, IEnumerable existingNames ) : string

Creates a role name, ensuring it doesn't already exist. If null is passed in, a number will be appended to the defaultRoleName.

SetScaffolding ( string scaffoldingFolderDirectory ) : void
VerifyCloudServiceProjectComponents ( ) : void

Описание методов

AddRoleRuntime() публичный Метод

Add the specified runtime to a role, checking that the runtime and version are currently available int he cloud
public AddRoleRuntime ( CloudProjectPathInfo paths, string roleName, string runtimeType, string runtimeVersion, string manifest = null ) : void
paths CloudProjectPathInfo service path info
roleName string Name of the role to change
runtimeType string The runtime identifier
runtimeVersion string The runtime version
manifest string Location fo the manifest file, default is the cloud manifest
Результат void

AddWebRole() публичный Метод

public AddWebRole ( string scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
scaffolding string
name string
instanceCount int
Результат RoleInfo

AddWorkerRole() публичный Метод

public AddWorkerRole ( string scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
scaffolding string
name string
instanceCount int
Результат RoleInfo

ChangeRolePermissions() публичный Метод

public ChangeRolePermissions ( RoleInfo role ) : void
role RoleInfo
Результат void

ChangeServiceName() публичный Метод

public ChangeServiceName ( string newName, CloudProjectPathInfo paths ) : void
newName string
paths CloudProjectPathInfo
Результат void

CloudServiceProject() публичный Метод

public CloudServiceProject ( ) : Common.System
Результат Common.System

CloudServiceProject() публичный Метод

public CloudServiceProject ( string cloudConfigurationFullPath ) : Common.System
cloudConfigurationFullPath string
Результат Common.System

CloudServiceProject() публичный Метод

public CloudServiceProject ( string rootPath, string scaffoldingPath ) : Common.System
rootPath string
scaffoldingPath string
Результат Common.System

CloudServiceProject() публичный Метод

public CloudServiceProject ( string rootPath, string name, string scaffoldingPath ) : Common.System
rootPath string
name string
scaffoldingPath string
Результат Common.System

GenerateScaffolding() публичный Метод

Generates scaffolding for role.
public GenerateScaffolding ( string scaffolding, string roleName, object>.Dictionary parameters ) : void
scaffolding string The relative scaffolding source path
roleName string The role name
parameters object>.Dictionary The rule parameters
Результат void

GetCloudRuntimes() публичный Метод

Retrieve currently available cloud runtimes
public GetCloudRuntimes ( CloudProjectPathInfo paths, string manifest ) : CloudRuntimeCollection
paths CloudProjectPathInfo service path info
manifest string The manifest to use to get current runtime info - default is the cloud manifest
Результат CloudRuntimeCollection

Reload() публичный Метод

Reloads the cloud service project configuration from the disk.
public Reload ( ) : void
Результат void

ResolveRuntimePackageUrls() публичный Метод

Resolves the service runtimes into downloadable URLs.
public ResolveRuntimePackageUrls ( string manifest = null ) : string
manifest string The custom manifest file
Результат string

SetRoleInstances() публичный Метод

Sets the role instance count
public SetRoleInstances ( CloudProjectPathInfo paths, string roleName, int instances ) : void
paths CloudProjectPathInfo The service paths
roleName string The name of the role to change its instance count
instances int
Результат void

SetRoleVMSize() публичный Метод

Sets the role VMSize
public SetRoleVMSize ( CloudProjectPathInfo paths, string roleName, string VMSize ) : void
paths CloudProjectPathInfo The service paths
roleName string The name of the role to change its vm size
VMSize string The new role vm size
Результат void

StartEmulators() публичный Метод

Starts azure emulator for this service.
This methods removes all deployments already in the emulator.
public StartEmulators ( bool launchBrowser, ComputeEmulatorMode mode, string &roleInformation, string &warning ) : void
launchBrowser bool Switch to control opening a browser for web roles.
mode ComputeEmulatorMode
roleInformation string
warning string
Результат void

StopEmulators() публичный Метод

public StopEmulators ( string &warning ) : void
warning string
Результат void