Exemplo n.º 1
0
        private void Throw(bool forceToThrowException)
        {
            if (this.m_ErrorMessages.Count <= 0)
            {
                return;
            }

            ErrorMessageScope <T> outsideValidationScope = ErrorMessageManager <T> .Peek();

            if (forceToThrowException || outsideValidationScope == null)
            {
                throw (Exception)Invoker.CreateInstance <T>(m_MergeMessageHandler(this.m_ErrorMessages));
            }
            else
            {
                outsideValidationScope.m_ErrorMessages.AddRange(this.m_ErrorMessages);
            }
        }
Exemplo n.º 2
0
 internal static void Push(ErrorMessageScope <T> scope)
 {
     InitContainer();
     s_Container.Push(scope);
 }