예제 #1
0
 public static SecurityExceptionClientHandler GetInstance()
 {
     if (_instance == null)
     {
         _instance = new SecurityExceptionClientHandler();
     }
     return(_instance);
 }
예제 #2
0
        public override CompositeFillErrors Run(Exception ex)
        {
            SecurityExceptionClientHandler myex = (SecurityExceptionClientHandler)ex;

            return(new CompositeFillErrors()
            {
                Field = "general_errors", Message = ex.Message
            });
        }
        private void FillExceptions()
        {
            Handlers = new List <BaseExceptionClientHandler>();
            Handlers.Add(SecurityExceptionClientHandler.GetInstance());
            Handlers.Add(HalExceptionClientHandler.GetInstance());
            Handlers.Add(JsonHalExceptionClientHandler.GetInstance());

            BaseExceptionClientHandler _handler;

            for (int i = 0; i <= Handlers.Count(); i++)
            {
                _handler = Handlers.ElementAt(i);
                if (i + 1 == Handlers.Count())
                {
                    break;
                }
                _handler.Mychainhandler = Handlers.ElementAt(i + 1);
            }
        }