Ejemplo n.º 1
0
        public void Serialize(LogSerializeContext context, bool hash)
        {
            context.bw.Write(Name);
            context.bw.Write(Type);

            context.bw.Write(IsRequired);
        }
Ejemplo n.º 2
0
 public void Serialize(LogSerializeContext context, bool hash)
 {
     context.bw.Write(Uuid);
     context.bw.WriteNullableString(Title);
     context.bw.WriteNullableString(Body);
     context.bw.WriteNullableString(BodyPlainText);
     context.bw.WriteNullableString(BodyHtml);
 }
Ejemplo n.º 3
0
 public void Serialize(LogSerializeContext context, bool hash)
 {
     context.bw.WriteVarBuffer(Subject);
     context.bw.Write(Type);
     context.bw.Write(Value);
     context.bw.WriteVarBuffer(Authority);
     context.bw.WriteVarBuffer(Signature);
 }
Ejemplo n.º 4
0
 public void Serialize(LogSerializeContext context, bool hash)
 {
     context.bw.Write(Uuid);
     context.bw.Write(Type);
     context.bw.Write(Name);
     context.bw.Write(Length);
     context.bw.WriteVarBuffer(Data);
 }
Ejemplo n.º 5
0
 internal static void Serialize(ILogDescriptor descriptor, LogSerializeContext context, bool hash)
 {
     context.bw.Write(context.Version);                  // Version
     context.bw.WriteVarBuffer(descriptor.PreviousHash); // PreviousHash
     if (!hash)
     {
         context.bw.WriteVarBuffer(descriptor.HashRoot); // HashRoot
     }
     context.bw.Write(descriptor.Timestamp);             // Timestamp
     context.bw.WriteVarBuffer(descriptor.Nonce);        // Nonce
 }
Ejemplo n.º 6
0
        public void Serialize(LogSerializeContext context, bool hash)
        {
            Type = context.typeProvider.Get(Data?.GetType());

            context.bw.Write(Index);              // Index
            context.bw.WriteNullableUInt64(Type); // Type
            context.bw.Write(Version);            // Version
            context.bw.Write(Timestamp);          // Timestamp
            if (!hash)
            {
                context.bw.WriteVarBuffer(Hash); // Hash
            }
            if (!context.bw.WriteBoolean(Data != null) || !Type.HasValue)
            {
                return;
            }
            Data?.Serialize(context, hash);
        }
Ejemplo n.º 7
0
 public void Serialize(LogSerializeContext context, bool hash)
 {
     context.bw.Write(Value);
 }
Ejemplo n.º 8
0
 public void Serialize(LogSerializeContext context, bool hash)
 {
     Serialize(this, context, hash);
 }
Ejemplo n.º 9
0
 public void Serialize(LogSerializeContext context, bool hash)
 {
     context.bw.Write(Uuid);
     context.bw.WriteNullableString(Name);
     context.bw.WriteNullableString(EmailAddress);
 }