Ejemplo n.º 1
0
 /// <summary>
 /// Creates a snapshot component to snapshot reads for a given visibility lsn.
 /// </summary>
 public SnapshotComponent(SnapshotContainer <TKey, TValue, TKeyComparer, TKeyEqualityComparer> container, LoadValueCounter valueCounter, bool isValueAReferenceType, string traceType)
 {
     this.container             = container;
     this.isValueAReferenceType = isValueAReferenceType;
     this.valueCounter          = valueCounter;
     this.traceType             = traceType;
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        public TDifferentialStoreComponent(
            ITransactionalReplicator transactionalReplicator,
            long stateProviderId,
            SnapshotContainer <TKey, TValue, TKeyComparer, TKeyEqualityComparer> snapshotContainer,
            LoadValueCounter loadValueCounter,
            bool isValueAReferenceType,
            string traceType)
        {
            this.traceType = traceType;
            this.transactionalReplicator = transactionalReplicator;
            this.stateProviderId         = stateProviderId;
            this.snapshotContainer       = snapshotContainer;

            this.component             = new ConcurrentDictionary <TKey, DifferentialStateVersions <TValue> >(KeyEqualityComparer);
            this.addList               = new AddList <TKey>(KeyComparer);
            this.isReadonly            = false;
            this.isValueAReferenceType = isValueAReferenceType;
            this.loadValueCounter      = loadValueCounter;
        }