protected SynchronizationContext(VaultCompiler compiler) { lock (compiler._barrier) { Compiler = compiler; WorkerSeq = compiler._nextWorkerSeq++; LastSuccessfulWorkerSeq = compiler._lastSuccessfulWorkerSeq; Revision = compiler.Vault.Revision; } }
protected CumulationAwareContext(VaultCompiler compiler) : base(compiler) { lock (compiler._barrier) { Changeset = compiler._changeSet.ToArray(); CompilingBaseline = compiler._compilingBaseline; if (CompilingBaseline) { // until we've compiled baseline, we're always instantly embracing all the changes compiler._changeSet.Clear(); Changeset = new ElementChangedEventArgs[0]; // however, when the baseline is ready and we switch to cumulative mode, then // changes should be deleted only when the worker has successfully incorporated them } } }