Example #1
0
 public BsonStructConvertMethodFactory([NotNull] IBsonStructConverter converter)
 {
     if (converter == null)
     {
         throw new ArgumentNullException(nameof(converter));
     }
     _converter = converter;
 }
Example #2
0
 public BsonConverter([NotNull] IBsonStructConverter bsonStructConverter, [NotNull] IBsonStructConvertMethodFactory bsonStructConvertMethodFactory)
 {
     if (bsonStructConverter == null)
     {
         throw new ArgumentNullException(nameof(bsonStructConverter));
     }
     if (bsonStructConvertMethodFactory == null)
     {
         throw new ArgumentNullException(nameof(bsonStructConvertMethodFactory));
     }
     _bsonStructConverter            = bsonStructConverter;
     _bsonStructConvertMethodFactory = bsonStructConvertMethodFactory;
 }
Example #3
0
 /// <summary>
 ///     Инициализирует новый экземпляр класса <see cref="T:System.Object" />.
 /// </summary>
 public BsonExceptionFactory([NotNull] IBsonDocumentValueAppender bsonDocumentValueAppender, [NotNull] IBsonStructConverter bsonStructConverter)
 {
     if (bsonDocumentValueAppender == null)
     {
         throw new ArgumentNullException(nameof(bsonDocumentValueAppender));
     }
     if (bsonStructConverter == null)
     {
         throw new ArgumentNullException(nameof(bsonStructConverter));
     }
     _bsonDocumentValueAppender = bsonDocumentValueAppender;
     _bsonStructConverter       = bsonStructConverter;
 }
Example #4
0
 /// <summary>
 ///     Инициализирует новый экземпляр класса <see cref="T:System.Object" />.
 /// </summary>
 public DefaultsFactory([NotNull] IBsonStructConverter bsonStructConverter,
                        [NotNull] IBsonExceptionFactory bsonExceptionFactory)
 {
     if (bsonStructConverter == null)
     {
         throw new ArgumentNullException(nameof(bsonStructConverter));
     }
     if (bsonExceptionFactory == null)
     {
         throw new ArgumentNullException(nameof(bsonExceptionFactory));
     }
     _bsonStructConverter  = bsonStructConverter;
     _bsonExceptionFactory = bsonExceptionFactory;
 }