Subscribe Method (Type, SubscribeServiceCallback)
Calls back on the provided callback when someone has published the requested service. If the service was already available, this method invokes the callback immediately. A generic version of this method is provided for convenience, and calls the non-generic method with appropriate casts.
Namespace: Microsoft.Data.Tools.Design.Core.Context
Assembly: Microsoft.Data.Tools.Design.Core (in Microsoft.Data.Tools.Design.Core.dll)
Syntax
'Declaration
Public MustOverride Sub Subscribe ( _
serviceType As Type, _
callback As SubscribeServiceCallback _
)
'Usage
Dim instance As ServiceCollection
Dim serviceType As Type
Dim callback As SubscribeServiceCallback
instance.Subscribe(serviceType, callback)
public abstract void Subscribe(
Type serviceType,
SubscribeServiceCallback callback
)
public:
virtual void Subscribe(
Type^ serviceType,
SubscribeServiceCallback^ callback
) abstract
abstract Subscribe :
serviceType:Type *
callback:SubscribeServiceCallback -> unit
public abstract function Subscribe(
serviceType : Type,
callback : SubscribeServiceCallback
)
Parameters
- serviceType
Type: System..::..Type
The type of service to subscribe to.
- callback
Type: Microsoft.Data.Tools.Design.Core.Context..::..SubscribeServiceCallback
A callback that will be notified when the service is available.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | If serviceType or callback is null. |