Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdaptiveAuthentication classes are missing the camelCasing Attribute #8926

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions source/dotnet/Library/AdaptiveCards/AdaptiveAuthCardButton.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Xml.Serialization;

namespace AdaptiveCards
{
/// <summary>
/// Class for AuthCardButton
/// </summary>
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
public class AdaptiveAuthCardButton
{
/// <summary>
Expand Down
7 changes: 5 additions & 2 deletions source/dotnet/Library/AdaptiveCards/AdaptiveAuthentication.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Collections.Generic;
using System.Net;
using System.Xml.Serialization;

namespace AdaptiveCards
{
/// <summary>
/// Class to for authentication data.
/// </summary>
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
public class AdaptiveAuthentication
{
/// <summary>
/// Text that can be displayed to the end user when prompting them to authenticate.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
[XmlAttribute]
public string Text { get; set; }
public string Text { get; set; } = "Please sign in";

/// <summary>
/// The identifier for registered OAuth connection setting information.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
[XmlAttribute]
public string ConnectionName { get; set; }
public string ConnectionName { get; set; } = "Default";

/// <summary>
/// Provides information required to enable on-behalf-of single sign-on user authentication.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Xml.Serialization;

namespace AdaptiveCards
{
/// <summary>
/// Class for TokenExchangeResource
/// </summary>
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
public class AdaptiveTokenExchangeResource
{
/// <summary>
Expand Down
10 changes: 3 additions & 7 deletions source/dotnet/Library/AdaptiveCards/ParseContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,10 @@ public void PopElement()
// add an entry for this element if it's fallback (we'll add one when we parse it for non-fallback)
if (!isFallback)
{
try
{
elementIds[elementID].Add(nearestFallbackID);
}
catch (KeyNotFoundException)
{
if (!elementIds.TryGetValue(elementID, out var list))
elementIds[elementID] = new List<AdaptiveInternalID>() { nearestFallbackID };
}
else
list.Add(nearestFallbackID);
}
}
idStack.Pop();
Expand Down
Loading