Share via


Publish Method

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public method Publish< (Of < <' (TServiceType> ) > > )(TServiceType) Publishes the given service. Once published, the service instance remains in the service collection until the editing context is disposed.
Public method Publish< (Of < <' (TServiceType> ) > > )(PublishServiceCallback< (Of < <' (TServiceType> ) > > )) Publishes the given service type, but does not declare an instance yet. When someone requests the service the PublishServiceCallback will be invoked to create the instance. The callback is only invoked once and after that the instance it returned is cached.
Public method Publish(Type, PublishServiceCallback) Publishes the given service type, but does not declare an instance yet. When someone requests the service the PublishServiceCallback will be invoked to create the instance. The callback is only invoked once and after that the instance it returned is cached. A generic version of this method is provided for convenience, and calls the non-generic method with appropriate casts.
Public method Publish(Type, Object) Publishes the given service. Once published, the service instance remains in the service collection until the editing context is disposed.

Top

See Also

Reference

ServiceCollection Class

Microsoft.Data.Tools.Design.Core.Context Namespace