You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ZeroLevel/Services/Serialization/IBinaryReader.cs

138 lines
4.1 KiB

6 years ago
using System;
using System.Collections.Concurrent;
6 years ago
using System.Collections.Generic;
5 years ago
using System.IO;
6 years ago
using System.Net;
namespace ZeroLevel.Services.Serialization
{
public interface IBinaryReader : IDisposable
{
bool ReadBoolean();
char ReadChar();
6 years ago
byte ReadByte();
6 years ago
byte[] ReadBytes();
6 years ago
Double ReadDouble();
6 years ago
float ReadFloat();
short ReadShort();
ushort ReadUShort();
6 years ago
Int32 ReadInt32();
UInt32 ReadUInt32();
6 years ago
Int64 ReadLong();
UInt64 ReadULong();
6 years ago
string ReadString();
6 years ago
Guid ReadGuid();
6 years ago
DateTime? ReadDateTime();
TimeOnly? ReadTime();
DateOnly? ReadDate();
6 years ago
decimal ReadDecimal();
6 years ago
TimeSpan ReadTimeSpan();
6 years ago
IPAddress ReadIP();
6 years ago
IPEndPoint ReadIPEndpoint();
#region Extensions
5 years ago
#region Arrays
T[] ReadArray<T>() where T : IBinarySerializable, new();
string[] ReadStringArray();
IPAddress[] ReadIPArray();
IPEndPoint[] ReadIPEndPointArray();
Guid[] ReadGuidArray();
DateTime[] ReadDateTimeArray();
Int64[] ReadInt64Array();
Int32[] ReadInt32Array();
UInt64[] ReadUInt64Array();
UInt32[] ReadUInt32Array();
char[] ReadCharArray();
short[] ReadShortArray();
ushort[] ReadUShortArray();
float[] ReadFloatArray();
Double[] ReadDoubleArray();
bool[] ReadBooleanArray();
byte[] ReadByteArray();
byte[][] ReadByteArrayArray();
decimal[] ReadDecimalArray();
TimeSpan[] ReadTimeSpanArray();
#endregion
#region Collections
6 years ago
List<T> ReadCollection<T>() where T : IBinarySerializable, new();
List<string> ReadStringCollection();
List<Guid> ReadGuidCollection();
List<DateTime> ReadDateTimeCollection();
List<char> ReadCharCollection();
6 years ago
List<Int64> ReadInt64Collection();
List<Int32> ReadInt32Collection();
List<Double> ReadDoubleCollection();
6 years ago
List<Decimal> ReadDecimalCollection();
List<TimeSpan> ReadTimeSpanCollection();
List<float> ReadFloatCollection();
6 years ago
List<bool> ReadBooleanCollection();
List<byte> ReadByteCollection();
List<byte[]> ReadByteArrayCollection();
List<IPAddress> ReadIPCollection();
List<IPEndPoint> ReadIPEndPointCollection();
List<UInt64> ReadUInt64Collection();
List<UInt32> ReadUInt32Collection();
List<short> ReadShortCollection();
List<ushort> ReadUShortCollection();
5 years ago
#endregion
#region Collections lazy
IEnumerable<T> ReadCollectionLazy<T>()
where T : IBinarySerializable, new();
IEnumerable<string> ReadStringCollectionLazy();
IEnumerable<IPAddress> ReadIPCollectionLazy();
IEnumerable<IPEndPoint> ReadIPEndPointCollectionLazy();
IEnumerable<Guid> ReadGuidCollectionLazy();
IEnumerable<DateTime> ReadDateTimeCollectionLazy();
IEnumerable<Int64> ReadInt64CollectionLazy();
IEnumerable<Int32> ReadInt32CollectionLazy();
IEnumerable<UInt64> ReadUInt64CollectionLazy();
IEnumerable<UInt32> ReadUInt32CollectionLazy();
IEnumerable<char> ReadCharCollectionLazy();
IEnumerable<short> ReadShortCollectionLazy();
IEnumerable<ushort> ReadUShortCollectionLazy();
IEnumerable<float> ReadFloatCollectionLazy();
IEnumerable<Double> ReadDoubleCollectionLazy();
IEnumerable<bool> ReadBooleanCollectionLazy();
IEnumerable<byte> ReadByteCollectionLazy();
IEnumerable<byte[]> ReadByteArrayCollectionLazy();
IEnumerable<decimal> ReadDecimalCollectionLazy();
IEnumerable<TimeSpan> ReadTimeSpanCollectionLazy();
#endregion
5 years ago
T Read<T>() where T : IBinarySerializable;
4 years ago
T Read<T>(object arg) where T : IBinarySerializable;
5 years ago
T ReadCompatible<T>();
Dictionary<TKey, TValue> ReadDictionary<TKey, TValue>();
5 years ago
ConcurrentDictionary<TKey, TValue> ReadDictionaryAsConcurrent<TKey, TValue>();
#endregion Extensions
5 years ago
Stream Stream { get; }
6 years ago
}
}

Powered by TurnKey Linux.