public InsertAction(IMetadataStore metadataStore, TEntity entity, IHydrator hydrator, IDbConnection connection, IDialect dialect, IEnvironmentSettings environment) : base(metadataStore, entity, connection, dialect, environment) { this._hydrator = hydrator; }
public StoredProcedureToListAction(IMetadataStore metadataStore, IHydrator hydrator, IDbConnection connection, IDialect dialect, IEnvironmentSettings environment) : base(metadataStore, default(TEntity), connection, dialect, environment) { this._hydrator = hydrator; }
public UserService(IOptions <AppSettings> appSettings, IUserRepository userRepository, IHydrator <geo_auth_data.models.domain.User, geo_auth_data.models.dto.User> userToUserDtoHydrator, ICachingService cachingService, IUserRoleRepository userRoleRepository) { this.appSettings = appSettings.Value; this.userRepository = userRepository; this.userToUserDtoHydrator = userToUserDtoHydrator; this.cachingService = cachingService; this.userRoleRepository = userRoleRepository; }
protected DatabaseAction(IMetadataStore metadataStore, IHydrator hydrator, IDbConnection connection, IEnvironmentSettings environment) { this.MetadataStore = metadataStore; this.Hydrator = hydrator; Connection = connection; Environment = environment; }
public QueryByStoredProcedure(IMetadataStore metadatastore, IHydrator hydrator, IDbConnection connection, IDialect dialect, IEnvironmentSettings environment) { this._metadatastore = metadatastore; this.hydrator = hydrator; this.connection = connection; _dialect = dialect; _environment = environment; }
public QueryOver(IMetadataStore metadatastore, IHydrator hydrator, IDbConnection connection, IDialect dialect, IEnvironmentSettings environment) { _metadatastore = metadatastore; _hydrator = hydrator; _connection = connection; _dialect = dialect; _environment = environment; _queryDefinition = new QueryOverDefinition <TEntity>(typeof(TEntity), _connection, _metadatastore, _hydrator, _dialect, _environment); }
public QueryOverDefinition(Type queryOverEntity, IDbConnection connection, IMetadataStore metadatastore, IHydrator hydrator, IDialect dialect, IEnvironmentSettings environment) { _queryOverEntity = queryOverEntity; _connection = connection; _metadatastore = metadatastore; _hydrator = hydrator; _dialect = dialect; _environment = environment; }
public QueryContext(IMetadataStore metadataStore, IHydrator hydrator, IDbConnection connection, IDialect dialect, IEnvironmentSettings environment) { _metadataStore = metadataStore; _hydrator = hydrator; _connection = connection; _dialect = dialect; _environment = environment; this._builder = new StringBuilder(); this._buffer = new StringWriterReader(this._builder); this._tableInfo = this._metadataStore.GetTableInfo <T>(); this._parameters = new Dictionary <string, object>(); }
public QueryClause(QueryOverDefinition <TParent> definition, Type queriedOverEntity, IDbConnection connection, IMetadataStore metadataStore, IHydrator hydrator, IDialect dialect, IEnvironmentSettings environment, Expression <Func <TEntity, bool> > clause) : base(metadataStore, clause) { _definition = definition; _queriedOverEntity = queriedOverEntity; _connection = connection; _hydrator = hydrator; _dialect = dialect; _environment = environment; }
public Query(IMetadataStore metadatastore, IHydrator hydrator, IDbConnection connection, IDialect dialect, IEnvironmentSettings environment) { this._metadatastore = metadatastore; this._hydrator = hydrator; this._connection = connection; _dialect = dialect; _environment = environment; _selectionOptions = new List <ISelectOption>(); _groupingOptions = new List <IGroupByOption>(); _orderOptions = new List <IOrderOption>(); _criteriaRestrictions = new List <ICriteriaRestriction>(); _queryParameters = new HashSet <QueryParameter>(); _eagerFetchProperties = new Dictionary <Type, string>(); _parentEntity = typeof(TParentEntity); }
private void InitializeSession(IMetadataStore metadataStore, IDbConnection connection) { if (metadataStore != null) { this._metadataStore = metadataStore; } else { this._metadataStore = new MetadataStore(); } if (this._connection != null) { if (this._connection.State != ConnectionState.Open) { this._connection.Open(); } } this._hydrator = new EntityHydrator(this._metadataStore, this); this._sessionCache = new SessionCache(); this._interceptorPipeline = new InterceptorPipeline(_environment); }
private static void Listener(object args) { DuplexPipeChannel channel = (DuplexPipeChannel)args; IBus bus = channel.bus; Stream stream = channel.InStream; IHydrator hydrator = channel.settings.Hydrator; CancellationTokenSource cts = channel.thrCancelTokens; CancellationToken token = cts.Token; while (!token.IsCancellationRequested) { object payload; using (MemoryStream ms = new MemoryStream()) { bool final; do { byte[] buffer = new byte[HeaderPacketSize]; var handle = GCHandle.Alloc(buffer, GCHandleType.Pinned); try { ReadBytes(buffer, stream); HeaderPacket header = (HeaderPacket) Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(HeaderPacket)); final = header.Final; if (token.IsCancellationRequested) { break; } if (header.Size > 0) { byte[] dataBuffer = new byte[header.Size]; var red = ReadBytes(dataBuffer, stream); ms.Write(dataBuffer, 0, red); } } finally { handle.Free(); } } while (!final && !token.IsCancellationRequested); if (ms.Length == 0) { continue; } ms.Seek(0, SeekOrigin.Begin); try { payload = hydrator.Hydrate(ms); } catch { payload = null; } } if (payload != null) { bus.Publish(payload); } } }
public InitializeProxyAction(IMetadataStore metadataStore, IHydrator hydrator, IDbConnection connection, IEnvironmentSettings environment) : base(metadataStore, hydrator, connection, environment) { }