public OnlineProjectTemplateSource() : base("Online", "Online") { ChildGroupsProvider = new FakeProjectElementProvider(Groups, new ISortDecorator[] {}); _templatesDataProvider = new FakeProjectElementProvider(Templates, _sortDecorators); _samplesDataProvider = new FakePagedProjectElementProvider(Samples, _sortDecorators); }
public LoadedProjectTemplateSource() : base("Loaded", "Loaded") { ChildGroupsProvider = new FakeProjectElementProvider(Groups, new ISortDecorator[] {}); _loadedTemplatesProvider = new FakeProjectElementProvider(Templates, _sortDecorators); _loadedSamplesProvider = new FakeProjectElementProvider(Samples, _sortDecorators); }
private IObservable <IProjectElement[]> ProjectGroupLoadObservable(IProjectElementDataProvider c) { if (c is IFilterableSource) { var fiterProvider = c as IFilterableSource; fiterProvider.Apply(new[] { new ProjectElementGroupIdFilter(_groupElement.Id) }); } return(Observable.Defer( () => Task <IObservable <IProjectElement[]> > .Factory.StartNew( () => Observable.Return( c.Load().ToArray() )) )); }
public ProjectGroupDescription( string id, string displayName, string parentGroupId, bool hasItems, IProjectElementDataProvider childGroupsProvider, IProjectElementDataProvider templatesProvider) { if (string.IsNullOrEmpty(id)) { throw new NoNullAllowedException("Id"); } if (string.IsNullOrEmpty(displayName)) { throw new NoNullAllowedException("displayName"); } Id = id; Name = displayName; GroupId = parentGroupId; HasChildGroups = hasItems; ChildGroupsProvider = childGroupsProvider; TemplatesProvider = templatesProvider; }
private void ProjectGroupChildBeginLoading(IProjectElementDataProvider groupDataProvider) { _observableContext.GroupsLoading.OnNext(true); Debug.WriteLine("Group Expanded {0}", groupDataProvider); }
private void TemplateProviderChanged(IProjectElementDataProvider provider) { _currentPage = 0; _pageCount = 0; InitPages(0); }