2021年3月22日星期一

Wangkanai Detection in static helper class

Is there a way to create a static helper using Wangkanai.Detection in .net core?

I have the following:

public static bool IsMobileDevice(IDetectionService detection)      {          try          {              return detection.Device.Type == DeviceType.Mobile;          }          catch (Exception ex)          {              throw new Exception();          }            return false;      }  

I'm using Wangkanai.Detection 3.0.0 in a .net 5.0 class library.

https://stackoverflow.com/questions/66757146/wangkanai-detection-in-static-helper-class March 23, 2021 at 12:06PM

没有评论:

发表评论