Class AppTeamInfoToModel
- Namespace
- RustPlusApi.Extensions
- Assembly
- RustPlusApi.dll
Mapping extensions from protobuf team-info messages to model types.
public static class AppTeamInfoToModel
- Inheritance
-
AppTeamInfoToModel
- Inherited Members
Methods
ToDeathNote(Note)
Maps a type-0 protobuf note to a DeathNote.
public static DeathNote ToDeathNote(this AppTeamInfo.Note note)
Parameters
noteAppTeamInfo.NoteThe protobuf map note.
Returns
ToMemberInfo(Member)
Maps a single protobuf team member to a MemberInfo.
public static MemberInfo ToMemberInfo(this AppTeamInfo.Member member)
Parameters
memberAppTeamInfo.MemberThe protobuf team member.
Returns
ToMemberInfos(IEnumerable<Member>)
Maps a sequence of protobuf team members to MemberInfo instances.
public static IEnumerable<MemberInfo> ToMemberInfos(this IEnumerable<AppTeamInfo.Member> members)
Parameters
membersIEnumerable<AppTeamInfo.Member>The protobuf team members to map.
Returns
ToPlayerNote(Note)
Maps a type-1 protobuf note to a PlayerNote.
public static PlayerNote ToPlayerNote(this AppTeamInfo.Note note)
Parameters
noteAppTeamInfo.NoteThe protobuf map note.
Returns
ToPlayerNotes(IEnumerable<Note>)
Maps a sequence of protobuf notes to PlayerNote instances.
public static IEnumerable<PlayerNote> ToPlayerNotes(this IEnumerable<AppTeamInfo.Note> notes)
Parameters
notesIEnumerable<AppTeamInfo.Note>The protobuf notes to map.
Returns
ToTeamInfo(AppTeamInfo)
Maps an RustPlusContracts.AppTeamInfo to a TeamInfo, routing map notes to typed models.
public static TeamInfo ToTeamInfo(this AppTeamInfo appTeamInfo)
Parameters
appTeamInfoAppTeamInfoThe protobuf team info response.
Returns
Exceptions
- ArgumentException
Thrown when a map note has an unrecognized type.