Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@ internal AnimalOperations(ClientPipeline pipeline, Uri endpoint)
Pipeline = pipeline;
}

/// <summary> Initializes a new instance of AnimalOperations. </summary>
/// <param name="endpoint"> Service endpoint. </param>
/// <exception cref="ArgumentNullException"> <paramref name="endpoint"/> is null. </exception>
public AnimalOperations(Uri endpoint) : this(endpoint, new SampleTypeSpecClientOptions())
{
}

/// <summary> Initializes a new instance of AnimalOperations. </summary>
/// <param name="endpoint"> Service endpoint. </param>
/// <param name="options"> The options for configuring the client. </param>
/// <exception cref="ArgumentNullException"> <paramref name="endpoint"/> is null. </exception>
public AnimalOperations(Uri endpoint, SampleTypeSpecClientOptions options)
{
Argument.AssertNotNull(endpoint, nameof(endpoint));

options ??= new SampleTypeSpecClientOptions();

_endpoint = endpoint;
Pipeline = ClientPipeline.Create(options, Array.Empty<PipelinePolicy>(), new PipelinePolicy[] { new UserAgentPolicy(typeof(AnimalOperations).Assembly) }, Array.Empty<PipelinePolicy>());
}

/// <summary> The HTTP pipeline for sending and receiving REST requests and responses. </summary>
public ClientPipeline Pipeline { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@ internal DogOperations(ClientPipeline pipeline, Uri endpoint)
Pipeline = pipeline;
}

/// <summary> Initializes a new instance of DogOperations. </summary>
/// <param name="endpoint"> Service endpoint. </param>
/// <exception cref="ArgumentNullException"> <paramref name="endpoint"/> is null. </exception>
public DogOperations(Uri endpoint) : this(endpoint, new SampleTypeSpecClientOptions())
{
}

/// <summary> Initializes a new instance of DogOperations. </summary>
/// <param name="endpoint"> Service endpoint. </param>
/// <param name="options"> The options for configuring the client. </param>
/// <exception cref="ArgumentNullException"> <paramref name="endpoint"/> is null. </exception>
public DogOperations(Uri endpoint, SampleTypeSpecClientOptions options)
{
Argument.AssertNotNull(endpoint, nameof(endpoint));

options ??= new SampleTypeSpecClientOptions();

_endpoint = endpoint;
Pipeline = ClientPipeline.Create(options, Array.Empty<PipelinePolicy>(), new PipelinePolicy[] { new UserAgentPolicy(typeof(DogOperations).Assembly) }, Array.Empty<PipelinePolicy>());
}

/// <summary> The HTTP pipeline for sending and receiving REST requests and responses. </summary>
public ClientPipeline Pipeline { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M
XmlNestedModel anotherModel = default;
IList<XmlModelWithNamespace> modelsWithNamespaces = default;
IList<XmlModelWithNamespace> unwrappedModelsWithNamespaces = default;
IList<IList<XmlItem>> listOfListFoo = default;
IDictionary<string, XmlItem> dictionaryFoo = default;
IDictionary<string, IDictionary<string, XmlItem>> dictionaryOfDictionaryFoo = default;
IDictionary<string, IList<XmlItem>> dictionaryListFoo = default;
IList<IDictionary<string, XmlItem>> listOfDictionaryFoo = default;
IDictionary<string, BinaryData> additionalBinaryDataProperties = new ChangeTrackingDictionary<string, BinaryData>();

foreach (var attr in element.Attributes())
Expand Down Expand Up @@ -329,6 +334,76 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M
unwrappedModelsWithNamespaces.Add(XmlModelWithNamespace.DeserializeXmlModelWithNamespace(child, options));
continue;
}
if (localName == "listOfListFoo")
{
List<IList<XmlItem>> array = new List<IList<XmlItem>>();
foreach (var e in child.Elements("Array"))
{
List<XmlItem> list = new List<XmlItem>();
foreach (var item in e.Elements())
{
list.Add(XmlItem.DeserializeXmlItem(item, options));
}
array.Add(list);
}
listOfListFoo = array;
continue;
}
if (localName == "dictionaryFoo")
{
Dictionary<string, XmlItem> dictionary = new Dictionary<string, XmlItem>();
foreach (var e in child.Elements())
{
dictionary.Add(e.Name.LocalName, XmlItem.DeserializeXmlItem(e, options));
}
dictionaryFoo = dictionary;
continue;
}
if (localName == "dictionaryOfDictionaryFoo")
{
Dictionary<string, IDictionary<string, XmlItem>> dictionary = new Dictionary<string, IDictionary<string, XmlItem>>();
foreach (var e in child.Elements())
{
Dictionary<string, XmlItem> dict = new Dictionary<string, XmlItem>();
foreach (var item in e.Elements())
{
dict.Add(item.Name.LocalName, XmlItem.DeserializeXmlItem(item, options));
}
dictionary.Add(e.Name.LocalName, dict);
}
dictionaryOfDictionaryFoo = dictionary;
continue;
}
if (localName == "dictionaryListFoo")
{
Dictionary<string, IList<XmlItem>> dictionary = new Dictionary<string, IList<XmlItem>>();
foreach (var e in child.Elements())
{
List<XmlItem> list = new List<XmlItem>();
foreach (var item in e.Elements())
{
list.Add(XmlItem.DeserializeXmlItem(item, options));
}
dictionary.Add(e.Name.LocalName, list);
}
dictionaryListFoo = dictionary;
continue;
}
if (localName == "listOfDictionaryFoo")
{
List<IDictionary<string, XmlItem>> array = new List<IDictionary<string, XmlItem>>();
foreach (var e in child.Elements("Record"))
{
Dictionary<string, XmlItem> dict = new Dictionary<string, XmlItem>();
foreach (var item in e.Elements())
{
dict.Add(item.Name.LocalName, XmlItem.DeserializeXmlItem(item, options));
}
array.Add(dict);
}
listOfDictionaryFoo = array;
continue;
}
}
content = element.Value;

