public ViewModelResolver(IEnumerable <Type> viewModelType, ICustomTaskPaneRegister customTaskPaneRegister, IViewContextProvider viewContextProvider, VstoContribContext context) { currentlyLoadingRibbon = DefaultRibbon; notifyChangeTargetLookup = new Dictionary <Type, List <KeyValuePair <string, string> > >(); ribbonTypeLookup = new Dictionary <string, Type>(); contextToViewModelLookup = new Dictionary <object, IRibbonViewModel>(); ribbonUiLookup = new Dictionary <string, IRibbonUI>(); this.customTaskPaneRegister = customTaskPaneRegister; this.viewContextProvider = viewContextProvider; vstoContribContext = context; foreach (var ribbonType in viewModelType) { CreateRibbonTypeToViewModelTypeLookup(ribbonType, context.FallbackRibbonType); } }
public ViewModelResolver(IEnumerable<Type> viewModelType, ICustomTaskPaneRegister customTaskPaneRegister, IViewContextProvider viewContextProvider, VstoContribContext context) { currentlyLoadingRibbon = DefaultRibbon; notifyChangeTargetLookup = new Dictionary<Type, List<KeyValuePair<string, string>>>(); ribbonTypeLookup = new Dictionary<string, Type>(); contextToViewModelLookup = new Dictionary<object, IRibbonViewModel>(); ribbonUiLookup = new Dictionary<string, IRibbonUI>(); this.customTaskPaneRegister = customTaskPaneRegister; this.viewContextProvider = viewContextProvider; vstoContribContext = context; foreach (var ribbonType in viewModelType) { CreateRibbonTypeToViewModelTypeLookup(ribbonType, context.FallbackRibbonType); } }