public void TitleRerturnsValueSet() { const string Title = "title"; var options = new PlaybackNotificationOptions { Title = Title }; options.Title.Should().Be(Title); }
public Task Show(PlaybackNotificationOptions options) { var toast = BuildToast(options); var toastNotification = new ToastNotification(toast.GetXml()); return(Task.Factory.StartNew(() => _toastNotifier.Show(toastNotification))); }
public Task Show(PlaybackNotificationOptions options) { var toast = BuildToast(options); var toastNotification = new ToastNotification(toast.GetXml()); return Task.Factory.StartNew(() => _toastNotifier.Show(toastNotification)); }
public void SubtitleRerturnsValueSet() { const string Subtitle = "subtitle"; var options = new PlaybackNotificationOptions { Subtitle = Subtitle }; options.Subtitle.Should().Be(Subtitle); }
public Task Show(PlaybackNotificationOptions options) { if (EnableNotifications) { _toastNotifier.Show(BuildToast(options)); } return Task.Factory.StartNew(() => { }); }
private static ITileSquarePeekImageAndText04 GetSquateTempalte(PlaybackNotificationOptions options) { var tile = TileContentFactory.CreateTileSquarePeekImageAndText04(); tile.Image.Src = options.ImageUrl; tile.TextBodyWrap.Text = string.Format("{0} - {1}", options.Title, options.Subtitle); return(tile); }
private static ToastNotification BuildToast(PlaybackNotificationOptions options) { var toast = ToastContentFactory.CreateToastImageAndText02(); toast.Image.Src = options.ImageUrl; toast.Image.Alt = "Cover Art"; toast.TextHeading.Text = options.Title; toast.TextBodyWrap.Text = options.Subtitle; return new ToastNotification(toast.GetXml()); }
private static ITileWideImageAndText02 GetWideTemplate(PlaybackNotificationOptions options) { var tile = TileContentFactory.CreateTileWideImageAndText02(); tile.Image.Src = options.ImageUrl; tile.TextCaption1.Text = options.Title; tile.TextCaption2.Text = options.Subtitle; tile.RequireSquareContent = true; return(tile); }
private IToastImageAndText02 BuildToast(PlaybackNotificationOptions options) { var toast = ToastContentFactory.CreateToastImageAndText02(); toast.Image.Src = options.ImageUrl; toast.Image.Alt = "Cover Art"; toast.TextHeading.Text = options.Title; toast.TextBodyWrap.Text = options.Subtitle; toast.Audio.Content = UseSound ? ToastAudioContent.Default : ToastAudioContent.Silent; return toast; }
private IToastImageAndText02 BuildToast(PlaybackNotificationOptions options) { var toast = ToastContentFactory.CreateToastImageAndText02(); toast.Image.Src = options.ImageUrl; toast.Image.Alt = "Cover Art"; toast.TextHeading.Text = options.Title; toast.TextBodyWrap.Text = options.Subtitle; toast.Audio.Content = UseSound ? ToastAudioContent.Default : ToastAudioContent.Silent; return(toast); }
private static TileNotification GetTileNotification(PlaybackNotificationOptions options) { var wideTemplate = GetWideTemplate(options); var squareTempalte = GetSquateTempalte(options); wideTemplate.SquareContent = squareTempalte; var tileNotification = new TileNotification(wideTemplate.GetXml()) { ExpirationTime = new DateTimeOffset( DateTime.UtcNow.Add( TimeSpan.FromMinutes(5))) }; return(tileNotification); }
public Task Show(PlaybackNotificationOptions options) { ShowCallCount++; return Task.Factory.StartNew(() => { }); }
public void TitleReturnsUnknownIfItIsSetToNull() { var options = new PlaybackNotificationOptions { Title = null }; options.Title.Should().Be("Unknown"); }
public void TitleReturnsUnknownIfItIsSetToEmpty() { var options = new PlaybackNotificationOptions { Title = string.Empty }; options.Title.Should().Be("Unknown"); }
public Task Show(PlaybackNotificationOptions options) { var tileNotification = GetTileNotification(options); return(Task.Factory.StartNew(() => _tileUpdater.Update(tileNotification))); }