internal Transaction(IStructuredDataClient client, Action<ITransactionClient> transactionBuilder) { this.client = client; using (TransactionAsyncClient builder = new TransactionAsyncClient(client, compiledCommands, resultDispatchers)) { transactionBuilder(builder); } Compile(); }
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); }
public TransactionAsyncClient(IStructuredDataClient client, List<byte[]> compiledCommands, List<Action<RedisReply>> resultDispatchers) { this.compiledCommands = compiledCommands; this.resultDispatchers = resultDispatchers; this.client = client; }