public static void Reset() { _configuration = null; _mapper = null; isMobile = null; isNative = null; }
// // GET: /Weather/ public ActionResult Index() { if (IsMobile.isMobileBrowser()) { return(View("MobileIndex")); } else { return(View()); } }
public static void Configure(SmartResultConfiguration configuration) { mapperConfiguration = new MapperConfiguration(cfg => { configuration.Profiles.ForEach(p => { cfg.AddProfile(p); }); }); mapper = mapperConfiguration.CreateMapper(); isMobile = configuration.IsMobileBrowser(); isNative = configuration.IsNativeDevice(); }
public SmartResultConfiguration(List <Profile> profiles, IsMobile isMobile = null, IsNative isNative = null) { this.profiles = profiles; this.isMobile = isMobile != null ? isMobile : IsMobileBrowser; this.isNative = isNative != null ? isNative : IsMobileBrowser; }
public SmartResultConfiguration(List <ISmartResultProfile> profiles, IsMobile isMobile = null, IsNative isNative = null) { this.Profiles = profiles; this.isMobile = isMobile ?? IsMobileBrowser; this.isNative = isNative; }
/// <inheritdoc cref="object.GetHashCode()"/> public override int GetHashCode() => 711844102 ^ Width.GetHashCode() ^ Height.GetHashCode() ^ IsMobile.GetHashCode() ^ DeviceScaleFactor.GetHashCode();