C# 클래스 Microsoft.WindowsAzure.Commands.Utilities.CloudService.ServiceComponents

파일 보기 프로젝트 열기: Azure/azure-powershell 1 사용 예제들

공개 메소드들

메소드 설명
AddRoleToConfiguration ( RoleSettings role, DevEnv env ) : void

Adds the given role settings to the specified configuration file.

AddStartupTask ( string roleName, string commandLine, ExecutionContext context ) : void

Adds new startup task to the given role.

ForEachRoleSettings ( bool>.Func predicate, Action action ) : void

Applied given action to all matching

GetCloudConfigRole ( string name ) : RoleSettings

Gets the role if exists otherwise return null.

GetLocalConfigRole ( string name ) : RoleSettings

Gets the role if exists otherwise return null.

GetNextPort ( ) : int

Gets the next available port, starts from 80.

GetRoleStartup ( string roleName ) : Startup

Gets role startup.

GetRoles ( IEnumerable roleNames ) : IEnumerable

Gets all role settings that matches the given name.

GetRoles ( ) : IEnumerable

Gets all existing role names.

GetStartupTask ( string roleName ) : Task

Searches for a startup task that matches one of the given command lines for the specified role.

GetStartupTaskVariable ( string roleName, string name ) : string

Gets startup task variable with the specified name.

GetWebRole ( string name ) : WebRole

Gets the web role if exists otherwise return null.

GetWorkerRole ( string name ) : WorkerRole

Gets the worker role if exists otherwise return null.

GetWorkerRoles ( Predicate predicate ) : IEnumerable

Gets all worker roles that matches given predicate.

IsWebRole ( string roleName ) : bool

Decides if the given role is web or worker role.

RoleExists ( string roleName ) : bool

Determines if a specified role exists in service components (*.csdef, local and cloud *cscfg) or not.

Save ( CloudProjectPathInfo paths ) : void
ServiceComponents ( CloudProjectPathInfo paths ) : System
ServiceComponents ( string cloudConfiguration ) : System
SetRoleInstances ( string roleName, int instances ) : void
SetRoleVMSize ( string roleName, string vmSize ) : void

Sets the VM size of a role

SetStartupTaskVariable ( string roleName, string name, string value ) : void

Sets a startup task environment variable.

StartupTaskExists ( string roleName ) : bool

Checks if a startup task exists with specified command line.

ValidRoleName ( string roleName ) : bool

Validates if given role name is valid or not

This method doesn't check if the role exists in service components or not. To check for role existence use RoleExists

비공개 메소드들

메소드 설명
LoadComponents ( CloudProjectPathInfo paths ) : void

메소드 상세

AddRoleToConfiguration() 공개 메소드

Adds the given role settings to the specified configuration file.
public AddRoleToConfiguration ( RoleSettings role, DevEnv env ) : void
role Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.RoleSettings The role settings instance
env DevEnv The environment
리턴 void

AddStartupTask() 공개 메소드

Adds new startup task to the given role.
public AddStartupTask ( string roleName, string commandLine, ExecutionContext context ) : void
roleName string The role name
commandLine string The startup task command line
context ExecutionContext The execution context
리턴 void

ForEachRoleSettings() 공개 메소드

Applied given action to all matching
public ForEachRoleSettings ( bool>.Func predicate, Action action ) : void
predicate bool>.Func
action Action
리턴 void

GetCloudConfigRole() 공개 메소드

Gets the role if exists otherwise return null.
public GetCloudConfigRole ( string name ) : RoleSettings
name string The role name
리턴 Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.RoleSettings

GetLocalConfigRole() 공개 메소드

Gets the role if exists otherwise return null.
public GetLocalConfigRole ( string name ) : RoleSettings
name string The role name
리턴 Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.RoleSettings

GetNextPort() 공개 메소드

Gets the next available port, starts from 80.
public GetNextPort ( ) : int
리턴 int

GetRoleStartup() 공개 메소드

Gets role startup.
public GetRoleStartup ( string roleName ) : Startup
roleName string The role name
리턴 Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.Startup

GetRoles() 공개 메소드

Gets all role settings that matches the given name.
public GetRoles ( IEnumerable roleNames ) : IEnumerable
roleNames IEnumerable Role names collection
리턴 IEnumerable

GetRoles() 공개 메소드

Gets all existing role names.
public GetRoles ( ) : IEnumerable
리턴 IEnumerable

GetStartupTask() 공개 메소드

Searches for a startup task that matches one of the given command lines for the specified role.
public GetStartupTask ( string roleName ) : Task
roleName string The role name
리턴 Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.Task

GetStartupTaskVariable() 공개 메소드

Gets startup task variable with the specified name.
public GetStartupTaskVariable ( string roleName, string name ) : string
roleName string The role name
name string The variable name
리턴 string

GetWebRole() 공개 메소드

Gets the web role if exists otherwise return null.
public GetWebRole ( string name ) : WebRole
name string The web role name
리턴 Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.WebRole

GetWorkerRole() 공개 메소드

Gets the worker role if exists otherwise return null.
public GetWorkerRole ( string name ) : WorkerRole
name string The worker role name
리턴 Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.WorkerRole

GetWorkerRoles() 공개 메소드

Gets all worker roles that matches given predicate.
public GetWorkerRoles ( Predicate predicate ) : IEnumerable
predicate Predicate The matching predicate
리턴 IEnumerable

IsWebRole() 공개 메소드

Decides if the given role is web or worker role.
public IsWebRole ( string roleName ) : bool
roleName string The role name
리턴 bool

RoleExists() 공개 메소드

Determines if a specified role exists in service components (*.csdef, local and cloud *cscfg) or not.
public RoleExists ( string roleName ) : bool
roleName string Role name
리턴 bool

Save() 공개 메소드

public Save ( CloudProjectPathInfo paths ) : void
paths CloudProjectPathInfo
리턴 void

ServiceComponents() 공개 메소드

public ServiceComponents ( CloudProjectPathInfo paths ) : System
paths CloudProjectPathInfo
리턴 System

ServiceComponents() 공개 메소드

public ServiceComponents ( string cloudConfiguration ) : System
cloudConfiguration string
리턴 System

SetRoleInstances() 공개 메소드

public SetRoleInstances ( string roleName, int instances ) : void
roleName string
instances int
리턴 void

SetRoleVMSize() 공개 메소드

Sets the VM size of a role
public SetRoleVMSize ( string roleName, string vmSize ) : void
roleName string The role name
vmSize string The VM size
리턴 void

SetStartupTaskVariable() 공개 메소드

Sets a startup task environment variable.
public SetStartupTaskVariable ( string roleName, string name, string value ) : void
roleName string The role name
name string The environment variable name
value string The environment variable value
리턴 void

StartupTaskExists() 공개 메소드

Checks if a startup task exists with specified command line.
public StartupTaskExists ( string roleName ) : bool
roleName string The role name
리턴 bool

ValidRoleName() 공개 정적인 메소드

Validates if given role name is valid or not
This method doesn't check if the role exists in service components or not. To check for role existence use RoleExists
public static ValidRoleName ( string roleName ) : bool
roleName string Role name to be checked
리턴 bool