From b7f39b8609fe01314de0ea083bc37f289d3337ac Mon Sep 17 00:00:00 2001 From: Jamie Penney Date: Thu, 7 May 2015 08:50:38 +1200 Subject: [PATCH] Update WebAPi readme Add a full example of creating custom RaygunWebApiClients --- Mindscape.Raygun4Net.WebApi/readme.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Mindscape.Raygun4Net.WebApi/readme.txt b/Mindscape.Raygun4Net.WebApi/readme.txt index a10dd534..f630f220 100644 --- a/Mindscape.Raygun4Net.WebApi/readme.txt +++ b/Mindscape.Raygun4Net.WebApi/readme.txt @@ -46,6 +46,20 @@ Sometimes when setting up Raygun to send exceptions automatically, you may need To do this, use the static RaygunWebApiClient method overload that takes a function. Within this function, return a new (or previously created) RaygunWebApiClient instance. In this function you can setup any additional options on the RaygunWebApiClient instance that you need - more information about each feature is described below. +RaygunWebApiClient.Attach(config, () => { + var client = new RaygunWebApiClient(); + client.ApplicationVersion = "5.9.0.1"; + client.UserInfo = new RaygunIdentifierMessage("user@example.com"); + client.SendingMessage += (sender, args) => + { + if (args.Message.Details.MachineName == "BadServer") + { + args.Cancel = true; + } + }; + return client; +}); + Additional configuration options and features =============================================