public void Init(ITypesProvider typesProvider) { IHandlerRegistry handlerRegistry = typesProvider.Resolve <IHandlerRegistry>(); handlerRegistry.RegisterHandler <GetDeviceDefinitionsQuery, GetDeviceDefinitionsQueryHandler>(); handlerRegistry.RegisterHandler <UpdateDeviceDefinitionCommand, UpdateDeviceDefinitionCommandHandler>(); handlerRegistry.RegisterHandler <GetStoreSnapshotQuery, GetStoreSnapshotQueryHandler>(); handlerRegistry.RegisterHandler <UploadSnapshotCommand, UploadSnapshotCommandHandler>(); }
public IHandler ResolveHandler(Type inputType) { return(_typesProvider.Resolve(_handlers[inputType]) as IHandler); }