當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。