using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MontoyaTech.Rest.Net { /// /// The outline of an attribute that defines a routes request type. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class RouteRequest : Attribute { /// /// The type of the request. /// public Type RequestType = null; /// /// Whether or not the Request is Json Serialized. Default is true. /// public bool Json = true; /// /// Whether or not the request is a dynamic type. Default is false. /// public bool Dynamic = false; /// /// Creates a default route request. /// public RouteRequest() { } /// /// Creates a route request with the request type. /// /// public RouteRequest(Type requestType) { if (requestType == null) throw new ArgumentNullException($"{nameof(requestType)} cannot be null."); this.RequestType = requestType; } } }