示例#1
0
        public EntityContext(
            IEntityContextFactory factory,
            IMappingsRepository mappings,
            IEntityStore entityStore,
            IEntitySource entitySource,
            IBaseUriSelectionPolicy baseUriSelector,
            IRdfTypeCache typeCache,
            IBlankNodeIdGenerator blankIdGenerator,
            IResultTransformerCatalog transformerCatalog,
            IEntityCaster caster,
            IDatasetChangesTracker changeTracker,
            IResourceResolutionStrategy resourceResolutionStrategy,
            ILogger log)
            : this(changeTracker)
        {
            _factory                    = factory;
            _entityStore                = entityStore;
            _entitySource               = entitySource;
            _baseUriSelector            = baseUriSelector;
            _mappings                   = mappings;
            _typeCache                  = typeCache;
            _blankIdGenerator           = blankIdGenerator;
            _transformerCatalog         = transformerCatalog;
            _caster                     = caster;
            _typedEntityMapping         = _mappings.MappingFor <ITypedEntity>();
            _typesPropertyMapping       = _typedEntityMapping.PropertyFor("Types");
            _resourceResolutionStrategy = resourceResolutionStrategy;
            _log = log;

            if (_baseUriSelector == null)
            {
                _log.Warning("No Base URI Selection Policy. It will not be possible to use relative URIs");
            }
        }
示例#2
0
 public EntityContext(
     IEntityContextFactory factory,
     IMappingsRepository mappings,
     IEntityStore entityStore,
     IEntitySource entitySource,
     IBaseUriSelectionPolicy baseUriSelector,
     IRdfTypeCache typeCache,
     IBlankNodeIdGenerator blankIdGenerator,
     IResultTransformerCatalog transformerCatalog,
     IEntityCaster caster,
     IDatasetChangesTracker changeTracker,
     ILogger log)
     : this(
         factory,
         mappings,
         entityStore,
         entitySource,
         baseUriSelector,
         typeCache,
         blankIdGenerator,
         transformerCatalog,
         caster,
         changeTracker,
         null,
         log)
 {
 }
示例#3
0
 public EntityStore(IDatasetChangesTracker changesTracker)
 {
     _changesTracker = changesTracker;
     _entityQuads    = new EntityQuadCollection(_threadSafe);
     _initialQuads   = new EntityQuadCollection(_threadSafe);
 }
示例#4
0
 private EntityContext(IDatasetChangesTracker changeTracker)
 {
     _changeTracker  = changeTracker;
     _currentCulture = null;
     EntityCache     = new InMemoryEntityCache();
 }