BencodeEditor/Bencoding encoder and decoder.cs
/// <summary>
/// Generates the bencoded equivalent of the dictionary.
/// </summary>
/// <param name="u">The StringBuilder to append to.</param>
/// <returns>The bencoded equivalent of the dictionary.</returns>
Generates the bencoded equivalent of the dictionary.
Generates the bencoded equivalent of the dictionary .
public StringBuilder ToBencodedString(StringBuilder u)
		{
			if (u == null) u = new StringBuilder('d');
			else u.Append('d');
			for (int i = 0; i < base.Count; i++)
			{
				base.Keys.ElementAt(i).ToBencodedString(u);
				base.Values.ElementAt(i).ToBencodedString(u);
			}
			return u.Append('e');
		}
public StringBuilder ToBencodedString ( StringBuilder u ) { if ( u == null ) u = new StringBuilder ( ' ' ) ; else u . Append ( ' ' ) ; for ( int i = 0 ; i < base . Count ; i ++ ) { base . Keys . ElementAt ( i ) . ToBencodedString ( u ) ; base . Values . ElementAt ( i ) . ToBencodedString ( u ) ; } return u . Append ( ' ' ) ; }
Generates the bencoded equivalent of the dictionary.
Generates the bencoded equivalent of the dictionary .
The bencoded equivalent of the dictionary.
The bencoded equivalent of the dictionary .
u
StringBuilder
The StringBuilder to append to.
The StringBuilder to append to .