Gets a value of a data object property
Namespace: Dapfor.Wpf.DataAssembly: Dapfor.Wpf (in Dapfor.Wpf.dll) Version: 4.1.0.26317 (4.1.0.26317)
Syntax
C# |
---|
public sealed class Getter<T> : IGetter
|
Visual Basic |
---|
Public NotInheritable Class Getter(Of T)
Implements IGetter |
Visual C++ |
---|
generic<typename T>
public ref class Getter sealed : IGetter |
F# |
---|
[<SealedAttribute>]
type Getter<'T> =
class
interface IGetter
end |
Type Parameters
- T
- Type of a value, returned by property of data object
Remarks
Examples
| Copy |
---|
public class TestClass : IGetAccelerator
{
private int intValue;
private double doubleValue;
public int IntValue
{
get { return intValue; }
set { intValue = value; }
}
public double DoubleValue
{
get { return doubleValue; }
set { doubleValue = value; }
}
public IGetter GetGetter(IDataField field)
{
switch (field.Id)
{
case "IntValue":
return new Getter<int>(delegate { return IntValue; });
case "DoubleValue":
return new ValueGetter(DoubleValue);
}
return null;
}
}
public void HowToUseExample(GridControl grid)
{
grid.Rows.Add(new TestClass());
} |
Inheritance Hierarchy
See Also