Diagram.GetService Method
Gets a service.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
'Déclaration
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.