示例#1
0
        public TagUsageContract(TagUsage usage)
        {
            ParamIs.NotNull(() => usage);

            Count = usage.Count;
            Id = usage.Id;
            TagName = usage.Tag.Name;
        }
示例#2
0
        public virtual bool Equals(TagUsage another)
        {
            if (another == null)
                return false;

            if (ReferenceEquals(this, another))
                return true;

            if (Id == 0)
                return false;

            return this.Id == another.Id;
        }
示例#3
0
        public virtual bool Equals(TagUsage another)
        {
            if (another == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, another))
            {
                return(true);
            }

            if (Id == 0)
            {
                return(false);
            }

            return(this.Id == another.Id);
        }
 public TagUsageWithVotesContract(TagUsage usage)
     : base(usage)
 {
     Votes = usage.VotesBase.Select(v => new UserContract(v.User)).ToArray();
 }
		public TagUsageForApiContract(TagUsage tagUsage) {
			Name = tagUsage.Tag.Name;
			Count = tagUsage.Count;
		}