Initializes a new instance of ProvideServiceAttribute.
Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Syntax
声明
Public Sub New ( _
    serviceType As Object _
)
用法
Dim serviceType As Object
Dim instance As New ProvideServiceAttribute(serviceType)
public ProvideServiceAttribute(
    Object serviceType
)
public:
ProvideServiceAttribute(
    Object^ serviceType
)
new : 
        serviceType:Object -> ProvideServiceAttribute
public function ProvideServiceAttribute(
    serviceType : Object
)
Parameters
- serviceType
 Type: System.Object
 The type of the service.
Remarks
The constructor logic attempts to extract a GUID using the following conversions:
- If serviceType is a string, create a new GUID from the string. 
- If serviceType is a type, extract its GUID. 
- If serviceType is a GUID, do nothing. 
If all of these fail, throw a new ArgumentException.
.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.