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