public static ServerInfo From(gameserveritem_t item) { return(new ServerInfo() { AddressRaw = item.NetAdr.IP, Address = Utility.Int32ToIp(item.NetAdr.IP), ConnectionPort = item.NetAdr.ConnectionPort, QueryPort = item.NetAdr.QueryPort, Name = item.ServerNameUTF8(), Ping = item.Ping, GameDir = item.GameDirUTF8(), Map = item.MapUTF8(), Description = item.GameDescriptionUTF8(), AppId = item.AppID, Players = item.Players, MaxPlayers = item.MaxPlayers, BotPlayers = item.BotPlayers, Passworded = item.Password, Secure = item.Secure, LastTimePlayed = item.TimeLastPlayed, Version = item.ServerVersion, TagString = item.GameTagsUTF8(), SteamId = item.SteamID }); }
internal static extern Utf8StringPointer InternalGetName(ref gameserveritem_t self);
internal static extern void InternalSetName(ref gameserveritem_t self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pName);
internal static extern void InternalConstruct(ref gameserveritem_t self);