Skip to content

Commit 1410596

Browse files
committed
Merge pull request #66 from exceptionless/session
Added support for sessions
2 parents be8f886 + 5ad73d5 commit 1410596

File tree

82 files changed

+3149
-2315
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3149
-2315
lines changed

Source/Extras/Exceptionless.Extras.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
<Compile Include="..\GlobalAssemblyInfo.cs">
5252
<Link>Properties\GlobalAssemblyInfo.cs</Link>
5353
</Compile>
54-
<Compile Include="Plugins\ErrorPlugin.cs" />
55-
<Compile Include="Plugins\PrivateInformationPlugin.cs" />
56-
<Compile Include="Plugins\TraceLogPlugin.cs" />
57-
<Compile Include="Plugins\VersionPlugin.cs" />
54+
<Compile Include="Plugins\20_ErrorPlugin.cs" />
55+
<Compile Include="Plugins\15_PrivateInformationPlugin.cs" />
56+
<Compile Include="Plugins\70_TraceLogPlugin.cs" />
57+
<Compile Include="Plugins\80_VersionPlugin.cs" />
5858
<Compile Include="ExceptionlessSection.cs" />
5959
<Compile Include="Extensions\EventBuilderExtensions.cs" />
6060
<Compile Include="Extensions\ExceptionlessClientExtensions.cs" />

Source/Extras/Extensions/ExceptionlessClientExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public static void Startup(this ExceptionlessClient client, AppDomain appDomain
2626
client.Configuration.UseErrorPlugin();
2727
client.Configuration.UseTraceLogEntriesPlugin();
2828
client.Configuration.AddPlugin<VersionPlugin>();
29-
client.Configuration.AddPlugin<PrivateInformationPlugin>();
3029

3130
client.RegisterAppDomainUnhandledExceptionHandler(appDomain);
3231
client.RegisterTaskSchedulerUnobservedTaskExceptionHandler();

Source/Extras/Extensions/ExceptionlessExtraConfigurationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static void UseErrorPlugin(this ExceptionlessConfiguration config) {
2727
config.RemovePlugin<SimpleErrorPlugin>();
2828
config.AddPlugin<Plugins.ErrorPlugin>();
2929
}
30-
30+
3131
public static void UseIsolatedStorage(this ExceptionlessConfiguration config) {
3232
config.Resolver.Register<IObjectStorage>(new IsolatedStorageObjectStorage(config.Resolver));
3333
}

Source/Extras/Logging/FileExceptionlessLog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class FileExceptionlessLog : IExceptionlessLog, IDisposable {
1515

1616
public FileExceptionlessLog(string filePath, bool append = false) {
1717
if (String.IsNullOrEmpty(filePath))
18-
throw new ArgumentNullException("filePath");
18+
throw new ArgumentNullException(nameof(filePath));
1919

2020
FilePath = filePath;
2121
_append = append;

Source/Extras/Plugins/PrivateInformationPlugin.cs renamed to Source/Extras/Plugins/15_PrivateInformationPlugin.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
using System;
22

33
namespace Exceptionless.Plugins {
4-
[Priority(60)]
5-
public class PrivateInformationPlugin : IEventPlugin {
4+
[Priority(15)]
5+
public class SetEnvironmentUserPlugin : IEventPlugin {
66
public void Run(EventPluginContext context) {
77
if (!context.Client.Configuration.IncludePrivateInformation)
88
return;
99

1010
var user = context.Event.GetUserIdentity();
11-
if (user == null || String.IsNullOrEmpty(user.Identity))
11+
if (user == null)
1212
context.Event.SetUserIdentity(Environment.UserName);
1313
}
1414
}

Source/Extras/Storage/FolderObjectStorage.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public FolderObjectStorage(IDependencyResolver resolver, string folder) {
3131

3232
public T GetObject<T>(string path) where T : class {
3333
if (String.IsNullOrWhiteSpace(path))
34-
throw new ArgumentNullException("path");
34+
throw new ArgumentNullException(nameof(path));
3535

3636
try {
3737
var json = File.ReadAllText(Path.Combine(Folder, path));
@@ -64,7 +64,7 @@ public bool Exists(string path) {
6464

6565
public bool SaveObject<T>(string path, T value) where T : class {
6666
if (String.IsNullOrWhiteSpace(path))
67-
throw new ArgumentNullException("path");
67+
throw new ArgumentNullException(nameof(path));
6868

6969
string directory = Path.GetDirectoryName(Path.Combine(Folder, path));
7070
if (!Directory.Exists(directory))
@@ -84,9 +84,9 @@ public bool SaveObject<T>(string path, T value) where T : class {
8484

8585
public bool RenameObject(string oldpath, string newpath) {
8686
if (String.IsNullOrWhiteSpace(oldpath))
87-
throw new ArgumentNullException("oldpath");
87+
throw new ArgumentNullException(nameof(oldpath));
8888
if (String.IsNullOrWhiteSpace(newpath))
89-
throw new ArgumentNullException("newpath");
89+
throw new ArgumentNullException(nameof(newpath));
9090

9191
try {
9292
lock (_lockObject) {
@@ -101,7 +101,7 @@ public bool RenameObject(string oldpath, string newpath) {
101101

102102
public bool DeleteObject(string path) {
103103
if (String.IsNullOrWhiteSpace(path))
104-
throw new ArgumentNullException("path");
104+
throw new ArgumentNullException(nameof(path));
105105

106106
try {
107107
File.Delete(Path.Combine(Folder, path));

Source/Extras/Storage/IsolatedStorageObjectStorage.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public bool Exists(string path) {
8989

9090
public T GetObject<T>(string path) where T : class {
9191
if (String.IsNullOrWhiteSpace(path))
92-
throw new ArgumentNullException("path");
92+
throw new ArgumentNullException(nameof(path));
9393

9494
try {
9595
var json = Run.WithRetries(() => {
@@ -115,7 +115,7 @@ public T GetObject<T>(string path) where T : class {
115115

116116
public bool SaveObject<T>(string path, T value) where T : class {
117117
if (String.IsNullOrWhiteSpace(path))
118-
throw new ArgumentNullException("path");
118+
throw new ArgumentNullException(nameof(path));
119119

120120
EnsureDirectory(path);
121121

@@ -150,9 +150,9 @@ public bool SaveObject<T>(string path, T value) where T : class {
150150

151151
public bool RenameObject(string oldpath, string newpath) {
152152
if (String.IsNullOrWhiteSpace(oldpath))
153-
throw new ArgumentNullException("oldpath");
153+
throw new ArgumentNullException(nameof(oldpath));
154154
if (String.IsNullOrWhiteSpace(newpath))
155-
throw new ArgumentNullException("newpath");
155+
throw new ArgumentNullException(nameof(newpath));
156156

157157
try {
158158
lock (_lockObject) {
@@ -170,7 +170,7 @@ public bool RenameObject(string oldpath, string newpath) {
170170

171171
public bool DeleteObject(string path) {
172172
if (String.IsNullOrWhiteSpace(path))
173-
throw new ArgumentNullException("path");
173+
throw new ArgumentNullException(nameof(path));
174174

175175
try {
176176
lock (_lockObject) {

0 commit comments

Comments
 (0)