using System;
namespace RestEase
{
///
/// Attribute specifying that this parameter should be interpreted as the request body
///
[AttributeUsage(AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)]
public sealed class BodyAttribute : Attribute
{
///
/// Gets the serialization method to use. Defaults to BodySerializationMethod.Serialized
///
public BodySerializationMethod SerializationMethod { get; }
///
/// Initialises a new instance of the class
///
public BodyAttribute()
: this(BodySerializationMethod.Default)
{
}
///
/// Initialises a new instance of the class, using the given body serialization method
///
/// Serialization method to use when serializing the body object
public BodyAttribute(BodySerializationMethod serializationMethod)
{
this.SerializationMethod = serializationMethod;
}
}
}