using Tiger.Communication.Messages.Interfaces; using Tiger.Communication.Messages.Types; using Tiger.Game.Navigator.Views; namespace Tiger.Communication.Messages.Outgoing.Navigator; public class NavigatorMetadataComposer : IMessageComposer { private readonly ICollection _navigatorViews; public NavigatorMetadataComposer(ICollection navigatorViews) { _navigatorViews = navigatorViews; } public OutgoingHeaders Header => OutgoingHeaders.NavigatorMetadata; public void Compose(ServerMessage message) { message.AppendInt32(_navigatorViews.Count); foreach (var navigatorView in _navigatorViews) { message.AppendString(navigatorView.Code); message.AppendInt32(0); // saved searches } } }