using System; namespace Kyoo.Abstractions.Models.Attributes { /// /// Remove an property from the serialization pipeline. It will simply be skipped. /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] public class SerializeIgnoreAttribute : Attribute {} /// /// Remove a property from the deserialization pipeline. The user can't input value for this property. /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] public class DeserializeIgnoreAttribute : Attribute {} /// /// Change the way the field is serialized. It allow one to use a string format like formatting instead of the default value. /// This can be disabled for a request by setting the "internal" query string parameter to true. /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] public class SerializeAsAttribute : Attribute { /// /// The format string to use. /// public string Format { get; } /// /// Create a new with the selected format. /// /// /// The format string can contains any property within {}. It will be replaced by the actual value of the property. /// You can also use the special value {HOST} that will put the webhost address. /// /// /// The show's poster serialized uses this format string: {HOST}/api/shows/{Slug}/poster /// /// The format to use public SerializeAsAttribute(string format) { Format = format; } } }