File tree Expand file tree Collapse file tree 7 files changed +32
-19
lines changed Expand file tree Collapse file tree 7 files changed +32
-19
lines changed Original file line number Diff line number Diff line change 54
54
<Compile Include =" Plugins\ErrorPlugin.cs" />
55
55
<Compile Include =" Plugins\PrivateInformationPlugin.cs" />
56
56
<Compile Include =" Plugins\TraceLogPlugin.cs" />
57
- <Compile Include =" Plugins\SingleSessionPlugin .cs" />
57
+ <Compile Include =" Plugins\SessionIdManagerPlugin .cs" />
58
58
<Compile Include =" Plugins\VersionPlugin.cs" />
59
59
<Compile Include =" ExceptionlessSection.cs" />
60
60
<Compile Include =" Extensions\EventBuilderExtensions.cs" />
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ public static void UseErrorPlugin(this ExceptionlessConfiguration config) {
33
33
/// Ensures only a single user session will be created unless you specify a session id via the event builder.
34
34
/// NOTE: This should only be used on deskop applications. Using this in web farm scenarios is not advisable.
35
35
/// </summary>
36
- public static void UseSingleSessionPlugin ( this ExceptionlessConfiguration config ) {
37
- config . AddPlugin < SingleSessionPlugin > ( ) ;
36
+ public static void UseSessionIdManagementPlugin ( this ExceptionlessConfiguration config ) {
37
+ config . AddPlugin < SessionIdManagerPlugin > ( ) ;
38
38
}
39
39
40
40
public static void UseIsolatedStorage ( this ExceptionlessConfiguration config ) {
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Concurrent ;
3
+
4
+ namespace Exceptionless . Plugins {
5
+ [ Priority ( 90 ) ]
6
+ public class SessionIdManagerPlugin : IEventPlugin {
7
+ private ConcurrentDictionary < string , string > _sessionIdMap = new ConcurrentDictionary < string , string > ( ) ;
8
+
9
+ public void Run ( EventPluginContext context ) {
10
+ string sessionId ;
11
+
12
+ if ( context . Event . IsSessionStart ( ) ) {
13
+ // remove old session
14
+ // add new session id
15
+ } if ( context . Event . IsSessionEnd ( ) ) {
16
+ // remove old session
17
+ }
18
+
19
+
20
+ // check to see if the user changed the sessionid..
21
+
22
+ //if (String.IsNullOrEmpty(context.Event.SessionId))
23
+ // context.Event.SessionId = sessionId;
24
+ }
25
+ }
26
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public static class ExceptionlessExtensions {
11
11
/// </summary>
12
12
/// <param name="client">The ExceptionlessClient.</param>
13
13
public static void Register ( this ExceptionlessClient client ) {
14
- client . Configuration . UseSingleSessionPlugin ( ) ;
14
+ client . Configuration . UseSessionIdManagementPlugin ( ) ;
15
15
client . Startup ( ) ;
16
16
client . SubmitSessionStart ( ) ;
17
17
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public static class ExceptionlessWindowsExtensions {
15
15
/// <param name="client">The ExceptionlessClient.</param>
16
16
/// <param name="showDialog">Controls whether a dialog is shown when an unhandled exception occurs.</param>
17
17
public static void Register ( this ExceptionlessClient client , bool showDialog = true ) {
18
- client . Configuration . UseSingleSessionPlugin ( ) ;
18
+ client . Configuration . UseSessionIdManagementPlugin ( ) ;
19
19
client . Startup ( ) ;
20
20
client . SubmitSessionStart ( ) ;
21
21
client . RegisterApplicationThreadExceptionHandler ( ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public static class ExceptionlessWpfExtensions {
16
16
/// <param name="client">The ExceptionlessClient.</param>
17
17
/// <param name="showDialog">Controls whether a dialog is shown when an unhandled exception occurs.</param>
18
18
public static void Register ( this ExceptionlessClient client , bool showDialog = true ) {
19
- client . Configuration . UseSingleSessionPlugin ( ) ;
19
+ client . Configuration . UseSessionIdManagementPlugin ( ) ;
20
20
client . Startup ( ) ;
21
21
client . SubmitSessionStart ( ) ;
22
22
client . RegisterApplicationThreadExceptionHandler ( ) ;
You can’t perform that action at this time.
0 commit comments