// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; namespace System.Json { /// /// This class extends the funcionality of the type for better Linq support . /// [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Linq is a technical name.")] [EditorBrowsable(EditorBrowsableState.Never)] public static class JsonValueLinqExtensions { /// /// Extension method for creating a from an collection of types. /// /// The enumerable instance. /// A created from the specified items. public static JsonArray ToJsonArray(this IEnumerable items) { return new JsonArray(items); } /// /// Extension method for creating a from an collection of of and types. /// /// The enumerable instance. /// A created from the specified items. [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "JsonValue implements the nested type in param.")] public static JsonObject ToJsonObject(this IEnumerable> items) { return new JsonObject(items); } } }