feat: allow packet attributes only on parameters
3 files changed, 5 insertions(+), 2 deletions(-) M Core/NosSmooth.Packets/Attributes/PacketContextListAttribute.cs M Core/NosSmooth.Packets/Attributes/PacketIndexAttribute.cs M Core/NosSmooth.Packets/Attributes/PacketListIndexAttribute.cs
M Core/NosSmooth.Packets/Attributes/PacketContextListAttribute.cs => Core/NosSmooth.Packets/Attributes/PacketContextListAttribute.cs +1 -1
@@ 14,7 14,7 @@ namespace NosSmooth.Packets.Attributes; /// <remarks> /// Contextual list gets its length from another property that was already set. /// </remarks> [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter)] [AttributeUsage(AttributeTargets.Parameter)] public class PacketContextListAttribute : PacketListIndexAttribute { /// <summary>
M Core/NosSmooth.Packets/Attributes/PacketIndexAttribute.cs => Core/NosSmooth.Packets/Attributes/PacketIndexAttribute.cs +1 -1
@@ 11,7 11,7 @@ namespace NosSmooth.Packets.Attributes; /// <summary> /// Attribute for marking properties in packets with their position in the packet. /// </summary> [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter)] [AttributeUsage(AttributeTargets.Parameter)] public class PacketIndexAttribute : Attribute { /// <summary>
M Core/NosSmooth.Packets/Attributes/PacketListIndexAttribute.cs => Core/NosSmooth.Packets/Attributes/PacketListIndexAttribute.cs +3 -0
@@ 4,11 4,14 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; namespace NosSmooth.Packets.Attributes; /// <summary> /// Attribute for marking property as a packet list. /// </summary> [AttributeUsage(AttributeTargets.Parameter)] public class PacketListIndexAttribute : PacketIndexAttribute { /// <summary>