public static IBencodingType Decode(BinaryReader inputStream, ref int bytesConsumed) { IBencodingType returnValue = null; char next = (char)inputStream.PeekChar(); switch (next) { case 'i': // Integer returnValue = new BInt(0); break; case 'l': // List returnValue = new BList(); break; case 'd': // Dictionary returnValue = new BDict(); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': // String returnValue = new BString(); break; } return(returnValue.Decode(inputStream, ref bytesConsumed)); }
public bool Equals(BDict obj) { var other = obj; return(Equals(other)); }
public override bool Equals(object obj) { BDict other = obj as BDict; return(Equals(other)); }