예제 #1
0
      public void MySend(LanguageTagParameters parameters, JSONObject container)
      {
         string message = manager.ConvertTag(parameters);

         if (container is WarningJSONObject)
         {
            ((WarningJSONObject)container).message = message;
         }
         else if (container is SystemMessageJSONObject)
         {
            ((SystemMessageJSONObject)container).message = message;
         }
         else
         {
            Log("Didn't get a proper container for a language tag. Using system message as default", LogLevel.Warning);
            ((SystemMessageJSONObject)container).message = message;
         }

         MySend(container.ToString());
      }
예제 #2
0
      public void MySend(LanguageTagParameters parameters, JSONObject container)
      {
         string message = manager.ConvertTag(parameters);
         //string subtype = parameters.Tag.ToString().ToLower();

         if (container is WarningJSONObject)
         {
            container = NewWarningFromTag(parameters);
            /*   (WarningJSONObject)container;
            warning.message = message;
            warning.subtype = subtype;*/
         }
         else if (container is SystemMessageJSONObject)
         {
            container = NewSystemMessageFromTag(parameters);
            /*((SystemMessageJSONObject)container).message = message;
            ((SystemMessageJSONObject)container).subtype = subtype;*/
         }
         else
         {
            Log("Didn't get a proper container for a language tag. Using system message as default", LogLevel.Warning);
            ((SystemMessageJSONObject)container).message = message;
         }

         MySend(container.ToString());
      }