예제 #1
0
            /// <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]);
            }
예제 #2
0
 /// <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;
 }