Exemplo n.º 1
0
        /// <summary>
        /// Deserializes the specified dictionary.
        /// </summary>
        /// <param name="dictionary">The <see cref="IDictionary{String,Object}" />.</param>
        /// <param name="serializer">The <see cref="JavaScriptSerializer" />.</param>
        public void Deserialize(IDictionary <string, object> dictionary, JavaScriptSerializer serializer)
        {
            foreach (string key in dictionary.Keys)
            {
                switch (key)
                {
                case "error":
                    ApiUtil.ThrowIfError(dictionary, key, serializer);
                    break;

                case "id":
                    Id = Convert.ToInt64(dictionary[key]);
                    break;

                case "image":
                    Image = serializer.ConvertToType <BrightcoveImage>(dictionary[key]);
                    break;

                case "tooltip":
                    Tooltip = (string)dictionary[key];
                    break;

                case "linkURL":
                    LinkUrl = (string)dictionary[key];
                    break;

                case "alignment":
                    Alignment = ((string)dictionary[key]).ToBrightcoveEnum <LogoOverlayAlignment>();
                    break;
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public BrightcoveLogoOverlay()
 {
     Alignment = LogoOverlayAlignment.BottomRight;
 }
		public void Deserialize(IDictionary<string, object> dictionary, JavaScriptSerializer serializer)
		{
			foreach (string key in dictionary.Keys)
			{
				switch (key)
				{
					case "error":
						ApiUtil.ThrowIfError(dictionary, key, serializer);
						break;

					case "id":
						Id = Convert.ToInt64(dictionary[key]);
						break;

					case "image":
						Image = serializer.ConvertToType<BrightcoveImage>(dictionary[key]);
						break;

					case "tooltip":
						Tooltip = (string) dictionary[key];
						break;

					case "linkURL":
						LinkUrl = (string) dictionary[key];
						break;

					case "alignment":
						Alignment = ((string) dictionary[key]).ToBrightcoveEnum<LogoOverlayAlignment>();
						break;
				}
			}
		}
		public BrightcoveLogoOverlay()
		{
			Alignment = LogoOverlayAlignment.BottomRight;
		}