NextParameter() public method

public NextParameter ( ) : string
return string
コード例 #1
0
        public void NextParameter()
        {
            string       sql       = "SELECT * FROM Test WHERE id=@id AND id2=?id2";
            SqlTokenizer tokenizer = new SqlTokenizer(sql);

            tokenizer.ReturnComments = true;
            Assert.Equal("@id", tokenizer.NextParameter());
            Assert.Equal("?id2", tokenizer.NextParameter());
            Assert.Null(tokenizer.NextParameter());
        }
コード例 #2
0
 public void NextParameter()
 {
     string sql = "SELECT * FROM Test WHERE id=@id AND id2=?id2";
       SqlTokenizer tokenizer = new SqlTokenizer(sql);
       tokenizer.ReturnComments = true;
       Assert.AreEqual("@id", tokenizer.NextParameter());
       Assert.AreEqual("?id2", tokenizer.NextParameter());
       Assert.IsNull(tokenizer.NextParameter());
 }