本文整理汇总了C#中StatementType类的典型用法代码示例。如果您正苦于以下问题:C# StatementType类的具体用法?C# StatementType怎么用?C# StatementType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StatementType类属于命名空间,在下文中一共展示了StatementType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateRowUpdatedEvent
protected override RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping)
{
NpgsqlEventLog.LogMethodEnter(LogLevel.Debug, CLASSNAME, "CreateRowUpdatedEvent");
return new NpgsqlRowUpdatedEventArgs(dataRow, command, statementType, tableMapping);
}
示例2: ApplyParameterInfo
protected override void ApplyParameterInfo(DbParameter parameter, DataRow datarow, StatementType statementType, bool whereClause)
{
SqlParameter parameter2 = (SqlParameter) parameter;
object obj3 = datarow[SchemaTableColumn.ProviderType];
parameter2.SqlDbType = (SqlDbType) obj3;
parameter2.Offset = 0;
if ((parameter2.SqlDbType == SqlDbType.Udt) && !parameter2.SourceColumnNullMapping)
{
parameter2.UdtTypeName = datarow["DataTypeName"] as string;
}
else
{
parameter2.UdtTypeName = string.Empty;
}
object obj2 = datarow[SchemaTableColumn.NumericPrecision];
if (DBNull.Value != obj2)
{
byte num2 = (byte) ((short) obj2);
parameter2.PrecisionInternal = (0xff != num2) ? num2 : ((byte) 0);
}
obj2 = datarow[SchemaTableColumn.NumericScale];
if (DBNull.Value != obj2)
{
byte num = (byte) ((short) obj2);
parameter2.ScaleInternal = (0xff != num) ? num : ((byte) 0);
}
}
示例3: Statement
/// <summary>
/// Initializes a new instance of the Statement class.
/// </summary>
/// <param name="proxy">Proxy object for the statement.</param>
/// <param name="type">The type of the statement.</param>
internal Statement(CodeUnitProxy proxy, StatementType type)
: base(proxy, (int)type)
{
Param.AssertNotNull(proxy, "proxy");
Param.Ignore(type);
CsLanguageService.Debug.Assert(System.Enum.IsDefined(typeof(StatementType), this.StatementType), "The type is invalid.");
}
示例4: TaxRequest
/// <summary>
/// Initializes a new instance of the <see cref="TaxRequest"/> class.
/// </summary>
/// <param name="docType">
/// The doc Type. This determines if the quotation should be recorded or if it is just an estimate.
/// Defaults to an estimate.
/// </param>
public TaxRequest(StatementType docType = StatementType.SalesOrder)
{
DocDate = DateTime.Today.ToString("yyyy-M-dddd");
DetailLevel = DetailLevel.Tax;
Commit = false;
DocType = docType;
}
示例5: Clear
/// <summary>
/// Resets content of this request.
/// Used for pooling.
/// </summary>
public void Clear()
{
DbStatementType = 0;
EntityName = null;
FieldNames = null;
InputItemsCount = 0;
}
示例6: TryGetSimpleCaseStatementType
private bool TryGetSimpleCaseStatementType(SwitchCase theCase, out StatementType statementType, out string gotoLabel)
{
gotoLabel = null;
statementType = StatementType.None;
if (theCase.Body.Statements.Count != 1 || !string.IsNullOrEmpty(theCase.Body.Statements[0].Label))
{
return false;
}
Statement statement = theCase.Body.Statements[0];
if (statement is GotoStatement)
{
statementType = StatementType.Goto;
gotoLabel = (statement as GotoStatement).TargetLabel;
}
else if (statement is BreakStatement)
{
statementType = StatementType.Break;
}
else if (statement is ContinueStatement)
{
statementType = StatementType.Continue;
}
return statementType != StatementType.None;
}
示例7: CreateStatement_ExpectValid
public void CreateStatement_ExpectValid()
{
//Arrange
string localStatementIdString = "STMT01";
StatementId localStatementId = new StatementId(localStatementIdString);
SpecificFieldsFactory localfactory = new SpecificFieldsFactory();
string[] listspecificfields = { "Credit Card", "12" };
StatementType localStatementType = new StatementType(localfactory, "CreditCardProvider", listspecificfields);
StatementSpecificFields localspecificfields = localStatementType.getSpecificFields();
int localstatementAccountnumber = 1234567;
string localstatementAccountholdername = "Bruce";
DateTime localstatementDate = DateTime.Now;
StatementCommonFields localStatementCommonFields = new StatementCommonFields(localstatementAccountnumber, localstatementAccountholdername, localstatementDate);
APSUser localAPSUser = new APSUser(new APSUserId("1"), "testusername", "testpassword");
BillingAccount localBillingAccount = new BillingAccount(new BillingAccountId("1"), new BillingCompanyId("1"), "testusername", "testpassword", localAPSUser);
//Act
Statement localStatement = new Statement(localStatementId, localStatementCommonFields, localStatementType, localspecificfields, localAPSUser, localBillingAccount);
//Assert
Assert.AreEqual(localStatement.StatementId, localStatementId);
Assert.AreEqual(localStatement.StatementCommonFields, localStatementCommonFields);
Assert.AreEqual(localStatement.StatementType, localStatementType);
Assert.AreEqual(localStatement.StatementSpecificFields, localspecificfields);
Assert.AreEqual(localStatement.APSUser, localAPSUser);
Assert.AreEqual(localStatement.BillingAccount, localBillingAccount);
}
示例8: Command
public Command(string identifier, string value, StatementType statementType, MetaData<IMeta> metaData, bool rcon)
: base(statementType, metaData)
{
Identifier = identifier;
Value = value;
RCON = rcon;
}
示例9: Statement
public Statement(string text, StatementType type, ResultType result, IDictionary<string, object> parameters)
{
Type = type;
Text = text;
Result = result;
Parameters = parameters ?? new Dictionary<string, object>();
}
示例10: FbRowUpdatedEventArgs
public FbRowUpdatedEventArgs(
DataRow row,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping)
: base(row, command, statementType, tableMapping)
{
}
示例11: CreateRowUpdatedEvent
protected override RowUpdatedEventArgs CreateRowUpdatedEvent(
DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping)
{
return new NpgsqlRowUpdatedEventArgs(dataRow, command, statementType, tableMapping);
}
示例12: CreateRowUpdatingEvent
protected override RowUpdatingEventArgs CreateRowUpdatingEvent(
DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping)
{
return null;
}
示例13: RowUpdatedEventArgs
RowUpdatedEventArgs (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
{
this.dataRow = dataRow;
this.command = command;
this.statementType = statementType;
this.tableMapping = tableMapping;
this.status = UpdateStatus.Continue;
}
示例14: RowUpdatedEventArgs
protected RowUpdatedEventArgs (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
{
this.dataRow = dataRow;
this.command = command;
this.statementType = statementType;
this.tableMapping = tableMapping;
this.errors = null;
this.status = UpdateStatus.Continue;
this.recordsAffected = 0; // FIXME
}
示例15: CreateStatementSpecificFields_ExpectValid
public void CreateStatementSpecificFields_ExpectValid()
{
//Arrange
SpecificFieldsFactory localfactory = new SpecificFieldsFactory();
string[] listspecificfields = { "You will need to pay by the 25th on the month", "1000" };
StatementType localStatementType = new StatementType(localfactory, "Municipality", listspecificfields);
StatementSpecificFields localspecificfields = localStatementType.getSpecificFields();
//Assert
Assert.IsNotNull(localspecificfields);
}