当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Verify.that函数代码示例

本文整理汇总了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;
    }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:12,代码来源:CreationInfo.ts

示例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;
    }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:12,代码来源:SqlCallDao.ts

示例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;
   }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:12,代码来源:SqlCallResponse.ts

示例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;
   }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:12,代码来源:SqlCall.ts

示例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;
   }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:15,代码来源:VersionInfo.ts

示例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;
   }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:13,代码来源:SqlCallQueryResponse.ts

示例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();
    }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:12,代码来源:SqlCallDao.ts

示例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;
   }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:14,代码来源:NamedModelId.ts

示例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;
  }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:9,代码来源:ModelObject.ts

示例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;
  }
开发者ID:jeremyalan,项目名称:nodejs-artisan-service-core,代码行数:11,代码来源:ModelId.ts


注:本文中的artisan-core/lib/exceptions/Verify.that函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。