~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/core/Mono.Texteditor/Mono.TextEditor/StringBuffer.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-05-27 18:08:20 UTC
  • mfrom: (19.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20120527180820-fydl21qnbnfr8w2t
Tags: 3.0.2+dfsg-3
* [fcecfe7] Fix monodevelop-core-addins.pc.in to point to actual 
  installed location of assemblies.
* [26e1a07] DebSrc 3.0 does not support Quilt's -p parameter, so 
  manually adjust the path in the patch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
using System;
3
 
using System.Collections.Generic;
4
 
using System.Text;
5
 
namespace Mono.TextEditor
6
 
{
7
 
        /// <summary>
8
 
        /// Simple implementation of the buffer interface to support fast read-only documents.
9
 
        /// </summary>
10
 
        public class StringBuffer : IBuffer
11
 
        {
12
 
                string buffer;
13
 
 
14
 
                public StringBuffer (string buffer)
15
 
                {
16
 
                        this.buffer = buffer;
17
 
                }
18
 
 
19
 
                #region IBuffer Members
20
 
                int IBuffer.Length {
21
 
                        get { return buffer.Length; }
22
 
                }
23
 
 
24
 
                string IBuffer.Text {
25
 
                        get { return buffer; }
26
 
                        set { buffer = value; }
27
 
                }
28
 
 
29
 
                void IBuffer.Insert (int offset, string value)
30
 
                {
31
 
                        throw new NotSupportedException ("Operation not supported on this buffer.");
32
 
                }
33
 
 
34
 
                void IBuffer.Remove (int offset, int count)
35
 
                {
36
 
                        throw new NotSupportedException ("Operation not supported on this buffer.");
37
 
                }
38
 
 
39
 
                void IBuffer.Remove (ISegment segment)
40
 
                {
41
 
                        throw new NotSupportedException ("Operation not supported on this buffer.");
42
 
                }
43
 
 
44
 
                void IBuffer.Replace (int offset, int count, string value)
45
 
                {
46
 
                        throw new NotSupportedException ("Operation not supported on this buffer.");
47
 
                }
48
 
 
49
 
                string IBuffer.GetTextAt (int offset, int count)
50
 
                {
51
 
                        return buffer.Substring (offset, count);
52
 
                }
53
 
 
54
 
                string IBuffer.GetTextAt (ISegment segment)
55
 
                {
56
 
                        return buffer.Substring (segment.Offset, segment.Length);
57
 
                }
58
 
 
59
 
                char IBuffer.GetCharAt (int offset)
60
 
                {
61
 
                        return buffer[offset];
62
 
                }
63
 
 
64
 
                IEnumerable<int> IBuffer.SearchForward (string pattern, int startIndex)
65
 
                {
66
 
                        throw new NotImplementedException();
67
 
                }
68
 
 
69
 
                IEnumerable<int> IBuffer.SearchForwardIgnoreCase (string pattern, int startIndex)
70
 
                {
71
 
                        throw new NotImplementedException();
72
 
                }
73
 
 
74
 
                IEnumerable<int> IBuffer.SearchBackward (string pattern, int startIndex)
75
 
                {
76
 
                        throw new NotImplementedException();
77
 
                }
78
 
 
79
 
                IEnumerable<int> IBuffer.SearchBackwardIgnoreCase (string pattern, int startIndex)
80
 
                {
81
 
                        throw new NotImplementedException();
82
 
                }
83
 
                #endregion
84
 
        }
85
 
}