Пример #1
0
        private async Task<Tile> RefreshAsync()
        {
            var tile = await BuildAsync();
            tile.BuiltUtc = DateTimeOffset.UtcNow;

            _cachedTile = tile;

            return tile;
        }
Пример #2
0
 public StaticTileBuilder(string template, string title, string style, string size, Uri uri)
 {
     _tile = new Tile
     {
         TemplateName = template,
         Title = title,
         Style = style,
         Size = size,
         Link = uri
     };
 }
Пример #3
0
        protected override async Task<Tile> BuildAsync()
        {
            var data = IsValid
                ? await GetTileData()
                : Enumerable.Empty<TileContent>();

            var tile = new Tile
            {
                Title = "Current Projects",
                Style = "github",
                Size = "large",
                Link = new Uri("https://github.com/rikkit"),
                Content = data
            };

            return tile;
        }