Skip to content

Commit

Permalink
fixes around Benchmark; this code has atrophied pretty badly
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-montrose committed Dec 28, 2014
1 parent eb2a5dd commit 66a2b1d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 56 deletions.
108 changes: 54 additions & 54 deletions Benchmark/Models/Feed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public bool Equals(MobileFeed obj)
public bool EqualsDynamic(dynamic obj)
{
return
this.account_id == obj.account_id &&
this.account_id == (int?)obj.account_id &&
this.association_bonuses.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.association_bonuses) &&
this.badges.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.badges) &&
this.banner_ads.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.banner_ads) &&
Expand Down Expand Up @@ -188,12 +188,12 @@ public bool Equals(MobileRepChange obj)
public bool EqualsDynamic(dynamic obj)
{
return
this.added_date == obj.added_date &&
this.group_id == obj.group_id &&
this.link == obj.link &&
this.rep_change == obj.rep_change &&
this.site == obj.site &&
this.title == obj.title;
this.added_date == (long?)obj.added_date &&
this.group_id == (int?)obj.group_id &&
this.link == (string)obj.link &&
this.rep_change == (int?)obj.rep_change &&
this.site == (string)obj.site &&
this.title == (string)obj.title;
}
}

Expand Down Expand Up @@ -243,17 +243,17 @@ public bool Equals(MobileInboxItem obj)
public bool EqualsDynamic(dynamic obj)
{
return
this.added_date == obj.added_date &&
this.answer_id == obj.answer_id &&
this.body == obj.body &&
this.comment_id == obj.comment_id &&
this.creation_date == obj.creation_date &&
this.group_id == obj.group_id &&
this.item_type == obj.item_type &&
this.link == obj.link &&
this.question_id == obj.question_id &&
this.site == obj.site &&
this.title == obj.title;
this.added_date == (long?)obj.added_date &&
this.answer_id == (int?)obj.answer_id &&
this.body == (string)obj.body &&
this.comment_id == (int?)obj.comment_id &&
this.creation_date == (long?)obj.creation_date &&
this.group_id == (int?)obj.group_id &&
this.item_type == (string)obj.item_type &&
this.link == (string)obj.link &&
this.question_id == (int?)obj.question_id &&
this.site == (string)obj.site &&
this.title == (string)obj.title;
}
}

Expand Down Expand Up @@ -285,7 +285,7 @@ public enum BadgeType
[ProtoMember(5)]
public string badge_description { get; set; }
[ProtoMember(6)]
public int badge_id { get; set; }
public int? badge_id { get; set; }

[ProtoMember(7)]
public int? post_id { get; set; }
Expand Down Expand Up @@ -315,16 +315,16 @@ public bool Equals(MobileBadgeAward obj)
public bool EqualsDynamic(dynamic obj)
{
return
this.added_date == obj.added_date &&
this.badge_description == obj.badge_description &&
this.badge_id == obj.badge_id &&
this.badge_name == obj.badge_name &&
this.badge_type == obj.badge_type &&
this.group_id == obj.group_id &&
this.link == obj.link &&
this.post_id == obj.post_id &&
this.rank == obj.rank &&
this.site == obj.site;
this.added_date == (long?)obj.added_date &&
this.badge_description == (string)obj.badge_description &&
this.badge_id == (int?)obj.badge_id &&
this.badge_name == (string)obj.badge_name &&
this.badge_type == (BadgeType?)obj.badge_type &&
this.group_id == (int?)obj.group_id &&
this.link == (string)obj.link &&
this.post_id == (int?)obj.post_id &&
this.rank == (BadgeRank?)obj.rank &&
this.site == (string)obj.site;
}
}

Expand Down Expand Up @@ -366,14 +366,14 @@ public bool Equals(MobilePrivilege obj)
public bool EqualsDynamic(dynamic obj)
{
return
this.added_date == obj.added_date &&
this.group_id == obj.group_id &&
this.link == obj.link &&
this.privilege_id == obj.privilege_id &&
this.privilege_long_description == obj.privilege_long_description &&
this.privilege_short_description == obj.privilege_short_description &&
this.reputation_required == obj.reputation_required &&
this.site == obj.site;
this.added_date == (long?)obj.added_date &&
this.group_id == (int?)obj.group_id &&
this.link == (string)obj.link &&
this.privilege_id == (int?)obj.privilege_id &&
this.privilege_long_description == (string)obj.privilege_long_description &&
this.privilege_short_description == (string)obj.privilege_short_description &&
this.reputation_required == (int?)obj.reputation_required &&
this.site == (string)obj.site;
}
}

Expand Down Expand Up @@ -486,10 +486,10 @@ public bool Equals(MobileAssociationBonus obj)
public bool EqualsDynamic(dynamic obj)
{
return
this.added_date == obj.added_date &&
this.amount == obj.amount &&
this.group_id == obj.group_id &&
this.site == obj.site;
this.added_date == (long?)obj.added_date &&
this.amount == (int?)obj.amount &&
this.group_id == (int?)obj.group_id &&
this.site == (string)obj.site;
}
}

Expand Down Expand Up @@ -527,13 +527,13 @@ public bool Equals(MobileCareersJobAd obj)
public bool EqualsDynamic(dynamic obj)
{
return
this.added_date == obj.added_date &&
this.company_name == obj.company_name &&
this.group_id == obj.group_id &&
this.job_id == obj.job_id &&
this.link == obj.link &&
this.location == obj.location &&
this.title == obj.title;
this.added_date == (long?)obj.added_date &&
this.company_name == (string)obj.company_name &&
this.group_id == (int?)obj.group_id &&
this.job_id == (int?)obj.job_id &&
this.link == (string)obj.link &&
this.location == (string)obj.location &&
this.title == (string)obj.title;
}
}

Expand Down Expand Up @@ -561,9 +561,9 @@ public bool Equals(MobileBannerAdImage obj)
public bool EqualsDynamic(dynamic obj)
{
return
this.height == obj.height &&
this.image_url == obj.image_url &&
this.width == obj.width;
this.height == (int?)obj.height &&
this.image_url == (string)obj.image_url &&
this.width == (int?)obj.width;
}
}

Expand Down Expand Up @@ -618,9 +618,9 @@ public bool Equals(MobileUpdateNotice obj)
public bool EqualsDynamic(dynamic obj)
{
return
this.message == obj.message &&
this.minimum_supported_version == obj.minimum_supported_version &&
this.should_update == obj.should_update;
this.message == (string)obj.message &&
this.minimum_supported_version == (string)obj.minimum_supported_version &&
this.should_update == (bool?)obj.should_update;
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Models/Tag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public bool EqualsDynamic(dynamic obj)
{
return
this.count.TrueEquals((int?)obj.count) &&
this.has_synonyms.TrueEquals((bool)obj.has_synonyms) &&
this.has_synonyms.TrueEquals((bool?)obj.has_synonyms) &&
this.is_moderator_only.TrueEquals((bool?)obj.is_moderator_only) &&
this.is_required.TrueEquals((bool?)obj.is_required) &&
this.last_activity_date.TrueEquals((DateTime?)obj.last_activity_date) &&
Expand Down
2 changes: 1 addition & 1 deletion Benchmark/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static List<Type> GetModels()
Assembly
.GetExecutingAssembly()
.GetTypes()
.Where(t => t.Namespace == "Benchmark.Models" && !t.IsEnum && !t.IsInterface)
.Where(t => t.Namespace == "Benchmark.Models" && !t.IsEnum && !t.IsInterface && !t.IsAbstract)
.ToList();

return ret;
Expand Down

0 comments on commit 66a2b1d

Please sign in to comment.