IntermediateTarget
Avalanche.DataType.IntermediateTarget targets for a default .NET type of a datatype type.
DataType | .NET |
---|---|
RecordType | Tuple<..>, ValueTuple<..> |
ListType | List<T> |
MapType | Dictionary<K,V> |
StringType | String |
FloatingPointType | float, double, decimal, BigDecimal |
IntegerType | bool, byte, sbyte, short, ushort, int, uint, long, uint, Int128, UInt128, BigInteger |
OneOfType | Avalanche.OneOf |
AnyType | Avalanche.Any |
Nullable<T> |
IntermediateTarget converts IDataType to NetType target.
// Create service
IService service = Services.Create(Avalanche.DataType.Net.Module.Instance);
// Create Datatype
IRecordType recordType = new RecordType
{
Name = "MyType",
Unassignable = false,
Referable = true,
};
recordType.AddField("Id", DataTypes.Fixed32.Instance, 1, true);
//
var target = new IntermediateTarget(recordType);
//
Type type = service.GetRequired<TypeRequest, Type>(new TypeRequest(target));