本文整理汇总了C#中ObjectResult.GetNextResult方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectResult.GetNextResult方法的具体用法?C# ObjectResult.GetNextResult怎么用?C# ObjectResult.GetNextResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectResult
的用法示例。
在下文中一共展示了ObjectResult.GetNextResult方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GameAndAreaAndRoomResultsFromDb
public GameData GameAndAreaAndRoomResultsFromDb(ObjectResult<ReadGameStateForPlayer_Result> gameStateResults)
{
GameState gameState = null;
AreaData areaData = null;
gameState = gameStateResults.Select(x => new GameState() { LastTime = x.LastTime, StopTime = x.StopTime }).SingleOrDefault();
var areaResults = gameStateResults.GetNextResult<ReadArea_Result>();
areaData = AreaAndRoomResultsFromDb(areaResults);
return new GameData(gameState, areaData.Item1, areaData.Item2, areaData.Item3, areaData.Item4);
}
示例2: AreaAndRoomResultsFromDb
public AreaData AreaAndRoomResultsFromDb(ObjectResult<ReadArea_Result> areaResults)
{
Area area = null;
RoomData roomData = null;
area = TypeAdapter.Adapt<Area>(areaResults.Single());
var roomResults = areaResults.GetNextResult<ReadRoom_Result>();
roomData = RoomResultsFromDB(roomResults);
return new AreaData(area, roomData.Item1, roomData.Item2, roomData.Item3);
}
示例3: RoomResultsFromDB
public RoomData RoomResultsFromDB(ObjectResult<ReadRoom_Result> roomResults)
{
Room room = null;
IEnumerable<RoomState> roomStates = null;
IEnumerable<ParagraphState> paragraphStates = null;
room = roomResults.Select(x => TypeAdapter.Adapt<Room>(x)).FirstOrDefault();
var roomStateResults = roomResults.GetNextResult<ReadRoomStatesForPlayerRoom_Result>();
roomStates = roomStateResults.Select(x => TypeAdapter.Adapt<RoomState>(x)).ToList();
var paragraphStateResults = roomStateResults.GetNextResult<ReadParagraphStatesForPlayerRoom_Result>();
paragraphStates = paragraphStateResults.Select(x => TypeAdapter.Adapt<ParagraphState>(x)).ToList();
var nounResults = paragraphStateResults.GetNextResult<ReadNounsForPlayerRoom_Result>();
IEnumerable<Noun> nouns = nounResults.Select(x => TypeAdapter.Adapt<Noun>(x)).ToList();
foreach (var paragraphState in paragraphStates)
paragraphState.Nouns = nouns.Where(x => x.ParagraphState == paragraphState.Id).ToArray();
return new RoomData(room, roomStates, paragraphStates);
}