//Scan attributes for context lists private void BuildContextLists() { contextOptions = new List <ContextOption <string> >(); GitUtility.ForEachTypeWithOrdered <StashContextAttribute>(true, (type, attribute) => { contextOptions.Add((ContextOption <string>)Activator.CreateInstance(type)); }); }
//Scan for tab attributes public void BuildTabList() { tabs = new List <Tab>(); GitUtility.ForEachTypeWithOrdered <TabAttribute>(true, (type, attribute) => { tabs.Add((Tab)Activator.CreateInstance(type)); }); }
public void BuildTopButtonList() { topButtons = new List <TopButton>(); GitUtility.ForEachTypeWithOrdered <TopButtonAttribute>(true, (type, attribute) => { TopButton button = (TopButton)Activator.CreateInstance(type); button.flexibleSpaceAfter = attribute.flexibleSpaceAfter; button.OnCreate(); topButtons.Add(button); }); }
//Scan attributes for context lists private void BuildContextLists() { stagedContextOptions = new List <ContextOption <string> >(); unstagedContextOptions = new List <ContextOption <string> >(); GitUtility.ForEachTypeWithOrdered <PathContextAttribute>(true, (type, attribute) => { if ((attribute.mode & FilePathMode.Staged) == FilePathMode.Staged) { stagedContextOptions.Add((ContextOption <string>)Activator.CreateInstance(type)); } if ((attribute.mode & FilePathMode.Unstaged) == FilePathMode.Unstaged) { unstagedContextOptions.Add((ContextOption <string>)Activator.CreateInstance(type)); } }); }