Beispiel #1
0
 public StreamIdHasherValidator(IContribStreamIdHasher streamIdHasher)
 {
     if (streamIdHasher == null)
     {
         throw new ArgumentNullException("streamIdHasher");
     }
     this._streamIdHasher = streamIdHasher;
 }
Beispiel #2
0
 public FirebirdSqlPersistenceFactory(IConnectionFactory factory, ISerialize serializer, IContribSqlDialect dialect, IContribStreamIdHasher streamIdHasher = null, TransactionScopeOption scopeOption = TransactionScopeOption.Suppress, int pageSize = DefaultPageSize)
 {
     this._connectionFactory      = factory;
     this._dialect                = dialect;
     this._transactionScopeOption = scopeOption;
     this._serializer             = serializer;
     this._scopeOption            = scopeOption;
     this._streamIdHasher         = streamIdHasher ?? new StreamIdHasher <SHA1>();
     this._pagesize               = pageSize;
 }
		public FirebirdSqlPersistenceFactory(IConnectionFactory factory, ISerialize serializer, IContribSqlDialect dialect, IContribStreamIdHasher streamIdHasher = null, TransactionScopeOption scopeOption = TransactionScopeOption.Suppress, int pageSize = DefaultPageSize)
		{
			this._connectionFactory = factory;
			this._dialect = dialect;
			this._transactionScopeOption = scopeOption;
			this._serializer = serializer;
			this._scopeOption = scopeOption;
			this._streamIdHasher = streamIdHasher ?? new StreamIdHasher<SHA1>();
			this._pagesize = pageSize;
		}
Beispiel #4
0
        public FirebirdSqlPersistenceEngine(
            IConnectionFactory connectionFactory,
            IContribSqlDialect dialect,
            ISerialize serializer,
            TransactionScopeOption scopeOption,
            int pageSize,
            IContribStreamIdHasher streamIdHasher)
        {
            if (connectionFactory == null)
            {
                throw new ArgumentNullException("connectionFactory");
            }

            if (dialect == null)
            {
                throw new ArgumentNullException("dialect");
            }

            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }

            if (pageSize < 0)
            {
                throw new ArgumentException("pageSize");
            }

            if (streamIdHasher == null)
            {
                throw new ArgumentNullException("streamIdHasher");
            }

            this._connectionFactory = connectionFactory;
            this._dialect           = dialect;
            this._serializer        = serializer;
            this._scopeOption       = scopeOption;
            this._pageSize          = pageSize;
            this._streamIdHasher    = new StreamIdHasherValidator(streamIdHasher);

            Logger.Debug(Messages.UsingScope, this._scopeOption.ToString());
        }
 /// <summary>
 /// Withes the stream identifier hasher.
 /// </summary>
 /// <param name="instance">The instance.</param>
 /// <returns>FirebirdSqlPersistenceWireup.</returns>
 public virtual FirebirdSqlPersistenceWireup WithStreamIdHasher(IContribStreamIdHasher instance)
 {
     this.Container.Register(instance);
     return(this);
 }
		/// <summary>
		/// Withes the stream identifier hasher.
		/// </summary>
		/// <param name="instance">The instance.</param>
		/// <returns>FirebirdSqlPersistenceWireup.</returns>
		public virtual FirebirdSqlPersistenceWireup WithStreamIdHasher(IContribStreamIdHasher instance)
		{
			this.Container.Register(instance);
			return this;
		}