using System;
using System.Collections.Generic;
namespace OpenTap
{
///
/// Determines the order of plugin activation related to other plugins.
///
public class PluginOrderAttribute : Attribute
{
static readonly PluginOrderAttribute @default = new PluginOrderAttribute();
/// The type marked with the PluginOrderAttribute should come before this type.
public Type Before { get; }
/// The type marked with the PluginOrderAttribute should come after this type.
public Type After { get; }
/// The type marked with the PluginOrderAttribute should be weighted by this order if everything else is the same. Sorting by smallest order first (default sort order for double)
public double Order { get; }
///
/// Creates a new instance of this attribute.
///
/// Order of this plugin is before another plugin.
/// Order of this plugin is after another plugin.
/// Everything else being the same, use a number sort order.
public PluginOrderAttribute(Type before = null, Type after = null, double order = 0.0)
{
Before = before;
After = after;
Order = order;
}
///
/// This comparer can be used for sorting a list of objects based on their plugin order attributes.
///
internal static Comparison