System.ComponentModel.PropertyDescriptor.GetValue C# (CSharp) Method

GetValue() public abstract method

When overridden in a derived class, gets the current value of the property on a component.

public abstract GetValue ( object component ) : object
component object
return object
        public abstract object GetValue(object component);

Usage Example

Example #1
0
 /// <summary>
 /// Processes the property.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <param name="property">The property.</param>
 private static void ProcessProperty(object value, PropertyDescriptor property)
 {
     if (property.Attributes.Contains(AntiXssHtmlText))
     {
         property.SetValue(value, Sanitizer.GetSafeHtmlFragment((string) property.GetValue(value)));
     }
     else if (property.Attributes.Contains(AntiXssIgnore))
     {
         // do nothing this contains special text
     }
     else
     {
         property.SetValue(value, HttpUtility.HtmlDecode(HttpUtility.HtmlEncode((string)property.GetValue(value))));
     }
 }
All Usage Examples Of System.ComponentModel.PropertyDescriptor::GetValue