public RepositoryFactory(ICypherTransactionFactory cypherTransactionFactory, IProxyFactory proxyFactory, IMetadataFactory metadataFactory) { _mappers = new ConcurrentDictionary <Type, Func <IGraphSession, IMapper> >(); _cypherTransactionFactory = cypherTransactionFactory; _proxyFactory = proxyFactory; _metadataFactory = metadataFactory; }
public GetQueryExecutor(ICypherTransactionFactory transactionFactory, IMetadataFactory metadataFactory, Func <IRecord, TResult> map, Func <ICypherReturn <TResult>, ICypherReturn <TResult> > returnFactory) : base(transactionFactory, metadataFactory) { _map = map; _returnFactory = returnFactory; }
public RepositoryFactory(IDriver db, ICypherTransactionFactory cypherTransactionFactory, IProxyFactory proxyFactory, IMetadataFactory metadataFactory, params Assembly[] assemblies) : this(cypherTransactionFactory, proxyFactory, metadataFactory) { foreach (var assembly in assemblies) { var types = assembly.GetTypes().Where(x => typeof(IMapper).IsAssignableFrom(x)); foreach (var type in types) { foreach (var item in type.GetInterfaces()) { var arguments = item.GetGenericArguments(); if (arguments.Any()) { var local = type; Register(session => (IMapper)Activator.CreateInstance(local, session, _cypherTransactionFactory, _metadataFactory), arguments[0]); } } } } }
public QueryExecutorFactory(ICypherTransactionFactory transactionFactory, IMetadataFactory metadataFactory, params Assembly[] assemblies) : this(metadataFactory) { foreach (var assembly in assemblies) { var types = assembly.GetTypes().Where(x => typeof(IQueryExecutor).IsAssignableFrom(x)); foreach (var type in types) { if (type.BaseType == null) { continue; } var arguments = type.BaseType.GetGenericArguments(); if (arguments.Length == 3) { var local = type; Register(session => (IQueryExecutor)Activator.CreateInstance(local, transactionFactory, _metadataFactory), arguments[2]); } } } }
public PersonMapper(IGraphSession session, ICypherTransactionFactory transactionFactory, IMetadataFactory metadataFactory) : base(session, transactionFactory, metadataFactory) { }
protected AbstractQueryExecutor(ICypherTransactionFactory transactionFactory, IMetadataFactory metadataFactory) { _transactionFactory = transactionFactory; _metadataFactory = metadataFactory; }
protected Mapper(IGraphSession session, ICypherTransactionFactory transactionFactory, IMetadataFactory metadataFactory) { _session = session; _transactionFactory = transactionFactory; MetadataFactory = metadataFactory; }
protected GenericQueryExecutor(ICypherTransactionFactory transactionFactory, IMetadataFactory metadataFactory) : base(transactionFactory, metadataFactory) { }
public GetMoviesByTitleExecutor(ICypherTransactionFactory transactionFactory, IMetadataFactory metadataFactory) : base(transactionFactory, metadataFactory) { }