本文整理汇总了C#中SteamKit2.SteamID.Render方法的典型用法代码示例。如果您正苦于以下问题:C# SteamID.Render方法的具体用法?C# SteamID.Render怎么用?C# SteamID.Render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SteamKit2.SteamID
的用法示例。
在下文中一共展示了SteamID.Render方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddChatRoomToAutoJoin
/// <summary>
/// Adds a chat room that is automatically joined on start-up.
/// </summary>
/// <param name="steamID">The SteamID of the chat room.</param>
public void AddChatRoomToAutoJoin(SteamID steamID)
{
using (var file = new StreamWriter(File.OpenWrite(_autoJoinPath)))
{
file.WriteLine(steamID.Render());
file.Flush();
}
}
示例2: SaveAdmin
/// <summary>
/// Saves a new admin.
/// </summary>
private void SaveAdmin(SteamID steamID)
{
using (var file = new StreamWriter(_adminListPath))
{
file.WriteLine(steamID.Render());
file.Flush();
}
}
示例3: ExpandSteamID
/*
* From VoiDeD's bot: https://github.com/VoiDeD/steam-irc-bot/blob/cedb7636e529fa226188ce102f5ee1337f8bed63/SteamIrcBot/Utils/Utils.cs#L191
*/
private static string ExpandSteamID(SteamID input)
{
string displayInstance = input.AccountInstance.ToString();
switch (input.AccountInstance)
{
case SteamID.AllInstances:
displayInstance = "All";
break;
case SteamID.DesktopInstance:
displayInstance = "Desktop";
break;
case SteamID.ConsoleInstance:
displayInstance = "Console";
break;
case SteamID.WebInstance:
displayInstance = "Web";
break;
case (uint)SteamID.ChatInstanceFlags.Clan:
displayInstance = "Clan";
break;
case (uint)SteamID.ChatInstanceFlags.Lobby:
displayInstance = "Lobby";
break;
case (uint)SteamID.ChatInstanceFlags.MMSLobby:
displayInstance = "MMS Lobby";
break;
}
return string.Format("{0} / {1} (UInt64: {2}, AccountID: {3}, IsValid: {4}, Universe: {5}, Instance: {6}, Type: {7})",
input.Render(), input.Render(true), input.ConvertToUInt64(), input.AccountID, input.IsValid, input.AccountUniverse, displayInstance, input.AccountType);
}
示例4: SteamIdToName
public String SteamIdToName(SteamID id)
{
return steamFriends.GetFriendPersonaName(id) + " [" + id.Render() + "]";
}
示例5: MemberLeftChat
public void MemberLeftChat(SteamID chatterID)
{
mChattingUsers [chatRoomID] = mChattingUsers [chatRoomID].Where (x => x.id != chatterID).ToList ();
if (chatterID == this.steamUser.SteamID)
{
log.Info (String.Format ("I [[{0}]] left the chat (or was kicked)", chatterID.Render ()));
AllChatrooms.Remove (chatRoomID);
}
log.Info (String.Format ("{0}[[{1}]] left the chat", steamFriends.GetFriendPersonaName (chatterID), chatterID.Render ()));
//Show this event to subscribing users
List<SteamID> subscribingUsers;
UserRelays.TryGetValue (chatRoomID, out subscribingUsers);
if (subscribingUsers != null)
{
foreach (SteamID user in subscribingUsers)
{
FriendMessage (user, String.Format ("{0} left the chat.", steamFriends.GetFriendPersonaName (chatterID)));
}
}
}
示例6: Steam3StringSymmetric
public void Steam3StringSymmetric()
{
var steamIds = new[]
{
"[U:1:123]",
"[U:1:123:2]",
"[G:1:626]",
"[A:2:165:1234]",
};
foreach ( var steamId in steamIds )
{
SteamID sid = new SteamID();
bool parsed = sid.SetFromSteam3String( steamId );
Assert.True( parsed );
Assert.Equal( steamId, sid.Render( steam3: true ) );
}
}
示例7: RendersOutOfRangeAccountTypeAsLowercaseI
public void RendersOutOfRangeAccountTypeAsLowercaseI()
{
SteamID sid = new SteamID( 123, EUniverse.Beta, (EAccountType)(-1) );
Assert.Equal( "[i:2:123]", sid.Render(steam3: true) );
}