Freigeben über


ProvideServiceAttribute(Object) Constructor

Definition

Initializes a new instance of ProvideServiceAttribute.

public:
 ProvideServiceAttribute(System::Object ^ serviceType);
public:
 ProvideServiceAttribute(Platform::Object ^ serviceType);
 ProvideServiceAttribute(winrt::Windows::Foundation::IInspectable const & serviceType);
public ProvideServiceAttribute (object serviceType);
new Microsoft.VisualStudio.Shell.ProvideServiceAttribute : obj -> Microsoft.VisualStudio.Shell.ProvideServiceAttribute
Public Sub New (serviceType As Object)

Parameters

serviceType
Object

[in] 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.

Applies to