|
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. |
| 3 | + |
| 4 | +using System; |
| 5 | +using System.ClientModel.Primitives; |
| 6 | +using System.Text.Json; |
| 7 | +using System.Xml; |
| 8 | +using System.Xml.Linq; |
| 9 | +using Microsoft.Generator.CSharp.Providers; |
| 10 | +using static Microsoft.Generator.CSharp.Snippets.Snippet; |
| 11 | + |
| 12 | +namespace Microsoft.Generator.CSharp.ClientModel |
| 13 | +{ |
| 14 | + internal static class ScmKnownParameters |
| 15 | + { |
| 16 | + private static readonly CSharpType modelReaderWriterOptionsType = typeof(ModelReaderWriterOptions); |
| 17 | + private static readonly CSharpType nullableModelReaderWriterOptionsType = new CSharpType(typeof(ModelReaderWriterOptions), isNullable: true); |
| 18 | + |
| 19 | + public static readonly ParameterProvider XmlWriter = new ParameterProvider("writer", FormattableStringHelpers.Empty, typeof(XmlWriter)); |
| 20 | + public static readonly ParameterProvider NameHint = new ParameterProvider("nameHint", FormattableStringHelpers.Empty, typeof(string)); |
| 21 | + public static readonly ParameterProvider XElement = new ParameterProvider("element", FormattableStringHelpers.Empty, typeof(XElement)); |
| 22 | + |
| 23 | + public static readonly ParameterProvider Utf8JsonWriter = new ParameterProvider("writer", FormattableStringHelpers.Empty, typeof(Utf8JsonWriter)); |
| 24 | + public static readonly ParameterProvider Utf8JsonReader = new ParameterProvider("reader", FormattableStringHelpers.Empty, typeof(Utf8JsonReader), isRef: true); |
| 25 | + public static readonly ParameterProvider JsonOptions = new ParameterProvider("options", FormattableStringHelpers.Empty, typeof(JsonSerializerOptions)); |
| 26 | + public static readonly ParameterProvider Options = new ParameterProvider("options", FormattableStringHelpers.Empty, modelReaderWriterOptionsType); |
| 27 | + public static readonly ParameterProvider OptionalOptions = new ParameterProvider("options", FormattableStringHelpers.Empty, nullableModelReaderWriterOptionsType, DefaultOf(nullableModelReaderWriterOptionsType)); |
| 28 | + public static readonly ParameterProvider JsonElement = new ParameterProvider("element", FormattableStringHelpers.Empty, typeof(JsonElement)); |
| 29 | + public static readonly ParameterProvider Data = new ParameterProvider("data", FormattableStringHelpers.Empty, typeof(BinaryData)); |
| 30 | + } |
| 31 | +} |
0 commit comments