Exemple #1
0
        /// <summary>
        /// Returns true if SecurityContractApplication instances are equal
        /// </summary>
        /// <param name="other">Instance of SecurityContractApplication to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SecurityContractApplication other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Fullname == other.Fullname ||
                     Fullname != null &&
                     Fullname.Equals(other.Fullname)
                     ) &&
                 (
                     ApplicationFunctions == other.ApplicationFunctions ||
                     ApplicationFunctions != null &&
                     other.ApplicationFunctions != null &&
                     ApplicationFunctions.SequenceEqual(other.ApplicationFunctions)
                 ) &&
                 (
                     DataPolicies == other.DataPolicies ||
                     DataPolicies != null &&
                     other.DataPolicies != null &&
                     DataPolicies.SequenceEqual(other.DataPolicies)
                 ));
        }
Exemple #2
0
        /// <summary>
        /// Returns true if InlineResponseDefault5Value instances are equal
        /// </summary>
        /// <param name="other">Instance of InlineResponseDefault5Value to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InlineResponseDefault5Value other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     OdataEtag == other.OdataEtag ||
                     OdataEtag != null &&
                     OdataEtag.Equals(other.OdataEtag)
                     ) &&
                 (
                     Nickname == other.Nickname ||
                     Nickname != null &&
                     Nickname.Equals(other.Nickname)
                 ) &&
                 (
                     Fullname == other.Fullname ||
                     Fullname != null &&
                     Fullname.Equals(other.Fullname)
                 ) &&
                 (
                     Firstname == other.Firstname ||
                     Firstname != null &&
                     Firstname.Equals(other.Firstname)
                 ) &&
                 (
                     Lastname == other.Lastname ||
                     Lastname != null &&
                     Lastname.Equals(other.Lastname)
                 ) &&
                 (
                     Azureactivedirectoryobjectid == other.Azureactivedirectoryobjectid ||
                     Azureactivedirectoryobjectid != null &&
                     Azureactivedirectoryobjectid.Equals(other.Azureactivedirectoryobjectid)
                 ) &&
                 (
                     Systemuserid == other.Systemuserid ||
                     Systemuserid != null &&
                     Systemuserid.Equals(other.Systemuserid)
                 ) &&
                 (
                     Ownerid == other.Ownerid ||
                     Ownerid != null &&
                     Ownerid.Equals(other.Ownerid)
                 ));
        }
Exemple #3
0
        /// <summary>
        /// Return information about the current Comment instance via the api/info endpoint.
        /// </summary>
        /// <returns>An instance of this class populated with the retrieved data.</returns>
        public Comment Info()
        {
            Things.Info info = Validate(Dispatch.LinksAndComments.Info(Fullname, Subreddit));
            if (info == null ||
                info.Comments == null ||
                info.Comments.Count == 0 ||
                !Fullname.Equals(info.Comments[0].Name))
            {
                throw new RedditControllerException("Unable to retrieve comment data.");
            }

            return(new Comment(Dispatch, info.Comments[0]));
        }
Exemple #4
0
        /// <summary>
        /// Return information about the current SelfPost instance.
        /// </summary>
        /// <returns>An instance of this class populated with the retrieved data.</returns>
        public new SelfPost About()
        {
            Info info = Validate(Dispatch.LinksAndComments.Info(Fullname, Subreddit));

            if (info == null ||
                info.Posts == null ||
                info.Posts.Count == 0 ||
                !Fullname.Equals(info.Posts[0].Name))
            {
                throw new RedditControllerException("Unable to retrieve post data.");
            }

            return(new SelfPost(Dispatch, info.Posts[0]));
        }
Exemple #5
0
 private bool Diff(LiveThread compare)
 {
     return(!(Id.Equals(compare.Id) &&
              Description.Equals(compare.Description) &&
              NSFW.Equals(compare.NSFW) &&
              Resources.Equals(compare.Resources) &&
              TotalViews.Equals(compare.TotalViews) &&
              Created.Equals(compare.Created) &&
              Fullname.Equals(compare.Fullname) &&
              IsAnnouncement.Equals(compare.IsAnnouncement) &&
              AnnouncementURL.Equals(compare.AnnouncementURL) &&
              State.Equals(compare.State) &&
              ViewerCount.Equals(compare.ViewerCount) &&
              Icon.Equals(compare.Icon)));
 }
        /// <summary>
        /// Returns true if InlineResponseDefaultCreatedby instances are equal
        /// </summary>
        /// <param name="other">Instance of InlineResponseDefaultCreatedby to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InlineResponseDefaultCreatedby other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Fullname == other.Fullname ||
                     Fullname != null &&
                     Fullname.Equals(other.Fullname)
                     ) &&
                 (
                     Firstname == other.Firstname ||
                     Firstname != null &&
                     Firstname.Equals(other.Firstname)
                 ) &&
                 (
                     Lastname == other.Lastname ||
                     Lastname != null &&
                     Lastname.Equals(other.Lastname)
                 ) &&
                 (
                     Nickname == other.Nickname ||
                     Nickname != null &&
                     Nickname.Equals(other.Nickname)
                 ) &&
                 (
                     Systemuserid == other.Systemuserid ||
                     Systemuserid != null &&
                     Systemuserid.Equals(other.Systemuserid)
                 ) &&
                 (
                     Ownerid == other.Ownerid ||
                     Ownerid != null &&
                     Ownerid.Equals(other.Ownerid)
                 ));
        }