IsPooledConnectionString() 공개 메소드

Used to determine whethe Npgsql will treat a connection string as pooling or not. Npgsql assumes a connection string is pooling by default.
public IsPooledConnectionString ( string dbConnStr ) : bool
dbConnStr string
리턴 bool
예제 #1
0
            public void NonPoolingConnectionStringTest()
            {
                Console.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name);

                string poolingConnStr = "Server=127.0.0.1;Port=23001;User Id=user;Password=password;Database=postgres;Pooling=false;CommandTimeout=1;Encoding=UNICODE;";

                StorageLayer storageLayer = new StorageLayer();

                Assert.IsTrue(!storageLayer.IsPooledConnectionString(poolingConnStr), "Connection string was not correctly recognised as non pooling.");
            }
예제 #2
0
			public void NonPoolingConnectionStringTest()
			{
				Console.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name);

				string poolingConnStr = "Server=127.0.0.1;Port=23001;User Id=user;Password=password;Database=postgres;Pooling=false;CommandTimeout=1;Encoding=UNICODE;";

				StorageLayer storageLayer = new StorageLayer();

				Assert.IsTrue(!storageLayer.IsPooledConnectionString(poolingConnStr), "Connection string was not correctly recognised as non pooling.");
			}