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/Assotiation.cs

47 lines
1.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using ZeroLevel.Services.Serialization;
namespace ZeroLevel.DocumentObjectModel
{
public sealed class Assotiation :
IBinarySerializable
{
#region Fields
/// <summary>
/// Заголовок
/// </summary>
public string Title;
/// <summary>
/// Описание (например, что было изменено по сравнению с прошлой версией)
/// </summary>
public string Description;
/// <summary>
/// Ссылка на связанный документ
/// </summary>
public Guid DocumentId;
/// <summary>
/// Тип связи
/// </summary>
public AssotiationRelation Relation;
#endregion
#region IBinarySerializable
public void Serialize(IBinaryWriter writer)
{
writer.WriteString(this.Title);
writer.WriteString(this.Description);
writer.WriteGuid(this.DocumentId);
writer.WriteInt32((Int32)this.Relation);
}
public void Deserialize(IBinaryReader reader)
{
this.Title = reader.ReadString();
this.Description = reader.ReadString();
this.DocumentId = reader.ReadGuid();
this.Relation = (AssotiationRelation)reader.ReadInt32();
}
#endregion
}
}

Powered by TurnKey Linux.