ServiceProviders.AddService(Type, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a service to the list.
public:
void AddService(Type ^ serviceType, System::Object ^ service);
public void AddService (Type serviceType, object service);
member this.AddService : Type * obj -> unit
Public Sub AddService (serviceType As Type, service As Object)
Parameters
- serviceType
- Type
Service type of the new service.
- service
- Object
The service implementation class.
Exceptions
serviceType
or service
is null
.
Attempted to add a service that already exists in the dictionary.
Applies to
Bekerjasama dengan kami di GitHub
Sumber untuk kandungan ini boleh didapati di GitHub, di mana anda juga boleh mencipta dan menyemak isu dan menarik permintaan. Untuk maklumat lanjut, lihat panduan penyumbang kami.