Example #1
0
		public override bool Close()
		{
			bool result;
			if (result = this.backend.NotNull() && this.backend.Close())
				this.backend = null;
			return result;
		}
        public PatternWriter(bool useColours)
        {
            var writer = new AsciiWriter();

            _characterWriter = useColours ? (ICharacterWriter) new ColorWriter(writer) : writer;
        }
Example #3
0
		public bool Send(ICharacterWriter writer)
		{
			return writer.WriteLine(this.Protocol + " " + this.Status) &&
			(headers.IsNull() || this.headers.All(header => writer.WriteLine(header.Key + ": " + header.Value))) &&
			writer.WriteLine() && writer.Flush();
		}
Example #4
0
		public Indenter(ICharacterWriter backend)
		{
			this.backend = backend;
			this.Format = true;
		}
Example #5
0
 public ColorWriter(ICharacterWriter innerWriter)
 {
     _innerWriter = innerWriter;
 }