Ejemplo n.º 1
0
 public override string ToString()
 {
     return($"{base.ToString()}, " +
            $"{nameof(Album)}: {Album}, " +
            $"{nameof(DurationHuman)}: {DurationHuman}, " +
            $"{nameof(Url)}: {Url}, " +
            $"{nameof(Id)}: {Id}, " +
            $"{nameof(IsVideo)}: {IsVideo.ToString()}, " +
            $"{nameof(IsAdvertisement)}: {IsAdvertisement.ToString()}, " +
            $"{nameof(InLibrary)}: {InLibrary.ToString()}");
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hashCode = 883736284;

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

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

            hashCode = hashCode * -1521134295 + IsAnimated.GetHashCode();
            hashCode = hashCode * -1521134295 + IsVideo.GetHashCode();
            hashCode = hashCode * -1521134295 + ContainsMasks.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <IEnumerable <Sticker> > .Default.GetHashCode(Stickers);

            hashCode = hashCode * -1521134295 + EqualityComparer <PhotoSize> .Default.GetHashCode(Thumb);

            return(hashCode);
        }
Ejemplo n.º 3
0
        override public string ToString()
        {
            string val       = Value.ToString();
            string typ       = Type.ToString();
            string ron       = Round.ToString();
            string vid       = IsVideo.ToString();
            string aud       = IsAudio.ToString();
            string lin       = HasLink.ToString();
            string retString = "Clue: " + Clue + "\n" +
                               " Answer: " + Answer + "\n" +
                               " Category " + Category + "\n" +
                               " Round: " + ron + "\n" +
                               " Value: " + val + "\n" +
                               " Type: " + typ + "\n" +
                               " Has Video: " + vid + "\n" +
                               " Has Audio: " + aud + "\n" +
                               " Has Link: " + lin + "\n";

            return(retString);
        }
Ejemplo n.º 4
0
        public override int GetHashCode()
        {
            int hashCode = -1863026592;

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

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

            hashCode = hashCode * -1521134295 + Width.GetHashCode();
            hashCode = hashCode * -1521134295 + Height.GetHashCode();
            hashCode = hashCode * -1521134295 + IsAnimated.GetHashCode();
            hashCode = hashCode * -1521134295 + IsVideo.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <PhotoSize> .Default.GetHashCode(Thumb);

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

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

            hashCode = hashCode * -1521134295 + EqualityComparer <MaskPosition> .Default.GetHashCode(MaskPosition);

            hashCode = hashCode * -1521134295 + FileSize.GetHashCode();
            return(hashCode);
        }
Ejemplo n.º 5
0
        public override List <string> ToArgs()
        {
            var args = base.ToArgs();

            if (!string.IsNullOrEmpty(QueryNot))
            {
                args.Add($"q:not={QueryNot}");
            }

            if (!string.IsNullOrEmpty(Title))
            {
                args.Add($"title={Title}");
            }

            if (!string.IsNullOrEmpty(TitleNot))
            {
                args.Add($"title:not={TitleNot}");
            }

            if (!string.IsNullOrEmpty(Selftext))
            {
                args.Add($"selftext={Selftext}");
            }

            if (!string.IsNullOrEmpty(SelftextNot))
            {
                args.Add($"selftext:not={SelftextNot}");
            }

            if (!string.IsNullOrEmpty(Score))
            {
                args.Add($"score={Score}");
            }

            if (!string.IsNullOrEmpty(NumComments))
            {
                args.Add($"num_comments={NumComments}");
            }

            if (Over18.HasValue)
            {
                args.Add($"over_18={Over18.ToString().ToLower()}");
            }

            if (IsVideo.HasValue)
            {
                args.Add($"is_video={IsVideo.ToString().ToLower()}");
            }

            if (Locked.HasValue)
            {
                args.Add($"locked={Locked.ToString().ToLower()}");
            }

            if (Stickied.HasValue)
            {
                args.Add($"stickied={Stickied.ToString().ToLower()}");
            }

            if (Spoiler.HasValue)
            {
                args.Add($"spoiler={Spoiler.ToString().ToLower()}");
            }

            if (ContestMode.HasValue)
            {
                args.Add($"contest_mode={ContestMode.ToString().ToLower()}");
            }

            return(args);
        }
