本文整理汇总了C#中IMapDataDestination类的典型用法代码示例。如果您正苦于以下问题:C# IMapDataDestination类的具体用法?C# IMapDataDestination怎么用?C# IMapDataDestination使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IMapDataDestination类属于命名空间,在下文中一共展示了IMapDataDestination类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MapInternal
protected override void MapInternal(Reflection.InitContext initContext, IMapDataSource source, object sourceObject, IMapDataDestination dest, object destObject, params object[] parameters)
{
FullObjectMapper mapper = (FullObjectMapper)initContext.ObjectMapper;
IDataReader dataReader = (IDataReader)sourceObject;
//int[] index = GetIndex(source, dest);
//IValueMapper[] mappers = GetValueMappers(source, dest, index);
//foreach (var valueMapper in mappers)
//{
//}
InitSchema(dataReader);
if (mapper.ColParent)
{
FillObject(mapper, dataReader, destObject);
while (dataReader.Read())
{
destObject = FillObject(destObject, mapper, dataReader);
}
}
else
FillObject(mapper, dataReader, destObject);
}
示例2: Map
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex)
{
if(source.IsNull(sourceObject, sourceIndex))
{
destination.SetString(destinationObject, destinationIndex, null);
}
else
{
destination.SetString(destinationObject, destinationIndex, source.GetString(sourceObject, sourceIndex));
}
}
示例3: Map
public void Map(
IMapDataSource source, object sourceObject, int sourceIndex,
IMapDataDestination dest, object destObject, int destIndex)
{
dest.SetValue(destObject, destIndex, source.GetValue(sourceObject, sourceIndex));
//object o = source.GetValue(sourceObject, sourceIndex);
//if (o == null) dest.SetNull (destObject, destIndex);
//else dest.SetValue(destObject, destIndex, o);
}
示例4: Map
public abstract void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex);
示例5: SimpleDestinationListMapper
public SimpleDestinationListMapper(IMapDataDestination mapper)
{
_mapper = mapper;
}