Пример #1
0
 protected override void Deserialize(DeserializeContext context, byte version)
 {
     base.Deserialize(context, version);
       Cookie = context.ReadObject<Signed<SignCheckCookie>>();
       Certificate = context.ReadObject<Certificate>();
       SignDateTime = context.ReadDateTime();
 }
Пример #2
0
 protected override void Deserialize(DeserializeContext context)
 {
     base.Deserialize(context);
       Id = context.ReadGuid();
       Title = context.ReadMultiLanguageString();
       Description = context.ReadMultiLanguageString();
       this.questions = context.ReadObjectList<Question>();
       VotingBeginDate = context.ReadDateTime();
       VotingEndDate = context.ReadDateTime();
       AuthorityCount = context.ReadInt32();
 }
Пример #3
0
 /// <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();
 }
Пример #4
0
 /// <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();
       VoterId = context.ReadGuid();
       Ballots = context.ReadObjectList<Ballot>();
       Date = context.ReadDateTime();
 }
Пример #5
0
 /// <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();
       PartialDeciphers = context.ReadObjectList<PartialDecipher>();
       EnvelopeCount = context.ReadInt32();
       EnvelopeHash = context.ReadBytes();
       Date = context.ReadDateTime();
 }
Пример #6
0
 protected override void Deserialize(DeserializeContext context, byte version)
 {
     base.Deserialize(context, version);
       CreationDate = context.ReadDateTime();
       Randomness = context.ReadBytes();
 }
Пример #7
0
        /// <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 (!context.ReadBytes().Equal(MagicTypeConstant))
            throw new InvalidOperationException("Magic type contant wrong.");

              Id = new Guid(context.ReadBytes());
              CreationDate = context.ReadDateTime();
              PublicKey = context.ReadBytes();
              SelfSignature = context.ReadBytes();
              this.attributes = context.ReadObjectList<CertificateAttribute>();
              this.signatures = context.ReadObjectList<Signature>();

              PrivateKeyStatus = (PrivateKeyStatus)context.ReadInt32();

              switch (PrivateKeyStatus)
              {
            case PrivateKeyStatus.Unavailable:
              break;
            case Crypto.PrivateKeyStatus.Unencrypted:
              this.privateKeyData = context.ReadBytes();
              break;
            case Crypto.PrivateKeyStatus.Encrypted:
              this.privateKeyData = context.ReadBytes();
              this.privateKeySalt = context.ReadBytes();
              this.passphraseSalt = context.ReadBytes();
              break;
            default:
              throw new InvalidOperationException("Unknown or bad private key status.");
              }
        }
Пример #8
0
 /// <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);
       IssuerId = context.ReadGuid();
       ValidFrom = context.ReadDateTime();
       ValidUntil = context.ReadDateTime();
       RevokedCertificates = context.ReadGuidList();
 }
Пример #9
0
 /// <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);
       SignerId = context.ReadGuid();
       Data = context.ReadBytes();
       ValidFrom = context.ReadDateTime();
       ValidUntil = context.ReadDateTime();
 }