Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/PluginLib/PluginAttribute.cs @ 10479

Last change on this file since 10479 was 4604, checked in by dkahn, 14 years ago

#1198 Imported new Plugin Host solution for the new MVC2 based web application

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Diagnostics;
6
7namespace HLWebPluginHost.PluginLib {
8
9  /// <summary>
10  /// Attribute to be implemented by all plugins to make them recognizeable by PluginHelper
11  /// </summary>
12  [AttributeUsage(AttributeTargets.Assembly)]
13  public class HLWebPluginViewLocations : Attribute {
14    public string[] viewLocations { get; set; }
15    public bool addLink { get; set; }
16    public string name { get; set; }
17    public string controller { get; set; }
18    public string action { get; set; }
19
20    /// <summary>
21    /// By declaring this custom attribute in a plugin, we can indicate to the host that the plugin assembly actually is  a plugin.
22    /// It will also let us pass information back to the host at runtime.
23    /// Currently, we will just be building a link on the plugin page,
24    /// but you could use the same technique to pass any type of information that a host may wish to know about its plugins.
25    /// </summary>
26    /// <param name="viewLocations"></param>
27    /// <param name="addLink"></param>
28    public HLWebPluginViewLocations(string[] viewLocations, bool addLink) {
29      this.viewLocations = viewLocations;
30      this.addLink = addLink;
31    }
32  }
33}
Note: See TracBrowser for help on using the repository browser.