~ruther/NosSmooth

da67a2341b2b9a6cd43deec7837c3b5d90787eee — František Boháček 3 years ago 2f616e5
feat: allow packet attributes only on parameters
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>

Do not follow this link