Class JPropertyDescriptor
- Namespace
- Newtonsoft.Json.Linq
- Assembly
- Newtonsoft.Json.dll
Represents a view of a JProperty.
public class JPropertyDescriptor : PropertyDescriptor
- Inheritance
-
JPropertyDescriptor
- Inherited Members
Constructors
JPropertyDescriptor(string, Type)
Initializes a new instance of the JPropertyDescriptor class.
public JPropertyDescriptor(string name, Type propertyType)
Parameters
Properties
ComponentType
When overridden in a derived class, gets the type of the component this property is bound to.
public override Type ComponentType { get; }
Property Value
- Type
A Type that represents the type of component this property is bound to. When the GetValue(object) or SetValue(object, object) methods are invoked, the object specified might be an instance of this type.
IsReadOnly
When overridden in a derived class, gets a value indicating whether this property is read-only.
public override bool IsReadOnly { get; }
Property Value
- bool
true if the property is read-only; otherwise, false.
NameHashCode
Gets the hash code for the name of the member.
protected override int NameHashCode { get; }
Property Value
PropertyType
When overridden in a derived class, gets the type of the property.
public override Type PropertyType { get; }
Property Value
Methods
CanResetValue(object)
When overridden in a derived class, returns whether resetting an object changes its value.
public override bool CanResetValue(object component)
Parameters
componentobjectThe component to test for reset capability.
Returns
- bool
true if resetting the component changes its value; otherwise, false.
GetValue(object)
When overridden in a derived class, gets the current value of the property on a component.
public override object GetValue(object component)
Parameters
componentobjectThe component with the property for which to retrieve the value.
Returns
- object
The value of a property for a given component.
ResetValue(object)
When overridden in a derived class, resets the value for this property of the component to the default value.
public override void ResetValue(object component)
Parameters
componentobjectThe component with the property value that is to be reset to the default value.
SetValue(object, object)
When overridden in a derived class, sets the value of the component to a different value.
public override void SetValue(object component, object value)
Parameters
componentobjectThe component with the property value that is to be set.
valueobjectThe new value.
ShouldSerializeValue(object)
When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
public override bool ShouldSerializeValue(object component)
Parameters
componentobjectThe component with the property to be examined for persistence.
Returns
- bool
true if the property should be persisted; otherwise, false.