本文整理汇总了TypeScript中angular2/src/web_workers/shared/service_message_broker.ServiceMessageBrokerFactory.createMessageBroker方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ServiceMessageBrokerFactory.createMessageBroker方法的具体用法?TypeScript ServiceMessageBrokerFactory.createMessageBroker怎么用?TypeScript ServiceMessageBrokerFactory.createMessageBroker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/src/web_workers/shared/service_message_broker.ServiceMessageBrokerFactory
的用法示例。
在下文中一共展示了ServiceMessageBrokerFactory.createMessageBroker方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: start
start(): void {
var broker = this._brokerFactory.createMessageBroker(RENDERER_CHANNEL);
this._bus.initChannel(EVENT_CHANNEL);
this._eventDispatcher = new EventDispatcher(this._bus.to(EVENT_CHANNEL), this._serializer);
broker.registerMethod("renderComponent", [RenderComponentType, PRIMITIVE],
bind(this._renderComponent, this));
broker.registerMethod("selectRootElement", [RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._selectRootElement, this));
broker.registerMethod("createElement",
[RenderStoreObject, RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._createElement, this));
broker.registerMethod("createViewRoot", [RenderStoreObject, RenderStoreObject, PRIMITIVE],
bind(this._createViewRoot, this));
broker.registerMethod("createTemplateAnchor", [RenderStoreObject, RenderStoreObject, PRIMITIVE],
bind(this._createTemplateAnchor, this));
broker.registerMethod("createText",
[RenderStoreObject, RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._createText, this));
broker.registerMethod("projectNodes", [RenderStoreObject, RenderStoreObject, RenderStoreObject],
bind(this._projectNodes, this));
broker.registerMethod("attachViewAfter",
[RenderStoreObject, RenderStoreObject, RenderStoreObject],
bind(this._attachViewAfter, this));
broker.registerMethod("detachView", [RenderStoreObject, RenderStoreObject],
bind(this._detachView, this));
broker.registerMethod("destroyView", [RenderStoreObject, RenderStoreObject, RenderStoreObject],
bind(this._destroyView, this));
broker.registerMethod("setElementProperty",
[RenderStoreObject, RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._setElementProperty, this));
broker.registerMethod("setElementAttribute",
[RenderStoreObject, RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._setElementAttribute, this));
broker.registerMethod("setBindingDebugInfo",
[RenderStoreObject, RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._setBindingDebugInfo, this));
broker.registerMethod("setElementClass",
[RenderStoreObject, RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._setElementClass, this));
broker.registerMethod("setElementStyle",
[RenderStoreObject, RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._setElementStyle, this));
broker.registerMethod("invokeElementMethod",
[RenderStoreObject, RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._invokeElementMethod, this));
broker.registerMethod("setText", [RenderStoreObject, RenderStoreObject, PRIMITIVE],
bind(this._setText, this));
broker.registerMethod("listen", [RenderStoreObject, RenderStoreObject, PRIMITIVE, PRIMITIVE],
bind(this._listen, this));
broker.registerMethod("listenGlobal", [RenderStoreObject, PRIMITIVE, PRIMITIVE, PRIMITIVE],
bind(this._listenGlobal, this));
broker.registerMethod("listenDone", [RenderStoreObject, RenderStoreObject],
bind(this._listenDone, this));
}
示例2: constructor
constructor(brokerFactory: ServiceMessageBrokerFactory, private _renderCompiler: RenderCompiler) {
var broker = brokerFactory.createMessageBroker(RENDER_COMPILER_CHANNEL);
broker.registerMethod("compileHost", [RenderDirectiveMetadata],
bind(this._renderCompiler.compileHost, this._renderCompiler),
ProtoViewDto);
broker.registerMethod("compile", [ViewDefinition],
bind(this._renderCompiler.compile, this._renderCompiler), ProtoViewDto);
broker.registerMethod(
"mergeProtoViewsRecursively", [RenderProtoViewRef],
bind(this._renderCompiler.mergeProtoViewsRecursively, this._renderCompiler),
RenderProtoViewMergeMapping);
}
示例3: start
start(): void {
var broker = this._brokerFactory.createMessageBroker(RENDERER_CHANNEL);
this._bus.initChannel(EVENT_CHANNEL);
broker.registerMethod("registerComponentTemplate", [RenderComponentTemplate],
bind(this._renderer.registerComponentTemplate, this._renderer));
broker.registerMethod("createProtoView", [PRIMITIVE, WebWorkerTemplateCmd, PRIMITIVE],
bind(this._createProtoView, this));
broker.registerMethod("createRootHostView",
[RenderProtoViewRef, PRIMITIVE, PRIMITIVE, PRIMITIVE],
bind(this._createRootHostView, this));
broker.registerMethod("createView", [RenderProtoViewRef, PRIMITIVE, PRIMITIVE],
bind(this._createView, this));
broker.registerMethod("destroyView", [RenderViewRef], bind(this._destroyView, this));
broker.registerMethod("attachFragmentAfterFragment", [RenderFragmentRef, RenderFragmentRef],
bind(this._renderer.attachFragmentAfterFragment, this._renderer));
broker.registerMethod("attachFragmentAfterElement", [WebWorkerElementRef, RenderFragmentRef],
bind(this._renderer.attachFragmentAfterElement, this._renderer));
broker.registerMethod("detachFragment", [RenderFragmentRef],
bind(this._renderer.detachFragment, this._renderer));
broker.registerMethod("hydrateView", [RenderViewRef],
bind(this._renderer.hydrateView, this._renderer));
broker.registerMethod("dehydrateView", [RenderViewRef],
bind(this._renderer.dehydrateView, this._renderer));
broker.registerMethod("setText", [RenderViewRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setText, this._renderer));
broker.registerMethod("setElementProperty", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setElementProperty, this._renderer));
broker.registerMethod("setElementAttribute", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setElementAttribute, this._renderer));
broker.registerMethod("setBindingDebugInfo", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setBindingDebugInfo, this._renderer));
broker.registerMethod("setElementClass", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setElementClass, this._renderer));
broker.registerMethod("setElementStyle", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setElementStyle, this._renderer));
broker.registerMethod("invokeElementMethod", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.invokeElementMethod, this._renderer));
broker.registerMethod("setEventDispatcher", [RenderViewRef],
bind(this._setEventDispatcher, this));
}
示例4: constructor
constructor(brokerFactory: ServiceMessageBrokerFactory, private _bus: MessageBus,
private _serializer: Serializer,
private _renderViewWithFragmentsStore: RenderViewWithFragmentsStore,
private _renderer: Renderer) {
var broker = brokerFactory.createMessageBroker(RENDERER_CHANNEL);
broker.registerMethod("createRootHostView",
[RenderProtoViewRef, PRIMITIVE, PRIMITIVE, PRIMITIVE],
bind(this._createRootHostView, this));
broker.registerMethod("createView", [RenderProtoViewRef, PRIMITIVE, PRIMITIVE],
bind(this._createView, this));
broker.registerMethod("destroyView", [RenderViewRef],
bind(this._renderer.destroyView, this._renderer));
broker.registerMethod("attachFragmentAfterFragment", [RenderFragmentRef, RenderFragmentRef],
bind(this._renderer.attachFragmentAfterFragment, this._renderer));
broker.registerMethod("attachFragmentAfterElement", [WebWorkerElementRef, RenderFragmentRef],
bind(this._renderer.attachFragmentAfterElement, this._renderer));
broker.registerMethod("detachFragment", [RenderFragmentRef],
bind(this._renderer.detachFragment, this._renderer));
broker.registerMethod("hydrateView", [RenderViewRef],
bind(this._renderer.hydrateView, this._renderer));
broker.registerMethod("dehydrateView", [RenderViewRef],
bind(this._renderer.dehydrateView, this._renderer));
broker.registerMethod("setText", [RenderViewRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setText, this._renderer));
broker.registerMethod("setElementProperty", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setElementProperty, this._renderer));
broker.registerMethod("setElementAttribute", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setElementAttribute, this._renderer));
broker.registerMethod("setElementClass", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setElementClass, this._renderer));
broker.registerMethod("setElementStyle", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.setElementStyle, this._renderer));
broker.registerMethod("invokeElementMethod", [WebWorkerElementRef, PRIMITIVE, PRIMITIVE],
bind(this._renderer.invokeElementMethod, this._renderer));
broker.registerMethod("setEventDispatcher", [RenderViewRef],
bind(this._setEventDispatcher, this));
}
示例5: start
start(): void {
var broker = this._brokerFactory.createMessageBroker(XHR_CHANNEL);
broker.registerMethod("get", [PRIMITIVE], bind(this._xhr.get, this._xhr), PRIMITIVE);
}
示例6: constructor
constructor(brokerFactory: ServiceMessageBrokerFactory, private _xhr: XHR) {
var broker = brokerFactory.createMessageBroker(XHR_CHANNEL);
broker.registerMethod("get", [PRIMITIVE], bind(this._xhr.get, this._xhr), PRIMITIVE);
}
示例7: createServiceMessageBroker
createServiceMessageBroker(channel: string, runInZone: boolean = true): ServiceMessageBroker {
return this._serviceMessageBrokerFactory.createMessageBroker(channel, runInZone);
}