Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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