/// <summary> /// Creates a new <see cref="KCommand"/> associated with the given link. /// </summary> /// <param name="link">The link this command is associated with.</param> protected KCommand( IKLink link ) { DEBUG.IndentLine( "\n-- KCommand( Link={0} )", link == null ? "null" : link.ToString() ); if( ( _Link = link ) == null ) throw new ArgumentNullException( "link", "Link cannot be null." ); if( ( _Parameters = _Link.Factory.CreateParameterList() ) == null ) throw new InvalidOperationException( "Cannot create a List of Parameters." ); if( ( _Parser = _Link.Factory.CreateParser() ) == null ) throw new InvalidOperationException( "Cannot create a Parser." ); DEBUG.Unindent(); }