Exemplo n.º 1
0
        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>();
        }
Exemplo n.º 2
0
 public IHandler ResolveHandler(Type inputType)
 {
     return(_typesProvider.Resolve(_handlers[inputType]) as IHandler);
 }