Example #1
0
        private void OnSourceBufferContentTypeChanged(object sender, ContentTypeChangedEventArgs e)
        {
            BaseProjectionBuffer targetBuffer = this.GetTargetBuffer();

            if (targetBuffer != null)
            {
                targetBuffer.OnSourceBufferContentTypeChanged(sender, e);
            }
        }
Example #2
0
        private void OnSourceBufferReadOnlyRegionsChanged(object sender, SnapshotSpanEventArgs e)
        {
            BaseProjectionBuffer targetBuffer = this.GetTargetBuffer();

            if (targetBuffer != null)
            {
                targetBuffer.OnSourceBufferReadOnlyRegionsChanged(sender, e);
            }
        }
Example #3
0
        public WeakEventHook(BaseProjectionBuffer targetBuffer, BaseBuffer sourceBuffer)
        {
            _targetBuffer = new WeakReference <BaseProjectionBuffer>(targetBuffer);
            _sourceBuffer = sourceBuffer;

            sourceBuffer.ChangedImmediate            += OnSourceTextChanged;
            sourceBuffer.ContentTypeChangedImmediate += OnSourceBufferContentTypeChanged;
            sourceBuffer.ReadOnlyRegionsChanged      += OnSourceBufferReadOnlyRegionsChanged;
        }