本文整理汇总了C#中System.Data.Linq.Mapping.MetaType.GetInheritanceType方法的典型用法代码示例。如果您正苦于以下问题:C# MetaType.GetInheritanceType方法的具体用法?C# MetaType.GetInheritanceType怎么用?C# MetaType.GetInheritanceType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Data.Linq.Mapping.MetaType
的用法示例。
在下文中一共展示了MetaType.GetInheritanceType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetRequiredInheritanceDataMember
/// <summary>
/// Get the MetaDataMember from the given table. Look in the inheritance hierarchy.
/// The member is expected to be there and an exception will be thrown if it isn't.
/// </summary>
/// <param name="type">The hierarchy type that should have the member.</param>
/// <param name="mi">The member to retrieve.</param>
/// <returns>The MetaDataMember for the type.</returns>
private static MetaDataMember GetRequiredInheritanceDataMember(MetaType type, MemberInfo mi) {
System.Diagnostics.Debug.Assert(type != null);
System.Diagnostics.Debug.Assert(mi != null);
MetaType root = type.GetInheritanceType(mi.DeclaringType);
if (root == null) {
throw Error.UnmappedDataMember(mi, mi.DeclaringType, type);
}
return root.GetDataMember(mi);
}
示例2: StandardTrackedObject
internal StandardTrackedObject(StandardChangeTracker tracker, MetaType type, object current, object original) {
if (current == null) {
throw Error.ArgumentNull("current");
}
this.tracker = tracker;
this.type = type.GetInheritanceType(current.GetType());
this.current = current;
this.original = original;
this.state = State.PossiblyModified;
dirtyMemberCache = new BitArray(this.type.DataMembers.Count);
}