38 lines
1022 B
C#
38 lines
1022 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MontoyaTech.Rest.Net
|
|
{
|
|
/// <summary>
|
|
/// The outline of an Attribute that includes a type when generating a client for this route.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
|
|
public class RouteInclude : Attribute
|
|
{
|
|
/// <summary>
|
|
/// The type to include.
|
|
/// </summary>
|
|
public Type Type = null;
|
|
|
|
/// <summary>
|
|
/// Creates a default route include.
|
|
/// </summary>
|
|
public RouteInclude() { }
|
|
|
|
/// <summary>
|
|
/// Creates a new route include with the type to include.
|
|
/// </summary>
|
|
/// <param name="type"></param>
|
|
public RouteInclude(Type type)
|
|
{
|
|
if (type == null)
|
|
throw new ArgumentNullException($"{nameof(type)} cannot be null.");
|
|
|
|
this.Type = type;
|
|
}
|
|
}
|
|
}
|