Esempio n. 1
0
        private static ResultOf <Circle> GetCircle()
        {
            var result = new ResultOf <Circle>();

            try
            {
                result.Value = new Circle();
            }
            catch (NullReferenceException e)
            {
                result.AddMessage(e.Message);
            }
            return(result);
        }
Esempio n. 2
0
        private static ResultOf<Circle> GetCircle()
        {
            var result = new ResultOf<Circle>();
            try
            {
                result.Value = new Circle();

            }
            catch (NullReferenceException e)
            {
                result.AddMessage(e.Message);
            }
            return result;
        }
Esempio n. 3
0
        public static ResultOf <Image> GetImage(EventHandler processor)
        {
            var result = new ResultOf <Image>();

            try
            {
                result.Value      = new Image();
                Application.Idle += processor;
            }
            catch (NullReferenceException e)
            {
                result.AddMessage(e.Message);
            }
            return(result);
        }
Esempio n. 4
0
        public static ResultOf<Desktop> GetDesktop(EventHandler processor)
        {
            var result = new ResultOf<Desktop>();
            try
            {
                result.Value = new Desktop();
                Application.Idle += processor;

            }
            catch (NullReferenceException e)
            {
                result.AddMessage(e.Message);
            }
            return result;
        }