public MetaEntityClass FindClass(string className) { if (MetaEntityTools.IsMultinodeExpressionPath(className)) { return(Parent.SelectTargetByPath(className) as MetaEntityClass); } return(Declarations.FirstOrDefault(x => x.name.Equals(className))); }
public IMetaEntityExpressionTarget SelectTarget(string expressionPathNode) { if (MetaEntityTools.IsMultinodeExpressionPath(expressionPathNode)) { return(this.SelectTargetByPath(expressionPathNode)); } if (propertTypeClassDefinition != null) { return(propertTypeClassDefinition.SelectTarget(expressionPathNode)); } return(this); }
public MetaEntityClass FindClass(string className) { if (MetaEntityTools.IsMultinodeExpressionPath(className)) { return(this.SelectTargetByPath(className) as MetaEntityClass); } foreach (var ns in Namespaces) { var cs = ns.FindClass(className); if (cs != null) { return(cs); } } return(null); }
public override IMetaEntityExpressionTarget SelectTarget(string expressionPathNode) { if (MetaEntityTools.IsMultinodeExpressionPath(expressionPathNode)) { return(Parent.SelectTargetByPath(expressionPathNode)); } var head = Declarations.FirstOrDefault(x => x.name.Equals(expressionPathNode)); if (head == null) { MetaEntityClass item = new MetaEntityClass(); item.name = expressionPathNode; item.Parent = this; Declarations.Add(item); head = item; } return(head); }
public override IMetaEntityExpressionTarget SelectTarget(string expressionPathNode) { if (MetaEntityTools.IsMultinodeExpressionPath(expressionPathNode)) { return(Parent.SelectTargetByPath(expressionPathNode)); } IMetaEntityExpressionTarget head = this; MetaEntityClassProperty property = this.Properties.FirstOrDefault(x => x.name == expressionPathNode); if (property == null) { property = new MetaEntityClassProperty() { name = expressionPathNode, type = MetaEntityClassPropertyType.none }; AddProperty(property, false); } return(property); }
public override IMetaEntityExpressionTarget SelectTarget(string expressionPathNode) { if (MetaEntityTools.IsMultinodeExpressionPath(expressionPathNode)) { return(this.SelectTargetByPath(expressionPathNode)); } var head = Namespaces.FirstOrDefault(x => x.name.Equals(expressionPathNode)); if (head == null) { MetaEntityNamespace item = new MetaEntityNamespace(); item.name = expressionPathNode; item.Parent = this; Namespaces.Add(item); head = item; } else { head.Parent = this; } return(head); }