Exemplo n.º 1
0
        internal Element_ToastVisual ConvertToElement()
        {
            var visual = new Element_ToastVisual()
            {
                Language      = Language,
                BaseUri       = BaseUri,
                AddImageQuery = AddImageQuery
            };

            if (BindingGeneric == null)
            {
                throw new NullReferenceException("BindingGeneric must be initialized");
            }

            Element_ToastBinding binding = BindingGeneric.ConvertToElement();

            // TODO: If a BaseUri wasn't provided, we can potentially optimize the payload size by calculating the best BaseUri
            visual.Bindings.Add(binding);

            if (BindingShoulderTap != null)
            {
                visual.Bindings.Add(BindingShoulderTap.ConvertToElement());
            }

            return(visual);
        }
Exemplo n.º 2
0
        internal Element_ToastVisual ConvertToElement()
        {
            var visual = new Element_ToastVisual()
            {
                Language      = Language,
                BaseUri       = BaseUri,
                AddImageQuery = AddImageQuery
            };

            Element_ToastBinding binding = BindingGeneric.ConvertToElement();

            // TODO: If a BaseUri wasn't provided, we can potentially optimize the payload size by calculating the best BaseUri
            visual.Bindings.Add(binding);

            return(visual);
        }