当前位置: 首页>>代码示例>>C#>>正文


C# DeserializeContext.ReadInt32方法代码示例

本文整理汇总了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;
        }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:12,代码来源:Authority.cs

示例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();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:10,代码来源:VotingStatusResponse.cs

示例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();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:11,代码来源:VotingMaterial.cs

示例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>>();
        }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:11,代码来源:FetchSignatureResponseResponse.cs

示例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();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:15,代码来源:VotingParameters.cs

示例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>();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:11,代码来源:SharePart.cs

示例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();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:9,代码来源:FetchEnvelopeCountResponse.cs

示例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();
        }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:21,代码来源:AuthorityEntity.cs

示例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()));
            }
              }
        }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:23,代码来源:FetchVotingMaterialVoterResponse.cs

示例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>();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:12,代码来源:SignatureResponse.cs

示例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();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:13,代码来源:VotingContainer.cs

示例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>();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:13,代码来源:Question.cs

示例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;
        }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:23,代码来源:PiException.cs

示例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();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:13,代码来源:ShareResponse.cs

示例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();
 }
开发者ID:dbrgn,项目名称:pi-vote,代码行数:10,代码来源:Group.cs


注:本文中的DeserializeContext.ReadInt32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。