本文整理汇总了TypeScript中huject.ContainerFactoryInterface.make方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ContainerFactoryInterface.make方法的具体用法?TypeScript ContainerFactoryInterface.make怎么用?TypeScript ContainerFactoryInterface.make使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类huject.ContainerFactoryInterface
的用法示例。
在下文中一共展示了ContainerFactoryInterface.make方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: download
/**
* Send download response
* @param {string} path
* @param {string?} filename
*/
protected download(path: string, filename?: string) {
this.send(this.objectFactory.make(DownloadResult, [path, filename]));
}
示例2: view
/**
* Send view
* @param {string} template
* @param {?} options
*/
protected view(template: string, options?: {}) {
var result = this.objectFactory.make(ViewResult, [template]);
if (options) result.options = options;
this.send(result);
}
示例3: file
/**
* Send file content
* @param {string} path
*/
protected file(path: string) {
this.send(this.objectFactory.make(FileResult, [path]));
}
示例4: json
/**
* Send json content
* @param {} data
*/
protected json(data: {}, status: number = 200) {
this.send(this.objectFactory.make(JsonResult, [data, status]));
}
示例5: content
/**
* Send string content
* @param {string} text
* @param {string?} contentType
*/
protected content(text: string, contentType?: string) {
this.send(this.objectFactory.make(ContentResult, [text, contentType]));
}
示例6: redirect
/**
* Clasic redirect type
* @param {string} url
* @param {number} status
*/
protected redirect(url: string, status: number = 302) {
this.send(this.objectFactory.make(RedirectResult, [url, status]));
}
示例7: json
/**
* Send json content
* @param {} data
*/
protected json(data: {}) {
this.send(this.objectFactory.make(JsonResult, [data]));
}