36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
// /**
|
|
// * File: NativePropertyDescriptor.cs
|
|
// * Author: haraldwolff
|
|
// *
|
|
// * This file and it's content is copyrighted by the Author and / or copyright holder.
|
|
// * Any use wihtout proper permission is illegal and may lead to legal actions.
|
|
// *
|
|
// *
|
|
// **/
|
|
using System;
|
|
using System.Reflection;
|
|
using System.ComponentModel;
|
|
namespace ln.manage
|
|
{
|
|
public class NativePropertyDescriptor : PropertyDescriptor
|
|
{
|
|
|
|
public Action<object, object> SetValue { get; }
|
|
public Func<object, object> GetValue { get; }
|
|
|
|
public NativePropertyDescriptor(IManagedContainer managedContainer, FieldInfo fieldInfo)
|
|
: base(managedContainer, fieldInfo)
|
|
{
|
|
GetValue = fieldInfo.GetValue;
|
|
SetValue = fieldInfo.SetValue;
|
|
}
|
|
public NativePropertyDescriptor(IManagedContainer managedContainer, PropertyInfo propertyInfo)
|
|
: base(managedContainer, propertyInfo)
|
|
{
|
|
GetValue = propertyInfo.GetValue;
|
|
SetValue = propertyInfo.SetValue;
|
|
}
|
|
|
|
}
|
|
}
|