You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ZeroLevel/Services/DOM/Model/Identifier.cs

61 lines
1.3 KiB

6 years ago
using ZeroLevel.Services.Serialization;
namespace ZeroLevel.DocumentObjectModel
{
public class Identifier :
6 years ago
IBinarySerializable
{
public Identifier()
{
}
public Identifier(IBinaryReader reader)
{
Deserialize(reader);
}
#region Fields
6 years ago
/// <summary>
/// Version
6 years ago
/// </summary>
public int Version;
6 years ago
/// <summary>
/// Timestamp ID
6 years ago
/// </summary>
public long Timestamp;
6 years ago
/// <summary>
/// Label with day accurcy
6 years ago
/// </summary>
public string DateLabel;
6 years ago
/// <summary>
/// Document unique link
/// </summary>
public string Link;
#endregion Fields
6 years ago
#region IBinarySerializable
6 years ago
public void Serialize(IBinaryWriter writer)
{
writer.WriteInt32(this.Version);
writer.WriteLong(this.Timestamp);
6 years ago
writer.WriteString(this.DateLabel);
6 years ago
writer.WriteString(this.Link);
6 years ago
}
public void Deserialize(IBinaryReader reader)
{
this.Version = reader.ReadInt32();
this.Timestamp = reader.ReadLong();
6 years ago
this.DateLabel = reader.ReadString();
6 years ago
this.Link = reader.ReadString();
6 years ago
}
#endregion IBinarySerializable
6 years ago
}
}

Powered by TurnKey Linux.