// WingsEmu
//
// Developed by NosWings Team
using System;
namespace WingsEmu.Packets
{
public class PacketIndexAttribute : Attribute
{
#region Instantiation
/// Specify the Index of the packet to parse this property to.
///
/// The zero based index starting from header (exclusive).
///
///
/// Adds an # to the Header and replaces Spaces with ^ if set to
/// true.
///
///
/// Defines if everything from this index should
/// be serialized into the underlying property
///
///
/// Removes
/// the separator (.) for List packets.
///
public PacketIndexAttribute(int index, bool isReturnPacket = false, bool serializeToEnd = false, bool removeSeparator = false)
{
Index = index;
IsReturnPacket = isReturnPacket;
SerializeToEnd = serializeToEnd;
RemoveSeparator = removeSeparator;
}
#endregion
#region Properties
///
/// The zero based index starting from the header (exclusive).
///
public int Index { get; set; }
///
/// Adds an # to the Header and replaces Spaces with ^
///
public bool IsReturnPacket { get; set; }
/// Removes the separator (.) for List packets.
public bool RemoveSeparator { get; set; }
///
/// Defines if everything from this index should be serialized into the underlying property.
///
public bool SerializeToEnd { get; set; }
#endregion
}
}