From 415ee803279804f755ccff5255ca129575436db4 Mon Sep 17 00:00:00 2001 From: Andrew Escutia Date: Mon, 22 Dec 2014 14:07:58 -0600 Subject: [PATCH 1/2] added Id prop to BrightcoveRendition --- .../Model/Items/BrightcoveRendition.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/BrightcoveOS .NET-MAPI-Wrapper/Model/Items/BrightcoveRendition.cs b/source/BrightcoveOS .NET-MAPI-Wrapper/Model/Items/BrightcoveRendition.cs index 620df28..d1c5f17 100644 --- a/source/BrightcoveOS .NET-MAPI-Wrapper/Model/Items/BrightcoveRendition.cs +++ b/source/BrightcoveOS .NET-MAPI-Wrapper/Model/Items/BrightcoveRendition.cs @@ -15,6 +15,15 @@ namespace BrightcoveMapiWrapper.Model.Items /// public class BrightcoveRendition : BrightcoveItem, IJavaScriptConvertable { + /// + /// The rendition's id. + /// + public long Id + { + get; + private set; + } + /// /// [Optional — required for live streaming only] Depending on your CDN, one of the following /// values: LIMELIGHT_LIVE or AKAMAI_LIVE. @@ -139,6 +148,7 @@ public IDictionary Serialize(JavaScriptSerializer serializer) serialized["size"] = Size; serialized["videoDuration"] = VideoDuration; serialized["videoCodec"] = VideoCodec.ToBrightcoveName(); + serialized["id"] = Id; return serialized; } @@ -158,6 +168,13 @@ public void Deserialize(IDictionary dictionary, JavaScriptSerial ApiUtil.ThrowIfError(dictionary, key, serializer); break; + case "id": + if (dictionary[key] != null) + { + Id = (long)dictionary[key]; + } + break; + case "controllerType": ControllerType = ((string)dictionary[key]).ToBrightcoveEnum(); break; From 1417c646aeab2cd0fa3f6346bbb89409b3e8b5fa Mon Sep 17 00:00:00 2001 From: Andrew Escutia Date: Mon, 29 Dec 2014 11:26:05 -0600 Subject: [PATCH 2/2] Brightcove Rendition Id should never be serialized --- .../Model/Items/BrightcoveRendition.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/source/BrightcoveOS .NET-MAPI-Wrapper/Model/Items/BrightcoveRendition.cs b/source/BrightcoveOS .NET-MAPI-Wrapper/Model/Items/BrightcoveRendition.cs index d1c5f17..c844081 100644 --- a/source/BrightcoveOS .NET-MAPI-Wrapper/Model/Items/BrightcoveRendition.cs +++ b/source/BrightcoveOS .NET-MAPI-Wrapper/Model/Items/BrightcoveRendition.cs @@ -148,7 +148,6 @@ public IDictionary Serialize(JavaScriptSerializer serializer) serialized["size"] = Size; serialized["videoDuration"] = VideoDuration; serialized["videoCodec"] = VideoCodec.ToBrightcoveName(); - serialized["id"] = Id; return serialized; }