using System; namespace Unosquare.Swan.Attributes { /// /// An attribute used to help conversion structs back and forth into arrays of bytes via /// extension methods included in this library ToStruct and ToBytes. /// /// [AttributeUsage(AttributeTargets.Field | AttributeTargets.Struct)] public class StructEndiannessAttribute : Attribute { /// /// Initializes a new instance of the class. /// /// The endianness. public StructEndiannessAttribute(Endianness endianness) => this.Endianness = endianness; /// /// Gets the endianness. /// /// /// The endianness. /// public Endianness Endianness { get; } } }