本文整理汇总了TypeScript中tns-core-modules/trace.write函数的典型用法代码示例。如果您正苦于以下问题:TypeScript write函数的具体用法?TypeScript write怎么用?TypeScript write使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了write函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
export var test_DummyTestForSnippetOnly2 = function () {
// >> trace-message
trace.setCategories(trace.categories.Debug);
trace.enable();
if (trace.isEnabled()) {
trace.write("My Debug Message", trace.categories.Debug);
}
// << trace-message
}
示例2: _testTransition
function _testTransition(navigationTransition: NavigationTransition) {
var testId = `Transition[${JSON.stringify(navigationTransition)}]`;
if (trace.isEnabled()) {
trace.write(`Testing ${testId}`, trace.categories.Test);
}
var navigationEntry: NavigationEntry = {
create: function (): Page {
let page = new Page();
page.id = testId;
page.style.backgroundColor = new Color(255, Math.round(Math.random() * 255), Math.round(Math.random() * 255), Math.round(Math.random() * 255));
return page;
},
animated: true,
transition: navigationTransition
}
helper.navigateWithEntry(navigationEntry);
}
示例3: write
export function write(message: string, type?: number) {
//console.log(message);
trace.write(message, trace.categories.Test, type);
}
示例4: log
function log(message: string) {
write(message, CATEGORY);
}
示例5: writeTrace
export function writeTrace(message: string, type: number = traceMessageType.info) {
if (trace.isEnabled()) {
trace.write(message, 'A11Y', type);
}
}
示例6: bootstrapLog
export function bootstrapLog(message: string): void {
write(message, bootstrapCategory);
}
示例7: bootstrapLogError
export function bootstrapLogError(message: string): void {
write(message, bootstrapCategory, messageType.error);
}
示例8: listViewLog
export function listViewLog(message: string): void {
write(message, listViewTraceCategory);
}
示例9: listViewError
export function listViewError(message: string): void {
write(message, listViewTraceCategory, messageType.error);
}
示例10: routeReuseStrategyLog
export function routeReuseStrategyLog(message: string): void {
write(message, routeReuseStrategyTraceCategory);
}