本文整理汇总了TypeScript中artisan-core/lib/exceptions/Verify.that函数的典型用法代码示例。如果您正苦于以下问题:TypeScript that函数的具体用法?TypeScript that怎么用?TypeScript that使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了that函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
/**
* Creates a new instance.
* @param {string} createdOn - The date/time when the model was created.
* @param {string} createdBy - The name of the user that created the model.
*/
constructor(createdOn: string, createdBy: string) {
Verify.that(createdOn, 'createdOn').isNotNullOrEmpty();
Verify.that(createdBy, 'createdBy').isNotNullOrEmpty();
this.CreatedOn = createdOn;
this.CreatedBy = createdBy;
}
示例2: constructor
/**
* Creates a new instance.
* @param {ISqlDatabase} database - The database instance.
* @param {ISqlCallFactory} callFactory - The ISqlCallFactory used to create SqlCall instances.
*/
constructor(database: ISqlDatabase, callFactory: ISqlCallFactory) {
Verify.that(database, 'database').isNotNull();
Verify.that(callFactory, 'callFactory').isNotNull;
this._database = database;
this._callFactory = callFactory;
}
示例3: constructor
/**
* Creates a new instance.
* @param {ISqlDatabase} database - The database instance.
* @param {ISqlCommand} dbCommand - The command that represents the statements executed against the database.
*/
constructor(database: ISqlDatabase, dbCommand: ISqlCommand) {
Verify.that(database, 'database').isNotNull();
Verify.that(dbCommand, 'dbCommand').isNotNull();
this._database = database;
this._dbCommand = dbCommand;
}
示例4: constructor
/**
* Creates a new instance.
* @param {ISqlDatabase} sqlDatabase - The database instance.
* @param {IQuerySqlCallDelegate<T>} delegate - The delegate used to execute the call.
*/
constructor(sqlDatabase: ISqlDatabase, delegate: ISqlCallDelegate<T>) {
Verify.that(sqlDatabase, 'sqlDatabase').isNotNull();
Verify.that(delegate, 'delegate').isNotNull();
this._sqlDatabase = sqlDatabase;
this._delegate = delegate;
}
示例5: constructor
/**
* Creates a new instance.
* @param {number} version - The version number.
* @param {string} versionOn - The date/time when the update occurred.
* @param {string} versionBy - The name of the user that performed the update.
*/
constructor(version: number, versionOn: string, versionBy: string) {
Verify.that(version, 'version').isNotNull();
Verify.that(versionOn, 'versionOn').isNotNullOrEmpty();
Verify.that(versionBy, 'versionBy').isNotNullOrEmpty();
this.Version = version;
this.VersionOn = versionOn;
this.VersionBy = versionBy;
}
示例6: constructor
/**
* Creates a new instance.
* @param {ISqlDatabase} database - The database instance.
* @param {ISqlCommand} dbCommand - The command that represents the statement executed against the database.
* @param {ISqlDataReader} reader - The reader that contains the result sets returned by the statement.
*/
constructor(database: ISqlDatabase, dbCommand: ISqlCommand, reader: ISqlDataReader) {
super(database, dbCommand);
Verify.that(reader, 'reader').isNotNull();
this.reader = reader;
}
示例7:
/**
* Executes the specified command against the database.
* @param {ISqlCallDelegate<T>} callDelegate - The delegate used to execute the call.
* @returns Promise - The result returned by the call.
*/
protected async execute<T>(callDelegate: ISqlCallDelegate<T>): Promise<T> {
Verify.that(callDelegate, 'callDelegate').isNotNull();
const sqlCall = this._callFactory.getSqlCall<T>(this._database, callDelegate);
return await sqlCall.execute();
}
示例8: constructor
/**
* Creates an instance of NamedModelId.
*
* @param {string} name - The name of the underlying model.
* @param {string} modelKey - The unique identifier of the underlying model.
* @param {number} [version] - The version number.
*/
constructor(name: string, modelKey: string, version?: number) {
super(modelKey, version);
Verify.that(name, 'name').isNotNullOrEmpty();
this.Name = name;
}
示例9: constructor
/**
* Creates a new instance.
* @param {ModelId} modelId - The unique identifier of the model instance.
*/
constructor(modelId: ModelId) {
Verify.that(modelId, 'modelId').isNotNull();
this.ModelId = modelId;
}
示例10: constructor
/**
* Creates a new instance.
* @param {string} modelKey - The unique identifier of the model instance.
* @param {number=0} version - The version number of the model instance.
*/
constructor(modelKey: string, version: number = 0) {
Verify.that(modelKey, 'modelKey').isNotNullOrEmpty();
this.ModelKey = modelKey;
this.Version = version || 0;
}