SteamKit2.SteamID.Render C# (CSharp) Méthode

Render() public méthode

Renders this instance into it's "STEAM_" represenation.
public Render ( ) : string
Résultat string
        public string Render()
        {
            switch ( AccountType )
            {
                case EAccountType.Invalid:
                case EAccountType.Individual:
                    if ( AccountUniverse <= EUniverse.Public )
                        return String.Format( "STEAM_0:{0}:{1}", AccountID & 1, AccountID >> 1 );
                    else
                        return String.Format( "STEAM_{2}:{0}:{1}", AccountID & 1, AccountID >> 1, ( int )AccountUniverse );
                default:
                    return Convert.ToString( this );
            }
        }

Usage Example

 /// <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();
     }
 }
All Usage Examples Of SteamKit2.SteamID::Render