using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace skyscraper8.Skyscraper.IO
{
	internal class EmptyStream : Stream
	{
		public override bool CanRead => true;

		public override bool CanSeek => true;

		public override bool CanWrite => false;

		public override long Length => 0;

		public override long Position { 
			get => 0; 
			set
			{
				if (value != 0)
					throw new ArgumentOutOfRangeException(nameof(value));
			}
		}

		public override void Flush()
		{
		}

		public override int Read(byte[] buffer, int offset, int count)
		{
			return 0;
		}

		public override long Seek(long offset, SeekOrigin origin)
		{
			if (offset != 0)
				throw new ArgumentOutOfRangeException(nameof(offset));
			return 0;
		}

		public override void SetLength(long value)
		{
			if (value != 0)
				throw new ArgumentOutOfRangeException(nameof(value));
		}

		public override void Write(byte[] buffer, int offset, int count)
		{

		}
	}
}
