Remove unused entities

pull/1/head
Ogoun 6 years ago
parent 2a021162a6
commit 44dd074c7b

@ -1,113 +0,0 @@
using System;
using System.Runtime.Serialization;
using ZeroLevel.Services.Serialization;
namespace ZeroLevel.Network
{
[DataContract]
public class Checkpoint :
ICloneable,
IEquatable<Checkpoint>,
IBinarySerializable
{
public Guid Id { get; set; }
public string SourceAppKey { get; set; }
public string DestinationAppKey { get; set; }
public string ReasonPhrase { get; set; }
public long Timestamp { get; set; }
public CheckpointType CheckpointType { get; set; }
public byte[] Payload { get; set; }
#region IBinarySerializable
public void Deserialize(IBinaryReader reader)
{
this.Id = reader.ReadGuid();
this.Timestamp = reader.ReadLong();
this.SourceAppKey = reader.ReadString();
this.DestinationAppKey = reader.ReadString();
this.ReasonPhrase = reader.ReadString();
this.CheckpointType = (CheckpointType)reader.ReadInt32();
this.Payload = reader.ReadBytes();
}
public void Serialize(IBinaryWriter writer)
{
writer.WriteGuid(this.Id);
writer.WriteLong(this.Timestamp);
writer.WriteString(this.SourceAppKey);
writer.WriteString(this.DestinationAppKey);
writer.WriteString(this.ReasonPhrase);
writer.WriteInt32((int)this.CheckpointType);
writer.WriteBytes(this.Payload);
}
#endregion IBinarySerializable
#region Ctors
public Checkpoint()
{
this.Id = Guid.NewGuid();
this.Timestamp = DateTime.Now.Ticks;
}
public Checkpoint(Guid id)
{
this.Timestamp = DateTime.Now.Ticks;
this.Id = id;
}
public Checkpoint(Checkpoint other)
{
this.Id = other.Id;
this.Timestamp = other.Timestamp;
this.SourceAppKey = other.SourceAppKey;
this.DestinationAppKey = other.DestinationAppKey;
this.CheckpointType = other.CheckpointType;
this.Payload = other.Payload;
this.ReasonPhrase = other.ReasonPhrase;
}
#endregion Ctors
#region Equals & Hash
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object obj)
{
return this.Equals(obj as Checkpoint);
}
#endregion Equals & Hash
#region ICloneable
public object Clone()
{
return new Checkpoint(this);
}
#endregion ICloneable
#region IEquatable
public bool Equals(Checkpoint other)
{
if (this.Id != other.Id) return false;
if (this.Timestamp != other.Timestamp) return false;
if (this.CheckpointType != other.CheckpointType) return false;
if (string.Compare(this.SourceAppKey, other.SourceAppKey, StringComparison.OrdinalIgnoreCase) != 0) return false;
if (string.Compare(this.DestinationAppKey, other.DestinationAppKey, StringComparison.OrdinalIgnoreCase) != 0) return false;
if (string.Compare(this.ReasonPhrase, other.ReasonPhrase, StringComparison.OrdinalIgnoreCase) != 0) return false;
if (false == ArrayExtensions.Equals(this.Payload, other.Payload)) return false;
return true;
}
#endregion IEquatable
}
}

@ -1,21 +0,0 @@
using System.Runtime.Serialization;
namespace ZeroLevel.Network
{
[DataContract]
public sealed class CheckpointArc
: Checkpoint
{
public CheckpointArc(Checkpoint other)
{
this.Id = other.Id;
this.Id = other.Id;
this.Timestamp = other.Timestamp;
this.SourceAppKey = other.SourceAppKey;
this.DestinationAppKey = other.DestinationAppKey;
this.CheckpointType = other.CheckpointType;
this.Payload = other.Payload;
this.ReasonPhrase = other.ReasonPhrase;
}
}
}

@ -1,10 +0,0 @@
namespace ZeroLevel.Network
{
public enum CheckpointType
{
Interrupt = 0,
Fatal = 1,
Finish = 2,
Transfer = 3
}
}

@ -243,9 +243,6 @@
<Compile Include="Services\Network\Contract\IZObservableServer.cs" />
<Compile Include="Services\Network\Contract\IZTransport.cs" />
<Compile Include="Services\Network\ExchangeTransportFactory.cs" />
<Compile Include="Services\Network\Models\Checkpoint.cs" />
<Compile Include="Services\Network\Models\CheckpointArc.cs" />
<Compile Include="Services\Network\Models\CheckpointType.cs" />
<Compile Include="Services\Network\Services\DiscoveryClient.cs" />
<Compile Include="Services\Network\Services\Exchange.cs" />
<Compile Include="Services\Network\Services\ExServiceHost.cs" />

@ -1 +0,0 @@
23b05e1da25edde99ed56a899f894605a2243d39
Loading…
Cancel
Save

Powered by TurnKey Linux.