protected AbstractRepositoryGroup(GroupedProviderMetadata providers, Uri idRoot, AbstractScopedCache scopedCache, RepositoryContext hiveContext)
 {
     Providers = providers;
     IdRoot = idRoot;
     UnitScopedCache = scopedCache;
     HiveContext = hiveContext;
 }
 public void Setup()
 {
     _frameworkContext = new FakeFrameworkContext();
     _unitScopedCache = new DictionaryScopedCache();
     var providerGroup = GroupedProviderMockHelper.GenerateProviderGroup(1, 0, 1, _frameworkContext);
     var idRoot = new Uri("oh-yeah://this-is-my-root/");
     _groupUnitFactory = new GroupUnitFactory(providerGroup.Writers, idRoot, FakeHiveCmsManager.CreateFakeRepositoryContext(_frameworkContext), _frameworkContext, () => _unitScopedCache);
 }
Beispiel #3
0
 public ProviderUnit(AbstractEntityRepository entityRepository, AbstractScopedCache unitScopedCache)
 {
     EntityRepository = entityRepository;
     WorkCompleting += (obj, target) =>
                           {
                               EntityRepository.PrepareForCompletion();
                               EntityRepository.Revisions.PrepareForCompletion();
                               EntityRepository.Schemas.PrepareForCompletion();
                               EntityRepository.Schemas.Revisions.PrepareForCompletion();
                           };
     FrameworkContext = entityRepository.FrameworkContext;
     UnitScopedCache = unitScopedCache;
 }
 public HiveQueryResultEventArgs(object result, QueryDescription query, AbstractScopedCache scopedCache)
     : this(Enumerable.Repeat(result, 1).ToArray(), query, scopedCache)
 {
 }
 public HiveEntityPostActionEventArgs(IRelatableEntity entity, AbstractScopedCache scopedCache)
 {
     Entity = entity;
     ScopedCache = scopedCache;
 }
 public ReadonlyProviderUnit(AbstractReadonlyEntityRepository entityRepository, AbstractScopedCache unitScopedCache)
 {
     EntityRepository = entityRepository;
     FrameworkContext = entityRepository.FrameworkContext;
     UnitScopedCache = unitScopedCache;
 }
 public HiveRevisionPostActionEventArgs(IRevision<IVersionableEntity> entity, AbstractScopedCache scopedCache)
 {
     Entity = entity;
     ScopedCache = scopedCache;
 }
 public HiveSchemaPostActionEventArgs(AbstractSchemaPart schemaPart, AbstractScopedCache scopedCache)
 {
     SchemaPart = schemaPart;
     ScopedCache = scopedCache;
 }
 public HiveSchemaPreActionEventArgs(AbstractSchemaPart schemaPart, AbstractScopedCache scopedCache)
     : base(scopedCache)
 {
     SchemaPart = schemaPart;
 }
 public HiveRelationPostActionEventArgs(IReadonlyRelation<IRelatableEntity, IRelatableEntity> relation, AbstractScopedCache scopedCache)
     : base(scopedCache)
 {
     Relation = relation;
 }
 public HiveEntityPreActionEventArgs(IRelatableEntity entity, AbstractScopedCache scopedCache)
     : base(scopedCache)
 {
     Entity = entity;
 }
 public AbstractHiveEventArgs(AbstractScopedCache scopedCache)
 {
     ScopedCache = scopedCache;
 }
 protected AbstractRepositoryGroup(IEnumerable<AbstractProviderRepository> childRepositories, Uri idRoot, AbstractScopedCache scopedCache, RepositoryContext hiveContext)
     : this(new GroupedProviderMetadata(childRepositories), idRoot, scopedCache, hiveContext)
 { }
 public HiveRevisionPreActionEventArgs(IRevision<IVersionableEntity> entity, AbstractScopedCache scopedCache)
     : base(scopedCache)
 {
     Entity = entity;
 }
 public HiveEntityPostDeletionEventArgs(HiveId id, AbstractScopedCache scopedCache)
     : base(scopedCache)
 {
     Id = id;
 }
 public HiveQueryResultEventArgs(IEnumerable<object> results, QueryDescription query, AbstractScopedCache scopedCache)
 {
     Results = results;
     ScopedCache = scopedCache;
     QueryDescription = query;
 }
Beispiel #17
0
        public static T GetOrCreateTyped <T>(this AbstractScopedCache cache, string key, Func <T> callback)
        {
            var obj = cache.GetOrCreate(key, () => callback.Invoke());

            return((T)obj);
        }
 public HiveRelationByIdPostActionEventArgs(IRelationById relation, AbstractScopedCache scopedCache)
     : base(scopedCache)
 {
     Relation = relation;
 }