public Scope(ScopeDef?scopeDef, ICollectionFactory collectionFactory, BucketBase bucket, ILogger <Scope> logger) { _bucket = bucket ?? throw new ArgumentNullException(nameof(bucket)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); if (scopeDef != null) { Name = scopeDef.name; Id = scopeDef.uid; _collections = new ConcurrentDictionary <string, ICouchbaseCollection>( scopeDef.collections .Select(p => collectionFactory.Create(bucket, this, Convert.ToUInt32(p.uid, 16), p.name)) .ToDictionary(x => x.Name, v => v)); } else { Name = DefaultScopeName; Id = DefaultScopeId; _collections = new ConcurrentDictionary <string, ICouchbaseCollection>(); _collections.TryAdd(CouchbaseCollection.DefaultCollectionName, collectionFactory.Create(bucket, this, null, CouchbaseCollection.DefaultCollectionName)); } _queryContext = $"{_bucket.Name}.{Name}"; }
public CreatePieceCommand( IPieceRepositoryFacade repository, IDateService dateService, IPieceFactory pieceFactory, IArtistFactory artistFactory, IMediumFactory mediumFactory, IGenreFactory genreFactory, ISubgenreFactory subgenreFactory, ISubjectMatterFactory subjectMatterFactory, IAcquisitionFactory acquisitionFactory, IFundingSourceFactory fundingSourceFactory, IPieceSourceFactory pieceSourceFactory, ILocationFactory locationFactory, ICollectionFactory collectionFactory, IUnitOfWork unitOfWork) { this.repository = repository; this.dateService = dateService; this.pieceFactory = pieceFactory; this.artistFactory = artistFactory; this.mediumFactory = mediumFactory; this.genreFactory = genreFactory; this.subgenreFactory = subgenreFactory; this.subjectMatterFactory = subjectMatterFactory; this.acquisitionFactory = acquisitionFactory; this.fundingSourceFactory = fundingSourceFactory; this.pieceSourceFactory = pieceSourceFactory; this.locationFactory = locationFactory; this.collectionFactory = collectionFactory; this.unitOfWork = unitOfWork; }
public HostSessionFactoryImpl(IThreadingProxy threadingProxy, ICollectionFactory collectionFactory, IPofSerializer pofSerializer, PofStreamsFactory pofStreamsFactory, PortableObjectBoxConverter portableObjectBoxConverter) { this.threadingProxy = threadingProxy; this.collectionFactory = collectionFactory; this.pofSerializer = pofSerializer; this.pofStreamsFactory = pofStreamsFactory; this.portableObjectBoxConverter = portableObjectBoxConverter; }
public InvokableServiceContextImpl(ICollectionFactory collectionFactory, PortableObjectBoxConverter portableObjectBoxConverter, object serviceImplementation, Type serviceInterface, Guid guid, IMultiValueDictionary <string, MethodDescriptor> methodDescriptorsByName) { this.collectionFactory = collectionFactory; this.portableObjectBoxConverter = portableObjectBoxConverter; this.serviceImplementation = serviceImplementation; this.serviceInterface = serviceInterface; this.guid = guid; this.methodDescriptorsByName = methodDescriptorsByName; }
public override System.Collections.IEnumerable Get(ICollectionFactory collections) { var q = from m in collections.Get <Message> () where m.ChannelName == Channel orderby m.PostTime descending select m; return(q.Take(20)); }
public Scope(string name, BucketBase bucket, ICollectionFactory collectionFactory, ILogger <Scope> logger) { Name = name ?? throw new ArgumentNullException(nameof(name)); _bucket = bucket ?? throw new ArgumentNullException(nameof(bucket)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _collectionFactory = collectionFactory ?? throw new ArgumentNullException(nameof(collectionFactory)); _collections = new ConcurrentDictionary <string, ICouchbaseCollection>(); _queryContext = $"{_bucket.Name}.{Name}"; }
public ServiceClientFactoryImpl(ProxyGenerator proxyGenerator, IStreamFactory streamFactory, ICollectionFactory collectionFactory, IThreadingProxy threadingProxy, INetworkingProxy networkingProxy, IPofSerializer pofSerializer, PofStreamsFactory pofStreamsFactory) { this.proxyGenerator = proxyGenerator; this.streamFactory = streamFactory; this.collectionFactory = collectionFactory; this.threadingProxy = threadingProxy; this.networkingProxy = networkingProxy; this.pofSerializer = pofSerializer; this.pofStreamsFactory = pofStreamsFactory; }
public Scope(string name, BucketBase bucket, ICollectionFactory collectionFactory, ILogger <Scope> logger) { Name = name ?? throw new ArgumentNullException(nameof(name)); _bucket = bucket ?? throw new ArgumentNullException(nameof(bucket)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _collectionFactory = collectionFactory ?? throw new ArgumentNullException(nameof(collectionFactory)); _collections = new ConcurrentDictionary <string, ICouchbaseCollection>(); _queryContext = $"default:{_bucket.Name.EscapeIfRequired()}.{name.EscapeIfRequired()}"; IsDefaultScope = name == DefaultScopeName; }
public ClusteringPhaseFactoryImpl(ICollectionFactory collectionFactory, IThreadingProxy threadingProxy, INetworkingProxy networkingProxy, PofStreamsFactory pofStreamsFactory, HostSessionFactory hostSessionFactory, ClusteringConfiguration clusteringConfiguration, PortableObjectBoxConverter portableObjectBoxConverter, ClusteringPhaseManager clusteringPhaseManager) { this.collectionFactory = collectionFactory; this.threadingProxy = threadingProxy; this.networkingProxy = networkingProxy; this.pofStreamsFactory = pofStreamsFactory; this.hostSessionFactory = hostSessionFactory; this.clusteringConfiguration = clusteringConfiguration; this.portableObjectBoxConverter = portableObjectBoxConverter; this.clusteringPhaseManager = clusteringPhaseManager; }
public HostPhase(ICollectionFactory collectionFactory, IThreadingProxy threadingProxy, HostSessionFactory hostSessionFactory, HostContext hostContext, IListenerSocket listenerSocket) { this.threadingProxy = threadingProxy; this.hostSessionFactory = hostSessionFactory; this.hostContext = hostContext; this.listenerSocket = listenerSocket; this.cancellationTokenSource = threadingProxy.CreateCancellationTokenSource(); this.listenerThread = threadingProxy.CreateThread(ListenerThreadEntryPoint, new ThreadCreationOptions { IsBackground = true }); sessions = collectionFactory.CreateConcurrentSet <HostSession>(); }
public T Create() { ICollectionFactory <T> factory = null; if (typeof(IDictionary).IsAssignableFrom(typeof(T))) { factory = new DictionaryFactory <T>() as ICollectionFactory <T>; } else if (typeof(IList).IsAssignableFrom(typeof(T))) { factory = new ListFactory <T>() as ICollectionFactory <T>; } return(factory.Create()); }
private void DoTestEqualsExact(IGeometry x, IGeometry somethingExactlyEqual, IGeometry somethingNotEqualButSameClass, IGeometry sameClassButEmpty, IGeometry anotherSameClassButEmpty, ICollectionFactory collectionFactory) { IGeometry emptyDifferentClass; if (x is Point) { emptyDifferentClass = geometryFactory.CreateGeometryCollection(null); } else { emptyDifferentClass = geometryFactory.CreatePoint((Coordinate)null); } IGeometry somethingEqualButNotExactly = geometryFactory.CreateGeometryCollection(new IGeometry[] { x }); DoTestEqualsExact(x, somethingExactlyEqual, collectionFactory.CreateCollection(new IGeometry[] { x }, geometryFactory), somethingNotEqualButSameClass); DoTestEqualsExact(sameClassButEmpty, anotherSameClassButEmpty, emptyDifferentClass, x); /** * Test comparison of non-empty versus empty. */ DoTestEqualsExact(x, somethingExactlyEqual, sameClassButEmpty, sameClassButEmpty); DoTestEqualsExact(collectionFactory.CreateCollection( new IGeometry[] { x, x }, geometryFactory), collectionFactory.CreateCollection( new IGeometry[] { x, somethingExactlyEqual }, geometryFactory), somethingEqualButNotExactly, collectionFactory.CreateCollection( new IGeometry[] { x, somethingNotEqualButSameClass }, geometryFactory)); }
//ctor public MongoDbSignalDispatchHistoryQueries(ICollectionFactory collectionFactory) { _collection = collectionFactory.GetCollection <SignalDispatch <ObjectId> >(CollectionNames.DISPATCHES_HISTORY); }
//init public MongoDbStoredNotificationQueries(ICollectionFactory collectionFactory) { _collectionFactory = collectionFactory; }
//init public MongoDbSignalEventQueries(ICollectionFactory collectionFactory) { _collectionFactory = collectionFactory; }
public SpecsSubscriberQueries(ICollectionFactory collectionFactory) : base(collectionFactory) { }
//init public MongoDbSubscriberQueries(ICollectionFactory collectionFactory) { _collectionFactory = collectionFactory; }
public RemoteServiceInvocationValidatorFactoryImpl(ICollectionFactory collectionFactory) { this.collectionFactory = collectionFactory; }
public ScopeFactory(ILogger <Scope> scopeLogger, ICollectionFactory collectionFactory) { _scopeLogger = scopeLogger; _collectionFactory = collectionFactory ?? throw new ArgumentNullException(nameof(collectionFactory)); }
public MongoRepository(ICollectionFactory collectionFactory) { CollectionFactory = collectionFactory; }
public abstract System.Collections.IEnumerable Get(ICollectionFactory collections);
//init public MongoDbSubscriberCategorySettingsQueries(ICollectionFactory collectionFactory) { _collectionFactory = collectionFactory; }
public DefaultObjectPoolFactory(ICollectionFactory collectionFactory) { this.collectionFactory = collectionFactory; }
//init public MongoDbSignalBounceQueries(ICollectionFactory collectionFactory) { _collectionFactory = collectionFactory; }
public override System.Collections.IEnumerable Get(ICollectionFactory collections) { var q = from m in collections.Get<Message> () where m.ChannelName == Channel orderby m.PostTime descending select m; return q.Take (20); }
public LocalServiceContainerImpl( ICollectionFactory collectionFactory ) : this(collectionFactory.CreateConcurrentDictionary <Guid, InvokableServiceContext>()) { }
public override System.Collections.IEnumerable Get(ICollectionFactory collections) { return collections.Get<Channel> (); }
//ctor public MongoDbConsolidationLockQueries(ICollectionFactory collectionFactory) { _collection = collectionFactory.GetCollection <ConsolidationLock <ObjectId> >(); }
//init public MongoDbSignalDispatchQueries(ICollectionFactory collectionFactory) { _collectionFactory = collectionFactory; }
//init public MongoDbSubscriberEmbeddedCategoriesQueries(ICollectionFactory collectionFactory) : base(collectionFactory) { }
//init public MongoDbDispatchTemplateQueries(ICollectionFactory collectionFactory) { _collectionFactory = collectionFactory; }
public InvokableServiceContextFactoryImpl(ICollectionFactory collectionFactory, PortableObjectBoxConverter portableObjectBoxConverter) { this.collectionFactory = collectionFactory; this.portableObjectBoxConverter = portableObjectBoxConverter; }