BaconographyWP8.Converters.ReifiedAlbumItemConverter.AddInitial C# (CSharp) Method

AddInitial() private method

private AddInitial ( IEnumerable viewModels, ObservableCollection boundControls ) : void
viewModels IEnumerable
boundControls ObservableCollection
return void
        async void AddInitial(IEnumerable<ViewModelBase> viewModels, ObservableCollection<PivotItem> boundControls)
        {
            var cancelToken = CancelSource.Token;
            if(viewModels != null)
            {
                foreach (var viewModel in viewModels)
                {
                    var result = await MapViewModel(viewModel);

                    if (cancelToken.IsCancellationRequested)
                        break;

                    if(result != null)
                        boundControls.Add(result);
                }
            }
        }