本文整理汇总了C#中DeserializeContext.ReadInt32方法的典型用法代码示例。如果您正苦于以下问题:C# DeserializeContext.ReadInt32方法的具体用法?C# DeserializeContext.ReadInt32怎么用?C# DeserializeContext.ReadInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DeserializeContext
的用法示例。
在下文中一共展示了DeserializeContext.ReadInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Authority
public Authority(DeserializeContext context, BaseParameters parameters)
{
Index = context.ReadInt32();
this.polynomial = context.ReadObject<Polynomial>();
if (!context.ReadBoolean())
{
this.secretKeyPart = context.ReadBigInt();
}
this.parameters = parameters;
}
示例2: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
VotingStatus = (VotingStatus)context.ReadInt32();
this.AuthoritiesDone = context.ReadGuidList();
}
示例3: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
Parameters = context.ReadObject<Signed<VotingParameters>>();
PublicKeyParts = context.ReadObjectList<Signed<ShareResponse>>();
CastEnvelopeCount = context.ReadInt32();
}
示例4: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
Status = (SignatureResponseStatus)context.ReadInt32();
SignatureResponse = context.ReadObject<Signed<SignatureResponse>>();
}
示例5: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
VotingId = context.ReadGuid();
Title = context.ReadMultiLanguageString();
Description = context.ReadMultiLanguageString();
Url = context.ReadMultiLanguageString();
VotingBeginDate = context.ReadDateTime();
VotingEndDate = context.ReadDateTime();
GroupId = context.ReadInt32();
}
示例6: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
AuthorityIndex = context.ReadInt32();
EncryptedShares = context.ReadObjectList<Encrypted<Share>>();
VerificationValues = context.ReadObjectList<VerificationValue>();
}
示例7: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
EnvelopeCount = context.ReadInt32();
}
示例8: Load
/// <summary>
/// Load data of authority from file.
/// </summary>
/// <param name="fileName">Name of file to load.</param>
private void Load(string fileName)
{
FileStream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
DeserializeContext context = new DeserializeContext(fileStream);
this.parameters = context.ReadObject<VotingParameters>();
this.signedParameters = context.ReadObject<Signed<VotingParameters>>();
this.authorities = new Dictionary<int,Certificate>();
int count = context.ReadInt32();
count.Times(() => this.authorities.Add(context.ReadInt32(), context.ReadObject<Certificate>()));
this.authority = new Authority(context, this.parameters);
context.Close();
fileStream.Close();
}
示例9: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
if (Exception == null)
{
this.votingMaterials = new List<Tuple<VotingMaterial, VotingStatus, List<Guid>>>();
int count = context.ReadInt32();
for (int index = 0; index < count; index++)
{
this.votingMaterials.Add(
new Tuple<VotingMaterial, VotingStatus, List<Guid>>(
context.ReadObject<VotingMaterial>(),
(VotingStatus)context.ReadInt32(),
context.ReadGuidList()));
}
}
}
示例10: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
SubjectId = context.ReadGuid();
Status = (SignatureResponseStatus)context.ReadInt32();
Reason = context.ReadString();
Signature = context.ReadObject<Signature>();
}
示例11: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
Material = context.ReadObject<VotingMaterial>();
Authorities = context.ReadObjectList<Certificate>();
AuthoritiesDone = context.ReadGuidList();
Status = (VotingStatus)context.ReadInt32();
EnvelopeCount = context.ReadInt32();
}
示例12: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
Text = context.ReadMultiLanguageString();
Description = context.ReadMultiLanguageString();
Url = context.ReadMultiLanguageString();
MaxVota = context.ReadInt32();
this.options = context.ReadObjectList<Option>();
}
示例13: FromBinary
/// <summary>
/// Deserializes an exception from binary data.
/// </summary>
/// <param name="data">Binary data of exception.</param>
/// <returns>An exception.</returns>
public static PiException FromBinary(byte[] data)
{
MemoryStream stream = new MemoryStream(data);
DeserializeContext context = new DeserializeContext(stream);
string typeName = context.ReadString();
ExceptionCode code = (ExceptionCode)context.ReadInt32();
string message = context.ReadString();
Type type = Type.GetType(typeName);
PiException exception = (PiException)Activator.CreateInstance(type, new object[] { code, code.Text() });
exception.ServerMessage = message;
context.Close();
stream.Close();
return exception;
}
示例14: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
VotingId = context.ReadGuid();
AuthorityIndex = context.ReadInt32();
AcceptShares = context.ReadBoolean();
PublicKeyPart = context.ReadBigInt();
VotingParametersHash = context.ReadBytes();
}
示例15: Deserialize
/// <summary>
/// Deserializes binary data to object.
/// </summary>
/// <param name="context">Context for deserialization</param>
protected override void Deserialize(DeserializeContext context, byte version)
{
base.Deserialize(context, version);
Id = context.ReadInt32();
Name = context.ReadMultiLanguageString();
}