blob: ec5f3f14aecab570ad97031857ac5c50a11d8e38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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();
}
}
}
|