< Summary

Information
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 28
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%110%

File(s)

C:\h\w\B31A098C\w\BB5A0A33\e\runtime-utils\Runner\runtime\src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Attributes\JsonPropertyOrderAttribute.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4namespace System.Text.Json.Serialization
 5{
 6    /// <summary>
 7    /// Specifies the property order that is present in the JSON when serializing. Lower values are serialized first.
 8    /// If the attribute is not specified, the default value is 0.
 9    /// </summary>
 10    /// <remarks>If multiple properties have the same value, the ordering is undefined between them.</remarks>
 11    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
 12    public sealed class JsonPropertyOrderAttribute : JsonAttribute
 13    {
 14        /// <summary>
 15        /// Initializes a new instance of <see cref="JsonPropertyOrderAttribute"/> with the specified order.
 16        /// </summary>
 17        /// <param name="order">The order of the property.</param>
 018        public JsonPropertyOrderAttribute(int order)
 019        {
 020            Order = order;
 021        }
 22
 23        /// <summary>
 24        /// The serialization order of the property.
 25        /// </summary>
 026        public int Order { get; }
 27    }
 28}

Methods/Properties

.ctor(System.Int32)
Order()