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