コード例 #1
0
 public override async Task <bool> process()
 {            // Return result value. Display it on the console.
     try
     {
         m_base.MsgIn = MsgIn;       //assign my output to the intput of the decorated instance
         if (await m_base.process()) //execute the process of the decorated instance
         {
             Debug += m_base.Debug;
             _msgIn = m_base.MsgOut;
             if (MsgIn.IsPossiblyGZippedString())
             {
                 MsgOut = cComp.Unzip(MsgIn);
             }
             else
             {
                 MsgOut = MsgIn;
             }
             return(true);
         }
         else
         {
             Debug += m_base.Debug;
             return(false);
         }
     }
     catch (Exception ex)
     {
         Debug += string.Format("ERROR: {0}", ex.Message);
         return(false);
     }
 }