예제 #1
0
        private static async Task RunExamples()
        {
            // Make sure that TLS 1.2 is available.
            ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;

            // Get path for local file cache.
            var location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            var client = new MusicBrainzClient()
            {
                Cache = new FileRequestCache(Path.Combine(location, "cache"))
            };

            Header("Example 1");
            await Example1.Run(client);

            Header("Example 2");
            await Example2.Run(client);

            Header("Example 3");
            await Example3.Run(client);

            Header("Example 4");
            await Example4.Run(client);

            Header("Example 5");
            await Example5.Run(client);

            Header("Example 6");
            await Example6.Run(client);
        }
예제 #2
0
        private static async Task RunExamples()
        {
            Header("Example 1");
            await Example1.Run();

            Header("Example 2");
            await Example2.Run();

            Header("Example 3");
            await Example3.Run();

            Header("Example 4");
            await Example4.Run();

            Header("Example 5");
            await Example5.Run();
        }
예제 #3
0
        private static async Task RunExamples()
        {
            var location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            // Use local file cache (subdirectory of executing program).
            Configuration.Cache = new FileRequestCache(Path.Combine(location, "cache"));

            Header("Example 1");
            await Example1.Run();

            Header("Example 2");
            await Example2.Run();

            Header("Example 3");
            await Example3.Run();

            Header("Example 4");
            await Example4.Run();

            Header("Example 5");
            await Example5.Run();
        }