public override int GetHashCode()
                {
                    int hash = 1;

                    if (HasCreationDateTime)
                    {
                        hash ^= CreationDateTime.GetHashCode();
                    }
                    if (HasStartDateTime)
                    {
                        hash ^= StartDateTime.GetHashCode();
                    }
                    if (HasCompletionDateTime)
                    {
                        hash ^= CompletionDateTime.GetHashCode();
                    }
                    if (HasEstimatedCompletionRatio)
                    {
                        hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(EstimatedCompletionRatio);
                    }
                    if (HasOperationCount)
                    {
                        hash ^= OperationCount.GetHashCode();
                    }
                    if (HasExecutedOperationCount)
                    {
                        hash ^= ExecutedOperationCount.GetHashCode();
                    }
                    if (_unknownFields != null)
                    {
                        hash ^= _unknownFields.GetHashCode();
                    }
                    return(hash);
                }
                public override int GetHashCode()
                {
                    int hash = 1;

                    if (creationDateTime_ != null)
                    {
                        hash ^= CreationDateTime.GetHashCode();
                    }
                    if (completionDateTime_ != null)
                    {
                        hash ^= CompletionDateTime.GetHashCode();
                    }
                    if (estimatedCompletionRatio_ != null)
                    {
                        hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.GetHashCode(EstimatedCompletionRatio);
                    }
                    if (operationCount_ != null)
                    {
                        hash ^= OperationCount.GetHashCode();
                    }
                    if (executedOperationCount_ != null)
                    {
                        hash ^= ExecutedOperationCount.GetHashCode();
                    }
                    if (_unknownFields != null)
                    {
                        hash ^= _unknownFields.GetHashCode();
                    }
                    return(hash);
                }
Exemple #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (InvitationId != 0L)
            {
                hash ^= InvitationId.GetHashCode();
            }
            if (AccessRole != global::Google.Ads.GoogleAds.V8.Enums.AccessRoleEnum.Types.AccessRole.Unspecified)
            {
                hash ^= AccessRole.GetHashCode();
            }
            if (EmailAddress.Length != 0)
            {
                hash ^= EmailAddress.GetHashCode();
            }
            if (CreationDateTime.Length != 0)
            {
                hash ^= CreationDateTime.GetHashCode();
            }
            if (InvitationStatus != global::Google.Ads.GoogleAds.V8.Enums.AccessInvitationStatusEnum.Types.AccessInvitationStatus.Unspecified)
            {
                hash ^= InvitationStatus.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
    public override string ToString()
    {
        StringBuilder sb = new StringBuilder();

        sb.AppendLine(Title);
        sb.AppendLine(Description);
        sb.AppendLine(CreationDateTime.ToString("G"));
        sb.AppendLine(ModifiedDateTime.ToString("G"));
        sb.AppendLine(NumberOfRobots + "");
        sb.AppendLine(FieldHeight + "");
        sb.AppendLine(FieldWidth + "");
        return(sb.ToString());
    }
Exemple #5
0
        public override int GetHashCode()
        {
            int hashCode = -1147776445;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Color);

            hashCode = hashCode * -1521134295 + CreationDateTime.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Data);

            hashCode = hashCode * -1521134295 + FinishDateTime.GetHashCode();
            return(hashCode);
        }
 public bool Equals(Order other)
 {
     if (!Id.Equals(other.Id))
     {
         return(false);
     }
     if (!CreationDateTime.Equals(other.CreationDateTime))
     {
         return(false);
     }
     if (!Address.Equals(other.Address))
     {
         return(false);
     }
     if (!Contacts.Equals(other.Contacts))
     {
         return(false);
     }
     if (!Note.Equals(other.Note))
     {
         return(false);
     }
     if (!Manager.Equals(other.Manager))
     {
         return(false);
     }
     if (!CreationDateTime.Equals(other.CreationDateTime))
     {
         return(false);
     }
     if (!Items.SequenceEqual(other.Items))
     {
         return(false);
     }
     return(true);
 }
