SteamRE/SteamKit — pull request #71 by Zagitta (2014-08-22 04:53:19+00:00)
Title: Made it easier to use ClientMsgProtobuf<BodyType> and ClientMsg<BodyType>

ClientMsgProtobuf and ClientMsg are in their current form makes it rather tedious to create wrapper APIs around specific game messages since you have to take all the relevant fields of a message as arguments to the function and manually assign each to the same field in the body.
This PR fixes that by adding an extra constructor that takes a body as parameter so the wrapper API can simply take the body as an parameter.

Example of how a wrapper function looks currently:
```
public async Task FindSourceTVGames(ulong custGameId, uint heroId, uint leagueId, uint numGames, string searchKey, DateTime start, bool teamGames)
{
CheckStatus();
var req = new ClientGCMsgProtobuf((uint)EDOTAGCMsg.k_EMsgGCFindSourceTVGames)
{
SourceJobID = _steam.GetNextJobID()
};

req.Body.custom_game_id = custGameId;
req.Body.heroid = heroId;
req.Body.leagueid = leagueId;
req.Body.num_games = numGames;
req.Body.search_key = searchKey;
req.Body.start = ToUnixTime(start);
req.Body.team_game = teamGames;

return await _sourceTVGamesHandler.Request(req);
}
```

And how it would look with this PR:
```
public async Task FindSourceTVGames(CMsgFindSourceTVGames msg)
{
CheckStatus();

var req = new ClientGCMsgProtobuf((uint)EDOTAGCMsg.k_EMsgGCFindSourceTVGames, msg)
{
SourceJobID = _steam.GetNextJobID()
};

return await _sourceTVGamesHandler.Request(req);
}
```