diff options
author | chai <chaifix@163.com> | 2020-12-30 20:59:04 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-12-30 20:59:04 +0800 |
commit | e9ea621b93fbb58d9edfca8375918791637bbd52 (patch) | |
tree | 19ce3b1c1f2d51eda6878c9d0f2c9edc27f13650 /Client/Assembly-CSharp/GoogleMobileAds/Api/AdSize.cs |
+init
Diffstat (limited to 'Client/Assembly-CSharp/GoogleMobileAds/Api/AdSize.cs')
-rw-r--r-- | Client/Assembly-CSharp/GoogleMobileAds/Api/AdSize.cs | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/GoogleMobileAds/Api/AdSize.cs b/Client/Assembly-CSharp/GoogleMobileAds/Api/AdSize.cs new file mode 100644 index 0000000..ec5f3f1 --- /dev/null +++ b/Client/Assembly-CSharp/GoogleMobileAds/Api/AdSize.cs @@ -0,0 +1,88 @@ +using System; + +namespace GoogleMobileAds.Api +{ + public class AdSize + { + public int Width + { + get + { + return this.width; + } + } + + public int Height + { + get + { + return this.height; + } + } + + public bool IsSmartBanner + { + get + { + return this.isSmartBanner; + } + } + + private bool isSmartBanner; + + private int width; + + private int height; + + public static readonly AdSize Banner = new AdSize(320, 50); + + public static readonly AdSize MediumRectangle = new AdSize(300, 250); + + public static readonly AdSize IABBanner = new AdSize(468, 60); + + public static readonly AdSize Leaderboard = new AdSize(728, 90); + + public static readonly AdSize SmartBanner = new AdSize(true); + + public static readonly int FullWidth = -1; + + public AdSize(int width, int height) + { + this.isSmartBanner = false; + this.width = width; + this.height = height; + } + + private AdSize(bool isSmartBanner) : this(0, 0) + { + this.isSmartBanner = isSmartBanner; + } + + public override bool Equals(object obj) + { + if (obj == null || base.GetType() != obj.GetType()) + { + return false; + } + AdSize adSize = (AdSize)obj; + return this.width == adSize.width && this.height == adSize.height && this.isSmartBanner == adSize.isSmartBanner; + } + + public static bool operator ==(AdSize a, AdSize b) + { + return a.Equals(b); + } + + public static bool operator !=(AdSize a, AdSize b) + { + return !a.Equals(b); + } + + public override int GetHashCode() + { + int num = 71; + int num2 = 11; + return ((num * num2 ^ this.width.GetHashCode()) * num2 ^ this.height.GetHashCode()) * num2 ^ this.isSmartBanner.GetHashCode(); + } + } +} |