public void run() { try { string csdl = "interaction.type == \"twitter\" and interaction.sample <= 1.0"; m_form.deletesLog("Creating definition..."); m_form.deletesLog(" " + csdl); Definition def = m_form.user.createDefinition(csdl); m_form.deletesLog("Creating consumer..."); m_consumer = def.getConsumer(this, "http"); m_form.deletesLog("Consuming..."); m_consumer.consume(); } catch (Exception e) { m_form.deletesLog(e.GetType().ToString() + ": " + e.Message); if (m_consumer != null) { m_consumer.stop(); } } }
public void run() { try { string csdl = "interaction.content contains \"football\""; m_form.footballLog("Creating definition..."); m_form.footballLog(" " + csdl); Definition def = m_form.user.createDefinition(csdl); m_form.footballLog("Creating consumer..."); m_consumer = def.getConsumer(this, "http"); m_form.footballLog("Consuming..."); m_consumer.consume(); } catch (Exception e) { m_form.footballLog(e.GetType().ToString() + ": " + e.Message); } }