FromTextAttribute Class

Marks an instance method to be notified with the text inside the XML element.

C#
[AttributeUsage(System.AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public sealed class FromTextAttribute : Attribute
Inheritance
FromTextAttribute
Attributes

Remarks

If the Oxbinder<T> finds the XML elements containing a text node, it invokes the annotated method with the value that the text node contains.

This annotation must mark an instance method, of which the return type must be void, and that must have a single parameter whose type is string. And the class that has the instance method must be annotated with ForElementAttribute.

If there is an instance method annotated with FromTextAttribute in a class, the class must not have other instance methods annotated with it, instance fields annotated with ForTextAttribute, and static and final fields annotated with ElementSchemaAttribute.

Methods

Equals(object) (Inherited from Attribute)
GetHashCode() (Inherited from Attribute)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)
ToString() (Inherited from object)

See Also