7
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
9
// Permission is hereby granted, free of charge, to any person obtaining
10
// a copy of this software and associated documentation files (the
11
// "Software"), to deal in the Software without restriction, including
12
// without limitation the rights to use, copy, modify, merge, publish,
13
// distribute, sublicense, and/or sell copies of the Software, and to
14
// permit persons to whom the Software is furnished to do so, subject to
15
// the following conditions:
17
// The above copyright notice and this permission notice shall be
18
// included in all copies or substantial portions of the Software.
20
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
using Mono.Addins.Description;
36
/// Marks an assembly as being an add-in.
38
[AttributeUsage (AttributeTargets.Assembly)]
39
public class AddinAttribute: Attribute
45
bool enabledByDefault = true;
51
/// Initializes an add-in marker attribute
53
public AddinAttribute ()
58
/// Initializes an add-in marker attribute
61
/// Identifier of the add-in
63
public AddinAttribute (string id)
69
/// Initializes an add-in marker attribute
72
/// Identifier of the add-in
74
/// <param name="version">
75
/// Version of the add-in
77
public AddinAttribute (string id, string version)
80
this.version = version;
84
/// Identifier of the add-in.
87
get { return id != null ? id : string.Empty; }
92
/// Version of the add-in.
94
public string Version {
95
get { return version != null ? version : string.Empty; }
96
set { version = value; }
100
/// Version of the add-in with which this add-in is backwards compatible.
102
public string CompatVersion {
103
get { return compatVersion != null ? compatVersion : string.Empty; }
104
set { compatVersion = value; }
108
/// Namespace of the add-in
110
public string Namespace {
111
get { return ns != null ? ns : string.Empty; }
116
/// Category of the add-in
118
public string Category {
119
get { return category != null ? category : string.Empty; }
120
set { category = value; }
124
/// Url to a web page with more information about the add-in
127
get { return url != null ? url : string.Empty; }
132
/// When set to True, the add-in will be automatically enabled after installing.
133
/// It's True by default.
135
public bool EnabledByDefault {
136
get { return this.enabledByDefault; }
137
set { this.enabledByDefault = value; }
143
public AddinFlags Flags {
144
get { return this.flags; }
145
set { this.flags = value; }