Adf.Base.Domain.GuidPropertyParser.SetValue C# (CSharp) Method

SetValue() public method

Sets the new value for a specific property on an object.
Unable to convert the new value to the specified property. null reference is not accept as a valid argument.
public SetValue ( object target, PropertyInfo pi, object newvalue, CultureInfo culture = null ) : void
target object Target object to set the property.
pi System.Reflection.PropertyInfo Property info for the property to set.
newvalue object Value for the property.
culture System.Globalization.CultureInfo
return void
        public void SetValue(object target, PropertyInfo pi, object newvalue, CultureInfo culture = null)
        {
            Guid key = new Guid(newvalue.ToString());

            pi.SetValue(target, key, null);
        }