SPServiceInstance.Roles Property

NOTE: This API is now obsolete.

Gets a list of the roles to which the service instance belongs, for classification on the Services on Server page in SharePoint Central Administration.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("Roles have been deprecated.")> _
Public Overridable ReadOnly Property Roles As ICollection(Of String)
    Get
'Usage
Dim instance As SPServiceInstance
Dim value As ICollection(Of String)

value = instance.Roles
[ObsoleteAttribute("Roles have been deprecated.")]
public virtual ICollection<string> Roles { get; }

Property Value

Type: System.Collections.Generic.ICollection<String>
A System.Collections.Generic.ICollection<string> that contains the list of roles, which, by default, includes SingleServer and WebFrontEnd.

See Also

Reference

SPServiceInstance Class

SPServiceInstance Members

Microsoft.SharePoint.Administration Namespace