Exemplo n.º 1
0
 internal Transaction(IStructuredDataClient client, Action<ITransactionClient> transactionBuilder)
 {
     this.client = client;
     using (TransactionAsyncClient builder = new TransactionAsyncClient(client, compiledCommands, resultDispatchers))
     {
         transactionBuilder(builder);
     }
     Compile();
 }
Exemplo n.º 2
0
        public SdsClientDataRepositoryService()
        {
            var config = Catalog.Factory.Resolve <IConfig>(SpecialFactoryContexts.Routed);

            _summaryMetadataSource =
                config.Get <IMetadataProvider <TSummaryType, TSummaryMetadataType> >(
                    DataRepositoryServiceLocalConfig.SummaryMetadataProvider);
            _itemMetadataSource =
                config.Get <IMetadataProvider <TDataType, TItemMetadataType> >(
                    DataRepositoryServiceLocalConfig.ItemMetadataProvider);
            _summarizer       = config.Get <ISummarizer <TDataType, TSummaryType> >(DataRepositoryServiceLocalConfig.Summarizer);
            _updateAssignment =
                config.Get <Action <TDataType, TDataType> >(DataRepositoryServiceLocalConfig.UpdateAssignment);
            if (config.SettingExists(DataRepositoryServiceLocalConfig.ContextFilter))
            {
                _contextFilter = config.Get <IContextFilter>(DataRepositoryServiceLocalConfig.ContextFilter);
            }

            _client  = config.Get <IStructuredDataClient>(SdsClientDataRepositoryServiceLocalConfig.SdsClient);
            _tableId = config.Get <Enum>(SdsClientDataRepositoryServiceLocalConfig.SdsClient);
        }
Exemplo n.º 3
0
 public TransactionAsyncClient(IStructuredDataClient client, List<byte[]> compiledCommands, List<Action<RedisReply>> resultDispatchers)
 {
     this.compiledCommands = compiledCommands;
     this.resultDispatchers = resultDispatchers;
     this.client = client;
 }