コード例 #1
0
 public ShadowStateEntry(
     [NotNull] StateManager stateManager,
     [NotNull] IEntityType entityType,
     [NotNull] StateEntryMetadataServices metadataServices)
     : base(stateManager, entityType, metadataServices)
 {
     _propertyValues = new object[entityType.ShadowPropertyCount];
 }
コード例 #2
0
        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);
        }
コード例 #7
0
        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);
            }
        }