本文整理汇总了C#中System.Property.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Property.Equals方法的具体用法?C# Property.Equals怎么用?C# Property.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Property
的用法示例。
在下文中一共展示了Property.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsDependentSidePropertyInAssociation
// detects whether the S-side Property represents the dependent side of an Association (e.g. for Split Entity or TPT or C-side Conditions)
private static bool IsDependentSidePropertyInAssociation(Property storageProperty)
{
if (storageProperty == null
|| storageProperty.EntityModel.IsCSDL)
{
Debug.Fail(
"should only receive a storage-side Property. Received property: "
+ (storageProperty == null ? "NULL" : storageProperty.ToPrettyString()));
return true; // returning true will mean this table's SGP settings will not be adjusted
}
foreach (var propRef in storageProperty.GetAntiDependenciesOfType<PropertyRef>())
{
var assoc = propRef.GetParentOfType(typeof(Association)) as Association;
if (assoc == null)
{
// no Association parent - so ignore this PropertyRef
continue;
}
foreach (var prop in assoc.DependentRoleProperties)
{
if (storageProperty.Equals(prop))
{
// found storage property on the dependent side which is part of an association
return true;
}
}
}
return false;
}