Пример #1
0
 public static HandlerClientExceptions GetInstance()
 {
     if (_handler == null)
     {
         _handler = new HandlerClientExceptions();
     }
     return(_handler);
 }
Пример #2
0
        private void FillExceptions()
        {
            Handlers = new List <BaseExceptionClientHandler>();
            Handlers.Add(SecurityExceptionClientHandler.GetInstance());
            Handlers.Add(JsonErrorHandler.GetInstance());

            //Handlers.Add(AggregateExceptionHandler.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);
            }
        }