C# Класс Keen.Core.KeenUtil

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CheckApiErrorCode ( dynamic apiResponse ) : void

Check the 'error_code' field and throw the appropriate exception if non-null.

GetBulkApiError ( Newtonsoft.Json.Linq.JObject apiResponse ) : Exception

Check the 'error' field on a bulk insert operation response and return the appropriate exception.

ToSafeString ( this obj ) : string
TryGetDouble ( this s ) : double?
TryGetInt ( this s ) : int?
ValidateEventCollectionName ( string collection ) : void

Apply the collection name restrictions. Throws KeenException with an explanation if a collection name is unacceptable.

ValidatePropertyName ( string property ) : void

Apply property name restrictions. Throws KeenException with an explanation if a collection name is unacceptable.

Приватные методы

Метод Описание
TryUnwrap ( this ex ) : Exception

Flatten an AggregateException and if only one exception instance is found in the innerexceptions, return it, otherwise return the original AggregateException unchanged.

Описание методов

CheckApiErrorCode() публичный статический Метод

Check the 'error_code' field and throw the appropriate exception if non-null.
public static CheckApiErrorCode ( dynamic apiResponse ) : void
apiResponse dynamic Deserialized json response from a Keen API call.
Результат void

GetBulkApiError() публичный статический Метод

Check the 'error' field on a bulk insert operation response and return the appropriate exception.
public static GetBulkApiError ( Newtonsoft.Json.Linq.JObject apiResponse ) : Exception
apiResponse Newtonsoft.Json.Linq.JObject Deserialized json response from a Keen API call.
Результат System.Exception

ToSafeString() публичный статический Метод

public static ToSafeString ( this obj ) : string
obj this
Результат string

TryGetDouble() публичный статический Метод

public static TryGetDouble ( this s ) : double?
s this
Результат double?

TryGetInt() публичный статический Метод

public static TryGetInt ( this s ) : int?
s this
Результат int?

ValidateEventCollectionName() публичный статический Метод

Apply the collection name restrictions. Throws KeenException with an explanation if a collection name is unacceptable.
public static ValidateEventCollectionName ( string collection ) : void
collection string
Результат void

ValidatePropertyName() публичный статический Метод

Apply property name restrictions. Throws KeenException with an explanation if a collection name is unacceptable.
public static ValidatePropertyName ( string property ) : void
property string
Результат void