xpo-devexpress-dot-xpo-dot-metadata-dot-xpmemberinfo-dot-getvalue-x28-system-dot-object-x29.md
When implemented in a derived class, returns the property’s value.
Namespace : DevExpress.Xpo.Metadata
Assembly : DevExpress.Xpo.v25.2.dll
NuGet Package : DevExpress.Xpo
public abstract object GetValue(
object theObject
)
Public MustOverride Function GetValue(
theObject As Object
) As Object
| Name | Type | Description |
|---|---|---|
| theObject | Object |
An object whose value will be returned.
|
| Type | Description |
|---|---|
| Object |
An object which represents the property’s value.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetValue(Object) 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-clone-a-persistent-object-e804/CS/SimpleObject/CloneHelper.cs#L53
if (memberInfo.ReferenceType != null) {
object value = memberInfo.GetValue(source);
if (value != null) {
get {
if (member.GetValue(host) == null) return null;
return string.Format("{0}{1}.{2}", member.Name, member.Owner.GetId(host), extension);
XPO_how-to-implement-odata4-service-with-xpo-netcore/CS/ODataService/Helpers/ApiHelper.cs#L42
var reference = uow.GetObjectByKey(memberInfo.CollectionElementType, relatedKey);
var collection = (IList)memberInfo.GetValue(entity);
collection.Add(reference);
XPO_how-to-implement-odata4-service-with-xpo/CS/ODataService/Helpers/ApiHelper.cs#L51
var reference = uow.GetObjectByKey(memberInfo.CollectionElementType, relatedKey);
var collection = (IList)memberInfo.GetValue(entity);
collection.Add(reference);
xpo-json-serialization/CS/XpoSerialization/JsonConverters.cs#L25
writer.WritePropertyName(member.Name);
object propertyValue = member.GetValue(theObject);
if(propertyValue != null && member.ReferenceType != null && !member.IsAggregated && !EvaluatorProperty.GetIsThisProperty(member.Name)) {
XPO_how-to-clone-a-persistent-object-e804/VB/SimpleObject/CloneHelper.vb#L56
If memberInfo.ReferenceType IsNot Nothing Then
Dim value As Object = memberInfo.GetValue(source)
If value IsNot Nothing Then
Get
If member.GetValue(host) Is Nothing Then
Return Nothing
See Also