private static string ComputeCacheKey(NavBarData data) { string?primaryKey = data.PrimaryItems.Aggregate("", (acc, item) => acc + item.CacheKey); //var farKey = data.FarItems.Aggregate("", (acc, item) => acc + item.CacheKey); string?overflowKey = data.OverflowItems.Aggregate("", (acc, item) => acc + item.CacheKey); return(string.Join(" ", primaryKey, overflowKey)); }
protected override Task OnParametersSetAsync() { _currentData = new NavBarData() { PrimaryItems = new List <INavBarItem>(Items ?? new List <INavBarItem>()), OverflowItems = new List <INavBarItem>(OverflowItems ?? new List <INavBarItem>()), //FarItems = new List<ICommandBarItem>(FarItems != null ? FarItems : new List<ICommandBarItem>()), MinimumOverflowItems = OverflowItems != null?OverflowItems.Count() : 0, CacheKey = "" }; return(base.OnParametersSetAsync()); }