/// <summary> /// Decode the next token as a list. /// Assumes the next token is a list. /// </summary> /// <param name="inputStream"></param> /// <returns>Decoded list</returns> public static BList Decode(BinaryReader inputStream) { // Get past 'l' inputStream.Read(); BList res = new BList(); // Read elements till an 'e' while (inputStream.PeekChar() != 'e') { res.Add(BencodingUtils.Decode(inputStream)); } // Get past 'e' inputStream.Read(); return(res); }
public override bool Equals(object obj) { BList other = obj as BList; return(Equals(other)); }
public bool Equals(BList obj) { IList <IBencodingType> other = obj as IList <IBencodingType>; return(Equals(other)); }