本文整理汇总了C#中Condition.Parse方法的典型用法代码示例。如果您正苦于以下问题:C# Condition.Parse方法的具体用法?C# Condition.Parse怎么用?C# Condition.Parse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Condition
的用法示例。
在下文中一共展示了Condition.Parse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parse
public override void Parse(XmlNode dom)
{
this.Name = dom.Attributes["Name"].Value;
this.TypeName = dom.Attributes["TypeName"].Value;
this.StoreEntitySet = dom.Attributes["StoreEntitySet"].Value;
foreach (XmlNode n in dom.ChildNodes)
{
if (n.Name == "EndProperty")
{
var end = new EndProperty();
end.Parse(n);
end.Parent = this;
this.EndPropertys.Add(end.Name, end);
}
else if (n.Name == "Condition")
{
var condition = new Condition();
condition.Parse(dom);
condition.Parent = this;
this.Condition = condition;
}
}
base.Parse(dom);
}
示例2: ParseSingleElement
internal override bool ParseSingleElement(ICollection<XName> unprocessedElements, XElement elem)
{
if (elem.Name.LocalName == EndProperty.ElementName)
{
var ep = new EndProperty(this, elem);
ep.Parse(unprocessedElements);
_endProperties.Add(ep);
}
else if (elem.Name.LocalName == Condition.ElementName)
{
var c = new Condition(this, elem);
c.Parse(unprocessedElements);
_conditions.Add(c);
}
else if (elem.Name.LocalName == QueryView.ElementName)
{
Debug.Assert(
_queryView == null, "There could only be 1 instance of QueryView element inside AssociationSetMapping element.");
_queryView = new QueryView(this, elem);
_queryView.Parse(unprocessedElements);
}
else
{
return base.ParseSingleElement(unprocessedElements, elem);
}
return true;
}