本文整理汇总了TypeScript中angular2/src/facade/lang.deserializeEnum函数的典型用法代码示例。如果您正苦于以下问题:TypeScript deserializeEnum函数的具体用法?TypeScript deserializeEnum怎么用?TypeScript deserializeEnum使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deserializeEnum函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: _deserializeProtoViewDto
private _deserializeProtoViewDto(obj: StringMap<string, any>): ProtoViewDto {
return new ProtoViewDto({
render: this._protoViewStore.deserialize(obj["render"]),
elementBinders: this.deserialize(obj['elementBinders'], RenderElementBinder),
variableBindings: this.objectToMap(obj['variableBindings']),
textBindings: this.deserialize(obj['textBindings'], ASTWithSource, "interpolation"),
type: deserializeEnum(obj['type'], this._enumRegistry.get(ViewType)),
transitiveNgContentCount: obj['transitiveNgContentCount']
});
}
示例2: _deserializeViewDefinition
private _deserializeViewDefinition(obj: StringMap<string, any>): ViewDefinition {
return new ViewDefinition({
componentId: obj['componentId'],
templateAbsUrl: obj['templateAbsUrl'], template: obj['template'],
directives: this.deserialize(obj['directives'], RenderDirectiveMetadata),
styleAbsUrls: obj['styleAbsUrls'],
styles: obj['styles'],
encapsulation:
deserializeEnum(obj['encapsulation'], this._enumRegistry.get(ViewEncapsulation))
});
}
示例3: _deserializeElementPropertyBinding
private _deserializeElementPropertyBinding(map: StringMap<string, any>): ElementPropertyBinding {
var type = deserializeEnum(map['type'], this._enumRegistry.get(PropertyBindingType));
var ast = this.deserialize(map['astWithSource'], ASTWithSource, "binding");
return new ElementPropertyBinding(type, ast, map['property'], map['unit']);
}