using System;
namespace Framework.Input {
/// Declares the action an input should be filled from
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
public class ActionAttribute : Attribute {
/// Initializes a new action association
///
/// Name of the action the input will be filled from
///
public ActionAttribute(string actionName) {
this.positiveActionName = actionName;
}
/// Initializes a new action association
///
/// Name of the action will set the input to a negative value
///
///
/// Name of the action will set the input to a positive value
///
public ActionAttribute(string negativeActionName, string positiveActionName) {
this.negativeActionName = negativeActionName;
this.positiveActionName = positiveActionName;
}
/// Name of the action will set the input to a negative value
public string NegativeActionName {
get { return this.negativeActionName; }
}
/// Name of the action will set the input to a positive value
public string PositiveActionName {
get { return this.positiveActionName; }
}
/// Name of the action will set the input to a negative value
private string negativeActionName;
/// Name of the action will set the input to a positive value
private string positiveActionName;
}
} // namespace Framework.Input