public ShadowStateEntry(
     [NotNull] StateManager stateManager,
     [NotNull] IEntityType entityType,
     [NotNull] StateEntryMetadataServices metadataServices)
     : base(stateManager, entityType, metadataServices)
 {
     _propertyValues = new object[entityType.ShadowPropertyCount];
 }
        public StateEntryFactory(
            [NotNull] EntityMaterializerSource materializerSource,
            [NotNull] StateEntryMetadataServices metadataServices)
        {
            Check.NotNull(materializerSource, "materializerSource");
            Check.NotNull(metadataServices, "metadataServices");

            _materializerSource = materializerSource;
            _metadataServices   = metadataServices;
        }
Пример #3
0
        public ClrStateEntry(
            [NotNull] StateManager stateManager,
            [NotNull] IEntityType entityType,
            [NotNull] StateEntryMetadataServices metadataServices,
            [NotNull] object entity)
            : base(stateManager, entityType, metadataServices)
        {
            Check.NotNull(entity, "entity");

            _entity = entity;
        }
Пример #4
0
        public MixedStateEntry(
            [NotNull] StateManager stateManager,
            [NotNull] IEntityType entityType,
            [NotNull] StateEntryMetadataServices metadataServices,
            [NotNull] object entity)
            : base(stateManager, entityType, metadataServices)
        {
            Check.NotNull(entity, "entity");

            _entity       = entity;
            _shadowValues = new object[entityType.ShadowPropertyCount];
        }
Пример #5
0
        protected StateEntry(
            [NotNull] StateManager stateManager,
            [NotNull] IEntityType entityType,
            [NotNull] StateEntryMetadataServices metadataServices)
        {
            Check.NotNull(stateManager, "stateManager");
            Check.NotNull(entityType, "entityType");
            Check.NotNull(metadataServices, "metadataServices");

            StateManager      = stateManager;
            _metadataServices = metadataServices;
            EntityType        = entityType;
            _stateData        = new StateData(EntityType.Properties.Count);
        }
Пример #6
0
        public MixedStateEntry(
            [NotNull] StateManager stateManager,
            [NotNull] IEntityType entityType,
            [NotNull] StateEntryMetadataServices metadataServices,
            [NotNull] object entity,
            [NotNull] IValueReader valueReader)
            : base(stateManager, entityType, metadataServices)
        {
            Check.NotNull(entity, "entity");
            Check.NotNull(valueReader, "valueReader");

            _entity       = entity;
            _shadowValues = ExtractShadowValues(valueReader);
        }
        public ShadowStateEntry(
            [NotNull] StateManager stateManager,
            [NotNull] IEntityType entityType,
            [NotNull] StateEntryMetadataServices metadataServices,
            [NotNull] IValueReader valueReader)
            : base(stateManager, entityType, metadataServices)
        {
            Check.NotNull(valueReader, "valueReader");

            _propertyValues = new object[valueReader.Count];

            for (var i = 0; i < valueReader.Count; i++)
            {
                // TODO: Consider using strongly typed ReadValue instead of always object
                // Issue #738
                _propertyValues[i] = valueReader.IsNull(i) ? null : valueReader.ReadValue <object>(i);
            }
        }