Exemplo n.º 1
0
 void EnsureResultIsGood(SafeModeResult safeModeResult, string message, params object[] objs)
 {
     if (!safeModeResult.Ok)
     {
         throw new ApplicationException(string.Format("The following operation didn't suceed: {0}", string.Format(message, objs)));
     }
 }
Exemplo n.º 2
0
 void EnsureResultIsGood(SafeModeResult safeModeResult)
 {
 }
Exemplo n.º 3
0
        void EnsureResultIsGood(SafeModeResult safeModeResult, string message, params object[] objs)
        {
            if (!safeModeResult.Ok && safeModeResult.DocumentsAffected == 1)
            {
                var exceptionMessage = string.Format("Tried to {0}, but apparently the operation didn't succeed.",
                                                     string.Format(message, objs));

                throw new MongoSafeModeException(exceptionMessage, safeModeResult);
            }
        }