コード例 #1
0
        public void Bug46473()          // concurrent serialization/deserialization
        {
            crossDomainSerializedObject = new CrossDomainSerializedObject();
            Task[] tasks = new Task [20];
            for (int i = 0; i < tasks.Length; i++)
            {
                var assembly = Assembly.GetAssembly(typeof(AppDomainObject));
                var name     = "AppDomainWithCall" + i;
                tasks [i] = Task.Factory.StartNew(() => AppDomainWithRemotingSerialization(assembly, name));
            }

            Assert.IsTrue(Task.WaitAll(tasks, 5000));
        }
コード例 #2
0
        public void Bug46473()          // concurrent serialization/deserialization
        {
            bool success = true;

            crossDomainSerializedObject = new CrossDomainSerializedObject();
            Task[] tasks = new Task [20];
            for (int i = 0; i < tasks.Length; i++)
            {
                var assembly = Assembly.GetAssembly(typeof(AppDomainObject));
                var name     = "AppDomainWithCall" + i;
                tasks [i] = Task.Factory.StartNew(() => AppDomainWithRemotingSerialization(assembly, name));
            }
            try {
                Task.WaitAll(tasks);
            } catch (AggregateException e) {
                success = false;
                Console.WriteLine($"{e}, {e.InnerException}");
            }
            Assert.IsTrue(success, "Bug46473 (exception during remoting call)");
        }
コード例 #3
0
 public void Init(CrossDomainSerializedObject applicationDependencies)             // racy exception here
 {
 }