本文整理汇总了C#中XPClassInfo.FindAttributeInfo方法的典型用法代码示例。如果您正苦于以下问题:C# XPClassInfo.FindAttributeInfo方法的具体用法?C# XPClassInfo.FindAttributeInfo怎么用?C# XPClassInfo.FindAttributeInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XPClassInfo
的用法示例。
在下文中一共展示了XPClassInfo.FindAttributeInfo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsMappedToParent
bool IsMappedToParent(XPClassInfo xpClassInfo) {
var attributeInfo = xpClassInfo.FindAttributeInfo(typeof(MapInheritanceAttribute));
return attributeInfo != null &&
((MapInheritanceAttribute)attributeInfo).MapType == MapInheritanceType.ParentTable;
}
示例2: AllOwnMembers
bool AllOwnMembers(XPClassInfo classInfo) {
return ((InitialDataAttribute)classInfo.FindAttributeInfo(typeof(InitialDataAttribute))).AllOwnMembers;
}
示例3: CaseInSensitive
bool CaseInSensitive(XPClassInfo xpClassInfo) {
var attribute = xpClassInfo.FindAttributeInfo(typeof(InitialDataAttribute)) as InitialDataAttribute;
return attribute == null || attribute.CaseInSensitive;
}
示例4: BaseMemberInfos
Dictionary<string, XPMemberInfo> BaseMemberInfos(XPClassInfo outputClassInfo) {
var members = ((InitialDataAttribute)outputClassInfo.FindAttributeInfo(typeof(InitialDataAttribute))).BaseMembers;
var xpMemberInfos = new Dictionary<string, XPMemberInfo>();
if (members != null) {
var baseMembers = members.Split(',');
foreach (var baseMember in baseMembers) {
var strings = baseMember.Split('|');
var xpMemberInfo = outputClassInfo.FindMember(strings[0]);
xpMemberInfos.Add(strings[strings.Length - 1], xpMemberInfo);
}
}
return xpMemberInfos;
}
示例5: CreateKey
void CreateKey(XPClassInfo outputClassInfo, XPClassInfo classInfo) {
var initialDataAttribute = ((InitialDataAttribute) outputClassInfo.FindAttributeInfo(typeof (InitialDataAttribute)));
var inputKeyPropertyName = initialDataAttribute.InputKeyPropertyName;
if (!String.IsNullOrEmpty(inputKeyPropertyName) ) {
var member = classInfo.FindMember(inputKeyPropertyName);
if (member == null)
classInfo.CreateMember(inputKeyPropertyName, initialDataAttribute.inputKeyPropertyType).AddAttribute(new KeyAttribute(true));
else {
member.AddAttribute(new KeyAttribute(true));
}
}
else if (!HasKey(classInfo)) {
classInfo.CreateMember("Oid_" + classInfo.TableName, typeof(int)).AddAttribute(new KeyAttribute(true));
}
}