Exemple #7
0
        public override int CompareTo(AcPlaceholderNew o)
        {
            var or = o as ReplayObject;

            return(or != null?CreationDateTime.CompareTo(or.CreationDateTime) : base.CompareTo(o));
        }
 protected bool Equals(ContainerImage other)
 {
     return(Repository == other.Repository && Hash == other.Hash && Tag == other.Tag && CreationDateTime.Equals(other.CreationDateTime));
 }
Exemple #9
0
        /// <summary>
        /// Displays the various information for a comment, including: the title, description, who it was created by, and the creation datetime.
        /// </summary>
        /// <returns>Returns the title, description, creator, and the creation datetime of a Comment type object, in the form of a string statement.</returns>
        public String DisplayComment()
        {
            if (string.IsNullOrEmpty(Title) || string.IsNullOrEmpty(Description) || string.IsNullOrEmpty(CreatedBy) || CreationDateTime.Equals(null))
            {
                DisplayUtility.ErrorMessageForNullOrEmpty();
            }

            return("_____________________________________\n\n" + "Title: " + Title + "\n\nDescription: " + Description + "\n\nCreated By: " + CreatedBy + "\n" + CreationDateTime);
        }
Exemple #10
0
 public override string ToString()
 {
     return($"ID: {ID}\nContent: {Content}\nCreation Date: {CreationDateTime.ToLongTimeString()}\nView Count: {ViewCount}\tLike Count: {LikeCount}\n");
 }
Exemple #11
0
        /// <summary>
        /// Saves the Routable Message to a file
        /// </summary>
        /// <param name="fileName">The file where the message is being saved</param>
        public void SaveToFile(string fileName)
        {
            try
            {
                // Ensure all variables are informed
                if (CreationDateTime == DateTime.MinValue)
                {
                    CreationDateTime = DateTime.Now;
                }

                // Defines the format of the file
                FormatOptions dosLineFormat = new FormatOptions()
                {
                    NewLineFormat = NewLineFormat.Dos,
                };

                // Prepare File Output
                using (var fileStream = File.Create(fileName))
                {
                    // Creates a stream for the header
                    using (MemoryStream streamHeader = new MemoryStream())
                    {
                        using (StreamWriter streamHeaderWriter = new StreamWriter(streamHeader, Encoding.GetEncoding(28592)))
                        {
                            // Ensure to not Automatically Flush
                            streamHeaderWriter.AutoFlush = false;

                            // Writes the SmtpRouter Header
                            streamHeaderWriter.WriteLine(SMTPROUTER_HEADER_BEGIN);
                            streamHeaderWriter.WriteLine($"{SMTPROUTER_HEADER_VERSION}: {SMTPROUTER_VERSION}");
                            streamHeaderWriter.WriteLine($"{SMTPROUTER_HEADER_CREATIONTIME}: {CreationDateTime.ToString(SMTPROUTER_HEADER_CREATIONTIME_FORMAT)}");
                            streamHeaderWriter.WriteLine($"{SMTPROUTER_HEADER_FROM}: {MailFrom.Address.ToString()}");
                            streamHeaderWriter.WriteLine($"{SMTPROUTER_HEADER_IPADDRESS}: {IPAddress}");

                            foreach (var mailTo in Recipients)
                            {
                                streamHeaderWriter.WriteLine($"{SMTPROUTER_HEADER_TO}: {mailTo.Address.ToString()}");
                            }

                            streamHeaderWriter.WriteLine(SMTPROUTER_HEADER_END);

                            // Flushes to the file
                            streamHeaderWriter.Flush();

                            // Copy Header to file
                            streamHeader.Seek(0, SeekOrigin.Begin);
                            streamHeader.CopyTo(fileStream);
                        }
                    }

                    // Creates a stream for the Message
                    using (MemoryStream streamMessage = new MemoryStream())
                    {
                        Message.WriteTo(dosLineFormat, streamMessage);

                        streamMessage.Seek(0, SeekOrigin.Begin);
                        streamMessage.CopyTo(fileStream);
                    }

                    // Flush it to the file
                    fileStream.Flush();
                }
            }
            catch (Exception e)
            {
                throw new MessageNotQueuedException(this, e);
            }
        }