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

« back to all changes in this revision

Viewing changes to external/mono-addins/Test/SystemInfoExtension/ModuleExtensionNode.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:
 
1
 
 
2
using System;
 
3
using Mono.Addins;
 
4
 
 
5
namespace SystemInfoExtension
 
6
{
 
7
        public class ModuleExtensionNode: ExtensionNode
 
8
        {
 
9
                // Not using NodeAttribute here to avoid caching localized strings
 
10
                string name;
 
11
                
 
12
                [NodeAttribute (Required=false)]
 
13
                protected string version;
 
14
 
 
15
                public string Name {
 
16
                        get { return Addin.Localizer.GetString (name); }
 
17
                }
 
18
                
 
19
                public string Version {
 
20
                        get { return version; }
 
21
                }
 
22
                
 
23
                public override string ToString ()
 
24
                {
 
25
                        return name;
 
26
                }
 
27
                
 
28
                protected override void Read (NodeElement elem)
 
29
                {
 
30
                        base.Read (elem);
 
31
                        name = elem.GetAttribute ("name");
 
32
                }
 
33
 
 
34
        }
 
35
}