Skip to content

Commit

Permalink
Reformatted code via StyleCop
Browse files Browse the repository at this point in the history
  • Loading branch information
soygul committed Jul 19, 2013
1 parent 7daa94c commit f6e5116
Show file tree
Hide file tree
Showing 124 changed files with 2,501 additions and 2,050 deletions.
7 changes: 4 additions & 3 deletions .nuget/NuGet.Config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
namespace NBug.Destinations.AzureBlobStorage
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AzureBlobStorage.cs" company="NBug Project">
// Copyright (c) 2011 - 2013 Teoman Soygul. Licensed under MIT license.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace NBug.Destinations.AzureBlobStorage
{
using System;
using System.IO;

using Microsoft.WindowsAzure.Storage.Auth;
using Microsoft.WindowsAzure.Storage.Blob;

using NBug.Core.Reporting.Info;
using NBug.Core.Submission;
using NBug.Core.Util.Serialization;

public class AzureBlobStorage : ProtocolBase
{
public AzureBlobStorage(string connectionString)
Expand All @@ -17,9 +24,11 @@ public AzureBlobStorage(string connectionString)
}

public string AccountName { get; set; }
public string SharedAccessSignature { get; set; }

public string ContainerName { get; set; }

public string SharedAccessSignature { get; set; }

// Connection string format (single line)
// Warning: There should be no semicolon (;) or equals sign (=) used in any field except for password.
// Warning: No field value value should contain the phrase 'password='
Expand All @@ -30,12 +39,11 @@ public AzureBlobStorage(string connectionString)
* ContainerName=yourcontainername;
* SharedAccessSignature=sr%3Dc%26si%3D16dacb22-asdf-asdf-asdf-e58fasdff3ed%26se%3D2098-12-31T23%253A00%253A00Z%26sig%3asdfIWtlasdfb98q0Kidp%252BasdffJcRm1ulFIjyks4E%253D
*/

public override bool Send(string fileName, Stream file, Report report, SerializableException exception)
{
var cred = new StorageCredentials(Uri.UnescapeDataString(SharedAccessSignature));
var cred = new StorageCredentials(Uri.UnescapeDataString(this.SharedAccessSignature));

var blobUrl = new Uri(string.Format("https://{0}.blob.core.windows.net/{1}", AccountName, ContainerName));
var blobUrl = new Uri(string.Format("https://{0}.blob.core.windows.net/{1}", this.AccountName, this.ContainerName));
var container = new CloudBlobContainer(blobUrl, cred);

var blob = container.GetBlockBlobReference(fileName);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
namespace NBug.Destinations.AzureBlobStorage
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AzureBlobStorageFactory.cs" company="NBug Project">
// Copyright (c) 2011 - 2013 Teoman Soygul. Licensed under MIT license.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace NBug.Destinations.AzureBlobStorage
{
using NBug.Core.Submission;

public class AzureBlobStorageFactory : IProtocolFactory
{
public IProtocol FromConnectionString(string connectionString)
public string SupportedType
{
return new AzureBlobStorage(connectionString);
get
{
return "AzureBlobStorage";
}
}

public string SupportedType
public IProtocol FromConnectionString(string connectionString)
{
get { return "AzureBlobStorage"; }
return new AzureBlobStorage(connectionString);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="NBug Project">
// Copyright (c) 2011 - 2013 Teoman Soygul. Licensed under MIT license.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------



using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand All @@ -23,14 +30,12 @@
[assembly: Guid("76a52bbd-f3e7-4a18-9ca8-f506e6e4e9c4")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
11 changes: 6 additions & 5 deletions Destinations/NBug.Destinations.AzureBlobStorage/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>

<packages>
<package id="Microsoft.Data.Edm" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.Data.OData" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.8.0.0" targetFramework="net45" />
<package id="System.Spatial" version="5.2.0" targetFramework="net45" />
<package id="WindowsAzure.Storage" version="2.0.5.1" targetFramework="net45" />
<package id="Microsoft.Data.Edm" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.Data.OData" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.8.0.0" targetFramework="net45" />
<package id="System.Spatial" version="5.2.0" targetFramework="net45" />
<package id="WindowsAzure.Storage" version="2.0.5.1" targetFramework="net45" />
</packages>
12 changes: 6 additions & 6 deletions Documentation/html/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>NBug Documentation</title>
</head>
<body>
<head>
<title>NBug Documentation</title>
</head>
<body>

</body>
</html>
</body>
</html>
12 changes: 6 additions & 6 deletions Documentation/html/toc.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
</head>
<body>
<head>
<title>Untitled Page</title>
</head>
<body>

</body>
</html>
</body>
</html>
21 changes: 15 additions & 6 deletions Examples/NBug.Examples.Console/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
namespace NBug.Examples.Console
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Program.cs" company="NBug Project">
// Copyright (c) 2011 - 2013 Teoman Soygul. Licensed under MIT license.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace NBug.Examples.Console
{
using System;
using System.IO;
using System.Threading.Tasks;

using NBug.Properties;

public class Program
{
Expand All @@ -10,13 +19,13 @@ public static void Main(string[] args)
// Check to see if test application is initialized by the configurator tool
if (args.Length > 0)
{
FileStream stream = new FileStream(args[0], FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
NBug.Properties.SettingsOverride.LoadCustomSettings(stream);
var stream = new FileStream(args[0], FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
SettingsOverride.LoadCustomSettings(stream);
}

// Sample NBug configuration for console applications
AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException;
System.Threading.Tasks.TaskScheduler.UnobservedTaskException += NBug.Handler.UnobservedTaskException;
AppDomain.CurrentDomain.UnhandledException += Handler.UnhandledException;
TaskScheduler.UnobservedTaskException += Handler.UnobservedTaskException;

Console.WriteLine("NBug now auto-handles: AppDomain.CurrentDomain.UnhandledException");
Console.WriteLine("NBug now auto-handles: Threading.Tasks.TaskScheduler.UnobservedTaskException");
Expand All @@ -29,4 +38,4 @@ public static void Main(string[] args)
}
}
}
}
}
13 changes: 9 additions & 4 deletions Examples/NBug.Examples.Console/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="NBug Project">
// Copyright (c) 2011 - 2013 Teoman Soygul. Licensed under MIT license.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------



using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand All @@ -18,12 +25,10 @@
[assembly: Guid("9e72b2e3-590a-4ffe-8de5-ffa37efc9dd6")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
6 changes: 5 additions & 1 deletion Examples/NBug.Examples.Console/app.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?xml version="1.0"?>

<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>
</configuration>
8 changes: 4 additions & 4 deletions Examples/NBug.Examples.WPF/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
<Application.Resources>

</Application.Resources>
</Application>
25 changes: 17 additions & 8 deletions Examples/NBug.Examples.WPF/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
namespace NBug.Examples.WPF
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="App.xaml.cs" company="NBug Project">
// Copyright (c) 2011 - 2013 Teoman Soygul. Licensed under MIT license.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace NBug.Examples.WPF
{
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

using NBug.Properties;

/// <summary>
/// Interaction logic for App.xaml
/// </summary>
Expand All @@ -15,17 +24,17 @@ public App()
// Check to see if test application is initialized by the configurator tool
if (Environment.GetCommandLineArgs().Count() > 1)
{
FileStream stream = new FileStream(Environment.GetCommandLineArgs()[1], FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
NBug.Properties.SettingsOverride.LoadCustomSettings(stream);
var stream = new FileStream(Environment.GetCommandLineArgs()[1], FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
SettingsOverride.LoadCustomSettings(stream);
}

// For demonstrational purposes only, normally this should be left with it's default value as false!
NBug.Settings.HandleProcessCorruptedStateExceptions = true;
Settings.HandleProcessCorruptedStateExceptions = true;

// Sample NBug configuration for WPF applications
AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException;
Application.Current.DispatcherUnhandledException += NBug.Handler.DispatcherUnhandledException;
System.Threading.Tasks.TaskScheduler.UnobservedTaskException += NBug.Handler.UnobservedTaskException;
AppDomain.CurrentDomain.UnhandledException += Handler.UnhandledException;
Current.DispatcherUnhandledException += Handler.DispatcherUnhandledException;
TaskScheduler.UnobservedTaskException += Handler.UnobservedTaskException;
}
}
}
}
25 changes: 14 additions & 11 deletions Examples/NBug.Examples.WPF/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="NBug - WPF Test Application" Height="150" Width="384" WindowStartupLocation="CenterScreen">
<Grid>
<Button Content="Generate Exception" Height="23" HorizontalAlignment="Left" Margin="51,63,0,0" Name="crashButton" VerticalAlignment="Top" Width="123" Click="CrashButton_Click" />
<ComboBox Height="23" HorizontalAlignment="Left" Margin="12,23,0,0" Name="crashTypeComboBox" VerticalAlignment="Top" Width="338">
<ComboBoxItem Content="UI Thread: System.Exception" />
<ComboBoxItem Content="UI Thread: System.ArgumentException" />
<ComboBoxItem Content="Background Thread (Task): System.Exception" />
<ComboBoxItem Content="Process Corrupted State Exception: Access Violation" />
</ComboBox>
<Button Content="Close" Height="23" HorizontalAlignment="Left" Margin="219,63,0,0" Name="closeButton" VerticalAlignment="Top" Width="75" Click="CloseButton_Click" />
</Grid>
</Window>
<Grid>
<Button Content="Generate Exception" Height="23" HorizontalAlignment="Left" Margin="51,63,0,0" Name="crashButton"
VerticalAlignment="Top" Width="123" Click="CrashButton_Click" />
<ComboBox Height="23" HorizontalAlignment="Left" Margin="12,23,0,0" Name="crashTypeComboBox" VerticalAlignment="Top"
Width="338">
<ComboBoxItem Content="UI Thread: System.Exception" />
<ComboBoxItem Content="UI Thread: System.ArgumentException" />
<ComboBoxItem Content="Background Thread (Task): System.Exception" />
<ComboBoxItem Content="Process Corrupted State Exception: Access Violation" />
</ComboBox>
<Button Content="Close" Height="23" HorizontalAlignment="Left" Margin="219,63,0,0" Name="closeButton"
VerticalAlignment="Top" Width="75" Click="CloseButton_Click" />
</Grid>
</Window>
Loading

0 comments on commit f6e5116

Please sign in to comment.