Beispiel #1
0
            /// <summary>
            /// Get the ICommand from the parent command library
            /// </summary>
            /// <param name="component"></param>
            /// <returns></returns>
            public override object GetValue(object component)
            {
                CommandLibrary map = component as CommandLibrary;

                if (null == map)
                {
                    throw new ArgumentException("component is not a CommandMap instance", "component");
                }

                return(map.Commands[this.Name]);
            }
Beispiel #2
0
 /// <summary>
 /// Store the command library for later
 /// </summary>
 /// <param name="descriptor"></param>
 /// <param name="map"></param>
 public CommandMapDescriptor(ICustomTypeDescriptor descriptor, CommandLibrary map)
     : base(descriptor)
 {
     _map = map;
 }