static void Main(string[] args)
        {
            try
            {
                // Create a session into the platform...
                using (ISession session = Configuration.Sessions.GetSession())
                {
                    // Open the session
                    session.Open();

                    // Create a streaming price interface for a list of instruments and specify lambda expressions to capture real-time updates
                    using (var stream = StreamingPrices.Definition("EUR=", "CAD=", "USD=").Fields("DSPLY_NAME", "BID", "ASK")
                                        .OnRefresh((o, item, refresh) => Console.WriteLine(refresh))
                                        .OnUpdate((o, item, update) => DisplayUpdate(item, update))
                                        .OnStatus((o, item, status) => Console.WriteLine(status)))
                    {
                        stream.Open();

                        // Pause on the main thread while updates come in.  Wait for a key press to exit.
                        Console.WriteLine("Streaming updates.  Press any key to stop...");
                        Console.ReadKey();
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine($"\n**************\nFailed to execute: {e.Message}\n{e.InnerException}\n***************");
            }
        }
        static void Main(string[] _)
        {
            try
            {
                // Create a session into the platform...
                using (ISession session = Configuration.Sessions.GetSession())
                {
                    // Open the session
                    session.Open();

                    // Create a streaming price interface for a list of instruments
                    using (var stream = StreamingPrices.Definition("EUR=", "CAD=", "GBP=").Fields("DSPLY_NAME", "BID", "ASK")
                                        .OnStatus((o, item, status) => Console.WriteLine(status)))
                    {
                        if (stream.Open() == Stream.State.Opened)
                        {
                            // Retrieve a snapshot of the whole cache.  The interface also supports the ability to pull out specific items and fields.
                            var snapshot = stream.GetSnapshot();

                            // Print out the contents of the snapshot
                            foreach (var entry in snapshot)
                            {
                                DisplayPriceData(entry.Value);
                            }

                            // Print out values directly within the live cache
                            Console.WriteLine($"\nDirect cache access => cache[CAD=][ASK] = {stream["CAD="]["ASK"]}");

                            // Pull out a reference to a live item...
                            Console.WriteLine("\nShow change in a live cache item.");
                            var item = stream["GBP="];

                            // Display the change in values from the live cached item...
                            int iterations = 5;
                            for (var i = 0; i < iterations; i++)
                            {
                                Console.WriteLine($"\n{iterations-i} iterations remaining.  Sleeping for 5 seconds...");
                                Thread.Sleep(5000);
                                DisplayPriceData(item);
                            }

                            // Close streams
                            Console.WriteLine("\nClosing open streams...");
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine($"\n**************\nFailed to execute: {e.Message}\n{e.InnerException}\n***************");
            }
        }
        static void Main(string[] _)
        {
            try
            {
                // Create a session into the platform...
                using (ISession session = Configuration.Sessions.GetSession())
                {
                    // Open the session
                    session.Open();

                    // Create a streaming price interface for a list of instruments
                    using (var stream = StreamingPrices.Definition("EUR=", "CAD=", "GBP=").Fields("DSPLY_NAME", "BID", "ASK")
                                        .OnStatus((o, item, status) => Console.WriteLine(status)))
                    {
                        if (stream.Open() == Stream.State.Opened)
                        {
                            // Dump the cache to show the current items we're watching
                            DumpCache(stream);

                            // Add 2 new currencies...
                            stream.AddItems("JPY=", "MXN=");

                            // Dump cache again...
                            DumpCache(stream);

                            // Remove 2 different currencies...
                            stream.RemoveItems("CAD=", "GBP=");

                            // Final dump
                            DumpCache(stream);

                            // Close streams
                            Console.WriteLine("\nClosing opened streams...");
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine($"\n**************\nFailed to execute: {e.Message}\n{e.InnerException}\n***************");
            }
        }