Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.ServiceManagementCmdletTestHelper.GetAzureRole C# (CSharp) Method

GetAzureRole() public method

public GetAzureRole ( string serviceName, string slot, string roleName, bool details ) : Collection
serviceName string
slot string
roleName string
details bool
return Collection
        public Collection<RoleContext> GetAzureRole(string serviceName, string slot, string roleName, bool details)
        {
            GetAzureRoleCmdletInfo getAzureRoleCmdletInfo = new GetAzureRoleCmdletInfo(serviceName, slot, roleName, details);
            WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureRoleCmdletInfo);

            Collection<PSObject> result = azurePowershellCmdlet.Run();
            Collection<RoleContext> roles = new Collection<RoleContext>();
            foreach (PSObject re in result)
            {
                roles.Add((RoleContext)re.BaseObject);
            }
            return roles;
        }
ServiceManagementCmdletTestHelper