~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to contrib/Sharpen/Sharpen/CharSequence.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
namespace Sharpen
 
2
{
 
3
        public class CharSequence
 
4
        {
 
5
                public static implicit operator CharSequence (string str)
 
6
                {
 
7
                        return new StringCharSequence (str);
 
8
                }
 
9
                
 
10
                public static implicit operator CharSequence (System.Text.StringBuilder str)
 
11
                {
 
12
                        return new StringCharSequence (str.ToString ());
 
13
                }
 
14
        }
 
15
        
 
16
        class StringCharSequence: CharSequence
 
17
        {
 
18
                string str;
 
19
                
 
20
                public StringCharSequence (string str)
 
21
                {
 
22
                        this.str = str;
 
23
                }
 
24
                
 
25
                public override string ToString ()
 
26
                {
 
27
                        return str;
 
28
                }
 
29
        }
 
30
}