C# Класс SharpRaven.RavenClient

The Raven Client, responsible for capturing exceptions and sending them to Sentry.
Наследование: IRavenClient
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Capture ( SentryEvent @event ) : string

Captures the specified event.

CaptureAsync ( SentryEvent @event ) : Task

Captures the event.

RavenClient ( SharpRaven.Dsn dsn, IJsonPacketFactory jsonPacketFactory = null, ISentryRequestFactory sentryRequestFactory = null, ISentryUserFactory sentryUserFactory = null ) : System

Initializes a new instance of the RavenClient class.

RavenClient ( IJsonPacketFactory jsonPacketFactory = null ) : System

Initializes a new instance of the RavenClient class. Sentry Data Source Name will be read from sharpRaven section in your app.config or web.config.

RavenClient ( string dsn, IJsonPacketFactory jsonPacketFactory = null, ISentryRequestFactory sentryRequestFactory = null, ISentryUserFactory sentryUserFactory = null ) : System

Initializes a new instance of the RavenClient class.

Защищенные методы

Метод Описание
PreparePacket ( JsonPacket packet ) : JsonPacket

Performs JsonPacket post-processing prior to being sent to Sentry.

Send ( JsonPacket packet ) : string

Sends the specified packet to Sentry.

SendAsync ( JsonPacket packet ) : Task

Sends the specified packet to Sentry.

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

Метод Описание
CaptureEvent ( Exception e ) : string
CaptureEvent ( Exception e, string>.Dictionary tags ) : string
CaptureException ( Exception exception, SentryMessage message = null, ErrorLevel level = ErrorLevel.Error, string>.IDictionary tags = null, string fingerprint = null, object extra = null ) : string
CaptureExceptionAsync ( Exception exception, SentryMessage message = null, ErrorLevel level = ErrorLevel.Error, string>.IDictionary tags = null, string fingerprint = null, object extra = null ) : Task
CaptureMessage ( SentryMessage message, ErrorLevel level = ErrorLevel.Info, string>.IDictionary tags = null, string fingerprint = null, object extra = null ) : string
CaptureMessageAsync ( SentryMessage message, ErrorLevel level = ErrorLevel.Info, string>.IDictionary tags = null, string fingerprint = null, object extra = null ) : Task
HandleException ( Exception exception ) : string
MergeTags ( string>.IDictionary tags = null ) : string>.IDictionary

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

Capture() публичный Метод

Captures the specified event.
public Capture ( SentryEvent @event ) : string
@event SharpRaven.Data.SentryEvent
Результат string

CaptureAsync() публичный Метод

Captures the event.
public CaptureAsync ( SentryEvent @event ) : Task
@event SharpRaven.Data.SentryEvent
Результат Task

PreparePacket() защищенный Метод

Performs JsonPacket post-processing prior to being sent to Sentry.
protected PreparePacket ( JsonPacket packet ) : JsonPacket
packet SharpRaven.Data.JsonPacket The prepared which has cleared the creation pipeline.
Результат SharpRaven.Data.JsonPacket

RavenClient() публичный Метод

Initializes a new instance of the RavenClient class.
dsn
public RavenClient ( SharpRaven.Dsn dsn, IJsonPacketFactory jsonPacketFactory = null, ISentryRequestFactory sentryRequestFactory = null, ISentryUserFactory sentryUserFactory = null ) : System
dsn SharpRaven.Dsn The Data Source Name in Sentry.
jsonPacketFactory IJsonPacketFactory The optional factory that will be used to create the that will be sent to Sentry.
sentryRequestFactory ISentryRequestFactory The optional factory that will be used to create the that will be sent to Sentry.
sentryUserFactory ISentryUserFactory The optional factory that will be used to create the that will be sent to Sentry.
Результат System

RavenClient() публичный Метод

Initializes a new instance of the RavenClient class. Sentry Data Source Name will be read from sharpRaven section in your app.config or web.config.
public RavenClient ( IJsonPacketFactory jsonPacketFactory = null ) : System
jsonPacketFactory IJsonPacketFactory The optional factory that will be used to create the that will be sent to Sentry.
Результат System

RavenClient() публичный Метод

Initializes a new instance of the RavenClient class.
public RavenClient ( string dsn, IJsonPacketFactory jsonPacketFactory = null, ISentryRequestFactory sentryRequestFactory = null, ISentryUserFactory sentryUserFactory = null ) : System
dsn string The Data Source Name in Sentry.
jsonPacketFactory IJsonPacketFactory The optional factory that will be used to create the that will be sent to Sentry.
sentryRequestFactory ISentryRequestFactory The optional factory that will be used to create the that will be sent to Sentry.
sentryUserFactory ISentryUserFactory The optional factory that will be used to create the that will be sent to Sentry.
Результат System

Send() защищенный Метод

Sends the specified packet to Sentry.
protected Send ( JsonPacket packet ) : string
packet SharpRaven.Data.JsonPacket The packet to send.
Результат string

SendAsync() защищенный Метод

Sends the specified packet to Sentry.
protected SendAsync ( JsonPacket packet ) : Task
packet SharpRaven.Data.JsonPacket The packet to send.
Результат Task