C# Class 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.
Mostra file Open project: Azure/azure-powershell Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
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

Method Details

AddRoleRuntime() public method

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
return void

AddWebRole() public method

public AddWebRole ( string scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
scaffolding string
name string
instanceCount int
return RoleInfo

AddWorkerRole() public method

public AddWorkerRole ( string scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
scaffolding string
name string
instanceCount int
return RoleInfo

ChangeRolePermissions() public method

public ChangeRolePermissions ( RoleInfo role ) : void
role RoleInfo
return void

ChangeServiceName() public method

public ChangeServiceName ( string newName, CloudProjectPathInfo paths ) : void
newName string
paths CloudProjectPathInfo
return void

CloudServiceProject() public method

public CloudServiceProject ( ) : Common.System
return Common.System

CloudServiceProject() public method

public CloudServiceProject ( string cloudConfigurationFullPath ) : Common.System
cloudConfigurationFullPath string
return Common.System

CloudServiceProject() public method

public CloudServiceProject ( string rootPath, string scaffoldingPath ) : Common.System
rootPath string
scaffoldingPath string
return Common.System

CloudServiceProject() public method

public CloudServiceProject ( string rootPath, string name, string scaffoldingPath ) : Common.System
rootPath string
name string
scaffoldingPath string
return Common.System

GenerateScaffolding() public method

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
return void

GetCloudRuntimes() public method

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
return CloudRuntimeCollection

Reload() public method

Reloads the cloud service project configuration from the disk.
public Reload ( ) : void
return void

ResolveRuntimePackageUrls() public method

Resolves the service runtimes into downloadable URLs.
public ResolveRuntimePackageUrls ( string manifest = null ) : string
manifest string The custom manifest file
return string

SetRoleInstances() public method

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
return void

SetRoleVMSize() public method

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
return void

StartEmulators() public method

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
return void

StopEmulators() public method

public StopEmulators ( string &warning ) : void
warning string
return void