示例#1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Status != 0)
            {
                hash ^= Status.GetHashCode();
            }
            if (Info.Length != 0)
            {
                hash ^= Info.GetHashCode();
            }
            if (startedAt_ != null)
            {
                hash ^= StartedAt.GetHashCode();
            }
            if (completedAt_ != null)
            {
                hash ^= CompletedAt.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (FolderId.Length != 0)
            {
                hash ^= FolderId.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            if (SourceClusterId.Length != 0)
            {
                hash ^= SourceClusterId.GetHashCode();
            }
            if (startedAt_ != null)
            {
                hash ^= StartedAt.GetHashCode();
            }
            hash ^= sourceShardNames_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#3
0
 public override void ShowStateDescription()
 {
     Console.WriteLine("State: Started and in progress!");
     Console.WriteLine("Started on: " + StartedAt.ToString("dd/MM/yyyy hh:mm:ss"));
     Console.WriteLine("Is Approved? " + (Approved ? "Yes" : "No"));
     Console.WriteLine("Allocated Employee: " + AllocatedEmployee);
 }
示例#4
0
 public void MergeFrom(TestSuite other)
 {
     if (other == null)
     {
         return;
     }
     if (other.startedAt_ != null)
     {
         if (startedAt_ == null)
         {
             startedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         StartedAt.MergeFrom(other.StartedAt);
     }
     if (other.completedAt_ != null)
     {
         if (completedAt_ == null)
         {
             completedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CompletedAt.MergeFrom(other.CompletedAt);
     }
     results_.Add(other.results_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
示例#5
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (Id != null)
                {
                    hashCode = hashCode * 59 + Id.GetHashCode();
                }
                if (StepId != null)
                {
                    hashCode = hashCode * 59 + StepId.GetHashCode();
                }
                if (PhaseId != null)
                {
                    hashCode = hashCode * 59 + PhaseId.GetHashCode();
                }
                if (Action != null)
                {
                    hashCode = hashCode * 59 + Action.GetHashCode();
                }
                if (Repository != null)
                {
                    hashCode = hashCode * 59 + Repository.GetHashCode();
                }
                if (Branch != null)
                {
                    hashCode = hashCode * 59 + Branch.GetHashCode();
                }
                if (Environment != null)
                {
                    hashCode = hashCode * 59 + Environment.GetHashCode();
                }
                if (EnvironmentType != null)
                {
                    hashCode = hashCode * 59 + EnvironmentType.GetHashCode();
                }
                if (StartedAt != null)
                {
                    hashCode = hashCode * 59 + StartedAt.GetHashCode();
                }
                if (FinishedAt != null)
                {
                    hashCode = hashCode * 59 + FinishedAt.GetHashCode();
                }
                if (Details != null)
                {
                    hashCode = hashCode * 59 + Details.GetHashCode();
                }

                hashCode = hashCode * 59 + Status.GetHashCode();
                if (Links != null)
                {
                    hashCode = hashCode * 59 + Links.GetHashCode();
                }
                return(hashCode);
            }
        }
示例#6
0
 public bool Equals(Note other)
 {
     return(string.Equals(Text, other.Text) &&
            string.Equals(Header, other.Header) &&
            State == other.State &&
            StartedAt.Equals(other.StartedAt) &&
            Duration.Equals(other.Duration));
 }
示例#7
0
        public TimeSpan TimeRemaining()
        {
            var cruiseEndTime = StartedAt.AddMinutes(Time.TotalMinutes);

            cruiseEndTime.AddMinutes(ExtendedByMinutes());

            return(cruiseEndTime.Subtract(DateTimeOffset.UtcNow));
        }
示例#8
0
 protected bool Equals(BuildTarget other)
 {
     return(string.Equals(Project, other.Project) &&
            string.Equals(ProjectConfiguration, other.ProjectConfiguration) &&
            string.Equals(Platform, other.Platform) &&
            string.Equals(SolutionConfiguration, other.SolutionConfiguration) &&
            StartedAt.Equals(other.StartedAt) && Duration.Equals(other.Duration) &&
            Successful.Equals(other.Successful));
 }
示例#9
0
        /// <summary>
        /// Override of the get hash code method.
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            //Get hash code for the nullable fields.
            int hashHostName  = HostName == null ? 0 : HostName.GetHashCode();
            int hashPublicUri = PublicUri == null ? 0 : PublicUri.GetHashCode();
            int hashHubs      = Hubs == null ? 0 : Hubs.Distinct().Aggregate(0, (x, y) => x.GetHashCode() ^ y.GetHashCode());;

            //Calculate the hash code for the GPOPolicy.
            return(StartedAt.GetHashCode() ^ hashHostName ^ hashPublicUri ^ hashHubs);
        }
示例#10
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Text != null ? Text.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^
                    (Header != null ? Header.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)State;
         hashCode = (hashCode * 397) ^ StartedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ Duration.GetHashCode();
         return(hashCode);
     }
 }
示例#11
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)BatchType;
         hashCode = (hashCode * 397) ^ (IndexesToWorkOn != null ? IndexesToWorkOn.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ TotalDocumentCount;
         hashCode = (hashCode * 397) ^ TotalDocumentSize.GetHashCode();
         hashCode = (hashCode * 397) ^ StartedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ TotalDuration.GetHashCode();
         hashCode = (hashCode * 397) ^ (PerformanceStats != null ? PerformanceStats.GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#12
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Project != null ? Project.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ProjectConfiguration != null ? ProjectConfiguration.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Platform != null ? Platform.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SolutionConfiguration != null ? SolutionConfiguration.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ StartedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ Duration.GetHashCode();
         hashCode = (hashCode * 397) ^ Successful.GetHashCode();
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (FinishedAt != null ? FinishedAt.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Message != null ? Message.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (RequestedOperation != null ? RequestedOperation.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Phase != null ? Phase.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (RetryCount != null ? RetryCount.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (StartedAt != null ? StartedAt.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SyncResult != null ? SyncResult.GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#14
0
        /// <summary>
        /// Override of the equality method.
        /// </summary>
        /// <param name="o"></param>
        /// <returns></returns>
        public bool Equals(SignalRServers o)
        {
            //Check whether the compared object is null.
            if (ReferenceEquals(o, null))
            {
                return(false);
            }

            //Check whether the compared object references the same data.
            if (ReferenceEquals(this, o))
            {
                return(true);
            }

            //Check whether the SignalRServers' properties are equal.
            return(StartedAt.Equals(o.StartedAt) && HostName.Equals(o.HostName) && PublicUri.Equals(o.PublicUri) && Tools.SequenceEqual(Hubs, o.Hubs));
        }
示例#15
0
 public void MergeFrom(Backup other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.FolderId.Length != 0)
     {
         FolderId = other.FolderId;
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.SourceClusterId.Length != 0)
     {
         SourceClusterId = other.SourceClusterId;
     }
     if (other.startedAt_ != null)
     {
         if (startedAt_ == null)
         {
             StartedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         StartedAt.MergeFrom(other.StartedAt);
     }
     sourceShardNames_.Add(other.sourceShardNames_);
     if (other.Size != 0L)
     {
         Size = other.Size;
     }
     if (other.Type != global::Yandex.Cloud.Mdb.Mongodb.V1.Backup.Types.BackupType.Unspecified)
     {
         Type = other.Type;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
示例#16
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (startedAt_ != null)
            {
                hash ^= StartedAt.GetHashCode();
            }
            if (completedAt_ != null)
            {
                hash ^= CompletedAt.GetHashCode();
            }
            hash ^= results_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#17
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (FolderId.Length != 0)
            {
                hash ^= FolderId.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            if (SourceClusterId.Length != 0)
            {
                hash ^= SourceClusterId.GetHashCode();
            }
            if (startedAt_ != null)
            {
                hash ^= StartedAt.GetHashCode();
            }
            hash ^= sourceShardNames_.GetHashCode();
            if (Size != 0L)
            {
                hash ^= Size.GetHashCode();
            }
            if (Type != global::Yandex.Cloud.Mdb.Mongodb.V1.Backup.Types.BackupType.Unspecified)
            {
                hash ^= Type.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public String ToJSON(Boolean iFinish,
                             HttpStatusCode iStatusCode,
                             IJSONSerialisable iReturnValue,
                             Newtonsoft.Json.Formatting iFormatting)
        {
            if (iFinish)
            {
                Finish();
            }
            JObject pJOtJSON       = new JObject();
            JObject pJOtStatistics = new JObject();

            pJOtStatistics.Add("StartedAt", new JValue(StartedAt.ToString(EnvironmentHelpers.GetEnvironmentVariable("DateTimeFormat"))));
            pJOtStatistics.Add("FinishedAt", new JValue(StartedAt.ToString(EnvironmentHelpers.GetEnvironmentVariable("DateTimeFormat"))));
            pJOtStatistics.Add("Ellapsed", new JValue(Ellapsed.ToString()));
            pJOtJSON.Add("Statistics", pJOtStatistics);
            JObject pJOtResponse = new JObject();

            pJOtResponse.Add("StatusCode", new JValue((Int32)iStatusCode));
            pJOtResponse.Add("ReturnValue", iReturnValue.ToJObject());
            pJOtJSON.Add("Response", pJOtResponse);
            return(pJOtJSON.ToString(iFormatting));
        }
示例#19
0
 public void MergeFrom(Backup other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.FolderId.Length != 0)
     {
         FolderId = other.FolderId;
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.SourceClusterId.Length != 0)
     {
         SourceClusterId = other.SourceClusterId;
     }
     if (other.startedAt_ != null)
     {
         if (startedAt_ == null)
         {
             StartedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         StartedAt.MergeFrom(other.StartedAt);
     }
     sourceShardNames_.Add(other.sourceShardNames_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
示例#20
0
 public void MergeFrom(TestRun other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Status != 0)
     {
         Status = other.Status;
     }
     if (other.Info.Length != 0)
     {
         Info = other.Info;
     }
     if (other.startedAt_ != null)
     {
         if (startedAt_ == null)
         {
             startedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         StartedAt.MergeFrom(other.StartedAt);
     }
     if (other.completedAt_ != null)
     {
         if (completedAt_ == null)
         {
             completedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CompletedAt.MergeFrom(other.CompletedAt);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
示例#21
0
        /// <summary>
        /// Returns true if PipelineExecutionStepState instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineExecutionStepState to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineExecutionStepState other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     StepId == other.StepId ||
                     StepId != null &&
                     StepId.Equals(other.StepId)
                 ) &&
                 (
                     PhaseId == other.PhaseId ||
                     PhaseId != null &&
                     PhaseId.Equals(other.PhaseId)
                 ) &&
                 (
                     Action == other.Action ||
                     Action != null &&
                     Action.Equals(other.Action)
                 ) &&
                 (
                     Repository == other.Repository ||
                     Repository != null &&
                     Repository.Equals(other.Repository)
                 ) &&
                 (
                     Branch == other.Branch ||
                     Branch != null &&
                     Branch.Equals(other.Branch)
                 ) &&
                 (
                     Environment == other.Environment ||
                     Environment != null &&
                     Environment.Equals(other.Environment)
                 ) &&
                 (
                     EnvironmentType == other.EnvironmentType ||
                     EnvironmentType != null &&
                     EnvironmentType.Equals(other.EnvironmentType)
                 ) &&
                 (
                     StartedAt == other.StartedAt ||
                     StartedAt != null &&
                     StartedAt.Equals(other.StartedAt)
                 ) &&
                 (
                     FinishedAt == other.FinishedAt ||
                     FinishedAt != null &&
                     FinishedAt.Equals(other.FinishedAt)
                 ) &&
                 (
                     Details == other.Details ||
                     Details != null &&
                     other.Details != null &&
                     Details.SequenceEqual(other.Details)
                 ) &&
                 (
                     Status == other.Status ||

                     Status.Equals(other.Status)
                 ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     Links.Equals(other.Links)
                 ));
        }
示例#22
0
 public override string ToString()
 {
     return($"{Id.ToString()}@{StartedAt.ToString(CultureInfo.InvariantCulture)}");
 }
 /// <summary>
 /// Filter by the date the user started the media.
 /// </summary>
 public GraphQueryArgument <FuzzyDateInt> StartedAtQueryArgument(FuzzyDateInt value)
 {
     return(StartedAt.GetQueryArgumentAndSetValue(value));
 }
示例#24
0
 public bool Equals(IndexingBatchInfo other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(BatchType == other.BatchType && Equals(IndexesToWorkOn, other.IndexesToWorkOn) && TotalDocumentCount == other.TotalDocumentCount && TotalDocumentSize == other.TotalDocumentSize && StartedAt.Equals(other.StartedAt) && TotalDuration.Equals(other.TotalDuration) && Equals(PerformanceStats, other.PerformanceStats));
 }