本文整理汇总了C#中SqlWriter.WriteIdentifier方法的典型用法代码示例。如果您正苦于以下问题:C# SqlWriter.WriteIdentifier方法的具体用法?C# SqlWriter.WriteIdentifier怎么用?C# SqlWriter.WriteIdentifier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SqlWriter
的用法示例。
在下文中一共展示了SqlWriter.WriteIdentifier方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AnyStatement
public AnyStatement(Identifier identifier, Sequence<Expression> expressions) {
using (StringWriter stringWriter = new StringWriter()) {
SqlWriter statementWriter = new SqlWriter(stringWriter, DatabaseEngine.Unknown);
statementWriter.WriteIdentifier(identifier.Value);
statementWriter.WriteScriptSequence(expressions, WhitespacePadding.SpaceBefore, null);
statementText = stringWriter.ToString();
}
}
示例2: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.WriteIdentifier("CONVERT");
writer.Write('(');
writer.WriteScript(typeName, WhitespacePadding.None);
writer.Write(", ");
writer.WriteScript(valueExpression, WhitespacePadding.None);
writer.WriteScript(style, WhitespacePadding.None, w => w.Write(", "), null);
writer.Write(')');
}
示例3: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.WriteIdentifier(Key);
writer.Write(' ');
objectName.WriteTo(writer);
}
示例4: WriteTo
public override void WriteTo(SqlWriter writer) {
writer.WriteIdentifier(original);
}
示例5: WriteIdentifier_WritesIdentifier
public void WriteIdentifier_WritesIdentifier()
{
var builder = new StringBuilder();
using (var writer = new SqlWriter(builder))
{
writer.WriteIdentifier("Blog.dbo.User");
}
Assert.Equal("[Blog].[dbo].[User]", builder.ToString());
}
示例6: WriteIdentifier_WithNullIdentifier_ThrowsArgumentNull
public void WriteIdentifier_WithNullIdentifier_ThrowsArgumentNull()
{
Assert.Throws<ArgumentNullException>(() =>
{
var builder = new StringBuilder();
using (var writer = new SqlWriter(builder))
{
writer.WriteIdentifier(null);
}
});
}