/// <summary> /// Initialization of the package; this method is called right after the package is sited, so this is the place /// where you can put all the initialization code that rely on services provided by VisualStudio. /// </summary> protected override void Initialize() { this._customCommands = new List <CustomCommand>(); Type[] types = this.GetType().Assembly.GetTypes().Where(p => typeof(CustomCommand).IsAssignableFrom(p) && !p.IsAbstract).ToArray(); foreach (Type type in types) { CustomCommand command = Activator.CreateInstance(type) as CustomCommand; command.Initialize(this); this._customCommands.Add(command); } base.Initialize(); }