Ejemplo n.º 1
0
 public ElisionSnapshot(ElisionBuffer elisionBuffer,
                        ITextSnapshot sourceSnapshot,
                        ITextVersion version,
                        ElisionMap content,
                        bool fillInMappingMode)
     : base(version)
 {
     this.elisionBuffer  = elisionBuffer;
     this.sourceSnapshot = sourceSnapshot;
     // The SourceSnapshots property is used heavily, so cache a handy copy.
     this.sourceSnapshots = new ReadOnlyCollection <ITextSnapshot>(new FrugalList <ITextSnapshot>()
     {
         sourceSnapshot
     });
     this.totalLength       = content.Length;
     this.content           = content;
     this.totalLineCount    = content.LineCount;
     this.fillInMappingMode = fillInMappingMode;
     Debug.Assert(this.totalLength == version.Length,
                  string.Format(System.Globalization.CultureInfo.CurrentCulture,
                                "Elision Snapshot Inconsistency. Content: {0}, Previous + delta: {1}", this.totalLength, version.Length));
     if (this.totalLength != version.Length)
     {
         throw new InvalidOperationException(Strings.InvalidLengthCalculation);
     }
 }
Ejemplo n.º 2
0
            public void RaiseEvent(BaseBuffer baseBuffer, bool immediate)
            {
                ElisionBuffer elBuffer = (ElisionBuffer)baseBuffer;
                EventHandler <ElisionSourceSpansChangedEventArgs> spanHandlers = elBuffer.SourceSpansChanged;

                if (spanHandlers != null)
                {
                    spanHandlers(this, args);
                }

                // now raise the text content changed event
                baseBuffer.RawRaiseEvent(args, immediate);
            }
Ejemplo n.º 3
0
 public ElisionEdit(ElisionBuffer elisionBuffer, ITextSnapshot originSnapshot, EditOptions options, int?reiteratedVersionNumber, object editTag)
     : base(elisionBuffer, originSnapshot, options, reiteratedVersionNumber, editTag)
 {
     this.elisionBuffer = elisionBuffer;
     this.subordinate   = true;
 }
Ejemplo n.º 4
0
 public SpanEdit(ElisionBuffer elBuffer) : base(elBuffer)
 {
     this.elBuffer = elBuffer;
 }