Show / Hide Table of Contents

Class Parser

Represents a parser of a user agent string

Inheritance
Object
Parser
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace:FubarDev.WebDavServer.Utils.UAParser
Assembly:FubarDev.WebDavServer.dll
Syntax
public sealed class Parser

Methods

| Improve this Doc View Source

FromYaml(String)

Returns a Parser instance based on the regex definitions in a yaml string

Declaration
public static Parser FromYaml(string yaml)
Parameters
Type Name Description
String yaml

a string containing yaml definitions of reg-ex

Returns
Type Description
Parser

A Parser instance parsing user agent strings based on the regexes defined in the yaml string

| Improve this Doc View Source

FromYamlFile(String)

Returns a Parser instance based on the information in a yaml file

Declaration
public static Parser FromYamlFile(string path)
Parameters
Type Name Description
String path

the path to a yaml file containing regex definitions

Returns
Type Description
Parser

A Parser instance parsing user agent strings based on the regexes defined in the yaml string

| Improve this Doc View Source

GetDefault()

Returns a Parser instance based on the embedded regex definitions. The embedded regex definitions may be outdated. Consider passing in external yaml definitions using FromYaml(String) or FromYamlFile(String)

Declaration
public static Parser GetDefault()
Returns
Type Description
Parser
| Improve this Doc View Source

Parse(String)

Parse a user agent string and obtain all client information

Declaration
public ClientInfo Parse(string uaString)
Parameters
Type Name Description
String uaString
Returns
Type Description
ClientInfo
| Improve this Doc View Source

ParseDevice(String)

Parse a user agent string and obtain the device information

Declaration
public Device ParseDevice(string uaString)
Parameters
Type Name Description
String uaString
Returns
Type Description
Device
| Improve this Doc View Source

ParseOS(String)

Parse a user agent string and obtain the OS information

Declaration
public OS ParseOS(string uaString)
Parameters
Type Name Description
String uaString
Returns
Type Description
OS
| Improve this Doc View Source

ParseUserAgent(String)

Parse a user agent string and obtain the UserAgent information

Declaration
public UserAgent ParseUserAgent(string uaString)
Parameters
Type Name Description
String uaString
Returns
Type Description
UserAgent
  • Improve this Doc
  • View Source
Back to top Copyright © 2016-2017 Fubar Development Junker
Generated by DocFX