~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Extension/TemplateCodon.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
namespace MonoDevelop.SourceEditor.Extension
34
34
{
35
35
        [ExtensionNode (Description="A template for color and syntax shemes.")]
36
 
        public class TemplateCodon : ExtensionNode, IXmlProvider
 
36
        public class TemplateCodon : ExtensionNode, Mono.TextEditor.Highlighting.IStreamProvider
37
37
        {
38
38
                [NodeAttribute("resource", "Name of the resource where the template is stored.")]
39
39
                string resource;
46
46
                        resource = file = null;
47
47
                }
48
48
                
49
 
                public XmlReader Open ()
 
49
                public Stream Open ()
50
50
                {
51
51
                        Stream stream;
52
52
                        if (!string.IsNullOrEmpty (file)) {
59
59
                                throw new InvalidOperationException ("Template file or resource not provided");
60
60
                        }
61
61
                        
62
 
                        XmlReaderSettings settings = new XmlReaderSettings ();
63
 
                        settings.CloseInput = true;
64
 
                        return XmlTextReader.Create (stream, settings);
 
62
                        return stream;
65
63
                }
66
64
        }
67
65
}