Partager via


Diagram.GetService Method

Gets a service.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

Syntax

'Declaration
Public Function GetService ( _
    serviceType As Type _
) As Object
public Object GetService(
    Type serviceType
)
public:
Object^ GetService(
    Type^ serviceType
)
member GetService : 
        serviceType:Type -> Object
public function GetService(
    serviceType : Type
) : Object

Parameters

  • serviceType
    Type: System.Type

    The type of service to retrieve.

Return Value

Type: System.Object
The service; if no service is found, nulla null reference (Nothing in Visual Basic).

Remarks

To get the service, this method queries the store. If no service is found in the store and the diagram has an active diagram view, the active diagram view is queried.

.NET Framework Security

See Also

Reference

Diagram Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace