本文整理汇总了C#中IValueReader.ReadBytes方法的典型用法代码示例。如果您正苦于以下问题:C# IValueReader.ReadBytes方法的具体用法?C# IValueReader.ReadBytes怎么用?C# IValueReader.ReadBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IValueReader
的用法示例。
在下文中一共展示了IValueReader.ReadBytes方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadPayload
public override void ReadPayload(IValueReader reader)
{
base.ReadPayload(reader);
var internalEndPointAddress = new IPAddress(reader.ReadBytes());
InternalOwnEndPoint = new IPEndPoint(internalEndPointAddress, reader.ReadInt32());
var externalEndPointAddress = new IPAddress(reader.ReadBytes());
ExternalPeerEndPoint = new IPEndPoint(externalEndPointAddress, reader.ReadInt32());
}
示例2: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
var ms = new MemoryStream(reader.ReadBytes());
ScreenFrame = new Bitmap(ms);
}
示例3: ReadPayload
public override void ReadPayload(IValueReader reader)
{
base.ReadPayload(reader);
var endPointAddress = new IPAddress(reader.ReadBytes());
InternalClientEndPoint = new IPEndPoint(endPointAddress, reader.ReadInt32());
}
示例4: Deserialize
public void Deserialize(IValueReader reader, RSACrypto crypto)
{
if (reader == null)
throw new ArgumentNullException ("reader");
if (crypto == null)
throw new ArgumentNullException ("crypto");
if (reader.ReadBool())
{
byte[] exponent = crypto.Decrypt (reader.ReadBytes());
byte[] modulus1 = crypto.Decrypt (reader.ReadBytes());
byte[] modulus2 = crypto.Decrypt (reader.ReadBytes());
byte[] modulus = modulus1.Concat (modulus2).ToArray();
this.exponentOffset = modulus.Length;
this.publicKey = new byte[exponent.Length + modulus.Length];
Buffer.BlockCopy (modulus, 0, this.publicKey, 0, modulus.Length);
Buffer.BlockCopy (exponent, 0, this.publicKey, exponentOffset, exponent.Length);
}
SetupSignature();
}
示例5: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
OriginalMessageId = reader.ReadUInt16();
Count = reader.ReadByte();
Payload = reader.ReadBytes();
}
示例6: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
SourceId = reader.ReadInt32 ();
Sequence = reader.ReadInt32();
byte frames = reader.ReadByte();
Data = new byte[frames][];
for (int i = 0; i < frames; ++i)
Data[i] = reader.ReadBytes();
}
示例7: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
AESKey = reader.ReadBytes();
PublicAuthenticationKeyType = Type.GetType (reader.ReadString());
PublicAuthenticationKey = reader.ReadBytes();
}
示例8: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
this.TargetType = (TargetType)reader.ReadByte();
ushort numTargets = reader.ReadUInt16();
int[] targets = new int[numTargets];
for (int i = 0; i < targets.Length; ++i)
targets[i] = reader.ReadInt32();
TargetIds = targets;
Sequence = reader.ReadInt32();
SourceId = reader.ReadInt32();
byte frames = reader.ReadByte();
Data = new byte[frames][];
for (int i = 0; i < frames; ++i)
Data[i] = reader.ReadBytes();
}