From 59fea459a771085342f221d04d3412de3ac45d9b Mon Sep 17 00:00:00 2001 From: "richardlun_debug@prdtrs01.prod.outlook.com" Date: Fri, 26 Apr 2024 17:08:25 -0400 Subject: [PATCH 1/4] horizontal alignment --- .../dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs index 5ecaeab692..7aa0702a8c 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs @@ -24,6 +24,16 @@ public class AdaptiveColumnSet : AdaptiveCollectionElement #endif public override string Type { get; set; } = TypeName; + /// + /// Horizontal alignment () to use. + /// + [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + [DefaultValue(typeof(AdaptiveHorizontalAlignment), "left")] + public AdaptiveHorizontalAlignment HorizontalAlignment { get; set; } + /// /// Collection of Columns that this ColumnSet contains. /// From f01db38f612e047aac900d6cfc5db2074be98ede Mon Sep 17 00:00:00 2001 From: "richardlun_debug@prdtrs01.prod.outlook.com" Date: Mon, 29 Apr 2024 17:05:18 -0400 Subject: [PATCH 2/4] Add fields --- .../AdaptiveCards/AdaptiveActionSet.cs | 11 +++ .../Library/AdaptiveCards/AdaptiveCard.cs | 11 +++ .../AdaptiveCards/AdaptiveColumnSet.cs | 10 +++ .../AdaptiveCards/AdaptiveContainer.cs | 10 +++ .../AdaptiveCards/AdaptiveHttpAction.cs | 71 +++++++++++++++++++ .../AdaptiveCards/AdaptiveHttpHeader.cs | 42 +++++++++++ .../Library/AdaptiveCards/AdaptivePadding.cs | 70 ++++++++++++++++++ .../AdaptiveCards/AdaptiveTextInput.cs | 1 + .../AdaptiveTypedElementConverter.cs | 1 + .../Rendering/AdaptiveActionHandlers.cs | 1 + .../Rendering/AdaptiveVisitor.cs | 7 ++ 11 files changed, 235 insertions(+) create mode 100644 source/dotnet/Library/AdaptiveCards/AdaptiveHttpAction.cs create mode 100644 source/dotnet/Library/AdaptiveCards/AdaptiveHttpHeader.cs create mode 100644 source/dotnet/Library/AdaptiveCards/AdaptivePadding.cs diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveActionSet.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveActionSet.cs index c848cbb3b5..77e856b914 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveActionSet.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveActionSet.cs @@ -32,6 +32,16 @@ public class AdaptiveActionSet : AdaptiveElement [JsonProperty(Required = Required.Default)] public override string Type { get; set; } = TypeName; + /// + /// Horizontal alignment () to use. + /// + [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + [DefaultValue(typeof(AdaptiveHorizontalAlignment), "left")] + public AdaptiveHorizontalAlignment HorizontalAlignment { get; set; } + /// /// The actions contained within this ActionSet. /// @@ -40,6 +50,7 @@ public class AdaptiveActionSet : AdaptiveElement [XmlElement(typeof(AdaptiveOpenUrlAction))] [XmlElement(typeof(AdaptiveShowCardAction))] [XmlElement(typeof(AdaptiveSubmitAction))] + [XmlElement(typeof(AdaptiveHttpAction))] [XmlElement(typeof(AdaptiveToggleVisibilityAction))] [XmlElement(typeof(AdaptiveExecuteAction))] [XmlElement(typeof(AdaptiveUnknownAction))] diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs index c645bfd134..b3212e76c3 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs @@ -190,6 +190,7 @@ public AdaptiveCard() : this(new AdaptiveSchemaVersion(1, 0)) { } [XmlElement(typeof(AdaptiveToggleVisibilityAction))] [XmlElement(typeof(AdaptiveExecuteAction))] [XmlElement(typeof(AdaptiveUnknownAction))] + [XmlElement(typeof(AdaptiveHttpAction))] #endif public List Actions { get; set; } = new List(); @@ -257,6 +258,16 @@ public bool ShouldSerializeJsonSchema() [DefaultValue(null)] public AdaptiveAuthentication Authentication { get; set; } + /// + /// Defines originator id for card. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlElement] +#endif + [DefaultValue(null)] + public string Originator { get; set; } + /// /// Determines whether the height property of an AdaptiveCard should be serialized. /// diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs index 7aa0702a8c..2271040bef 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs @@ -43,6 +43,16 @@ public class AdaptiveColumnSet : AdaptiveCollectionElement #endif public List Columns { get; set; } = new List(); + /// + /// Sets padding + /// + [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] +#if !NETSTANDARD1_3 + [XmlElement] +#endif + [DefaultValue(null)] + public AdaptivePadding Padding { get; set; } + public override IEnumerator GetEnumerator() { return Columns.GetEnumerator(); diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs index 1e104e5ec9..b0495b8c37 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs @@ -68,6 +68,16 @@ public class AdaptiveContainer : AdaptiveCollectionElement [DefaultValue(null)] public bool? Rtl { get; set; } = null; + /// + /// Sets padding + /// + [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] +#if !NETSTANDARD1_3 + [XmlElement] +#endif + [DefaultValue(null)] + public AdaptivePadding Padding { get; set; } + public override IEnumerator GetEnumerator() { return Items.GetEnumerator(); diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveHttpAction.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveHttpAction.cs new file mode 100644 index 0000000000..4cda458f19 --- /dev/null +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveHttpAction.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +using Newtonsoft.Json; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace AdaptiveCards +{ + /// + /// Represents the Action.Http element. + /// +#if !NETSTANDARD1_3 + [XmlType(TypeName = AdaptiveHttpAction.TypeName)] +#endif + public class AdaptiveHttpAction : AdaptiveAction + { + /// + public const string TypeName = "Action.Http"; + + /// +#if !NETSTANDARD1_3 + [XmlIgnore] +#endif + public override string Type { get; set; } = TypeName; + + /// + /// Http method. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public string Method { get; set; } + + /// + /// Target url for request. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public string Url { get; set; } + + /// + /// Body of request. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public string Body { get; set; } + + /// + /// List of headers. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public List Headers { get; set; } + + /// + /// Adds a to the AdaptiveHttpAction. + /// + public void AddHttpHeader(AdaptiveHttpHeader header) + { + this.Headers ??= new List(); + this.Headers.Add(httpHeader); + } + } +} diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveHttpHeader.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveHttpHeader.cs new file mode 100644 index 0000000000..7134cffa8c --- /dev/null +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveHttpHeader.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +using Newtonsoft.Json; +using System; +using System.ComponentModel; +using System.Xml.Serialization; + +namespace AdaptiveCards +{ + /// + /// Represents any input element. + /// + public class AdaptiveHttpHeader + { + /// + /// Initializes . + /// + public AdaptiveHttpHeader(string name, string value) + { + Name = name; + Value = value; + } + + /// + /// Header name. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public string Name { get; set; } + + /// + /// Header value. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public string Value { get; set; } + } +} diff --git a/source/dotnet/Library/AdaptiveCards/AdaptivePadding.cs b/source/dotnet/Library/AdaptiveCards/AdaptivePadding.cs new file mode 100644 index 0000000000..a127278ceb --- /dev/null +++ b/source/dotnet/Library/AdaptiveCards/AdaptivePadding.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +using Newtonsoft.Json; +using System; +using System.ComponentModel; +using System.Xml.Serialization; + +namespace AdaptiveCards +{ + /// + /// Represents any input element. + /// + public class AdaptivePadding + { + /// + /// Initializes . + /// + public AdaptivePadding(AdaptiveSpacing left, AdaptiveSpacing top, AdaptiveSpacing right, AdaptiveSpacing bottom) + { + Left = left; + Right = right; + Top = top; + Bottom = bottom; + } + + /// + /// Initializes . + /// + public AdaptivePadding(AdaptiveSpacing padding) + { + Left = Right = Top = Bottom = padding; + } + + /// + /// Gets or sets the left padding. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public AdaptiveSpacing Left { get; set; } + + /// + /// Gets or sets the right padding. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public AdaptiveSpacing Right { get; set; } + + /// + /// Gets or sets the top padding. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public AdaptiveSpacing Top { get; set; } + + /// + /// Gets or sets the bottom padding. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlAttribute] +#endif + public AdaptiveSpacing Bottom { get; set; } + } +} diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveTextInput.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveTextInput.cs index 20a30528b9..725bb76b3c 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveTextInput.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveTextInput.cs @@ -81,6 +81,7 @@ public class AdaptiveTextInput : AdaptiveInput [XmlElement(typeof(AdaptiveOpenUrlAction))] [XmlElement(typeof(AdaptiveShowCardAction))] [XmlElement(typeof(AdaptiveSubmitAction))] + [XmlElement(typeof(AdaptiveHttpAction))] [XmlElement(typeof(AdaptiveToggleVisibilityAction))] [XmlElement(typeof(AdaptiveUnknownAction))] #endif diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveTypedElementConverter.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveTypedElementConverter.cs index 7f983d4cca..a19860b22e 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveTypedElementConverter.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveTypedElementConverter.cs @@ -49,6 +49,7 @@ public class AdaptiveTypedElementConverter : AdaptiveTypedBaseElementConverter, [AdaptiveTableRow.TypeName] = typeof(AdaptiveTableRow), [AdaptiveTableCell.TypeName] = typeof(AdaptiveTableCell), [AdaptiveSubmitAction.TypeName] = typeof(AdaptiveSubmitAction), + [AdaptiveHttpAction.TypeName] = typeof(AdaptiveHttpAction), [AdaptiveExecuteAction.TypeName] = typeof(AdaptiveExecuteAction), [AdaptiveOpenUrlAction.TypeName] = typeof(AdaptiveOpenUrlAction), [AdaptiveShowCardAction.TypeName] = typeof(AdaptiveShowCardAction), diff --git a/source/dotnet/Library/AdaptiveCards/Rendering/AdaptiveActionHandlers.cs b/source/dotnet/Library/AdaptiveCards/Rendering/AdaptiveActionHandlers.cs index 7c2c33461f..f257bd3f56 100644 --- a/source/dotnet/Library/AdaptiveCards/Rendering/AdaptiveActionHandlers.cs +++ b/source/dotnet/Library/AdaptiveCards/Rendering/AdaptiveActionHandlers.cs @@ -14,6 +14,7 @@ public class AdaptiveActionHandlers { typeof(AdaptiveOpenUrlAction), typeof(AdaptiveSubmitAction), + typeof(AdaptiveHttpAction), typeof(AdaptiveShowCardAction), typeof(AdaptiveToggleVisibilityAction), typeof(AdaptiveExecuteAction) diff --git a/source/dotnet/Library/AdaptiveCards/Rendering/AdaptiveVisitor.cs b/source/dotnet/Library/AdaptiveCards/Rendering/AdaptiveVisitor.cs index 4b4208995b..1353a672a5 100644 --- a/source/dotnet/Library/AdaptiveCards/Rendering/AdaptiveVisitor.cs +++ b/source/dotnet/Library/AdaptiveCards/Rendering/AdaptiveVisitor.cs @@ -139,6 +139,9 @@ public virtual void Visit(AdaptiveAction action) Visit(urlAction); if (action is AdaptiveSubmitAction submitAction) + Visit(submitAction); + + if (action is AdaptiveHttpAction httpAction) Visit(submitAction); if (action is AdaptiveShowCardAction cardAction) @@ -153,6 +156,10 @@ public virtual void Visit(AdaptiveAction action) public virtual void Visit(AdaptiveSubmitAction action) { + } + + public virtual void Visit(AdaptiveHttpAction action) + { } public virtual void Visit(AdaptiveOpenUrlAction action) From 709c549e0f2f968f8a8ea1b26055b4b68247214c Mon Sep 17 00:00:00 2001 From: "richardlun_debug@prdtrs01.prod.outlook.com" Date: Mon, 29 Apr 2024 17:13:36 -0400 Subject: [PATCH 3/4] Add fields --- .../AdaptiveCards/AdaptiveActionSet.cs | 3 +-- .../Library/AdaptiveCards/AdaptiveCard.cs | 20 +++++++++++++++++++ .../AdaptiveCards/AdaptiveColumnSet.cs | 5 ++--- .../AdaptiveCards/AdaptiveContainer.cs | 2 +- .../Library/AdaptiveCards/AdaptivePadding.cs | 2 +- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveActionSet.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveActionSet.cs index 77e856b914..b53b2dda9a 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveActionSet.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveActionSet.cs @@ -35,11 +35,10 @@ public class AdaptiveActionSet : AdaptiveElement /// /// Horizontal alignment () to use. /// - [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] #if !NETSTANDARD1_3 [XmlAttribute] #endif - [DefaultValue(typeof(AdaptiveHorizontalAlignment), "left")] public AdaptiveHorizontalAlignment HorizontalAlignment { get; set; } /// diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs index b3212e76c3..38128fb7f2 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs @@ -268,6 +268,26 @@ public bool ShouldSerializeJsonSchema() [DefaultValue(null)] public string Originator { get; set; } + /// + /// Sets the text flow direction + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlElement] +#endif + [DefaultValue(false)] + public bool? Rtl { get; set; } = null; + + /// + /// Tells the client whether or not it should constrain the width of the card. + /// + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] +#if !NETSTANDARD1_3 + [XmlElement] +#endif + [DefaultValue(false)] + public bool? ConstrainWidth { get; set; } = null; + /// /// Determines whether the height property of an AdaptiveCard should be serialized. /// diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs index 2271040bef..1fe5cc6556 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs @@ -27,11 +27,10 @@ public class AdaptiveColumnSet : AdaptiveCollectionElement /// /// Horizontal alignment () to use. /// - [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] #if !NETSTANDARD1_3 [XmlAttribute] #endif - [DefaultValue(typeof(AdaptiveHorizontalAlignment), "left")] public AdaptiveHorizontalAlignment HorizontalAlignment { get; set; } /// @@ -44,7 +43,7 @@ public class AdaptiveColumnSet : AdaptiveCollectionElement public List Columns { get; set; } = new List(); /// - /// Sets padding + /// Gets or sets the padding. /// [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] #if !NETSTANDARD1_3 diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs index b0495b8c37..66064eb31d 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs @@ -69,7 +69,7 @@ public class AdaptiveContainer : AdaptiveCollectionElement public bool? Rtl { get; set; } = null; /// - /// Sets padding + /// Gets or sets the padding. /// [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] #if !NETSTANDARD1_3 diff --git a/source/dotnet/Library/AdaptiveCards/AdaptivePadding.cs b/source/dotnet/Library/AdaptiveCards/AdaptivePadding.cs index a127278ceb..76b19701a2 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptivePadding.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptivePadding.cs @@ -8,7 +8,7 @@ namespace AdaptiveCards { /// - /// Represents any input element. + /// Represents padding object. /// public class AdaptivePadding { From 250e9ccf7d263d8302e721c1e29adc8d7a6ff0f0 Mon Sep 17 00:00:00 2001 From: "richardlun_debug@prdtrs01.prod.outlook.com" Date: Mon, 29 Apr 2024 17:19:38 -0400 Subject: [PATCH 4/4] null handling and comments --- source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs | 4 ++-- source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs | 3 +-- source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs | 3 +-- source/dotnet/Library/AdaptiveCards/AdaptiveHttpHeader.cs | 6 +++--- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs index 38128fb7f2..90d5a698ec 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveCard.cs @@ -275,7 +275,7 @@ public bool ShouldSerializeJsonSchema() #if !NETSTANDARD1_3 [XmlElement] #endif - [DefaultValue(false)] + [DefaultValue(null)] public bool? Rtl { get; set; } = null; /// @@ -285,7 +285,7 @@ public bool ShouldSerializeJsonSchema() #if !NETSTANDARD1_3 [XmlElement] #endif - [DefaultValue(false)] + [DefaultValue(null)] public bool? ConstrainWidth { get; set; } = null; /// diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs index 1fe5cc6556..6dfea433ec 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveColumnSet.cs @@ -45,11 +45,10 @@ public class AdaptiveColumnSet : AdaptiveCollectionElement /// /// Gets or sets the padding. /// - [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] #if !NETSTANDARD1_3 [XmlElement] #endif - [DefaultValue(null)] public AdaptivePadding Padding { get; set; } public override IEnumerator GetEnumerator() diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs index 66064eb31d..949e0b0a57 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveContainer.cs @@ -71,11 +71,10 @@ public class AdaptiveContainer : AdaptiveCollectionElement /// /// Gets or sets the padding. /// - [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] #if !NETSTANDARD1_3 [XmlElement] #endif - [DefaultValue(null)] public AdaptivePadding Padding { get; set; } public override IEnumerator GetEnumerator() diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveHttpHeader.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveHttpHeader.cs index 7134cffa8c..812a0be015 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveHttpHeader.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveHttpHeader.cs @@ -8,7 +8,7 @@ namespace AdaptiveCards { /// - /// Represents any input element. + /// Represents the AdaptiveHttpHeader. /// public class AdaptiveHttpHeader { @@ -22,7 +22,7 @@ public AdaptiveHttpHeader(string name, string value) } /// - /// Header name. + /// Gets or sets the header name. /// [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] #if !NETSTANDARD1_3 @@ -31,7 +31,7 @@ public AdaptiveHttpHeader(string name, string value) public string Name { get; set; } /// - /// Header value. + /// Gets or sets the header value. /// [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] #if !NETSTANDARD1_3