/// <summary> /// Get the ICommand from the parent command map /// </summary> /// <param name="component"></param> /// <returns></returns> public override object GetValue(object component) { CommandMap map = component as CommandMap; if (null == map) { throw new ArgumentException("component is not a CommandMap instance", "component"); } return(map.Commands[this.Name]); }
/// <summary> /// Store the command map for later /// </summary> /// <param name="descriptor"></param> /// <param name="map"></param> public CommandMapDescriptor(ICustomTypeDescriptor descriptor, CommandMap map) : base(descriptor) { _map = map; }