本文整理汇总了TypeScript中ember-metal._instrumentStart函数的典型用法代码示例。如果您正苦于以下问题:TypeScript _instrumentStart函数的具体用法?TypeScript _instrumentStart怎么用?TypeScript _instrumentStart使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_instrumentStart函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: update
update(bucket: ComponentStateBucket): void {
let { component, args, argsRevision, environment } = bucket;
if (DEBUG) {
this._pushToDebugStack(component._debugContainerKey, environment);
}
bucket.finalizer = _instrumentStart('render.component', rerenderInstrumentDetails, component);
if (!args.tag.validate(argsRevision)) {
let props = processComponentArgs(args);
bucket.argsRevision = args.tag.value();
component[IS_DISPATCHING_ATTRS] = true;
component.setProperties(props);
component[IS_DISPATCHING_ATTRS] = false;
component.trigger('didUpdateAttrs');
component.trigger('didReceiveAttrs');
}
if (environment.isInteractive) {
component.trigger('willUpdate');
component.trigger('willRender');
}
}
示例2: create
create(
environment: Environment,
_state: DefinitionState,
_args: Arguments | null,
dynamicScope: DynamicScope
) {
let component = this.component;
if (DEBUG) {
this._pushToDebugStack((component as any)._debugContainerKey, environment);
}
let finalizer = _instrumentStart('render.component', initialRenderInstrumentDetails, component);
dynamicScope.view = component;
// We usually do this in the `didCreateElement`, but that hook doesn't fire for tagless components
if (component.tagName === '') {
if (environment.isInteractive) {
component.trigger('willRender');
}
component._transitionTo('hasElement');
if (environment.isInteractive) {
component.trigger('willInsertElement');
}
}
if (DEBUG) {
processComponentInitializationAssertions(component, {});
}
return new ComponentStateBucket(environment, component, null, finalizer);
}
示例3: create
create(environment: Environment, definition: CurlyComponentDefinition, args: Arguments, dynamicScope: DynamicScope, callerSelfRef: VersionedPathReference<Opaque>, hasBlock: boolean): ComponentStateBucket {
if (DEBUG) {
this._pushToDebugStack(`component:${definition.name}`, environment);
}
let parentView = dynamicScope.view;
let factory = definition.ComponentClass;
let capturedArgs = args.named.capture();
let props = processComponentArgs(capturedArgs);
aliasIdToElementId(args, props);
props.parentView = parentView;
props[HAS_BLOCK] = hasBlock;
props._targetObject = callerSelfRef.value();
let component = factory.create(props);
let finalizer = _instrumentStart('render.component', initialRenderInstrumentDetails, component);
dynamicScope.view = component;
if (parentView !== null && parentView !== undefined) {
parentView.appendChild(component);
}
// We usually do this in the `didCreateElement`, but that hook doesn't fire for tagless components
if (component.tagName === '') {
if (environment.isInteractive) {
component.trigger('willRender');
}
component._transitionTo('hasElement');
if (environment.isInteractive) {
component.trigger('willInsertElement');
}
}
let bucket = new ComponentStateBucket(environment, component, capturedArgs, finalizer);
if (args.named.has('class')) {
bucket.classRef = args.named.get('class');
}
if (DEBUG) {
processComponentInitializationAssertions(component, props);
}
if (environment.isInteractive && component.tagName !== '') {
component.trigger('willRender');
}
return bucket;
}
示例4: getComponentDefinition
getComponentDefinition(name: string, { owner, moduleName }: any): ComponentDefinition<Opaque> {
let finalizer = _instrumentStart('render.getComponentDefinition', instrumentationPayload, name);
let source = moduleName && `template:${moduleName}`;
let definition = this._definitionCache.get({ name, source, owner });
finalizer();
// TODO the glimmer-vm wants this to always have a def
// but internally we need it to sometimes be undefined
return definition!;
}
示例5: instrument
instrument() {
this.finalizer = _instrumentStart('render.outlet', instrumentationPayload, this.outletState);
}