コード例 #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
            });
        }
コード例 #3
0
        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);
            }
        }