Ejemplo n.º 6
0
        public bool Equals(ContentTypeProperty input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Name == input.Name ||
                     (Name != null && Name.Equals(input.Name))
                     ) &&
                 (
                     RootPropertyName == input.RootPropertyName ||
                     (RootPropertyName != null && RootPropertyName.Equals(input.RootPropertyName))
                 ) &&
                 (
                     ReadableName == input.ReadableName ||
                     (ReadableName != null && ReadableName.Equals(input.ReadableName))
                 ) &&
                 (
                     Value == input.Value ||
                     (Value != null && Value.Equals(input.Value))
                 ) &&
                 (
                     PropertyDescription == input.PropertyDescription ||
                     (PropertyDescription != null && PropertyDescription.Equals(input.PropertyDescription))
                 ) &&
                 (
                     Localizable == input.Localizable ||
                     (Localizable != null && Localizable.Equals(input.Localizable))
                 ) &&
                 (
                     Fallback == input.Fallback ||
                     (Fallback != null && Fallback.Equals(input.Fallback))
                 ) &&
                 (
                     Enabled == input.Enabled ||
                     (Enabled != null && Enabled.Equals(input.Enabled))
                 ) &&
                 (
                     Order == input.Order ||
                     (Order.Equals(input.Order))
                 ) &&
                 (
                     Visible == input.Visible ||
                     (Visible != null && Visible.Equals(input.Visible))
                 ) &&
                 (
                     IsTitle == input.IsTitle ||
                     (IsTitle != null && IsTitle.Equals(input.IsTitle))
                 ) &&
                 (
                     Required == input.Required ||
                     (Required != null && Required.Equals(input.Required))
                 ) &&
                 (
                     MaxLength == input.MaxLength ||
                     (MaxLength.Equals(input.MaxLength))
                 ) &&
                 (
                     MaxByteLength == input.MaxByteLength ||
                     (MaxByteLength.Equals(input.MaxByteLength))
                 ) &&
                 (
                     MaxFileSize == input.MaxFileSize ||
                     (MaxFileSize.Equals(input.MaxFileSize))
                 ) &&
                 (
                     Regexp == input.Regexp ||
                     (Regexp != null && Regexp.Equals(input.Regexp))
                 ) &&
                 (
                     ValidateAs == input.ValidateAs ||
                     (ValidateAs != null && ValidateAs.Equals(input.ValidateAs))
                 ) &&
                 (
                     RssAttribute == input.RssAttribute ||
                     (RssAttribute != null && RssAttribute.Equals(input.RssAttribute))
                 ) &&
                 (
                     VisibleDependency == input.VisibleDependency ||
                     (VisibleDependency != null && VisibleDependency.Equals(input.VisibleDependency))
                 ) &&
                 (
                     VisibleOn == input.VisibleOn ||
                     (VisibleOn != null && VisibleOn.Equals(input.VisibleOn))
                 ) &&
                 (
                     Datatype == input.Datatype ||
                     (Datatype != null && Datatype.Equals(input.Datatype))
                 ) &&
                 (
                     Attributes == input.Attributes ||
                     (Attributes != null && Attributes.SequenceEqual(input.Attributes))
                 ) &&
                 (
                     ChildProperties == input.ChildProperties ||
                     (ChildProperties != null && ChildProperties.SequenceEqual(input.ChildProperties))
                 ) &&
                 (
                     ContentTypeAllowed == input.ContentTypeAllowed ||
                     (ContentTypeAllowed != null && ContentTypeAllowed.Equals(input.ContentTypeAllowed))
                 ) &&
                 (
                     BindToProperty == input.BindToProperty ||
                     (BindToProperty != null && BindToProperty.Equals(input.BindToProperty))
                 ) &&
                 (
                     BoundRegex == input.BoundRegex ||
                     (BoundRegex != null && BoundRegex.Equals(input.BoundRegex))
                 ) &&
                 (
                     RepresentationSelection == input.RepresentationSelection ||
                     (RepresentationSelection != null && RepresentationSelection.SequenceEqual(input.RepresentationSelection))
                 ) &&
                 (
                     DefaultValues == input.DefaultValues ||
                     (DefaultValues != null && DefaultValues.SequenceEqual(input.DefaultValues))
                 ) &&
                 (
                     IsExternalAllowed == input.IsExternalAllowed ||
                     (IsExternalAllowed != null && IsExternalAllowed.Equals(input.IsExternalAllowed))
                 ) &&
                 (
                     PropertySection == input.PropertySection ||
                     (PropertySection != null && PropertySection.Equals(input.PropertySection))
                 ) &&
                 (
                     Weight == input.Weight ||
                     (Weight.Equals(input.Weight))
                 ) &&
                 (
                     Entitytype == input.Entitytype ||
                     (Entitytype != null && Entitytype.Equals(input.Entitytype))
                 ) &&
                 (
                     IsCombo == input.IsCombo ||
                     (IsCombo != null && IsCombo.Equals(input.IsCombo))
                 ) &&
                 (
                     SuppressProperty == input.SuppressProperty ||
                     (SuppressProperty != null && SuppressProperty.Equals(input.SuppressProperty))
                 ) &&
                 (
                     LegalContentTypes == input.LegalContentTypes ||
                     (LegalContentTypes != null && LegalContentTypes.SequenceEqual(input.LegalContentTypes))
                 ) &&
                 (
                     RepresentationValidationString == input.RepresentationValidationString ||
                     (RepresentationValidationString != null && RepresentationValidationString.Equals(input.RepresentationValidationString))
                 ) &&
                 (
                     MinWidth == input.MinWidth ||
                     (MinWidth.Equals(input.MinWidth))
                 ) &&
                 (
                     MaxWidth == input.MaxWidth ||
                     (MaxWidth.Equals(input.MaxWidth))
                 ) &&
                 (
                     MinHeight == input.MinHeight ||
                     (MinHeight.Equals(input.MinHeight))
                 ) &&
                 (
                     MaxHeight == input.MaxHeight ||
                     (MaxHeight.Equals(input.MaxHeight))
                 ) &&
                 (
                     IsVideo == input.IsVideo ||
                     (IsVideo != null && IsVideo.Equals(input.IsVideo))
                 ) &&
                 (
                     IsImage == input.IsImage ||
                     (IsImage != null && IsImage.Equals(input.IsImage))
                 ));
        }