Skip to content

Commit b364708

Browse files
committed
fixing #371
1 parent 2590626 commit b364708

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Source/FikaAmazonAPI/ConstructFeed/Messages/CartonContentsRequest.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using System.Xml.Serialization;
34

45
namespace FikaAmazonAPI.ConstructFeed.Messages
@@ -8,8 +9,15 @@ public class CartonContentsRequest
89
{
910
[XmlElement(ElementName = "ShipmentId")]
1011
public string ShipmentId { get; set; }
12+
1113
[XmlElement(ElementName = "NumCartons")]
12-
public int NumCartons { get { return Carton.Count; } }
14+
public int NumCartons
15+
{
16+
get { return Carton.Count; }
17+
[Obsolete("Only used for xml serialization", error: true)]
18+
set { throw new NotSupportedException(); }
19+
}
20+
1321
[XmlElement(ElementName = "Carton")]
1422
public List<Carton> Carton { get; set; } = new List<Carton>();
1523
}

0 commit comments

Comments
 (0)