Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: TElement GetField(TElement, string, string)

  • Declared in: RT.Serialization.IClassifyFormat<TElement>
  • Interface method
  • Abstract

Declaration

public TElement GetField(
    TElement element,
    string fieldName,
    string declaringType
)

Summary

Returns the sub-element pertaining to the specified field.

Parameters

TElementelement The element that represents an object.
stringfieldName The name of the field within the object whose sub-element is sought.
stringdeclaringType The assembly-qualified name of the type that declares the field. (This can be null if the field name is unique within the type of the object being deserialized.)

Returns

The sub-element for the specified field.

Remarks

Classify calls IClassifyFormat<TElement>.HasField(TElement, string, string) first for each field and only calls this method if IClassifyFormat<TElement>.HasField(TElement, string, string) returned true.

This should return the same element that was passed into IClassifyFormat<TElement>.FormatObject(IEnumerable<ObjectFieldInfo<TElement>>) for the same fieldName.