Struct BannerSize
Chartboost Mediation defined banner sizes.
Inherited Members
Namespace: Chartboost.Mediation.Ad.Banner
Assembly: Chartboost.Mediation.dll
Syntax
public struct BannerSize
Fields
AspectRatio
Declaration
[JsonProperty("aspectRatio")]
public float AspectRatio
Field Value
| Type | Description |
|---|---|
| float |
BannerType
Declaration
[JsonProperty("type")]
public BannerType BannerType
Field Value
| Type | Description |
|---|---|
| BannerType |
Height
Declaration
[JsonProperty("height")]
public float Height
Field Value
| Type | Description |
|---|---|
| float |
Leaderboard
A BannerSize size object for a fixed size 728x90 leaderboard banner.
Declaration
public static readonly BannerSize Leaderboard
Field Value
| Type | Description |
|---|---|
| BannerSize |
MediumRect
A BannerSize size object for a fixed size 300x250 medium banner.
Declaration
public static readonly BannerSize MediumRect
Field Value
| Type | Description |
|---|---|
| BannerSize |
Standard
A BannerSize size object for a fixed size 320x50 standard banner.
Declaration
public static readonly BannerSize Standard
Field Value
| Type | Description |
|---|---|
| BannerSize |
Width
Declaration
[JsonProperty("width")]
public float Width
Field Value
| Type | Description |
|---|---|
| float |
Properties
SizeType
Declaration
[JsonProperty("sizeType")]
public readonly BannerSizeType SizeType { get; }
Property Value
| Type | Description |
|---|---|
| BannerSizeType |
Methods
Adaptive(float)
Returns a size for an adaptive banner with the specified width. This will generally be used when requesting an inline ad that can be of any height. To request an adaptive size banner with a maximum height, use Adaptive(float, float) instead. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive(float, float)
Returns a size for an adaptive banner with the specified width and maxHeight. This will generally be used when requesting an anchored adaptive size banner, or when requesting an inline ad where the maximum height can be constrained. To request an adaptive size banner without a maximum height, use Adaptive(float) instead. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive(float width, float height)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
| float | height | The maximum height for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive10X1(float)
Convenience that returns a 10:1 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive10X1(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive1X1(float)
Convenience that returns a 1:1 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive1X1(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive1X2(float)
Convenience that returns a 1:2 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive1X2(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive1X3(float)
Convenience that returns a 1:3 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive1X3(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive1X4(float)
Convenience that returns a 1:4 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive1X4(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive2X1(float)
Convenience that returns a 2:1 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive2X1(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive4X1(float)
Convenience that returns a 4:1 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive4X1(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive6X1(float)
Convenience that returns a 6:1 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive6X1(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive8X1(float)
Convenience that returns 8:1 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive8X1(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |
Adaptive9X16(float)
Convenience that returns a 9:16 BannerSize size for the specified width. Note: This is only a maximum banner size. Depending on how your waterfall is configured, smaller or different aspect ratio ads may be served.
Declaration
public static BannerSize Adaptive9X16(float width)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | The maximum width for the banner. |
Returns
| Type | Description |
|---|---|
| BannerSize | A BannerSize that can be used to load a banner. |