本文整理汇总了C#中Property.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Property.Equals方法的具体用法?C# Property.Equals怎么用?C# Property.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Property
的用法示例。
在下文中一共展示了Property.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteInlineTypeMap
/// <summary>
/// Write an inline type mapping for the TypeReference specified
/// </summary>
private void WriteInlineTypeMap(XmlWriter xw, TypeReference tr, List<TypeReference> genericSupplier, string interactionName, Property.PropertyTypes srcType, Property.PropertyTypes destType)
{
List<String> collectionTypes = new List<string>() { "SET", "LIST", "QSET", "DSET", "HIST", "BAG" };
if (collectionTypes.Contains(tr.CoreDatatypeName ?? "") && tr.GenericSupplier.Count == 1) // Collection
tr = tr.GenericSupplier[0];
else if (collectionTypes.Contains(tr.CoreDatatypeName ?? ""))
{
System.Diagnostics.Trace.WriteLine(String.Format("Can't handle a collection ({0}) with more than one generic parameter", tr.ToString()), "warn");
return;
}
string schemaFriendlyName = MakeSchemaFriendlyCoreType(tr);
// Map the type
if (dataTypeMaps.ContainsKey(schemaFriendlyName ?? "")) // simple map
{
if (dataTypeMaps[schemaFriendlyName ?? ""].LocalName == "for-each")
{
// Call the template for strait map only if the property type hasn't changed
if (srcType.Equals(destType))
{
xw.WriteStartElement("call-template", NS_XSLT);
xw.WriteAttributeString("name", "dtMap");
//xw.WriteStartElement("copy-of", NS_XSLT);
//xw.WriteAttributeString("select", ".");
//xw.WriteEndElement();
xw.WriteEndElement(); // call-template
}
else
{
xw.WriteStartElement("value-of", NS_XSLT);
xw.WriteAttributeString("select", ".");
xw.WriteEndElement(); // value-of
}
}
else
dataTypeMaps[schemaFriendlyName ?? ""].WriteTo(xw);
}
else if (IsRecursiveReference(tr, tr, new List<string>())) // complex map
WriteInlineApplyTemplate(xw, tr.Container as Property, tr, genericSupplier);
else if (tr.Class != null)
WriteInlineForeachCollapse(xw, tr, genericSupplier, interactionName);
//else
//System.Diagnostics.Debugger.Break();
}