Expand Down Expand Up @@ -368,6 +443,11 @@ internal static XmlAdvancedModel DeserializeXmlAdvancedModel(XElement element, M
anotherModel,
modelsWithNamespaces,
unwrappedModelsWithNamespaces,
listOfListFoo,
dictionaryFoo,
dictionaryOfDictionaryFoo,
dictionaryListFoo,
listOfDictionaryFoo,
additionalBinaryDataProperties);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ public partial class XmlAdvancedModel
/// <param name="anotherModel"></param>
/// <param name="modelsWithNamespaces"></param>
/// <param name="unwrappedModelsWithNamespaces"></param>
internal XmlAdvancedModel(string name, int age, bool enabled, float score, string nullableString, string id, int version, bool isActive, string originalName, string xmlIdentifier, string content, IEnumerable<string> unwrappedStrings, IEnumerable<int> unwrappedCounts, IEnumerable<XmlItem> unwrappedItems, IEnumerable<string> wrappedColors, IEnumerable<XmlItem> items, XmlNestedModel nestedModel, IDictionary<string, string> metadata, DateTimeOffset createdAt, TimeSpan duration, BinaryData data, StringFixedEnum fixedEnum, StringExtensibleEnum extensibleEnum, string label, int daysUsed, IEnumerable<string> fooItems, XmlNestedModel anotherModel, IEnumerable<XmlModelWithNamespace> modelsWithNamespaces, IEnumerable<XmlModelWithNamespace> unwrappedModelsWithNamespaces)
/// <param name="listOfListFoo"></param>
/// <param name="dictionaryFoo"></param>
/// <param name="dictionaryOfDictionaryFoo"></param>
/// <param name="dictionaryListFoo"></param>
/// <param name="listOfDictionaryFoo"></param>
internal XmlAdvancedModel(string name, int age, bool enabled, float score, string nullableString, string id, int version, bool isActive, string originalName, string xmlIdentifier, string content, IEnumerable<string> unwrappedStrings, IEnumerable<int> unwrappedCounts, IEnumerable<XmlItem> unwrappedItems, IEnumerable<string> wrappedColors, IEnumerable<XmlItem> items, XmlNestedModel nestedModel, IDictionary<string, string> metadata, DateTimeOffset createdAt, TimeSpan duration, BinaryData data, StringFixedEnum fixedEnum, StringExtensibleEnum extensibleEnum, string label, int daysUsed, IEnumerable<string> fooItems, XmlNestedModel anotherModel, IEnumerable<XmlModelWithNamespace> modelsWithNamespaces, IEnumerable<XmlModelWithNamespace> unwrappedModelsWithNamespaces, IEnumerable<IList<XmlItem>> listOfListFoo, IDictionary<string, XmlItem> dictionaryFoo, IDictionary<string, IDictionary<string, XmlItem>> dictionaryOfDictionaryFoo, IDictionary<string, IList<XmlItem>> dictionaryListFoo, IEnumerable<IDictionary<string, XmlItem>> listOfDictionaryFoo)
{
Name = name;
Age = age;
Expand Down Expand Up @@ -77,6 +82,11 @@ internal XmlAdvancedModel(string name, int age, bool enabled, float score, strin
AnotherModel = anotherModel;
ModelsWithNamespaces = modelsWithNamespaces.ToList();
UnwrappedModelsWithNamespaces = unwrappedModelsWithNamespaces.ToList();
ListOfListFoo = listOfListFoo.ToList();
DictionaryFoo = dictionaryFoo;
DictionaryOfDictionaryFoo = dictionaryOfDictionaryFoo;
DictionaryListFoo = dictionaryListFoo;
ListOfDictionaryFoo = listOfDictionaryFoo.ToList();
}

/// <summary> Initializes a new instance of <see cref="XmlAdvancedModel"/>. </summary>
Expand Down Expand Up @@ -115,8 +125,13 @@ internal XmlAdvancedModel(string name, int age, bool enabled, float score, strin
/// <param name="anotherModel"></param>
/// <param name="modelsWithNamespaces"></param>
/// <param name="unwrappedModelsWithNamespaces"></param>
/// <param name="listOfListFoo"></param>
/// <param name="dictionaryFoo"></param>
/// <param name="dictionaryOfDictionaryFoo"></param>
/// <param name="dictionaryListFoo"></param>
/// <param name="listOfDictionaryFoo"></param>
/// <param name="additionalBinaryDataProperties"> Keeps track of any properties unknown to the library. </param>
internal XmlAdvancedModel(string name, int age, bool enabled, float score, string optionalString, int? optionalInt, string nullableString, string id, int version, bool isActive, string originalName, string xmlIdentifier, string content, IList<string> unwrappedStrings, IList<int> unwrappedCounts, IList<XmlItem> unwrappedItems, IList<string> wrappedColors, IList<XmlItem> items, XmlNestedModel nestedModel, XmlNestedModel optionalNestedModel, IDictionary<string, string> metadata, DateTimeOffset createdAt, TimeSpan duration, BinaryData data, IDictionary<string, BinaryData> optionalRecordUnknown, StringFixedEnum fixedEnum, StringExtensibleEnum extensibleEnum, IntFixedEnum? optionalFixedEnum, IntExtensibleEnum? optionalExtensibleEnum, string label, int daysUsed, IList<string> fooItems, XmlNestedModel anotherModel, IList<XmlModelWithNamespace> modelsWithNamespaces, IList<XmlModelWithNamespace> unwrappedModelsWithNamespaces, IDictionary<string, BinaryData> additionalBinaryDataProperties)
internal XmlAdvancedModel(string name, int age, bool enabled, float score, string optionalString, int? optionalInt, string nullableString, string id, int version, bool isActive, string originalName, string xmlIdentifier, string content, IList<string> unwrappedStrings, IList<int> unwrappedCounts, IList<XmlItem> unwrappedItems, IList<string> wrappedColors, IList<XmlItem> items, XmlNestedModel nestedModel, XmlNestedModel optionalNestedModel, IDictionary<string, string> metadata, DateTimeOffset createdAt, TimeSpan duration, BinaryData data, IDictionary<string, BinaryData> optionalRecordUnknown, StringFixedEnum fixedEnum, StringExtensibleEnum extensibleEnum, IntFixedEnum? optionalFixedEnum, IntExtensibleEnum? optionalExtensibleEnum, string label, int daysUsed, IList<string> fooItems, XmlNestedModel anotherModel, IList<XmlModelWithNamespace> modelsWithNamespaces, IList<XmlModelWithNamespace> unwrappedModelsWithNamespaces, IList<IList<XmlItem>> listOfListFoo, IDictionary<string, XmlItem> dictionaryFoo, IDictionary<string, IDictionary<string, XmlItem>> dictionaryOfDictionaryFoo, IDictionary<string, IList<XmlItem>> dictionaryListFoo, IList<IDictionary<string, XmlItem>> listOfDictionaryFoo, IDictionary<string, BinaryData> additionalBinaryDataProperties)
{
Name = name;
Age = age;
Expand Down Expand Up @@ -153,6 +168,11 @@ internal XmlAdvancedModel(string name, int age, bool enabled, float score, strin
AnotherModel = anotherModel;
ModelsWithNamespaces = modelsWithNamespaces;
UnwrappedModelsWithNamespaces = unwrappedModelsWithNamespaces;
ListOfListFoo = listOfListFoo;
DictionaryFoo = dictionaryFoo;
DictionaryOfDictionaryFoo = dictionaryOfDictionaryFoo;
DictionaryListFoo = dictionaryListFoo;
ListOfDictionaryFoo = listOfDictionaryFoo;
_additionalBinaryDataProperties = additionalBinaryDataProperties;
}

Expand Down Expand Up @@ -300,5 +320,20 @@ internal XmlAdvancedModel(string name, int age, bool enabled, float score, strin

/// <summary> Gets the UnwrappedModelsWithNamespaces. </summary>
public IList<XmlModelWithNamespace> UnwrappedModelsWithNamespaces { get; }

/// <summary> Gets the ListOfListFoo. </summary>
public IList<IList<XmlItem>> ListOfListFoo { get; }

/// <summary> Gets the DictionaryFoo. </summary>
public IDictionary<string, XmlItem> DictionaryFoo { get; }

/// <summary> Gets the DictionaryOfDictionaryFoo. </summary>
public IDictionary<string, IDictionary<string, XmlItem>> DictionaryOfDictionaryFoo { get; }

/// <summary> Gets the DictionaryListFoo. </summary>
public IDictionary<string, IList<XmlItem>> DictionaryListFoo { get; }

/// <summary> Gets the ListOfDictionaryFoo. </summary>
public IList<IDictionary<string, XmlItem>> ListOfDictionaryFoo { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@ internal PetOperations(ClientPipeline pipeline, Uri endpoint)
Pipeline = pipeline;
}

/// <summary> Initializes a new instance of PetOperations. </summary>
/// <param name="endpoint"> Service endpoint. </param>
/// <exception cref="ArgumentNullException"> <paramref name="endpoint"/> is null. </exception>
public PetOperations(Uri endpoint) : this(endpoint, new SampleTypeSpecClientOptions())
{
}

/// <summary> Initializes a new instance of PetOperations. </summary>
/// <param name="endpoint"> Service endpoint. </param>
/// <param name="options"> The options for configuring the client. </param>
/// <exception cref="ArgumentNullException"> <paramref name="endpoint"/> is null. </exception>
public PetOperations(Uri endpoint, SampleTypeSpecClientOptions options)
{
Argument.AssertNotNull(endpoint, nameof(endpoint));

options ??= new SampleTypeSpecClientOptions();

_endpoint = endpoint;
Pipeline = ClientPipeline.Create(options, Array.Empty<PipelinePolicy>(), new PipelinePolicy[] { new UserAgentPolicy(typeof(PetOperations).Assembly) }, Array.Empty<PipelinePolicy>());
}

/// <summary> The HTTP pipeline for sending and receiving REST requests and responses. </summary>
public ClientPipeline Pipeline { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@ internal PlantOperations(ClientPipeline pipeline, Uri endpoint)
Pipeline = pipeline;
}

/// <summary> Initializes a new instance of PlantOperations. </summary>
/// <param name="endpoint"> Service endpoint. </param>
/// <exception cref="ArgumentNullException"> <paramref name="endpoint"/> is null. </exception>
public PlantOperations(Uri endpoint) : this(endpoint, new SampleTypeSpecClientOptions())
{
}

/// <summary> Initializes a new instance of PlantOperations. </summary>
/// <param name="endpoint"> Service endpoint. </param>
/// <param name="options"> The options for configuring the client. </param>
/// <exception cref="ArgumentNullException"> <paramref name="endpoint"/> is null. </exception>
public PlantOperations(Uri endpoint, SampleTypeSpecClientOptions options)
{
Argument.AssertNotNull(endpoint, nameof(endpoint));

options ??= new SampleTypeSpecClientOptions();

_endpoint = endpoint;
Pipeline = ClientPipeline.Create(options, Array.Empty<PipelinePolicy>(), new PipelinePolicy[] { new UserAgentPolicy(typeof(PlantOperations).Assembly) }, Array.Empty<PipelinePolicy>());
}

/// <summary> The HTTP pipeline for sending and receiving REST requests and responses. </summary>
public ClientPipeline Pipeline { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ internal PipelineMessage CreateWithApiVersionRequest(string p1, RequestOptions o
ClientUriBuilder uri = new ClientUriBuilder();
uri.Reset(_endpoint);
uri.AppendPath("/WithApiVersion", false);
uri.AppendQuery("apiVersion", _apiVersion, true);
if (_apiVersion != null)
{
uri.AppendQuery("apiVersion", _apiVersion, true);
}
PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier204);
PipelineRequest request = message.Request;
request.Headers.Set("p1", p1);
Expand Down
Loading
Loading