using System; using System.Collections.Generic; using System.IO; using System.Net; namespace ZeroLevel.Services.Serialization { public interface IBinaryWriter : IDisposable { void WriteBoolean(bool val); void WriteByte(byte val); void WriteBytes(byte[] val); void WriteDouble(double val); void WriteInt32(Int32 number); void WriteLong(Int64 number); void WriteString(string line); void WriteGuid(Guid guid); void WriteDateTime(DateTime? datetime); void WriteDecimal(Decimal number); void WriteTimeSpan(TimeSpan period); void WriteIP(IPAddress ip); void WriteIPEndpoint(IPEndPoint endpoint); #region Extensions void WriteCollection(IEnumerable collection) where T : IBinarySerializable; void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void WriteCollection(IEnumerable collection); void Write(T item) where T : IBinarySerializable; void WriteCompatible(T item); #endregion Stream Stream { get; } } }