Пример #1
0
        private static void SingleWrap(Object state)
        {
            Object[] objs = (Object[])state;

            XCodeTest test = new XCodeTest();

            test.ID = (Int32)objs[1];

            try
            {
                test.Single();
            }
            catch (Exception ex)
            {
                XTrace.WriteLine(ex.Message);
            }
            finally
            {
                AutoResetEvent e = objs[0] as AutoResetEvent;
                if (e != null)
                {
                    e.Set();
                }
            }
        }
Пример #2
0
        private static void SingleWrap(Object state)
        {
            Object[] objs = (Object[])state;

            XCodeTest test = new XCodeTest();
            test.ID = (Int32)objs[1];

            try
            {
                test.Single();
            }
            catch (Exception ex)
            {
                XTrace.WriteLine(ex.Message);
            }
            finally
            {
                AutoResetEvent e = objs[0] as AutoResetEvent;
                if (e != null) e.Set();
            }
        }