示例#1
0
        public bool Equals(DistributedJob obj)
        {
            if (obj == null)
            {
                return(false);
            }

            return(obj.Guid == Guid);
        }
        public static void ToWriter(DistributedJob distributedJob, BinaryWriter writer)
        {
            writer.Write(distributedJob.Guid.ToByteArray());
            writer.Write(distributedJob.Name);
            writer.Write(distributedJob.Description);
            writer.Write(distributedJob.Owner);
            writer.Write(distributedJob.CreateDate.ToBinary());
            writer.Write(distributedJob.FileName);

            var hasStatusKey = !string.IsNullOrEmpty(distributedJob.StatusKey);

            writer.Write(hasStatusKey);
            if (hasStatusKey)
            {
                writer.Write(distributedJob.StatusKey);
            }
        }
        public static DistributedJob FromReader(BinaryReader reader)
        {
            var newJob = new DistributedJob();

            newJob.Guid        = new Guid(reader.ReadBytes(16));
            newJob.Name        = reader.ReadString();
            newJob.Description = reader.ReadString();
            newJob.Owner       = reader.ReadString();
            newJob.CreateDate  = DateTime.FromBinary(reader.ReadInt64());
            newJob.FileName    = reader.ReadString();

            if (reader.ReadBoolean())
            {
                newJob.StatusKey = reader.ReadString();
            }

            return(newJob);
        }
示例#4
0
 public void IncreaseDownloadCount(DistributedJob distributedJob)
 {
 }
示例#5
0
 public void RetrieveCurrentStatus(DistributedJob distributedJob)
 {
 }
示例#6
0
 public void RetrieveDownloadCount(DistributedJob distributedJob)
 {
 }
示例#7
0
 public void CompleteDistributedJob(DistributedJob distributedJob)
 {
 }
示例#8
0
 public void DeleteDistributedJob(DistributedJob distributedJobToDelete)
 {
 }
示例#9
0
 public void AddDistributedJob(DistributedJob distributedJob)
 {
 }