Example #1
0
        /// <summary>
        /// This method helps in the cloning process by allowing each
        /// class in the hierarchy to clone their own member variables.
        /// The class being cloned will create a new instance of itself,
        /// and then call the cloneHelper in its super-class to get any
        /// member variables of its super classes to be copied.
        /// </summary>
        /// <param name="clone">the instance of the cloned object</param>
        protected void cloneHelper(ApplianceCommand clone)
        {
            base.cloneHelper(clone);

            // this may not always be appropriate...but should be given
            // when I expect the cloning to be taking place
            clone.SetNetworkHandler();
        }
Example #2
0
 /// <summary>
 /// The default handler used for the InvocationRequested event.  This
 /// handler sends a CommandInvokeRequest message to the server.
 /// </summary>
 /// <param name="cmd"></param>
 protected void sendInvokeMessage(ApplianceCommand cmd)
 {
     try
     {
         _appliance.GetConnection().Send(new CommandInvokeRequest(cmd.FullName));
     }
     catch (Exception)
     {
     }
 }
Example #3
0
        /*
         * Member Methods
         */

        public override object Clone()
        {
            // create the clone object
            ApplianceCommand cmd = new ApplianceCommand();

            // call the cloneHelper
            cloneHelper(cmd);

            // return the clone
            return(cmd);
        }