public int WriteTo(TextWriter writer) { int length = 0; Path8 parent = this.Parent; if (!parent.IsRoot) { length += Parent.WriteTo(writer); writer.Write((char)_delimiter); length++; } length += Name.WriteTo(writer); return(length); }
public int WriteTo(Stream stream) { int length = 0; Path8 parent = this.Parent; if (!parent.IsRoot) { length += Parent.WriteTo(stream); stream.WriteByte(_delimiter); length++; } length += Name.WriteTo(stream); return(length); }
public int WriteTo(byte[] buffer, int index) { int length = 0; Path8 parent = this.Parent; if (!parent.IsRoot) { length += parent.WriteTo(buffer, index + length); buffer[index + length] = _delimiter; length++; } length += Name.WriteTo(buffer, index + length); return(length); }