예제 #1
0
        public static void Ctor_String()
        {
            string message   = "Created ExecutionEngineException";
            var    exception = new ExecutionEngineException(message);

            Assert.Equal(message, exception.Message);
            Assert.Equal(COR_E_EXECUTIONENGINE, exception.HResult);
        }
예제 #2
0
        public static void Ctor_Empty()
        {
            var exception = new ExecutionEngineException();

            Assert.NotNull(exception);
            Assert.NotEmpty(exception.Message);
            Assert.Equal(COR_E_EXECUTIONENGINE, exception.HResult);
        }
예제 #3
0
        private static void LogAOTError(Type type, ExecutionEngineException ex)
        {
            UnityEngine.Debug.LogError("No AOT serializer was pre-generated for the type '" + type.GetNiceFullName() + "'. " +
                                       "Please use Odin's AOT generation feature to generate an AOT dll before building, and ensure that '" +
                                       type.GetNiceFullName() + "' is in the list of supported types after a scan. If it is not, please " +
                                       "report an issue and add it to the list manually.");

            throw new SerializationAbortException("AOT serializer was missing for type '" + type.GetNiceFullName() + "'.");
        }
        public static void Ctor_Empty()
        {
#pragma warning disable 0618
            var exception = new ExecutionEngineException();
#pragma warning restore 0618
            Assert.NotNull(exception);
            Assert.NotEmpty(exception.Message);
            Assert.Equal(COR_E_EXECUTIONENGINE, exception.HResult);
        }
        public static void Ctor_String()
        {
            string message = "Created ExecutionEngineException";

#pragma warning disable 0618
            var exception = new ExecutionEngineException(message);
#pragma warning restore 0618
            Assert.Equal(message, exception.Message);
            Assert.Equal(COR_E_EXECUTIONENGINE, exception.HResult);
        }
예제 #6
0
    public void Test()
    {
        string s1 = "";

        lock (s1) { }                           //NonComplaint

        lock ("Hello") { }                      //NonComplaint

        var o1 = new OutOfMemoryException();

        lock (o1) { }                           //NonComplaint

        var o2 = new StackOverflowException();

        lock (o2) { }                           //NonComplaint

        var o3 = new ExecutionEngineException();

        lock (o3) { }                                    //NonComplaint

        lock (System.Threading.Thread.CurrentThread) { } //NonComplaint

        lock (typeof(LockTest2)) { }                     //NonComplaint

        System.Reflection.MemberInfo mi = null;
        lock (mi) { }                           //NonComplaint

        System.Reflection.ConstructorInfo ci = null;
        lock (ci) { }                           //NonComplaint

        System.Reflection.ParameterInfo pi = null;
        lock (pi) { }                           //NonComplaint

        int[] values = { 1, 2, 3 };
        lock (values) { }                       //NonComplaint

        System.Reflection.MemberInfo[] values1 = null;
        lock (values1) { }

        lock (this) { }                                 //NonComplaint
    }