Class Bo4eUri
Bo4eUri class is derived from System.Uri and works the same way. It's just a bit more strict in validation.
Inheritance
Namespace: BO4E.meta
Assembly: BO4Enet.dll
Syntax
public class Bo4eUri : Uri
Constructors
| Improve this Doc View SourceBo4eUri(String)
Instantiates a Bo4eUri object. Throws Argument(Null)Exception if URI is null, not well formed (
Declaration
public Bo4eUri(string uri)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | URI string to be processed |
Methods
| Improve this Doc View SourceAddFilter(IDictionary<String, Object>)
returns a new Bo4eUri instance with an additional filter in the query
Declaration
public Bo4eUri AddFilter(IDictionary<string, object> filterObject)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<System.String, System.Object> | filterObject |
Returns
Type | Description |
---|---|
Bo4eUri |
FullyUnescapeDataString(String)
Repeatedly calls Uri.UnescapeDataString until the result doesn't change any more.
Declaration
public static string FullyUnescapeDataString(string stringToUnescape)
Parameters
Type | Name | Description |
---|---|---|
System.String | stringToUnescape | string to unescape |
Returns
Type | Description |
---|---|
System.String | unescaped input string |
GetBoName()
Get name of business object with correct upper/lower case (the host value)
Declaration
public string GetBoName()
Returns
Type | Description |
---|---|
System.String | business object name or null iff there is no such object |
GetBoType()
Get type of business object (e.g. to be used with Activator.CreateInstance)
Declaration
public Type GetBoType()
Returns
Type | Description |
---|---|
Type | business object type of null iff there is no such object |
GetQueryObject(Type, Int32)
The query object / dictionary returned by this method allows to search for Business Objects. Basically this method reverses what is done in GetUri(BusinessObject, Boolean).
Declaration
public JObject GetQueryObject(Type boType = null, int i = 0)
Parameters
Type | Name | Description |
---|---|---|
Type | boType | |
System.Int32 | i |
Returns
Type | Description |
---|---|
JObject | A dictionary with boKey:boKeyValue pairs. |
GetUri(BusinessObject, Boolean)
Get an URI for a Business Object
Declaration
public static Bo4eUri GetUri(BusinessObject bo, bool includeUserProperties = false)
Parameters
Type | Name | Description |
---|---|---|
BusinessObject | bo | Business Object |
System.Boolean | includeUserProperties | set true to add userProperties as query parameters |
Returns
Type | Description |
---|---|
Bo4eUri | Bo4eUri |
IsValid(String)
Test if a URI string is valid
Declaration
public static bool IsValid(string uri)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | URI string |
Returns
Type | Description |
---|---|
System.Boolean | true iff valid, false otherwise |
Operators
| Improve this Doc View SourceImplicit(String to Bo4eUri)
implicit casting operator for strings (useful during de serialising
Declaration
public static implicit operator Bo4eUri(string input)
Parameters
Type | Name | Description |
---|---|---|
System.String | input | string |
Returns
Type | Description |
---|---|
Bo4eUri |