Ejemplo n.º 1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="EventReaderConfiguration" /> class.
 /// </summary>
 /// <param name="sliceSize">Size of the slice to read.</param>
 /// <param name="deserializer">The event deserializer to use.</param>
 /// <param name="streamNameResolver">The stream name resolver to use.</param>
 /// <param name="streamUserCredentialsResolver">The stream user credentials resolver to use.</param>
 /// <exception cref="System.ArgumentNullException">
 ///     Thrown when the <paramref name="deserializer" /> or
 ///     <paramref name="streamNameResolver" /> is <c>null</c>.
 /// </exception>
 public EventReaderConfiguration(SliceSize sliceSize, IEventDeserializer deserializer,
                                 IStreamNameResolver streamNameResolver,
                                 IStreamUserCredentialsResolver streamUserCredentialsResolver)
 {
     SliceSize                     = sliceSize;
     Deserializer                  = deserializer ?? throw new ArgumentNullException(nameof(deserializer));
     StreamNameResolver            = streamNameResolver ?? throw new ArgumentNullException(nameof(streamNameResolver));
     StreamUserCredentialsResolver = streamUserCredentialsResolver ?? throw new ArgumentNullException(nameof(streamUserCredentialsResolver));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventReaderConfiguration"/> class.
 /// </summary>
 /// <param name="sliceSize">Size of the slice to read.</param>
 /// <param name="deserializer">The event deserializer to use.</param>
 /// <param name="streamNameResolver">The stream name resolver to use.</param>
 /// <param name="streamUserCredentialsResolver">The stream user credentials resolver to use.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="deserializer"/> or <paramref name="streamNameResolver"/> is <c>null</c>.</exception>
 public EventReaderConfiguration(SliceSize sliceSize, IEventDeserializer deserializer,
                                 IStreamNameResolver streamNameResolver,
                                 IStreamUserCredentialsResolver streamUserCredentialsResolver)
 {
     if (deserializer == null) throw new ArgumentNullException("deserializer");
     if (streamNameResolver == null) throw new ArgumentNullException("streamNameResolver");
     if (streamUserCredentialsResolver == null) throw new ArgumentNullException("streamUserCredentialsResolver");
     _sliceSize = sliceSize;
     _deserializer = deserializer;
     _streamNameResolver = streamNameResolver;
     _streamUserCredentialsResolver = streamUserCredentialsResolver;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventReaderConfiguration"/> class.
 /// </summary>
 /// <param name="sliceSize">Size of the slice to read.</param>
 /// <param name="deserializer">The event deserializer to use.</param>
 /// <param name="streamNameResolver">The stream name resolver to use.</param>
 /// <param name="streamUserCredentialsResolver">The stream user credentials resolver to use.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="deserializer"/> or <paramref name="streamNameResolver"/> is <c>null</c>.</exception>
 public EventReaderConfiguration(SliceSize sliceSize, IEventDeserializer deserializer,
                                 IStreamNameResolver streamNameResolver,
                                 IStreamUserCredentialsResolver streamUserCredentialsResolver)
 {
     if (deserializer == null)
     {
         throw new ArgumentNullException("deserializer");
     }
     if (streamNameResolver == null)
     {
         throw new ArgumentNullException("streamNameResolver");
     }
     if (streamUserCredentialsResolver == null)
     {
         throw new ArgumentNullException("streamUserCredentialsResolver");
     }
     _sliceSize                     = sliceSize;
     _deserializer                  = deserializer;
     _streamNameResolver            = streamNameResolver;
     _streamUserCredentialsResolver = streamUserCredentialsResolver;
 }