User Agent Parser
ResourcePath Property
Example 



KellermanSoftware.UserAgentParser Namespace > Configuration Class : ResourcePath Property
Gets or sets the resource path.
Syntax
'Declaration
 
Public Shared Property ResourcePath As String
'Usage
 
Dim value As String
 
Configuration.ResourcePath = value
 
value = Configuration.ResourcePath
public static string ResourcePath {get; set;}
public:
static property String^ ResourcePath {
   String^ get();
   void set (    String^ value);
}

Property Value

The resource path.
Example
DetectionLogic detectionLogic = new DetectionLogic(); //Trial Mode
//DetectionLogic detectionLogic = new DetectionLogic("place user name here", "place license key here"); //License Mode
 
detectionLogic.Configuration.ResourcePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Configuration.ModelFileName);
 
//Parameters
string userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25";
 
DeviceInformation results = detectionLogic.DetectDevice(userAgent);
 
Console.WriteLine(results.ToString());
Dim detectionLogic As New DetectionLogic() 'Trial Mode
'DetectionLogic detectionLogic = new DetectionLogic("place user name here", "place license key here"); //License Mode
 
detectionLogic.Configuration.ResourcePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Configuration.ModelFileName)
 
'Parameters
Dim userAgent As String = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25"
 
Dim results As DeviceInformation = detectionLogic.DetectDevice(userAgent)
 
Console.WriteLine(results.ToString())
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Configuration Class
Configuration Members