using System;
namespace RestEase
{
///
/// Specifies the default serialization methods for query parameters and request bodies (which can then be overridden)
///
[AttributeUsage(AttributeTargets.Interface | AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public sealed class SerializationMethodsAttribute : Attribute
{
///
/// Gets and sets the serialization method used to serialize request bodies. Defaults to BodySerializationMethod.Serialized
///
public BodySerializationMethod Body { get; set; }
///
/// Gets and sets the serialization method used to serialize query parameters. Defaults to QuerySerializationMethod.ToString
///
public QuerySerializationMethod Query { get; set; }
///
/// Gets and sets the serialization method used to serialize path parameters. Default to PathSerializationMethod.ToString
///
public PathSerializationMethod Path { get; set; }
///
/// Initialises a new instance of the class
///
public SerializationMethodsAttribute()
{
this.Body = BodySerializationMethod.Default;
this.Query = QuerySerializationMethod.Default;
this.Path = PathSerializationMethod.Default;
}
}
}