public static HalExceptionClientHandler GetInstance()
 {
     if (_instance == null)
     {
         _instance = new HalExceptionClientHandler();
     }
     return(_instance);
 }
        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);
            }
        }