namespace JustTrack
{
///
/// Defines the different types of ad units supported by the SDK.
///
public enum AdUnit
{
///
/// Banner ad unit.
///
Banner,
///
/// Interstitial ad unit.
///
Interstitial,
///
/// Rewarded ad unit.
///
Rewarded,
///
/// Rewarded interstitial ad unit.
///
RewardedInterstitial,
///
/// Native ad unit.
///
Native,
///
/// App open ad unit.
///
AppOpen,
}
///
/// Internal utility class for converting AdUnit enum values to string representations.
///
internal static class AdUnitInternalConversation
{
///
/// Converts an AdUnit enum value to its internal string representation.
///
/// The ad unit to convert.
/// The string representation of the ad unit.
internal static string ToInternalString(AdUnit adFormat)
{
switch (adFormat)
{
case AdUnit.Banner:
return "banner";
case AdUnit.Interstitial:
return "interstitial";
case AdUnit.Rewarded:
return "rewarded";
case AdUnit.RewardedInterstitial:
return "rewarded_interstitial";
case AdUnit.Native:
return "native";
case AdUnit.AppOpen:
return "app_open";
default:
return string.Empty;
}
}
}
}