xpo-devexpress-dot-xpo-dot-metadata-dot-xpclassinfo-dot-findmember-x28-system-dot-string-x29.md
Returns information on the member with the specified name.
Namespace : DevExpress.Xpo.Metadata
Assembly : DevExpress.Xpo.v25.2.dll
NuGet Package : DevExpress.Xpo
public XPMemberInfo FindMember(
string memberName
)
Public Function FindMember(
memberName As String
) As XPMemberInfo
| Name | Type | Description |
|---|---|---|
| memberName | String |
A String value which specifies the member’s name.
|
| Type | Description |
|---|---|
| XPMemberInfo |
An XPMemberInfo object which represents member metadata. null ( Nothing in Visual Basic) if a member with the specified name isn’t found.
|
The FindMember method scans the XPClassInfo.OwnMembers collection for an element whose XPMemberInfo.Name property’s value matches the memberName parameter. If an element with the specified name isn’t found, the FindMember method scans the XPClassInfo.OwnMembers collection of the base class (XPClassInfo.BaseClass).
The following code snippets (auto-collected from DevExpress Examples) contain references to the FindMember(String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
XPO_how-to-implement-odata4-service-with-xpo-netcore/CS/ODataService/Helpers/ApiHelper.cs#L35
var classInfo = uow.GetClassInfo<TEntity>();
var memberInfo = classInfo.FindMember(navigationProperty);
if(memberInfo == null) {
XPO_how-to-implement-odata4-service-with-xpo/CS/ODataService/Helpers/ApiHelper.cs#L44
var classInfo = uow.GetClassInfo<TEntity>();
var memberInfo = classInfo.FindMember(navigationProperty);
if(memberInfo == null) {
XPO_how-to-persist-metadata-e269/CS/MetadataObjects.cs#L84
internal XPMemberInfo CreateMember(XPClassInfo owner) {
XPMemberInfo result = owner.FindMember(Name);
if(result == null)
System.Diagnostics.Debug.Assert(xpc[0].Name == "bbb");
XPMemberInfo mi = xpc[0].ClassInfo.FindMember("DisplayName");
System.Diagnostics.Debug.Assert(mi!= null && mi.IsReadOnly && mi.IsAliased);
XPO_how-to-persist-metadata-e269/VB/MetadataObjects.vb#L125
Friend Function CreateMember(ByVal owner As XPClassInfo) As XPMemberInfo
Dim result As XPMemberInfo = owner.FindMember(Name)
If result Is Nothing Then result = CreateMemberCore(owner)
See Also