Esempio n. 1
0
        static void Main(string[] args)
        {
            // Please enter your application access key
            string         applicationAccessKey = "";
            AppAccessToken token = new AppAccessToken(Guid.Parse(applicationAccessKey));

            // Please enter your API key
            string dataCenterApiKey = "";

            int checkIntervalInSeconds = 120;

            using (ILeadScoringEventClient client = new LeadScoringEventClient(token, dataCenterApiKey, checkIntervalInSeconds))
            {
                // Always use the Subscribe method that allows you to plug in your custom error handling logic.
                client.Subscribe(ProcessLeadScoringThresholdPasses, ErrorHandler);

                int intervalInMinutes = TimeSpan.FromSeconds(checkIntervalInSeconds).Minutes;
                Console.WriteLine($"Waiting for {intervalInMinutes} minutes to receive Lead Scoring Threshold Passes. Pres any key to stop and exit");
                Console.ReadLine();

                Console.WriteLine("Unsubscribing from the LeadScoringEventClient. Waiting for pending operations to complete.");
                client.Unsubscribe();
                Console.WriteLine("Pending operations complete.");
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            string yourApplicationKey = "";
            AppAccessToken token = new AppAccessToken(Guid.Parse(yourApplicationKey));

            string yourDecDataCenterApiKey = "";

            int checkIntervalInSeconds = 120;
            using (ILeadScoringEventClient client = new LeadScoringEventClient(token, yourDecDataCenterApiKey, checkIntervalInSeconds))
            {
                client.Subscribe(ProcessLeadScoringThresholdPasses);

                int intervalInMinutes = TimeSpan.FromSeconds(checkIntervalInSeconds).Minutes;
                Console.WriteLine("Waiting for {0} minutes to receive Lead Scoring Threshold Passes. Pres any key to stop and exit", intervalInMinutes);
                Console.ReadLine();

                Console.WriteLine("Unsubscribing from the LeadScoringEventClient. Waiting for pending operations to complete.");
                client.Unsubscribe();
                Console.WriteLine("Pending operations complete.");
            }
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            string         yourApplicationKey = "";
            AppAccessToken token = new AppAccessToken(Guid.Parse(yourApplicationKey));

            string yourDecDataCenterApiKey = "";

            int checkIntervalInSeconds = 120;

            using (ILeadScoringEventClient client = new LeadScoringEventClient(token, yourDecDataCenterApiKey, checkIntervalInSeconds))
            {
                client.Subscribe(ProcessLeadScoringThresholdPasses);

                int intervalInMinutes = TimeSpan.FromSeconds(checkIntervalInSeconds).Minutes;
                Console.WriteLine("Waiting for {0} minutes to receive Lead Scoring Threshold Passes. Pres any key to stop and exit", intervalInMinutes);
                Console.ReadLine();

                Console.WriteLine("Unsubscribing from the LeadScoringEventClient. Waiting for pending operations to complete.");
                client.Unsubscribe();
                Console.WriteLine("Pending operations complete.");
            }
        }