diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..21fee68 --- /dev/null +++ b/.gitignore @@ -0,0 +1,108 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug*/ +[Rr]elease/ + +build/ + + +[Tt]est[Rr]esult +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.vspscc +*.vssscc +.builds + +*.pidb + +*.log +*.scc +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ + +*.[Rr]e[Ss]harper + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Publish Web Output +*.Publish.xml + +# Others +[Bb]in +[Oo]bj +sql +TestResults +[Tt]est[Rr]esult* +*.Cache +ClientBin +[Ss]tyle[Cc]op.* +~$* +*.dbmdl + +*.[Pp]ublish.xml + +Generated_Code #added for RIA/Silverlight projects + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + +# NuGet +packages/ diff --git a/Documentation/Documentation.csproj b/Documentation/Documentation.csproj new file mode 100644 index 0000000..9ce56ab --- /dev/null +++ b/Documentation/Documentation.csproj @@ -0,0 +1,75 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {975E1EA6-EDA8-4E5D-AC56-7A741022C89A} + Exe + Properties + Documentation + Documentation + v4.0 + Client + 512 + + + + + + + + + + + true + bin\Debug\ + DEBUG;TRACE + full + AnyCPU + bin\Debug\Documentation.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + + + bin\Release\ + TRACE + true + pdbonly + AnyCPU + bin\Release\Documentation.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Documentation/html/content/blank.html b/Documentation/html/content/blank.html new file mode 100644 index 0000000..522a642 --- /dev/null +++ b/Documentation/html/content/blank.html @@ -0,0 +1 @@ +

\ No newline at end of file diff --git a/Documentation/html/content/getting_started.html b/Documentation/html/content/getting_started.html new file mode 100644 index 0000000..522a642 --- /dev/null +++ b/Documentation/html/content/getting_started.html @@ -0,0 +1 @@ +

\ No newline at end of file diff --git a/Documentation/html/index.html b/Documentation/html/index.html new file mode 100644 index 0000000..c0666d0 --- /dev/null +++ b/Documentation/html/index.html @@ -0,0 +1,9 @@ + + + + NBug Documentation + + + + + diff --git a/Documentation/html/toc.html b/Documentation/html/toc.html new file mode 100644 index 0000000..2b4ec2c --- /dev/null +++ b/Documentation/html/toc.html @@ -0,0 +1,9 @@ + + + + Untitled Page + + + + + diff --git a/Examples/NBug.Examples.Console/NBug.Examples.Console.csproj b/Examples/NBug.Examples.Console/NBug.Examples.Console.csproj new file mode 100644 index 0000000..f0fc671 --- /dev/null +++ b/Examples/NBug.Examples.Console/NBug.Examples.Console.csproj @@ -0,0 +1,138 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {37281C42-C5CC-456D-B817-D81E6D866121} + Exe + Properties + NBug.Examples.Console + NBug.Examples.Console + v4.0 + Client + 512 + + + + + + + + + http://localhost/NBug.Examples.Console/ + true + Web + true + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + true + false + true + + + true + + + ..\..\Signing.snk + + + ..\..\NBug\resources\icon.ico + + + true + bin\Debug\ + DEBUG;TRACE + true + full + AnyCPU + bin\Debug\NBug.Examples.Console.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + AllRules.ruleset + ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + + + bin\Release\ + TRACE + bin\Release\NBug.Examples.Console.XML + true + pdbonly + AnyCPU + bin\Release\NBug.Examples.Console.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + false + ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + false + + + + + + + + + + + + + Properties\GlobalAssemblyInfo.cs + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + {62CED1D5-F603-40DE-8BF5-3E49D3A392F4} + NBug + + + + + \ No newline at end of file diff --git a/Examples/NBug.Examples.Console/Program.cs b/Examples/NBug.Examples.Console/Program.cs new file mode 100644 index 0000000..4a5e856 --- /dev/null +++ b/Examples/NBug.Examples.Console/Program.cs @@ -0,0 +1,32 @@ +namespace NBug.Examples.Console +{ + using System; + using System.IO; + + public class Program + { + 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); + } + + // Sample NBug configuration for console applications + AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException; + System.Threading.Tasks.TaskScheduler.UnobservedTaskException += NBug.Handler.UnobservedTaskException; + + Console.WriteLine("NBug now auto-handles: AppDomain.CurrentDomain.UnhandledException"); + Console.WriteLine("NBug now auto-handles: Threading.Tasks.TaskScheduler.UnobservedTaskException"); + Console.WriteLine(Environment.NewLine); + Console.Write("Generate a System.Exception (y/n): "); + + if (Console.ReadKey().Key == ConsoleKey.Y) + { + throw new Exception("This is an exception thrown from NBug console sample application."); + } + } + } +} diff --git a/Examples/NBug.Examples.Console/Properties/AssemblyInfo.cs b/Examples/NBug.Examples.Console/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..14ae91a --- /dev/null +++ b/Examples/NBug.Examples.Console/Properties/AssemblyInfo.cs @@ -0,0 +1,29 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NBug.Examples.Console")] +[assembly: AssemblyDescription("NBug Console Sample Application created by Teoman Soygul.")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[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.*")] \ No newline at end of file diff --git a/Examples/NBug.Examples.Console/app.config b/Examples/NBug.Examples.Console/app.config new file mode 100644 index 0000000..f76deb9 --- /dev/null +++ b/Examples/NBug.Examples.Console/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Examples/NBug.Examples.WPF/App.xaml b/Examples/NBug.Examples.WPF/App.xaml new file mode 100644 index 0000000..0793102 --- /dev/null +++ b/Examples/NBug.Examples.WPF/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Examples/NBug.Examples.WPF/App.xaml.cs b/Examples/NBug.Examples.WPF/App.xaml.cs new file mode 100644 index 0000000..f32bde0 --- /dev/null +++ b/Examples/NBug.Examples.WPF/App.xaml.cs @@ -0,0 +1,31 @@ +namespace NBug.Examples.WPF +{ + using System; + using System.IO; + using System.Linq; + using System.Windows; + + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + 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); + } + + // For demonstrational purposes only, normally this should be left with it's default value as false! + NBug.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; + } + } +} diff --git a/Examples/NBug.Examples.WPF/MainWindow.xaml b/Examples/NBug.Examples.WPF/MainWindow.xaml new file mode 100644 index 0000000..653bf1b --- /dev/null +++ b/Examples/NBug.Examples.WPF/MainWindow.xaml @@ -0,0 +1,15 @@ + + +