Provides the context of a Command or Response.
Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Command"/> class using the specified context, element ID, command name, and parameters.
        /// </summary>
        /// <param name="context">The <see cref="Context"/> of the command.</param>
        /// <param name="elementId">The ID of the element to execute the command on.</param>
        /// <param name="name">The name of the command.</param>
        /// <param name="parameters">The parameters for the command.</param>
        public Command(Context context, string elementId, string name, object parameters)
        {
            if (context != null)
            {
                commandContext = context;
            }

            commandElementId = elementId;
            commandName = name;
            commandParameters = parameters;
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Command"/> class using the specified context, command name, and parameters.
 /// </summary>
 /// <param name="context">The <see cref="Context"/> of the command.</param>
 /// <param name="name">The name of the command.</param>
 /// <param name="parameters">The parameters for the command.</param>
 public Command(Context context, string name, object parameters)
     : this(context, null, name, parameters)
 {
 }