本文整理匯總了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);
}