C# 클래스 Keen.Core.KeenUtil

파일 보기 프로젝트 열기: keenlabs/keen-sdk-net 1 사용 예제들

공개 메소드들

메소드 설명
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