~ubuntu-branches/ubuntu/trusty/mono-addins/trusty-proposed

« back to all changes in this revision

Viewing changes to Mono.Addins/Mono.Addins/AddinAttribute.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-04-25 11:11:33 UTC
  • mfrom: (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110425111133-t05u5p7o5fxx70fu
Tags: 0.6-2
Upload to Unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
 
30
30
using System;
 
31
using Mono.Addins.Description;
31
32
 
32
33
namespace Mono.Addins
33
34
{
 
35
        /// <summary>
 
36
        /// Marks an assembly as being an add-in.
 
37
        /// </summary>
34
38
        [AttributeUsage (AttributeTargets.Assembly)]
35
39
        public class AddinAttribute: Attribute
36
40
        {
38
42
                string version;
39
43
                string ns;
40
44
                string category;
 
45
                bool enabledByDefault = true;
 
46
                AddinFlags flags;
 
47
                string compatVersion;
 
48
                string url;
41
49
                
 
50
                /// <summary>
 
51
                /// Initializes an add-in marker attribute
 
52
                /// </summary>
42
53
                public AddinAttribute ()
43
54
                {
44
55
                }
45
56
                
 
57
                /// <summary>
 
58
                /// Initializes an add-in marker attribute
 
59
                /// </summary>
 
60
                /// <param name="id">
 
61
                /// Identifier of the add-in
 
62
                /// </param>
46
63
                public AddinAttribute (string id)
47
64
                {
48
65
                        this.id = id;
49
66
                }
50
67
                
 
68
                /// <summary>
 
69
                /// Initializes an add-in marker attribute
 
70
                /// </summary>
 
71
                /// <param name="id">
 
72
                /// Identifier of the add-in
 
73
                /// </param>
 
74
                /// <param name="version">
 
75
                /// Version of the add-in
 
76
                /// </param>
51
77
                public AddinAttribute (string id, string version)
52
78
                {
53
79
                        this.id = id;
54
80
                        this.version = version;
55
81
                }
56
82
                
 
83
                /// <summary>
 
84
                /// Identifier of the add-in.
 
85
                /// </summary>
57
86
                public string Id {
58
87
                        get { return id != null ? id : string.Empty; }
59
88
                        set { id = value; }
60
89
                }
61
90
                
 
91
                /// <summary>
 
92
                /// Version of the add-in.
 
93
                /// </summary>
62
94
                public string Version {
63
95
                        get { return version != null ? version : string.Empty; }
64
96
                        set { version = value; }
65
97
                }
66
98
                
 
99
                /// <summary>
 
100
                /// Version of the add-in with which this add-in is backwards compatible.
 
101
                /// </summary>
 
102
                public string CompatVersion {
 
103
                        get { return compatVersion != null ? compatVersion : string.Empty; }
 
104
                        set { compatVersion = value; }
 
105
                }
 
106
                
 
107
                /// <summary>
 
108
                /// Namespace of the add-in
 
109
                /// </summary>
67
110
                public string Namespace {
68
111
                        get { return ns != null ? ns : string.Empty; }
69
112
                        set { ns = value; }
70
113
                }
71
114
                
 
115
                /// <summary>
 
116
                /// Category of the add-in
 
117
                /// </summary>
72
118
                public string Category {
73
119
                        get { return category != null ? category : string.Empty; }
74
120
                        set { category = value; }
75
121
                }
 
122
                
 
123
                /// <summary>
 
124
                /// Url to a web page with more information about the add-in
 
125
                /// </summary>
 
126
                public string Url {
 
127
                        get { return url != null ? url : string.Empty; }
 
128
                        set { url = value; }
 
129
                }
 
130
                
 
131
                /// <summary>
 
132
                /// When set to True, the add-in will be automatically enabled after installing.
 
133
                /// It's True by default.
 
134
                /// </summary>
 
135
                public bool EnabledByDefault {
 
136
                        get { return this.enabledByDefault; }
 
137
                        set { this.enabledByDefault = value; }
 
138
                }
 
139
                
 
140
                /// <summary>
 
141
                /// Add-in flags
 
142
                /// </summary>
 
143
                public AddinFlags Flags {
 
144
                        get { return this.flags; }
 
145
                        set { this.flags = value; }
 
146
                }
76
147
        }
77
148
}