/// <summary>
 /// Создает нового бота
 /// </summary>
 /// <param name="context"></param>
 /// <param name="callbackProcessor"></param>
 /// <param name="messageProcessor"></param>
 /// <param name="telegramBotClient"></param>
 public LearningBot(Context context, CallbackProcessor callbackProcessor, MessageProcessor messageProcessor,
                    TelegramBotClient telegramBotClient)
 {
     _context           = context;
     _callbackProcessor = callbackProcessor;
     _messageProcessor  = messageProcessor;
     _telegramBotClient = telegramBotClient;
 }
Esempio n. 2
0
 public MyCharListSetter(CostumeRoom_Dlg owner)
 {
     this._owner             = owner;
     this._selectedSolInfo   = null;
     this._callbackProcessor = new CallbackProcessor(owner, this);
     this._sortProcessor     = new SortProcessor();
     this._listItemSetter    = new ListItemSetter(this);
     this._listItemMover     = new ListItemMover(owner);
 }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            // Extract the XML from the request.
            Stream       RequestStream       = Request.InputStream;
            StreamReader RequestStreamReader = new StreamReader(RequestStream);
            string       RequestXml          = RequestStreamReader.ReadToEnd();

            RequestStream.Close();

            //Log.Debug( "Request XML: " + RequestXml );

            // Process the incoming XML.
            CallbackProcessor p           = new CallbackProcessor(new VevoCallBackRules());
            byte[]            ResponseXML = p.Process(RequestXml);

            Log.Debug("Response XML: " + EncodeHelper.Utf8BytesToString(ResponseXML));

            string responseOld = EncodeHelper.Utf8BytesToString(ResponseXML);
            if (DataAccessContext.Configurations.GetValue("PaymentCurrency") != "USD")
            {
                responseOld = responseOld.Replace("currency=\"USD\"",
                                                  "currency=\"" + DataAccessContext.Configurations.GetValue("PaymentCurrency") + "\"");
            }

            byte[] result = EncodeHelper.StringToUtf8Bytes(responseOld);

            Response.BinaryWrite(result);
            //Response.BinaryWrite( ResponseXML );
        }
        catch (Exception ex)
        {
            Log.Debug(ex.ToString());
            throw;
        }
    }