public CustomTaskPaneRegister(AddInBase addinBase)
 {
     customTaskPaneCollection = new Lazy<CustomTaskPaneCollection>(() =>
     {
         var field = addinBase.GetType().GetField("CustomTaskPanes", BindingFlags.Instance | BindingFlags.NonPublic);
         return (CustomTaskPaneCollection)field.GetValue(addinBase);
     });
     registrationInfo = new Dictionary<IRibbonViewModel, List<TaskPaneRegistrationInfo>>();
     ribbonTaskPanes = new Dictionary<IRibbonViewModel, List<OneToManyCustomTaskPaneAdapter>>();
 }
 public CustomTaskPaneRegister(AddInBase addinBase)
 {
     customTaskPaneCollection = new Lazy <CustomTaskPaneCollection>(() =>
     {
         var field = addinBase.GetType().GetField("CustomTaskPanes", BindingFlags.Instance | BindingFlags.NonPublic);
         return((CustomTaskPaneCollection)field.GetValue(addinBase));
     });
     registrationInfo = new Dictionary <IRibbonViewModel, List <TaskPaneRegistrationInfo> >();
     ribbonTaskPanes  = new Dictionary <IRibbonViewModel, List <OneToManyCustomTaskPaneAdapter> >();
 }
        public VstoContribContext(Assembly[] assemblies, AddInBase addinBase, string fallbackRibbonType)
        {
            FallbackRibbonType = fallbackRibbonType;
            Assemblies = assemblies;
            AddinBase = addinBase;
            addinType = addinBase.GetType();

            var globalsType = Type.GetType(addinType.AssemblyQualifiedName.Replace("." + addinType.Name, ".Globals"));
            var factory = globalsType.GetProperty("Factory", BindingFlags.Static | BindingFlags.NonPublic)
                .GetValue(null, null);
            VstoFactory = (Factory)factory;
            ViewLocationStrategy = new DefaultViewLocationStrategy();
            ViewModelFactory = new DefaultViewModelFactory();
            RibbonXmlFromTypeLookup = new Dictionary<string, string>();
            TagToCallbackTargetLookup = new Dictionary<string, CallbackTarget>();
        }
        public VstoContribContext(Assembly[] assemblies, AddInBase addinBase, string fallbackRibbonType)
        {
            FallbackRibbonType = fallbackRibbonType;
            Assemblies         = assemblies;
            AddinBase          = addinBase;
            addinType          = addinBase.GetType();

            var globalsType = Type.GetType(addinType.AssemblyQualifiedName.Replace("." + addinType.Name, ".Globals"));
            var factory     = globalsType.GetProperty("Factory", BindingFlags.Static | BindingFlags.NonPublic)
                              .GetValue(null, null);

            VstoFactory               = (Factory)factory;
            ViewLocationStrategy      = new DefaultViewLocationStrategy();
            ViewModelFactory          = new DefaultViewModelFactory();
            RibbonXmlFromTypeLookup   = new Dictionary <string, string>();
            TagToCallbackTargetLookup = new Dictionary <string, CallbackTarget>();
        }