using System.Collections.Generic;
public enum UserDeviceType
internal static bool ValidateCampaign => false;
internal static List<int> SupportedCampaignList => new List<int>
internal static bool ValidateDeviceType => true;
internal static List<UserDeviceType> SupportedDeviceType => new List<UserDeviceType>
public static void Main()
Console.WriteLine(IsSupportedByDeviceType(UserDeviceType.Desktop));
Console.WriteLine(IsSupportedByDeviceType(UserDeviceType.Tablet));
public static bool IsSupportedByDeviceType(UserDeviceType deviceType)
return !ValidateDeviceType || SupportedDeviceType.Contains(deviceType);
public static bool IsSupportedByCampaign(int? campaignId)
if (ValidateCampaign && campaignId != null)
return SupportedCampaignList.Exists(name => name.Equals(campaignId));