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