Gets a value of a data object property
Namespace: Dapfor.Net.DataAssembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)
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(Grid grid)
{
grid.Rows.Add(new TestClass());
} |
Inheritance Hierarchy
See Also