diff --git a/.gitignore b/.gitignore index 3a7816f..f24f0a0 100644 --- a/.gitignore +++ b/.gitignore @@ -161,4 +161,8 @@ Desktop.ini $RECYCLE.BIN/ # Mac crap -.DS_Store \ No newline at end of file +.DS_Store +AssemblyInfo.Company.cs +*.ide +.vs/ +_site/ diff --git a/Build.Binaries.msbuild b/Build.Binaries.msbuild deleted file mode 100644 index f88abcf..0000000 --- a/Build.Binaries.msbuild +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Release - Any CPU - $(Platform.Replace(" ","")) - - - $(MSBuildProjectDirectory) - $(DirWorkspace)\src - - - - - - - - - - $(DirSrc)\nuclei.sln - - - - - \ No newline at end of file diff --git a/Build.GatherReleaseNotes.msbuild b/Build.GatherReleaseNotes.msbuild deleted file mode 100644 index 6204a1e..0000000 --- a/Build.GatherReleaseNotes.msbuild +++ /dev/null @@ -1,84 +0,0 @@ - - - - - true - false - - - $(MSBuildProjectDirectory) - $(DirWorkspace)\packages - $(DirWorkspace)\tools - $(DirWorkspace)\build - $(DirBuild)\bin\$(PlatformTranslated)\$(Configuration) - $(DirBuild)\deploy - $(DirBuild)\logs - $(DirBuild)\temp - $(DirWorkspace)\src - - - - - - - 0 - - - $(DirTools)\msbuild.extensions - - - - - - - - - - - - - - - - - - - - GitHubFlowVersion.exe - $(DirBuildTemp)\semantic_version.json - - - - - - - - - - - - - - - GitReleaseNotes.exe - $(DirBuildTemp)\releasenotes_short.md - $(DirBuildTemp)\releasenotes_full.md - - - - - - - - - - - \ No newline at end of file diff --git a/Build.Package.NuGet.msbuild b/Build.Package.NuGet.msbuild deleted file mode 100644 index f55d8e9..0000000 --- a/Build.Package.NuGet.msbuild +++ /dev/null @@ -1,485 +0,0 @@ - - - - - Release - Any CPU - $(Platform.Replace(" ","")) - - - $(MSBuildProjectDirectory) - $(DirWorkspace)\packages - $(DirWorkspace)\src - $(DirWorkspace)\templates - $(DirWorkspace)\tools - $(DirWorkspace)\build - $(DirBuild)\bin\$(PlatformTranslated)\$(Configuration) - $(DirBuild)\deploy - $(DirBuild)\temp - - - - - - - 0 - - - $(DirTools)\msbuild.extensions - - - - - - - - - - - - - - - - - - - - - $(DirBuildTemp)\semantic_version.json - - - - - - - - - $(DirBuildTemp)\releasenotes_full.md - - - - - - - - - $(DirSrc)\.nuget\NuGet.exe - - - $(DirTemplates)\nuclei.nuspec.in - $(DirBuildTemp)\nuclei.nuspec - - - - - - - - - - - - - - - $(VersionSemantic) - - - $(DirBuildBin) - - - $(DirSrc) - - - $(ReleaseNotes) - - - $(NugetDependenciesNuclei) - - - - - - - - - $(DirTemplates)\nuclei.build.nuspec.in - $(DirBuildTemp)\nuclei.build.nuspec - - - - - - - - - - - - - - - $(VersionSemantic) - - - $(DirBuildBin) - - - $(DirSrc) - - - $(ReleaseNotes) - - - $(NugetDependenciesNucleiBuild) - - - - - - - - - $(DirTemplates)\nuclei.communication.nuspec.in - $(DirBuildTemp)\nuclei.communication.nuspec - - - - - - - - - - - - - - - $(VersionSemantic) - - - $(DirBuildBin) - - - $(DirSrc) - - - $(ReleaseNotes) - - - $(NugetDependenciesNucleiCommunication) - - - - - - - - - $(DirTemplates)\nuclei.configuration.nuspec.in - $(DirBuildTemp)\nuclei.configuration.nuspec - - - - - - - - - - - - - - - $(VersionSemantic) - - - $(DirBuildBin) - - - $(DirSrc) - - - $(ReleaseNotes) - - - $(NugetDependenciesNucleiConfiguration) - - - - - - - - - $(DirTemplates)\nuclei.diagnostics.nuspec.in - $(DirBuildTemp)\nuclei.diagnostics.nuspec - - - - - - - - - - - - - - - $(VersionSemantic) - - - $(DirBuildBin) - - - $(DirSrc) - - - $(ReleaseNotes) - - - $(NugetDependenciesNucleiDiagnostics) - - - - - - - - - $(DirTemplates)\nuclei.nunit.extensions.nuspec.in - $(DirBuildTemp)\nuclei.nunit.extensions.nuspec - - - - - - - - - - - - - - - $(VersionSemantic) - - - $(DirBuildBin) - - - $(DirSrc) - - - $(ReleaseNotes) - - - $(NugetDependenciesNucleiNunitExtensions) - - - - - - - - - $(DirBuildTemp)\src - - - $(DirTempSource)\Nuclei.AppDomains - - - - - - - - - - - using $rootnamespace$.Nuclei.ExceptionHandling - - - using $rootnamespace$.Nuclei.Fusion - - - namespace $rootnamespace$.Nuclei.AppDomains - - - - - - - - - - - - $(DirTemplates)\nuclei.appdomains.nuspec.in - $(DirBuildTemp)\nuclei.appdomains.nuspec - - - - - - - - - - - - - - - $(VersionSemantic) - - - $(DirTempSourceNucleiAppDomains) - - - $(ReleaseNotes) - - - $(NugetDependenciesNucleiAppDomains) - - - - - - - - - $(DirTempSource)\Nuclei.ExceptionHandling - - - - - - - - - - - namespace $rootnamespace$.Nuclei.ExceptionHandling - - - - - - - - - - - - $(DirTemplates)\nuclei.exceptionhandling.nuspec.in - $(DirBuildTemp)\nuclei.exceptionhandling.nuspec - - - - - - - - - - - - - - - $(VersionSemantic) - - - $(DirTempSourceNucleiExceptionHandling) - - - $(ReleaseNotes) - - - $(NugetDependenciesNucleiExceptionHandling) - - - - - - - - - $(DirTempSource)\Nuclei.Fusion - - - - - - - - - - - namespace $rootnamespace$.Nuclei.Fusion - - - - - - - - - - - - $(DirTemplates)\nuclei.fusion.nuspec.in - $(DirBuildTemp)\nuclei.fusion.nuspec - - - - - - - - - - - - - - - $(VersionSemantic) - - - $(DirTempSourceNucleiFusion) - - - $(ReleaseNotes) - - - $(NugetDependenciesNucleiFusion) - - - - - - - \ No newline at end of file diff --git a/Build.PrepareWorkspace.msbuild b/Build.PrepareWorkspace.msbuild deleted file mode 100644 index d4d259c..0000000 --- a/Build.PrepareWorkspace.msbuild +++ /dev/null @@ -1,62 +0,0 @@ - - - - - true - false - - - $(MSBuildProjectDirectory) - $(DirWorkspace)\packages - $(DirWorkspace)\tools - $(DirWorkspace)\build - $(DirBuild)\bin\$(PlatformTranslated)\$(Configuration) - $(DirBuild)\deploy - $(DirBuild)\logs - $(DirBuild)\temp - $(DirWorkspace)\src - - - $(DirTools)\msbuild.extensions - - - - - - - - - - - - - - - - - - - - - - - - - - - $(DirSrc)\.nuget\NuGet.exe - $([System.IO.Path]::Combine($(DirWorkspace), "packages.config")) - - - - - \ No newline at end of file diff --git a/Build.Test.Unit.msbuild b/Build.Test.Unit.msbuild deleted file mode 100644 index 401905d..0000000 --- a/Build.Test.Unit.msbuild +++ /dev/null @@ -1,96 +0,0 @@ - - - - - Release - Any CPU - $(Platform.Replace(" ","")) - - - $(MSBuildProjectDirectory) - $(DirWorkspace)\packages - $(DirWorkspace)\tools - $(DirWorkspace)\build - $(DirBuild)\bin\$(PlatformTranslated)\$(Configuration) - $(DirBuild)\logs - $(DirBuild)\temp - - - $(DirTools)\msbuild.extensions - - - - - - - - - - - - - - - - - - nunit-console-x86.exe - - - $(DirBuildLogs)\opencover.xml - opencover.console.exe - ReportGenerator.exe - $(DirBuildLogs)\coverage - $(ReportGeneratorOutputDir)\Summary.xml - $(DirBuildLogs)\coverage.csv - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build.msbuild b/Build.msbuild deleted file mode 100644 index 71d1b43..0000000 --- a/Build.msbuild +++ /dev/null @@ -1,67 +0,0 @@ - - - - - true - true - false - - - Any CPU - - - $(MSBuildProjectDirectory) - - - - - - - - - - - - - - $(DirWorkspace)\Build.PrepareWorkspace.msbuild - - - - - - - - $(DirWorkspace)\Build.GatherReleaseNotes.msbuild - - - - - - - - $(DirWorkspace)\Build.Binaries.msbuild - - - - - - - - - $(DirWorkspace)\Build.Test.Unit.msbuild - - - - - - - - $(DirWorkspace)\Build.Package.NuGet.msbuild - - - - - \ No newline at end of file diff --git a/Deploy.GitTag.msbuild b/Deploy.GitTag.msbuild deleted file mode 100644 index 655594e..0000000 --- a/Deploy.GitTag.msbuild +++ /dev/null @@ -1,58 +0,0 @@ - - - - - $(MSBuildProjectDirectory) - $(DirWorkspace)\tools - $(DirWorkspace)\build - $(DirBuild)\temp - - - 0 - - - $(DirTools)\msbuild.extensions - - - - - - - - - - - - - - $(DirBuildTemp)\semantic_version.json - - - - - - - - - $(DirBuildTemp)\releasenotes_short.md - - - - - - - - - $(DirGit)\git.exe - - - - - - \ No newline at end of file diff --git a/NextVersion.txt b/NextVersion.txt deleted file mode 100644 index 8adc70f..0000000 --- a/NextVersion.txt +++ /dev/null @@ -1 +0,0 @@ -0.8.0 \ No newline at end of file diff --git a/README.md b/README.md index 2c3e8a6..3b170be 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,38 @@ # Nuclei Nuclei is a collection of libraries containing classes and functions for inter-application interaction via a command mechanism, diagnostics, configuration handling, exception handling and assembly location and loading. +The `Nuclei` assembly contains a set of classes and interfaces for: -The capabilities in Nuclei are currently divided as follows: - -* __Nuclei__ - Base classes and interfaces, mostly used by the other libraries. -* __Nuclei.Build__ - Assembly attributes which can be used at build time to embed information about the specific build into an assembly, e.g. time and date of build or information describing the version control revision of the source code that was used to create the assembly. -* __Nuclei.Communication__ - Provides classes, interfaces and delegates used to provide a means of interacting between two or more applications through one or more command interfaces (similar to a Remote Procedure Call (RPC)). Capabilities include: - * Based on WCF. Currently implemented methods for using TCP and named-pipes as base network layers. - * Discovery of communication sources on the local machine and the local network (using WS discovery). - * Automatic exchange of connection parameters between endpoints, if endpoints desired to communicate on the same topics (i.e. using an API that is familiar to both). - * User provides command and notification interfaces which provide asynchronous methods which can be called by remote endpoints. Command parameters and return data are transported over via a message based mechanism. -* __Nuclei.Configuration__ - Provides an abstraction of a configuration. Build-in support for configuration via an application config file. -* __Nuclei.Diagnostics__ - Provides classes for logging (using NLog) and and in-application measuring of performance. -* __Nuclei.Nunit.Extensions__ - Contains a simple implementation of contract verification for NUnit. Ideas based - on the [contract verifiers in MbUnit](http://interfacingreality.blogspot.co.nz/2009/03/contract-verifiers-in-mbunit-v307.html). Currently only has - verifiers for hashcode and equality. - -* __Nuclei.AppDomains__ - Provides classes for the creation of AppDomains with pre-set assembly resolve and exception handlers. -* __Nuclei.ExceptionHandling__ - Provides exception filters for use in top level exception recording. -* __Nuclei.Fusion__ - Provides methods for assembly resolve requests. +* An ID instance that is comparable and equatable. +* Extracting text and streams from an embedded resource. +* Comparison of `Type` instances. +* Loading of `Type` instances with a partial assembly name. +* Extension methods for `Assembly` instances. # Installation instructions -All libraries are available on [NuGet.org](http://www.nuget.org). +All libraries are available on [NuGet.org](https://www.nuget.org/packages/Nuclei/). -Note that __Nuclei.AppDomains__, __Nuclei.ExceptionHandling__ and __Nuclei.Fusion__ are source-only packages because of the capabilities they provide. For both top-level exception handlers and for assembly resolvers it makes no sense to provide binary packages because then it is possible that trying to load the respective assemblies may be the cause of the unhandled exception or assembly resolve request. +# How to build +The solution files are created in Visual Studio 2013 (using .NET 4.0) and the assemblies can be build either from Visual Studio or through the build script. +To invoke the build script use the following command line from the workspace directory (assuming MsBuild is on the PATH) + msbuild nuclei.msbuild /t:build -# How to build -The solution files are created in Visual Studio 2012 (using .NET 4.5) and the entire project can be build by invoking MsBuild on the nuclei.integration.msbuild script. This will build the binaries and the NuGet package. The binaries will be placed in the `build\bin\AnyCpu\Release` directory and the NuGet package will be placed in the `build\deploy` directory. +This will build the binaries and the NuGet package. The binaries will be placed in the `build\bin\AnyCpu\Release` directory and the NuGet package will be placed in the `build\deploy` directory. Note that the build scripts assume that: -* The binaries should be signed, however the SNK key file is not included in the repository so a new key file has to be [created][snkfile_msdn]. The key file is referenced through an environment variable called `SOFTWARE_SIGNING_KEY_PATH` that has as value the full path of the key file. -* GIT can be found on the PATH somewhere so that it can be called to get the hash of the last commit in the current repository. This hash is embedded in the nuclei assemblies together with information about the build configuration and build time and date. -* The Windows SDK 7 or 8 is installed on the machine so that the script has access to the strong naming utility (`sn.exe`) for the generation of the `InternalsVisibleTo` attributes that are used during the unit tests. +* The binaries should be signed, however the SNK key file is not included in the repository so a new key file has to be [created][snkfile_msdn]. The key file is referenced + through an environment variable called `SOFTWARE_SIGNING_KEY_PATH` that has as value the directory path of the key file. The key file is expected to be called `nuclei.snk` +* GIT can be found on the PATH somewhere so that it can be called to get the hash of the last commit in the current repository. This hash is embedded in the assemblies together + with information about the build configuration and build time and date. + +# How to contribute +There are a few ways to contribute: + +* By opening an issue on the project. +* By provide a pull-request for a new feature or a bug. + +Any suggestions or improvements you may have are more than welcome. [snkfile_msdn]: http://msdn.microsoft.com/en-us/library/6f05ezxy(v=vs.110).aspx \ No newline at end of file diff --git a/Settings.StyleCop b/Settings.StyleCop deleted file mode 100644 index 9564c15..0000000 --- a/Settings.StyleCop +++ /dev/null @@ -1,270 +0,0 @@ - - - - aspx - bitness - castle-dynamic-proxy-tutorial-part-xv-patterns-and-antipatterns - clrteam - dir - dotnetinterop - double - finalizer - GUID - hashcode - hashcodes - int - ip - kozmic - msdn - Ms-PL - parameterless - performant - rmbyers - serializer - serializers - simple-auto-update-for-wpf-apps - stackoverflow - tcp - unregistration - UUID - xaml - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - as - do - id - if - in - is - m_ - my - no - on - s_ - to - ui - - - - - - - - True - - - - - True - - - - - False - - - - - False - - - - - Nuclei - Copyright 2013 Nuclei. Licensed under the Apache License, Version 2.0. - True - True - - - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - False - - - - - False - - - - - False - - - - - - - - - - True - - - - - True - - - - - True - - - - - True - - - - - True - - - - - False - - - - - False - False - False - $(AaBb) - $(AaBb) - m_$(AaBb) - m_$(AaBb) - m_$(AaBb) - s_$(AaBb) - s_$(AaBb) - s_$(AaBb) - $(AaBb) - $(AaBb) - $(AaBb) - $(AaBb) - $(AaBb):$(AaBb)A$(AaBb) - On$(AaBb) - $(AA_BB) - Spaces:False - 150:4 - 25 - 1000 - FxCop IP StyleCop x64 x86 - $(AaBb):$(AaBb)A$(AaBb) - $(AaBb):$(AaBb)A$(AaBb) - 150 - - - - \ No newline at end of file diff --git a/build.settings.props b/build.settings.props new file mode 100644 index 0000000..aee2f6f --- /dev/null +++ b/build.settings.props @@ -0,0 +1,830 @@ + + + + + + + + + Release + + + Deploy + + + + + + + + + + + + + + + Prepare; + + + + + + + Prepare; + + + + + + + Prepare; + + + + + + + Prepare; + + + + + + + Prepare; + + + + + + + Prepare; + + + + + + + + + + Prepare; + + + + + + + + Generate; + Prepare; + + + + + + + + + + Compile; + + + + + + Configuration=$(TestConfiguration); + Platform=$(Platform) + + + UnitTest; + + + + + + + + Configuration=$(TestConfiguration); + Platform=$(Platform) + + + Analyze; + + + + + + + + Configuration=$(ProductionConfiguration); + Platform=$(Platform) + + + Package; + + + + + Configuration=$(ProductionConfiguration); + Platform=$(Platform) + + + Package; + + + + + + + + + + + + + + + + + + + + + + + UTF-8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + true + + + + + + + + + + + Nuclei + + $(SOFTWARE_SIGNING_KEY_PATH)\nuclei.snk + + + + + + + v4.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(DirSrc)\default.ruleset + + + + + + + + + true + + + + + 4.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + diff --git a/deploy.settings.props b/deploy.settings.props new file mode 100644 index 0000000..184d2fa --- /dev/null +++ b/deploy.settings.props @@ -0,0 +1,285 @@ + + + + + + + + + Prepare; + + + + + + + Prepare; + + + + + + Configuration=$(ProductionConfiguration); + Platform=$(Platform); + + + NuGet; + Push; + + + + + + + Configuration=$(ProductionConfiguration); + Platform=$(Platform); + + + Git; + Push; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Nuclei + ${ReleaseNotes} + + + + + + + + + + + $(GitRemoteRepository) + gh-pages + true + Documentation update for version ${VersionSemantic} + + + + + + + + + + + + + + + + + + + + + + + + + true + + diff --git a/doc/Nuclei.Documentation/Nuclei.Documentation.csproj b/doc/Nuclei.Documentation/Nuclei.Documentation.csproj new file mode 100644 index 0000000..434b91f --- /dev/null +++ b/doc/Nuclei.Documentation/Nuclei.Documentation.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + + + 2.0 + {9F1C358A-E44C-4666-ADA6-2126C275C5A7} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + Nuclei.Documentation + Nuclei.Documentation + v4.5.2 + true + + + + + + + + + + ..\..\build\logs\docfx.txt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 3043 + / + http://localhost:3043/ + False + False + + + False + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/doc/Nuclei.Documentation/Properties/AssemblyInfo.cs b/doc/Nuclei.Documentation/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ffacacb --- /dev/null +++ b/doc/Nuclei.Documentation/Properties/AssemblyInfo.cs @@ -0,0 +1,42 @@ +using System.Reflection; +using System.Diagnostics.CodeAnalysis; +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("Nuclei.Build.Documentation")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Nuclei.Build.Documentation")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[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("f6e6d7bb-5943-414b-9971-9706862a178a")] + +// 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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + +[module: SuppressMessage( + "Microsoft.Usage", + "CA2243:AttributeStringLiteralsShouldParseCorrectly", + Justification = "Semantic version")] +[assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/doc/Nuclei.Documentation/api/index.md b/doc/Nuclei.Documentation/api/index.md new file mode 100644 index 0000000..e3c9c8f --- /dev/null +++ b/doc/Nuclei.Documentation/api/index.md @@ -0,0 +1,48 @@ + +# Nuclei + +DOCUMENTATION TO FOLLOW + + +## ID + +The `ID` type defines an immutable, serializable ID type that is comparable and has the equality methods and operators defined. + +[!code-csharp[ExampleID](..\..\Nuclei.Samples\SampleId.cs?range=8-)] + +The `ID` type implements object equality through `IEquatable` and the equality operators and object comparability through `IComparable` and `IComparable`. + + +## Assembly extensions + +The `AssemblyExtensions` class provides several extension methods for the `Assembly` type. Extension methods are provided to: + +* Get the full file path of an assembly + +[!code-csharp[Assembly.LocalFilePath](..\..\Nuclei.Samples\AssemblyExtensionsSample.cs?range=26)] + +* Get the full directory path of an assembly + +[!code-csharp[Assembly.LocalDirectoryPath](..\..\Nuclei.Samples\AssemblyExtensionsSample.cs?range=35)] + +* Determine if the assembly is strong named + +[!code-csharp[Assembly.IsStrongNamed](..\..\Nuclei.Samples\AssemblyExtensionsSample.cs?range=44-45)] + +* Get the strong name of the assembly + +[!code-csharp[Assembly.StrongName](..\..\Nuclei.Samples\AssemblyExtensionsSample.cs?range=44,49)] + + +## Embedded resources + +The `EmbeddedResourceExtracter` class provides methods for extracting an embedded resource from a given assembly. + +[!code-csharp[EmbeddedResourceExtracter.LoadEmbeddedStream](..\..\Nuclei.Samples\EmbeddedResourceExtracterSample.cs?range=30-35,38)] + +[!code-csharp[EmbeddedResourceExtracter.LoadEmbeddedTextFile](..\..\Nuclei.Samples\EmbeddedResourceExtracterSample.cs?range=44-46)] + + +## Type + +[!code-csharp[Type.IsAssignableToOpenGenericType](..\..\Nuclei.Samples\TypeSample.cs?range=26-27,30,32-33,36,38-39)] diff --git a/doc/Nuclei.Documentation/docfx.json b/doc/Nuclei.Documentation/docfx.json new file mode 100644 index 0000000..892911f --- /dev/null +++ b/doc/Nuclei.Documentation/docfx.json @@ -0,0 +1,74 @@ +{ + "metadata": [ + { + "src": [ + { + "cwd": "../../", + "exclude": [ + "**/obj/**", + "**/bin/**", + "_site/**" + ], + "files": [ + "src/**/*.csproj" + ] + } + ], + "dest": "obj/api" + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml" + ], + "cwd": "obj" + }, + { + "files": [ + "api/*.md", + "articles/**.md", + "toc.yml", + "*.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "_site", + "globalMetadata": { + "newFileRepository": { + "branch": "develop" + }, + "_appFooter": "Copyright (c) - TheNucleus 2013 - 2016. All rights reserved." + }, + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "template": [ + "default" + ] + } +} diff --git a/doc/Nuclei.Documentation/index.md b/doc/Nuclei.Documentation/index.md new file mode 100644 index 0000000..3b170be --- /dev/null +++ b/doc/Nuclei.Documentation/index.md @@ -0,0 +1,38 @@ +# Nuclei +Nuclei is a collection of libraries containing classes and functions for inter-application interaction via a command mechanism, diagnostics, configuration handling, exception handling and assembly location and loading. +The `Nuclei` assembly contains a set of classes and interfaces for: + +* An ID instance that is comparable and equatable. +* Extracting text and streams from an embedded resource. +* Comparison of `Type` instances. +* Loading of `Type` instances with a partial assembly name. +* Extension methods for `Assembly` instances. + + +# Installation instructions +All libraries are available on [NuGet.org](https://www.nuget.org/packages/Nuclei/). + +# How to build +The solution files are created in Visual Studio 2013 (using .NET 4.0) and the assemblies can be build either from Visual Studio or through the build script. +To invoke the build script use the following command line from the workspace directory (assuming MsBuild is on the PATH) + + msbuild nuclei.msbuild /t:build + +This will build the binaries and the NuGet package. The binaries will be placed in the `build\bin\AnyCpu\Release` directory and the NuGet package will be placed in the `build\deploy` directory. + +Note that the build scripts assume that: + +* The binaries should be signed, however the SNK key file is not included in the repository so a new key file has to be [created][snkfile_msdn]. The key file is referenced + through an environment variable called `SOFTWARE_SIGNING_KEY_PATH` that has as value the directory path of the key file. The key file is expected to be called `nuclei.snk` +* GIT can be found on the PATH somewhere so that it can be called to get the hash of the last commit in the current repository. This hash is embedded in the assemblies together + with information about the build configuration and build time and date. + +# How to contribute +There are a few ways to contribute: + +* By opening an issue on the project. +* By provide a pull-request for a new feature or a bug. + +Any suggestions or improvements you may have are more than welcome. + +[snkfile_msdn]: http://msdn.microsoft.com/en-us/library/6f05ezxy(v=vs.110).aspx \ No newline at end of file diff --git a/doc/Nuclei.Documentation/nuclei.zipspec b/doc/Nuclei.Documentation/nuclei.zipspec new file mode 100644 index 0000000..b87dcbd --- /dev/null +++ b/doc/Nuclei.Documentation/nuclei.zipspec @@ -0,0 +1,9 @@ + + + nuclei.documentation-${VersionSemantic} + + + + + + \ No newline at end of file diff --git a/doc/Nuclei.Documentation/packages.config b/doc/Nuclei.Documentation/packages.config new file mode 100644 index 0000000..bc7f084 --- /dev/null +++ b/doc/Nuclei.Documentation/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/doc/Nuclei.Documentation/template.docfx.json b/doc/Nuclei.Documentation/template.docfx.json new file mode 100644 index 0000000..e9d2dec --- /dev/null +++ b/doc/Nuclei.Documentation/template.docfx.json @@ -0,0 +1,74 @@ +{ + "metadata": [ + { + "src": [ + { + "cwd": "../../", + "exclude": [ + "**/obj/**", + "**/bin/**", + "_site/**" + ], + "files": [ + "src/**/*.csproj" + ] + } + ], + "dest": "obj/api" + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml" + ], + "cwd": "obj" + }, + { + "files": [ + "api/*.md", + "articles/**.md", + "toc.yml", + "*.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "_site", + "globalMetadata": { + "newFileRepository": { + "branch": "develop" + }, + "_appFooter": "${CopyrightLong}" + }, + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "template": [ + "default" + ] + } +} \ No newline at end of file diff --git a/doc/Nuclei.Documentation/toc.yml b/doc/Nuclei.Documentation/toc.yml new file mode 100644 index 0000000..54e0dde --- /dev/null +++ b/doc/Nuclei.Documentation/toc.yml @@ -0,0 +1,4 @@ + +- name: API Documentation + href: api/ + homepage: api/index.md diff --git a/doc/Nuclei.Samples/AssemblyExtensionsSample.cs b/doc/Nuclei.Samples/AssemblyExtensionsSample.cs new file mode 100644 index 0000000..5ed632e --- /dev/null +++ b/doc/Nuclei.Samples/AssemblyExtensionsSample.cs @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) TheNucleus. All rights reserved. +// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. +// +//----------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Reflection; +using NUnit.Framework; + +namespace Nuclei.Samples +{ + [TestFixture] + [SuppressMessage( + "Microsoft.StyleCop.CSharp.DocumentationRules", + "SA1600:ElementsMustBeDocumented", + Justification = "Unit tests do not need documentation.")] + public sealed class AssemblyExtensionsSample + { + [Test] + public void LocalFilePath() + { + var filePath = Assembly.GetExecutingAssembly().LocalFilePath(); + + var path = new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath; + Assert.AreEqual(path, filePath); + } + + [Test] + public void LocalDirectoryPath() + { + var directoryPath = Assembly.GetExecutingAssembly().LocalDirectoryPath(); + + var path = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); + Assert.AreEqual(path, directoryPath); + } + + [Test] + public void StrongName() + { + var assembly = typeof(string).Assembly; + var isStrongNamed = assembly.IsStrongNamed(); + + Assert.IsTrue(isStrongNamed); + + var strongName = assembly.StrongName(); + + Assert.AreEqual(assembly.GetName().Name, strongName.Name); + Assert.AreEqual(assembly.GetName().Version, strongName.Version); + } + } +} diff --git a/doc/Nuclei.Samples/EmbeddedResourceExtracterSample.cs b/doc/Nuclei.Samples/EmbeddedResourceExtracterSample.cs new file mode 100644 index 0000000..2bb6eb8 --- /dev/null +++ b/doc/Nuclei.Samples/EmbeddedResourceExtracterSample.cs @@ -0,0 +1,51 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) TheNucleus. All rights reserved. +// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. +// +//----------------------------------------------------------------------- + +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Reflection; +using NUnit.Framework; + +namespace Nuclei.Samples +{ + [TestFixture] + [SuppressMessage( + "Microsoft.StyleCop.CSharp.DocumentationRules", + "SA1600:ElementsMustBeDocumented", + Justification = "Unit tests do not need documentation.")] + [SuppressMessage( + "Microsoft.Naming", + "CA1704:IdentifiersShouldBeSpelledCorrectly", + MessageId = "Extracter", + Justification = "Noun version of extraction. Seems reasonable.")] + public sealed class EmbeddedResourceExtracterSample + { + [Test] + public void LoadFromEmbeddedStream() + { + var stream = EmbeddedResourceExtracter.LoadEmbeddedStream( + Assembly.GetExecutingAssembly(), + "Nuclei.Samples.ExtracterFile.txt"); + using (var reader = new StreamReader(stream)) + { + var text = reader.ReadToEnd(); + Assert.IsNotNull(text); + Assert.Greater(text.Length, 0); + } + } + + [Test] + public void LoadFromEmbeddedTextFile() + { + var text = EmbeddedResourceExtracter.LoadEmbeddedTextFile( + Assembly.GetExecutingAssembly(), + "Nuclei.Samples.ExtracterFile.txt"); + Assert.IsNotNull(text); + Assert.Greater(text.Length, 0); + } + } +} diff --git a/doc/Nuclei.Samples/ExtracterFile.txt b/doc/Nuclei.Samples/ExtracterFile.txt new file mode 100644 index 0000000..99fd4cf --- /dev/null +++ b/doc/Nuclei.Samples/ExtracterFile.txt @@ -0,0 +1 @@ +This is a sample text file. \ No newline at end of file diff --git a/doc/Nuclei.Samples/GlobalSuppressions.cs b/doc/Nuclei.Samples/GlobalSuppressions.cs new file mode 100644 index 0000000..b3472e6 Binary files /dev/null and b/doc/Nuclei.Samples/GlobalSuppressions.cs differ diff --git a/doc/Nuclei.Samples/Nuclei.Samples.csproj b/doc/Nuclei.Samples/Nuclei.Samples.csproj new file mode 100644 index 0000000..6d41b1d --- /dev/null +++ b/doc/Nuclei.Samples/Nuclei.Samples.csproj @@ -0,0 +1,90 @@ + + + + + $(MSBuildProjectDirectory)\..\..\src + + + Debug + AnyCPU + {0F2A04DD-00F0-4FBC-8C1F-D3B271DE7743} + Library + Properties + Nuclei.Samples + Nuclei.Samples + v4.5.2 + 512 + 1591 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\..\packages\Nuclei.Build.0.9.0\lib\net40\Nuclei.Build.dll + True + + + ..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + {7c12c611-1780-4e93-9b0e-b806b738559d} + Nuclei + + + + + + + + + + + \ No newline at end of file diff --git a/doc/Nuclei.Samples/Properties/AssemblyInfo.cs b/doc/Nuclei.Samples/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d9e6b0f --- /dev/null +++ b/doc/Nuclei.Samples/Properties/AssemblyInfo.cs @@ -0,0 +1,63 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) TheNucleus. All rights reserved. +// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. +// +//----------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Runtime.InteropServices; +using Nuclei.Build; + +// 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("Nuclei.Nunit.Extensions.Samples")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyProduct("Nuclei.Nunit.Extensions.Samples")] + +[assembly: AssemblyCompany("")] +[assembly: AssemblyCopyright("Copyright © 2013")] + +[assembly: AssemblyCulture("")] + +// 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: AssemblyTrademark("")] + +// 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)] + +// Indicate that the assembly is CLS compliant. +[assembly: CLSCompliant(true)] + +[assembly: AssemblyConfiguration("Release")] + +// 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: AssemblyInformationalVersion("1.0.0.0")] + +// The time the assembly was build +[assembly: AssemblyBuildTime(buildTime: "1900-01-01T00:00:00.0000000+00:00")] + +// The version from which the assembly was build +[module: SuppressMessage( + "Microsoft.Usage", + "CA2243:AttributeStringLiteralsShouldParseCorrectly", + Justification = "It's a VCS revision, not a version")] +[assembly: AssemblyBuildInformation(buildNumber: 0, versionControlInformation: "1234567890123456789012345678901234567890")] diff --git a/doc/Nuclei.Samples/SampleId.cs b/doc/Nuclei.Samples/SampleId.cs new file mode 100644 index 0000000..2c955fb --- /dev/null +++ b/doc/Nuclei.Samples/SampleId.cs @@ -0,0 +1,47 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) TheNucleus. All rights reserved. +// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. +// +//----------------------------------------------------------------------- + +using System.Globalization; + +namespace Nuclei.Samples +{ + /// + /// Defines an ID that uses a string as the internal identifying value. + /// + public sealed class SampleId : Id + { + /// + /// Initializes a new instance of the class. + /// + /// The value. + public SampleId(string value) + : base(value) + { + } + + /// + /// Clones the specified value. + /// + /// The value. + /// A new with the given value as internal ID. + protected override SampleId Clone(string value) + { + return new SampleId(value); + } + + /// + /// Returns a that represents this instance. + /// + /// + /// A that represents this instance. + /// + public override string ToString() + { + return string.Format(CultureInfo.InvariantCulture, "ID: {0}", InternalValue); + } + } +} diff --git a/doc/Nuclei.Samples/TypeSample.cs b/doc/Nuclei.Samples/TypeSample.cs new file mode 100644 index 0000000..dad47f2 --- /dev/null +++ b/doc/Nuclei.Samples/TypeSample.cs @@ -0,0 +1,44 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) TheNucleus. All rights reserved. +// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. +// +//----------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using NUnit.Framework; + +namespace Nuclei.Samples +{ + [TestFixture] + [SuppressMessage( + "Microsoft.StyleCop.CSharp.DocumentationRules", + "SA1600:ElementsMustBeDocumented", + Justification = "Unit tests do not need documentation.")] + public sealed class TypeSample + { + [Test] + public void IsAssignableToOpenGenericType() + { + { + // Should return true + var result = typeof(List<>).IsAssignableToOpenGenericType(typeof(List)); + Assert.IsTrue(result); + } + + { + // Should return false + var result = typeof(IList<>).IsAssignableToOpenGenericType(typeof(Dictionary)); + Assert.IsFalse(result); + } + + { + // Should return true + var result = typeof(IComparable<>).IsAssignableToOpenGenericType(typeof(bool)); + Assert.IsTrue(result); + } + } + } +} diff --git a/doc/Nuclei.Samples/packages.config b/doc/Nuclei.Samples/packages.config new file mode 100644 index 0000000..25419c8 --- /dev/null +++ b/doc/Nuclei.Samples/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/entrypoint.msbuild b/entrypoint.msbuild new file mode 100644 index 0000000..fdb754f --- /dev/null +++ b/entrypoint.msbuild @@ -0,0 +1,954 @@ + + + + + + $(MSBuildProjectDirectory) + + $(DirWorkspace)\packages + + + + $(DirWorkspace)\settings.props + + $(DirWorkspace)\packages.config + + $(DirWorkspace)\nuget.config + + + + NuGet.exe + + + $(MSBuildToolsPath)\Microsoft.Build.Tasks.v$(MSBuildToolsVersion).dll + $(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + true + + $(DirWorkspace)\build + $(DirBuildDefault)\temp + $(DirWorkspace)\src + $(DirWorkspace)\tests + + https://raw.githubusercontent.com/nbuildkit/nBuildKit.MsBuild + $(UrlNBuildKitOnGitHub)/master/src/samples + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + { + if (!string.IsNullOrWhiteSpace(e.Data)) + { + text.Append(e.Data); + } + }; + process.ErrorDataReceived += + (s, e) => + { + if (!string.IsNullOrWhiteSpace(e.Data)) + { + Log.LogError(e.Data); + } + }; + process.Start(); + + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + process.WaitForExit(); + + if (process.ExitCode != 0) + { + Log.LogError( + string.Format( + "{0} exited with a non-zero exit code. Exit code was: {1}", + System.IO.Path.GetFileName(process.StartInfo.FileName), + process.ExitCode)); + return false; + } + + try + { + string listText = text.ToString(); + const string nbuildKitVersionStart = "nBuildKit.Msbuild "; + var index = listText.IndexOf(nbuildKitVersionStart, StringComparison.OrdinalIgnoreCase); + var versionText = listText.Substring( + index + nbuildKitVersionStart.Length, + listText.IndexOf("nBuildKit", index + nbuildKitVersionStart.Length, StringComparison.OrdinalIgnoreCase) - (index + nbuildKitVersionStart.Length)) + .Trim(); + var version = new Version(versionText); + Major = version.Major; + Minor = version.Minor; + Patch = version.Build; + } + catch(Exception e) + { + Log.LogError(e.ToString()); + } + + // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged + // from a task's constructor or property setter. As long as this task is written to always log an error + // when it fails, we can reliably return HasLoggedErrors. + return !Log.HasLoggedErrors; + } + ]]> + + + + + + + + + + + + + { + if (!string.IsNullOrWhiteSpace(e.Data)) + { + text.Append(e.Data); + } + }; + process.ErrorDataReceived += + (s, e) => + { + if (!string.IsNullOrWhiteSpace(e.Data)) + { + Log.LogError(e.Data); + } + }; + process.Start(); + + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + process.WaitForExit(); + + if (process.ExitCode != 0) + { + Log.LogError( + string.Format( + "{0} exited with a non-zero exit code. Exit code was: {1}", + System.IO.Path.GetFileName(process.StartInfo.FileName), + process.ExitCode)); + return false; + } + + RemoteRepositoryUrl = ""; + try + { + string listText = text.ToString(); + const string remoteStart = "Fetch URL: "; + var index = listText.IndexOf(remoteStart, StringComparison.OrdinalIgnoreCase); + if (index > -1) + { + RemoteRepositoryUrl = listText.Substring( + index + remoteStart.Length, + listText.IndexOf("Push URL:", index + remoteStart.Length, StringComparison.OrdinalIgnoreCase) - (index + remoteStart.Length)) + .Trim(); + } + } + catch(Exception e) + { + Log.LogError(e.ToString()); + } + + // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged + // from a task's constructor or property setter. As long as this task is written to always log an error + // when it fails, we can reliably return HasLoggedErrors. + return !Log.HasLoggedErrors; + } + ]]> + + + + + + + + + + + + + + + + + { + if (!string.IsNullOrWhiteSpace(e.Data)) + { + Log.LogMessage(MessageImportance.Normal, e.Data); + } + }; + process.ErrorDataReceived += + (s, e) => + { + if (!string.IsNullOrWhiteSpace(e.Data)) + { + Log.LogError(e.Data); + } + }; + process.Start(); + + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + process.WaitForExit(); + + if (process.ExitCode != 0) + { + Log.LogError( + string.Format( + "{0} exited with a non-zero exit code. Exit code was: {1}", + System.IO.Path.GetFileName(process.StartInfo.FileName), + process.ExitCode)); + return false; + } + + // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged + // from a task's constructor or property setter. As long as this task is written to always log an error + // when it fails, we can reliably return HasLoggedErrors. + return !Log.HasLoggedErrors; + } + ]]> + + + + + + + + + + + + + + highestVersion) && (version < notAllowedVersion)) + { + highestVersion = version; + } + } + + Version = highestVersion.ToString(3); + } + catch(Exception e) + { + Log.LogError(e.ToString()); + } + + // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged + // from a task's constructor or property setter. As long as this task is written to always log an error + // when it fails, we can reliably return HasLoggedErrors. + return !Log.HasLoggedErrors; + } + ]]> + + + + + + + + + + + + + + + { + if (!string.IsNullOrWhiteSpace(e.Data)) + { + Log.LogMessage(MessageImportance.Normal, e.Data); + } + }; + process.ErrorDataReceived += + (s, e) => + { + if (!string.IsNullOrWhiteSpace(e.Data)) + { + Log.LogError(e.Data); + } + }; + process.Start(); + + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + process.WaitForExit(); + + if (process.ExitCode != 0) + { + Log.LogError( + string.Format( + "{0} exited with a non-zero exit code. Exit code was: {1}", + System.IO.Path.GetFileName(process.StartInfo.FileName), + process.ExitCode)); + return false; + } + + // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged + // from a task's constructor or property setter. As long as this task is written to always log an error + // when it fails, we can reliably return HasLoggedErrors. + return !Log.HasLoggedErrors; + } + ]]> + + + + \ No newline at end of file diff --git a/packages.config b/packages.config index eaa883d..4787f58 100644 --- a/packages.config +++ b/packages.config @@ -1,8 +1,3 @@ - - - - - \ No newline at end of file diff --git a/releasenotes.txt b/releasenotes.txt deleted file mode 100644 index e69de29..0000000 diff --git a/settings.props b/settings.props new file mode 100644 index 0000000..eedc4c7 --- /dev/null +++ b/settings.props @@ -0,0 +1,643 @@ + + + + + + + + + + + + + + + + + Nuclei + + + Nuclei + + + + Nuclei is a collection of libraries containing classes and functions for inter-application interaction via a command mechanism, diagnostics, configuration handling, exception handling and assembly location and loading. + + + + Nuclei + + + 2013 + + + TheNucleus + + + thenucleus + + + https://github.com/thenucleus/Nuclei + + + UNDEFINED + + + + + + + + + + + + thenucleus + + + Nuclei + + + https://github.com/$(GitHubUserName)/Nuclei.git + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(DirWorkspace)\doc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UNDEFINED + + + + + + + + + + + + + + + + + + + UNDEFINED + + + + + + + + + + + + + + + + + + + + + + + + + + $(DirDoc) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + 0.8.0 + 1.0.0 + + diff --git a/src/.nuget/NuGet.Config b/src/.nuget/NuGet.Config deleted file mode 100644 index 6a318ad..0000000 --- a/src/.nuget/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe deleted file mode 100644 index cb3ed03..0000000 Binary files a/src/.nuget/NuGet.exe and /dev/null differ diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets deleted file mode 100644 index 2d6456d..0000000 --- a/src/.nuget/NuGet.targets +++ /dev/null @@ -1,133 +0,0 @@ - - - - $(MSBuildProjectDirectory)\..\ - - - false - - - false - - - true - - - false - - - - - - - - - - - $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) - $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) - - - - - $(SolutionDir).nuget - packages.config - - - - - $(NuGetToolsPath)\NuGet.exe - @(PackageSource) - - "$(NuGetExePath)" - mono --runtime=v4.0.30319 $(NuGetExePath) - - $(TargetDir.Trim('\\')) - - -RequireConsent - -NonInteractive - - - $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir "$(SolutionDir) " -Verbosity detailed -NoCache - $(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols - - - - RestorePackages; - $(BuildDependsOn); - - - - - $(BuildDependsOn); - BuildPackage; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/BaseConfiguration.targets b/src/BaseConfiguration.targets deleted file mode 100644 index 0b0f5f7..0000000 --- a/src/BaseConfiguration.targets +++ /dev/null @@ -1,66 +0,0 @@ - - - - - 9.0.30729 - 2.0 - - - Debug - AnyCPU - v4.0 - 512 - - - Properties - $(SolutionDir)\..\build\bin\$(Platform)\$(Configuration)\ - $(SolutionDir)\..\build\temp\bin\obj\$(AssemblyName)\$(Platform)\$(Configuration)\ - - - prompt - 4 - true - - - true - true - - - $(OutputPath)\$(AssemblyName).XML - - - true - false - $(SOFTWARE_SIGNING_KEY_PATH) - - - true - full - false - TRACE;DEBUG;CODE_ANALYSIS - - - pdbonly - true - TRACE;CODE_ANALYSIS - - - pdbonly - true - TRACE - - - $(SolutionDir)\.. - $(DirWorkspace)\packages - $(DirWorkspace)\tools - $(DirTools)\StyleCop - $(DirTools)\msbuild.extensions - - - - - false - - \ No newline at end of file diff --git a/src/Nuclei.sln b/src/Nuclei.sln index 831de48..3cf0d75 100644 --- a/src/Nuclei.sln +++ b/src/Nuclei.sln @@ -1,57 +1,46 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei", "Nuclei\Nuclei.csproj", "{7C12C611-1780-4E93-9B0E-B806B738559D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0245F9D1-9F8D-43AA-8C61-69370002790D}" ProjectSection(SolutionItems) = preProject - ..\NextVersion.txt = ..\NextVersion.txt - ..\templates\nuget.binaries.nuspec.in = ..\templates\nuget.binaries.nuspec.in - ..\nuget.config = ..\nuget.config - ..\templates\nuget.manifestbuilder.nuspec.in = ..\templates\nuget.manifestbuilder.nuspec.in - ..\templates\nuget.msbuild.nuspec.in = ..\templates\nuget.msbuild.nuspec.in - ..\templates\nuget.src.nuspec.in = ..\templates\nuget.src.nuspec.in - ..\packages.config = ..\packages.config + ..\.gitattributes = ..\.gitattributes + ..\.gitignore = ..\.gitignore + ..\LICENSE.md = ..\LICENSE.md + ..\README.md = ..\README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SolutionLevel", "solutionlevel\SolutionLevel.csproj", "{B0B1C32A-53FC-4B7E-BA60-6DAFB8180A42}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.Communication", "Nuclei.Communication\Nuclei.Communication.csproj", "{B0D0341B-98D0-48D0-A2D8-9B05761AE64E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.Diagnostics", "Nuclei.Diagnostics\Nuclei.Diagnostics.csproj", "{751A1133-0A06-4FD1-A4C1-0DAEC2D40D31}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Unit.Nuclei", "test.unit.Nuclei\Test.Unit.Nuclei.csproj", "{0FA80344-F6F5-4D93-8D1E-249456D6A6B7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Unit.Nuclei.Communication", "test.unit.Nuclei.communication\Test.Unit.Nuclei.Communication.csproj", "{F0DBB163-09EE-4DC2-B278-87C2FC0A1758}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Unit.Nuclei.Diagnostics", "test.unit.Nuclei.diagnostics\Test.Unit.Nuclei.Diagnostics.csproj", "{A9D87967-A2DD-49D9-BB3A-FFDBCA92F516}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.Examples.Complete", "nuclei.examples.complete\Nuclei.Examples.Complete.csproj", "{F04CC16B-8422-403E-919B-1189D0C637CD}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{FE08C557-2C2F-409C-A106-C12F6A6E8C40}" ProjectSection(SolutionItems) = preProject - .nuget\NuGet.Config = .nuget\NuGet.Config - .nuget\NuGet.exe = .nuget\NuGet.exe - .nuget\NuGet.targets = .nuget\NuGet.targets + ..\nuget.config = ..\nuget.config + ..\packages.config = ..\packages.config EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.AppDomains", "nuclei.appdomains\Nuclei.AppDomains.csproj", "{DCB074C2-9A85-4A50-A011-832757C5DF44}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.ExceptionHandling", "nuclei.exceptionhandling\Nuclei.ExceptionHandling.csproj", "{5590531E-2A71-471E-BB20-213BBE9EADA3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.Fusion", "nuclei.fusion\Nuclei.Fusion.csproj", "{D34DEE94-9488-41C3-AFD3-7DBC1B272ED6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.Build", "nuclei.build\Nuclei.Build.csproj", "{AEA39FA0-9B45-4FDF-B94C-543E410F480C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.Configuration", "nuclei.configuration\Nuclei.Configuration.csproj", "{62E77B2F-34EE-4258-B1C7-9F30EB80AE12}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{525FF8D6-BF44-4BEB-BEF4-DD767DC0E722}" + ProjectSection(SolutionItems) = preProject + base.props = base.props + ..\build.settings.props = ..\build.settings.props + ..\deploy.settings.props = ..\deploy.settings.props + ..\entrypoint.msbuild = ..\entrypoint.msbuild + ..\settings.props = ..\settings.props + ..\test.settings.props = ..\test.settings.props + EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Unit.Nuclei.Configuration", "test.unit.nuclei.configuration\Test.Unit.Nuclei.Configuration.csproj", "{55441F18-9C0A-4F09-97D9-CA7CCD21CA50}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "codeanalysis", "codeanalysis", "{BC3CBE56-0A8E-48BE-9E45-4F1DB9033C2A}" + ProjectSection(SolutionItems) = preProject + default.ruleset = default.ruleset + stylecop.json = stylecop.json + test.ruleset = test.ruleset + EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Unit.Nuclei.Fusion", "test.unit.nuclei.fusion\Test.Unit.Nuclei.Fusion.csproj", "{4A729817-3A73-4B6A-A617-150DBF58D12B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.Documentation", "..\doc\Nuclei.Documentation\Nuclei.Documentation.csproj", "{9F1C358A-E44C-4666-ADA6-2126C275C5A7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.NUnit.Extensions", "nuclei.nunit.extensions\Nuclei.NUnit.Extensions.csproj", "{95F183AF-7BBA-4ECE-AC1C-EE006317470D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuclei.Samples", "..\doc\Nuclei.Samples\Nuclei.Samples.csproj", "{0F2A04DD-00F0-4FBC-8C1F-D3B271DE7743}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -66,87 +55,23 @@ Global {7C12C611-1780-4E93-9B0E-B806B738559D}.Deploy|Any CPU.Build.0 = Deploy|Any CPU {7C12C611-1780-4E93-9B0E-B806B738559D}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C12C611-1780-4E93-9B0E-B806B738559D}.Release|Any CPU.Build.0 = Release|Any CPU - {B0B1C32A-53FC-4B7E-BA60-6DAFB8180A42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0B1C32A-53FC-4B7E-BA60-6DAFB8180A42}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0B1C32A-53FC-4B7E-BA60-6DAFB8180A42}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {B0B1C32A-53FC-4B7E-BA60-6DAFB8180A42}.Deploy|Any CPU.Build.0 = Deploy|Any CPU - {B0B1C32A-53FC-4B7E-BA60-6DAFB8180A42}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0B1C32A-53FC-4B7E-BA60-6DAFB8180A42}.Release|Any CPU.Build.0 = Release|Any CPU - {B0D0341B-98D0-48D0-A2D8-9B05761AE64E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0D0341B-98D0-48D0-A2D8-9B05761AE64E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0D0341B-98D0-48D0-A2D8-9B05761AE64E}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {B0D0341B-98D0-48D0-A2D8-9B05761AE64E}.Deploy|Any CPU.Build.0 = Deploy|Any CPU - {B0D0341B-98D0-48D0-A2D8-9B05761AE64E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0D0341B-98D0-48D0-A2D8-9B05761AE64E}.Release|Any CPU.Build.0 = Release|Any CPU - {751A1133-0A06-4FD1-A4C1-0DAEC2D40D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {751A1133-0A06-4FD1-A4C1-0DAEC2D40D31}.Debug|Any CPU.Build.0 = Debug|Any CPU - {751A1133-0A06-4FD1-A4C1-0DAEC2D40D31}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {751A1133-0A06-4FD1-A4C1-0DAEC2D40D31}.Deploy|Any CPU.Build.0 = Deploy|Any CPU - {751A1133-0A06-4FD1-A4C1-0DAEC2D40D31}.Release|Any CPU.ActiveCfg = Release|Any CPU - {751A1133-0A06-4FD1-A4C1-0DAEC2D40D31}.Release|Any CPU.Build.0 = Release|Any CPU {0FA80344-F6F5-4D93-8D1E-249456D6A6B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0FA80344-F6F5-4D93-8D1E-249456D6A6B7}.Debug|Any CPU.Build.0 = Debug|Any CPU {0FA80344-F6F5-4D93-8D1E-249456D6A6B7}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU {0FA80344-F6F5-4D93-8D1E-249456D6A6B7}.Release|Any CPU.ActiveCfg = Release|Any CPU {0FA80344-F6F5-4D93-8D1E-249456D6A6B7}.Release|Any CPU.Build.0 = Release|Any CPU - {F0DBB163-09EE-4DC2-B278-87C2FC0A1758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F0DBB163-09EE-4DC2-B278-87C2FC0A1758}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F0DBB163-09EE-4DC2-B278-87C2FC0A1758}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {F0DBB163-09EE-4DC2-B278-87C2FC0A1758}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F0DBB163-09EE-4DC2-B278-87C2FC0A1758}.Release|Any CPU.Build.0 = Release|Any CPU - {A9D87967-A2DD-49D9-BB3A-FFDBCA92F516}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A9D87967-A2DD-49D9-BB3A-FFDBCA92F516}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A9D87967-A2DD-49D9-BB3A-FFDBCA92F516}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {A9D87967-A2DD-49D9-BB3A-FFDBCA92F516}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A9D87967-A2DD-49D9-BB3A-FFDBCA92F516}.Release|Any CPU.Build.0 = Release|Any CPU - {F04CC16B-8422-403E-919B-1189D0C637CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F04CC16B-8422-403E-919B-1189D0C637CD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F04CC16B-8422-403E-919B-1189D0C637CD}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {F04CC16B-8422-403E-919B-1189D0C637CD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F04CC16B-8422-403E-919B-1189D0C637CD}.Release|Any CPU.Build.0 = Release|Any CPU - {DCB074C2-9A85-4A50-A011-832757C5DF44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DCB074C2-9A85-4A50-A011-832757C5DF44}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DCB074C2-9A85-4A50-A011-832757C5DF44}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {DCB074C2-9A85-4A50-A011-832757C5DF44}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DCB074C2-9A85-4A50-A011-832757C5DF44}.Release|Any CPU.Build.0 = Release|Any CPU - {5590531E-2A71-471E-BB20-213BBE9EADA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5590531E-2A71-471E-BB20-213BBE9EADA3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5590531E-2A71-471E-BB20-213BBE9EADA3}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {5590531E-2A71-471E-BB20-213BBE9EADA3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5590531E-2A71-471E-BB20-213BBE9EADA3}.Release|Any CPU.Build.0 = Release|Any CPU - {D34DEE94-9488-41C3-AFD3-7DBC1B272ED6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D34DEE94-9488-41C3-AFD3-7DBC1B272ED6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D34DEE94-9488-41C3-AFD3-7DBC1B272ED6}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {D34DEE94-9488-41C3-AFD3-7DBC1B272ED6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D34DEE94-9488-41C3-AFD3-7DBC1B272ED6}.Release|Any CPU.Build.0 = Release|Any CPU - {AEA39FA0-9B45-4FDF-B94C-543E410F480C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AEA39FA0-9B45-4FDF-B94C-543E410F480C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AEA39FA0-9B45-4FDF-B94C-543E410F480C}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {AEA39FA0-9B45-4FDF-B94C-543E410F480C}.Deploy|Any CPU.Build.0 = Deploy|Any CPU - {AEA39FA0-9B45-4FDF-B94C-543E410F480C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AEA39FA0-9B45-4FDF-B94C-543E410F480C}.Release|Any CPU.Build.0 = Release|Any CPU - {62E77B2F-34EE-4258-B1C7-9F30EB80AE12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {62E77B2F-34EE-4258-B1C7-9F30EB80AE12}.Debug|Any CPU.Build.0 = Debug|Any CPU - {62E77B2F-34EE-4258-B1C7-9F30EB80AE12}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {62E77B2F-34EE-4258-B1C7-9F30EB80AE12}.Deploy|Any CPU.Build.0 = Deploy|Any CPU - {62E77B2F-34EE-4258-B1C7-9F30EB80AE12}.Release|Any CPU.ActiveCfg = Release|Any CPU - {62E77B2F-34EE-4258-B1C7-9F30EB80AE12}.Release|Any CPU.Build.0 = Release|Any CPU - {55441F18-9C0A-4F09-97D9-CA7CCD21CA50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {55441F18-9C0A-4F09-97D9-CA7CCD21CA50}.Debug|Any CPU.Build.0 = Debug|Any CPU - {55441F18-9C0A-4F09-97D9-CA7CCD21CA50}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {55441F18-9C0A-4F09-97D9-CA7CCD21CA50}.Release|Any CPU.ActiveCfg = Release|Any CPU - {55441F18-9C0A-4F09-97D9-CA7CCD21CA50}.Release|Any CPU.Build.0 = Release|Any CPU - {4A729817-3A73-4B6A-A617-150DBF58D12B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A729817-3A73-4B6A-A617-150DBF58D12B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A729817-3A73-4B6A-A617-150DBF58D12B}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {4A729817-3A73-4B6A-A617-150DBF58D12B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A729817-3A73-4B6A-A617-150DBF58D12B}.Release|Any CPU.Build.0 = Release|Any CPU - {95F183AF-7BBA-4ECE-AC1C-EE006317470D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {95F183AF-7BBA-4ECE-AC1C-EE006317470D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {95F183AF-7BBA-4ECE-AC1C-EE006317470D}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {95F183AF-7BBA-4ECE-AC1C-EE006317470D}.Deploy|Any CPU.Build.0 = Deploy|Any CPU - {95F183AF-7BBA-4ECE-AC1C-EE006317470D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {95F183AF-7BBA-4ECE-AC1C-EE006317470D}.Release|Any CPU.Build.0 = Release|Any CPU + {9F1C358A-E44C-4666-ADA6-2126C275C5A7}.Debug|Any CPU.ActiveCfg = Deploy|Any CPU + {9F1C358A-E44C-4666-ADA6-2126C275C5A7}.Debug|Any CPU.Build.0 = Deploy|Any CPU + {9F1C358A-E44C-4666-ADA6-2126C275C5A7}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU + {9F1C358A-E44C-4666-ADA6-2126C275C5A7}.Deploy|Any CPU.Build.0 = Deploy|Any CPU + {9F1C358A-E44C-4666-ADA6-2126C275C5A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F1C358A-E44C-4666-ADA6-2126C275C5A7}.Release|Any CPU.Build.0 = Release|Any CPU + {0F2A04DD-00F0-4FBC-8C1F-D3B271DE7743}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F2A04DD-00F0-4FBC-8C1F-D3B271DE7743}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F2A04DD-00F0-4FBC-8C1F-D3B271DE7743}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU + {0F2A04DD-00F0-4FBC-8C1F-D3B271DE7743}.Deploy|Any CPU.Build.0 = Deploy|Any CPU + {0F2A04DD-00F0-4FBC-8C1F-D3B271DE7743}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F2A04DD-00F0-4FBC-8C1F-D3B271DE7743}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/base.props b/src/base.props new file mode 100644 index 0000000..0e53d4e --- /dev/null +++ b/src/base.props @@ -0,0 +1,180 @@ + + + + + $(ProjectTypeGuids.ToUpper().Contains('{3AC096D0-A1C2-E12C-1390-A8335801FDAB}').ToString().ToLower()) + + + false + + $(ProjectTypeGuids.ToUpper().Contains('{603C0E0B-DB56-11DC-BE95-000D561079B0}').ToString().ToLower()) + + $(ProjectTypeGuids.ToUpper().Contains('{F85E285D-A4E0-4152-9332-AB1D724D3325}').ToString().ToLower()) + + $(ProjectTypeGuids.ToUpper().Contains('{E53F8FEA-EAE0-44A6-8774-FFD645390401}').ToString().ToLower()) + + $(ProjectTypeGuids.ToUpper().Contains('{E3E379DF-F4C6-4180-9B81-6769533ABE47}').ToString().ToLower()) + + $(ProjectTypeGuids.ToUpper().Contains('{349C5851-65DF-11DA-9384-00065B846F21}').ToString().ToLower()) + + + + + + true + + v4.5.2 + + + AnyCPU + + + + + + true + + $([System.IO.Path]::GetFullPath('$(SolutionDir)\default.ruleset')) + + $([System.IO.Path]::GetFullPath('$(SolutionDir)\test.ruleset')) + + en-US + + + + + + false + false + false + + $(SOFTWARE_SIGNING_KEY_PATH)\nuclei.snk + + + + + + 4 + + TRACE + + + + + DEBUG;CODE_ANALYSIS;$(DefineConstants) + true + full + true + true + false + bin\Debug\ + bin\ + false + true + + + + + CODE_ANALYSIS;$(DefineConstants) + false + pdbonly + false + true + true + bin\Release\ + bin\ + false + true + + + + + false + pdbonly + false + true + true + bin\Deploy\ + bin\ + false + true + + + + + + false + true + + + $(OutputPath)\$(AssemblyName).XML + + + + + + + + + CustomDictionary.xml + + + \ No newline at end of file diff --git a/src/default.ruleset b/src/default.ruleset new file mode 100644 index 0000000..28052d7 --- /dev/null +++ b/src/default.ruleset @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/nuclei/AssemblyExtensions.cs b/src/nuclei/AssemblyExtensions.cs index 9bc0394..aac616d 100644 --- a/src/nuclei/AssemblyExtensions.cs +++ b/src/nuclei/AssemblyExtensions.cs @@ -1,6 +1,7 @@ //----------------------------------------------------------------------- -// -// Copyright 2013 Nuclei. Licensed under the Apache License, Version 2.0. +// +// Copyright (c) TheNucleus. All rights reserved. +// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. // //----------------------------------------------------------------------- @@ -19,20 +20,48 @@ namespace Nuclei public static class AssemblyExtensions { /// - /// Returns the local file path from where a specific + /// Returns a value indicating whether the assembly is strong named. + /// + /// The assembly. + /// + /// if the assembly is strong named; otherwise . + /// + /// + /// Thrown if is . + /// + public static bool IsStrongNamed(this Assembly assembly) + { + if (assembly == null) + { + throw new ArgumentNullException("assembly"); + } + + var assemblyName = assembly.GetName(); + byte[] publicKey = assemblyName.GetPublicKey(); + if (publicKey == null || publicKey.Length == 0) + { + return false; + } + + return true; + } + + /// + /// Returns the local directory path from where a specific /// was loaded. /// /// The assembly. /// - /// The local file path from where the assembly was loaded. + /// The local directory path from where the assembly was loaded. /// /// /// Thrown if is . /// - public static string LocalFilePath(this Assembly assembly) + public static string LocalDirectoryPath(this Assembly assembly) { + if (assembly == null) { - Lokad.Enforce.Argument(() => assembly); + throw new ArgumentNullException("assembly"); } // Get the location of the assembly before it was shadow-copied @@ -43,24 +72,25 @@ public static string LocalFilePath(this Assembly assembly) // Get the local path. This may not work if the assembly isn't // local. For now we assume it is. - return uncPath.LocalPath; + return Path.GetDirectoryName(uncPath.LocalPath); } /// - /// Returns the local directory path from where a specific + /// Returns the local file path from where a specific /// was loaded. /// /// The assembly. /// - /// The local directory path from where the assembly was loaded. + /// The local file path from where the assembly was loaded. /// /// /// Thrown if is . /// - public static string LocalDirectoryPath(this Assembly assembly) + public static string LocalFilePath(this Assembly assembly) { + if (assembly == null) { - Lokad.Enforce.Argument(() => assembly); + throw new ArgumentNullException("assembly"); } // Get the location of the assembly before it was shadow-copied @@ -71,7 +101,7 @@ public static string LocalDirectoryPath(this Assembly assembly) // Get the local path. This may not work if the assembly isn't // local. For now we assume it is. - return Path.GetDirectoryName(uncPath.LocalPath); + return uncPath.LocalPath; } /// @@ -79,10 +109,14 @@ public static string LocalDirectoryPath(this Assembly assembly) /// /// The assembly. /// The strong name of the assembly. - public static StrongName GetStrongName(this Assembly assembly) + /// + /// Thrown if is . + /// + public static StrongName StrongName(this Assembly assembly) { + if (assembly == null) { - Lokad.Enforce.Argument(() => assembly); + throw new ArgumentNullException("assembly"); } var assemblyName = assembly.GetName(); diff --git a/src/nuclei/EmbeddedResourceExtracter.cs b/src/nuclei/EmbeddedResourceExtracter.cs index 4222493..37fdd0a 100644 --- a/src/nuclei/EmbeddedResourceExtracter.cs +++ b/src/nuclei/EmbeddedResourceExtracter.cs @@ -1,6 +1,7 @@ //----------------------------------------------------------------------- -// -// Copyright 2013 Nuclei. Licensed under the Apache License, Version 2.0. +// +// Copyright (c) TheNucleus. All rights reserved. +// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. // //----------------------------------------------------------------------- @@ -15,7 +16,10 @@ namespace Nuclei /// /// Defines utility methods for dealing with resources stored in the assembly. /// - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Extracter", + [SuppressMessage( + "Microsoft.Naming", + "CA1704:IdentifiersShouldBeSpelledCorrectly", + MessageId = "Extracter", Justification = "Noun version of extraction. Seems reasonable.")] public static class EmbeddedResourceExtracter { @@ -26,9 +30,12 @@ public static class EmbeddedResourceExtracter /// The name of the file to extract. /// A stream containing the file data. /// + /// Thrown if is . + /// + /// /// Thrown if is . /// - /// + /// /// Thrown if is an empty string. /// /// @@ -36,10 +43,21 @@ public static class EmbeddedResourceExtracter /// public static Stream LoadEmbeddedStream(Assembly assembly, string filePath) { + if (assembly == null) + { + throw new ArgumentNullException("assembly"); + } + + if (filePath == null) + { + throw new ArgumentNullException("filePath"); + } + + if (string.IsNullOrEmpty(filePath)) { - Lokad.Enforce.Argument(() => assembly); - Lokad.Enforce.Argument(() => filePath); - Lokad.Enforce.That(!string.IsNullOrEmpty(filePath)); + throw new ArgumentException( + Resources.Exceptions_Messages_ParameterShouldNotBeAnEmptyString, + "filePath"); } Stream str; @@ -71,6 +89,9 @@ public static Stream LoadEmbeddedStream(Assembly assembly, string filePath) /// The name of the file to extract. /// A string containing the file data. /// + /// Thrown if is . + /// + /// /// Thrown if is . /// /// @@ -81,10 +102,21 @@ public static Stream LoadEmbeddedStream(Assembly assembly, string filePath) /// public static string LoadEmbeddedTextFile(Assembly assembly, string filePath) { + if (assembly == null) + { + throw new ArgumentNullException("assembly"); + } + + if (filePath == null) + { + throw new ArgumentNullException("filePath"); + } + + if (string.IsNullOrEmpty(filePath)) { - Lokad.Enforce.Argument(() => assembly); - Lokad.Enforce.Argument(() => filePath); - Lokad.Enforce.That(!string.IsNullOrEmpty(filePath)); + throw new ArgumentException( + Resources.Exceptions_Messages_ParameterShouldNotBeAnEmptyString, + "filePath"); } Stream str; diff --git a/src/nuclei/IIsId.cs b/src/nuclei/IIsId.cs index 718a3ca..3a3dd56 100644 --- a/src/nuclei/IIsId.cs +++ b/src/nuclei/IIsId.cs @@ -1,6 +1,7 @@ //----------------------------------------------------------------------- -// -// Copyright 2013 Nuclei. Licensed under the Apache License, Version 2.0. +// +// Copyright (c) TheNucleus. All rights reserved. +// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. // //----------------------------------------------------------------------- @@ -20,7 +21,8 @@ namespace Nuclei /// /// /// The type of the object which is the ID. - public interface IIsId : IComparable, IComparable, IEquatable where TId : IIsId + public interface IIsId : IComparable, IComparable, IEquatable + where TId : IIsId { /// /// Clones this ID number. diff --git a/src/nuclei/Id.cs b/src/nuclei/Id.cs index ceb7aa8..16fc1fc 100644 --- a/src/nuclei/Id.cs +++ b/src/nuclei/Id.cs @@ -1,6 +1,7 @@ //----------------------------------------------------------------------- -// -// Copyright 2013 Nuclei. Licensed under the Apache License, Version 2.0. +// +// Copyright (c) TheNucleus. All rights reserved. +// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. // //----------------------------------------------------------------------- @@ -210,7 +211,7 @@ public abstract class Id : IIsId /// The internal value which defines the value for the current ID. /// [DataMember] - private readonly TInternalValue m_Value; + private readonly TInternalValue _value; /// /// Initializes a new instance of the class. @@ -225,7 +226,7 @@ public abstract class Id : IIsId /// protected Id(TInternalValue value) { - m_Value = value; + _value = value; } /// @@ -237,7 +238,7 @@ protected TInternalValue InternalValue [DebuggerStepThrough] get { - return m_Value; + return _value; } } @@ -249,7 +250,7 @@ protected TInternalValue InternalValue /// public TId Clone() { - return Clone(m_Value); + return Clone(_value); } /// @@ -284,7 +285,7 @@ public int CompareTo(TId other) // Check if other is a null reference by using ReferenceEquals because // we overload the == operator. If other isn't actually null then // we get an infinite loop where we're constantly trying to compare to null. - return ReferenceEquals(other, null) ? 1 : CompareValues(m_Value, other.m_Value); + return ReferenceEquals(other, null) ? 1 : CompareValues(_value, other._value); } /// @@ -308,7 +309,7 @@ public int CompareTo(TId other) /// protected virtual int CompareValues(TInternalValue ourValue, TInternalValue theirValue) { - return m_Value.CompareTo(theirValue); + return _value.CompareTo(theirValue); } /// @@ -367,7 +368,9 @@ public int CompareTo(object obj) /// if the specified is equal to this instance; /// otherwise, . /// - [SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules", "SA1628:DocumentationTextMustBeginWithACapitalLetter", + [SuppressMessage( + "Microsoft.StyleCop.CSharp.DocumentationRules", + "SA1628:DocumentationTextMustBeginWithACapitalLetter", Justification = "Documentation can start with a language keyword")] public bool Equals(TId other) { @@ -379,7 +382,7 @@ public bool Equals(TId other) // Check if other is a null reference by using ReferenceEquals because // we overload the == operator. If other isn't actually null then // we get an infinite loop where we're constantly trying to compare to null. - return !ReferenceEquals(other, null) && AreValuesEqual(m_Value, other.m_Value); + return !ReferenceEquals(other, null) && AreValuesEqual(_value, other._value); } /// @@ -391,7 +394,9 @@ public bool Equals(TId other) /// if is equal to the value owned by this instance; /// otherwise, . /// - [SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules", "SA1628:DocumentationTextMustBeginWithACapitalLetter", + [SuppressMessage( + "Microsoft.StyleCop.CSharp.DocumentationRules", + "SA1628:DocumentationTextMustBeginWithACapitalLetter", Justification = "Documentation can start with a language keyword")] protected virtual bool AreValuesEqual(TInternalValue ourValue, TInternalValue theirValue) { @@ -399,13 +404,15 @@ protected virtual bool AreValuesEqual(TInternalValue ourValue, TInternalValue th } /// - /// Determines whether the specified is equal to this instance. + /// Determines whether the specified is equal to this instance. /// - /// The to compare with this instance. + /// The to compare with this instance. /// - /// if the specified is equal to this instance; otherwise, . + /// if the specified is equal to this instance; otherwise, . /// - [SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules", "SA1628:DocumentationTextMustBeginWithACapitalLetter", + [SuppressMessage( + "Microsoft.StyleCop.CSharp.DocumentationRules", + "SA1628:DocumentationTextMustBeginWithACapitalLetter", Justification = "Documentation can start with a language keyword")] public sealed override bool Equals(object obj) { @@ -425,18 +432,18 @@ public sealed override bool Equals(object obj) /// Returns a hash code for this instance. /// /// - /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// public sealed override int GetHashCode() { - return m_Value.GetHashCode(); + return _value.GetHashCode(); } /// - /// Returns a that represents this instance. + /// Returns a that represents this instance. /// /// - /// A that represents this instance. + /// A that represents this instance. /// public abstract override string ToString(); } diff --git a/src/nuclei/Nuclei.csproj b/src/nuclei/Nuclei.csproj index 93eb44e..334e446 100644 --- a/src/nuclei/Nuclei.csproj +++ b/src/nuclei/Nuclei.csproj @@ -6,45 +6,45 @@ Library Nuclei Nuclei + + 9.0.30729 + 2.0 + + Debug + AnyCPU + v4.0 + 512 + + Properties + $(SolutionDir)\..\build\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\..\build\temp\bin\obj\$(AssemblyName)\$(Platform)\$(Configuration)\ + + prompt + 4 + true true - + + true + full + false + TRACE;DEBUG + + + pdbonly + true + TRACE + + + pdbonly + true + TRACE + + - - ..\..\packages\Autofac.3.1.1\lib\net40\Autofac.dll - - - ..\..\packages\log4net.1.2.10\lib\2.0\log4net.dll - - - ..\..\packages\Lokad.Shared.1.5.181.0\lib\Lokad.ActionPolicy.dll - - - ..\..\packages\Lokad.Shared.1.5.181.0\lib\Lokad.Logging.dll - - - ..\..\packages\Lokad.Shared.1.5.181.0\lib\Lokad.Quality.dll - - - ..\..\packages\Lokad.Shared.1.5.181.0\lib\Lokad.Shared.dll - - - ..\..\packages\Lokad.Shared.1.5.181.0\lib\Lokad.Stack.dll - - - ..\..\packages\Lokad.Shared.1.5.181.0\lib\Lokad.Testing.dll - - - ..\..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.dll - - - ..\..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Mdb.dll - - - ..\..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Pdb.dll - - - ..\..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Rocks.dll + + ..\..\packages\Nuclei.Build.0.9.0\lib\net40\Nuclei.Build.dll + True @@ -57,24 +57,16 @@ - + Properties\App.snk - + + + + Designer + - - Properties\AssemblyInfo.Base.cs - - - Properties\AssemblyInfo.BuildInformation.cs - - - Properties\AssemblyInfo.InternalsVisibleTo.cs - - - Properties\AssemblyInfo.VersionNumber.cs - @@ -101,17 +93,12 @@ - - {aea39fa0-9b45-4fdf-b94c-543e410f480c} - Nuclei.Build - - - {b0b1c32a-53fc-4b7e-ba60-6dafb8180a42} - SolutionLevel - + + + - - + 9.0.30729 + 2.0 + + Debug + AnyCPU + v4.0 + 512 + + Properties + $(SolutionDir)\..\build\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\..\build\temp\bin\obj\$(AssemblyName)\$(Platform)\$(Configuration)\ + + prompt + 4 + true + + true true - 1685 + + true + full + false + TRACE;DEBUG + + + pdbonly + true + TRACE + + + pdbonly + true + TRACE + + - - ..\..\packages\Moq.4.1.1309.1617\lib\net40\Moq.dll + + ..\..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll + True + + + ..\..\packages\Moq.4.5.10\lib\net45\Moq.dll + True + + + ..\..\packages\Nuclei.Build.0.9.0\lib\net40\Nuclei.Build.dll + True + + + ..\..\packages\Nuclei.Nunit.Extensions.2.6.2\lib\net40\Nuclei.Nunit.Extensions.dll + True ..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll @@ -30,21 +80,13 @@ - + Properties\App.snk + - - Properties\AssemblyInfo.Base.cs - - - Properties\AssemblyInfo.BuildInformation.cs - - - Properties\AssemblyInfo.VersionNumber.cs - @@ -54,29 +96,25 @@ - + - - {aea39fa0-9b45-4fdf-b94c-543e410f480c} - Nuclei.Build - - - {95f183af-7bba-4ece-ac1c-ee006317470d} - Nuclei.NUnit.Extensions - {7c12c611-1780-4e93-9b0e-b806b738559d} Nuclei - - {b0b1c32a-53fc-4b7e-ba60-6dafb8180a42} - SolutionLevel - - - + + + + + + Prepare; + + + + + + + Prepare; + + + + + + + Prepare; + + + + + + + Prepare; + + + + + + + Prepare; + + + + + + + Generate; + Prepare; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + diff --git a/tools/msbuild.extensions/CalculateSemanticVersion.msbuild b/tools/msbuild.extensions/CalculateSemanticVersion.msbuild deleted file mode 100644 index 1d41fd6..0000000 --- a/tools/msbuild.extensions/CalculateSemanticVersion.msbuild +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogMessage(MessageImportance.Normal, e.Data); - } - }; - process.ErrorDataReceived += - (s, e) => - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogError(e.Data); - } - }; - process.Start(); - - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - process.WaitForExit(); - - if (process.ExitCode != 0) - { - Log.LogError("Failed to get semantic version information"); - return false; - } - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors; - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/FindAndReplaceInFile.msbuild b/tools/msbuild.extensions/FindAndReplaceInFile.msbuild deleted file mode 100644 index fdec08d..0000000 --- a/tools/msbuild.extensions/FindAndReplaceInFile.msbuild +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - (System.StringComparer.InvariantCultureIgnoreCase); - if (Tokens != null) - { - ITaskItem[] processedTokens = Tokens; - for (int i = 0; i < processedTokens.Length; i++) - { - ITaskItem taskItem = processedTokens[i]; - if (!string.IsNullOrEmpty(taskItem.ItemSpec)) - { - toReplace.Add(taskItem.ItemSpec, taskItem.GetMetadata(MetadataValueTag)); - } - } - } - - string text; - using (var streamReader = new System.IO.StreamReader(Input)) - { - text = streamReader.ReadToEnd(); - } - - foreach (var pair in toReplace) - { - if (text.Contains(pair.Key)) - { - Log.LogMessage("Replacing [" + pair.Key + "] with [" + pair.Value + "]"); - text = text.Replace(pair.Key, pair.Value); - } - } - - using (var streamWriter = new System.IO.StreamWriter(Input)) - { - streamWriter.WriteLine(text); - streamWriter.Flush(); - } - } - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors; - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/FindToolDirectoryFromPackages.msbuild b/tools/msbuild.extensions/FindToolDirectoryFromPackages.msbuild deleted file mode 100644 index 902a863..0000000 --- a/tools/msbuild.extensions/FindToolDirectoryFromPackages.msbuild +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - System.IO.Path.GetDirectoryName(k)) - .Select(k => System.IO.Path.GetDirectoryName(k)) - .LastOrDefault(); - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/FindToolFromPackages.msbuild b/tools/msbuild.extensions/FindToolFromPackages.msbuild deleted file mode 100644 index e725cac..0000000 --- a/tools/msbuild.extensions/FindToolFromPackages.msbuild +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - System.IO.Path.GetDirectoryName(k)) - .LastOrDefault(); - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/GetFileVersion.msbuild b/tools/msbuild.extensions/GetFileVersion.msbuild deleted file mode 100644 index f5eecc0..0000000 --- a/tools/msbuild.extensions/GetFileVersion.msbuild +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/GetSemanticVersion.msbuild b/tools/msbuild.extensions/GetSemanticVersion.msbuild deleted file mode 100644 index 9e16e79..0000000 --- a/tools/msbuild.extensions/GetSemanticVersion.msbuild +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/GitCommitHash.msbuild b/tools/msbuild.extensions/GitCommitHash.msbuild deleted file mode 100644 index c2106f0..0000000 --- a/tools/msbuild.extensions/GitCommitHash.msbuild +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - { - text.Append(e.Data); - }; - process.ErrorDataReceived += - (s, e) => - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogError(e.Data); - } - }; - process.Start(); - - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - process.WaitForExit(); - - RevNo = text.ToString().Trim(); - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors; - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/NugetGatherDependencies.msbuild b/tools/msbuild.extensions/NugetGatherDependencies.msbuild deleted file mode 100644 index 67f1a7d..0000000 --- a/tools/msbuild.extensions/NugetGatherDependencies.msbuild +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - (); - var builder = new System.Text.StringBuilder(); - foreach (var token in Packages) - { - var filePath = token.ToString(); - if (!System.IO.File.Exists(filePath)) - { - Log.LogMessage("File does not exist: {0}", filePath); - } - - System.Xml.Linq.XDocument xDoc = null; - try - { - xDoc = System.Xml.Linq.XDocument.Load(filePath); - } - catch(System.Exception) - { - Log.LogError("Failed to load document {0}.", filePath); - } - - var packages = from package in xDoc.Element("packages").Descendants("package") - select new - { - Id = package.Attribute("id").Value, - Version = package.Attribute("version").Value, - }; - - foreach (var package in packages) - { - if (knownDependencies.Contains(package.Id)) - { - continue; - } - - if (builder.Length > 0) - { - builder.Append(System.Environment.NewLine); - } - - builder.Append(string.Format("", package.Id, package.Version)); - knownDependencies.Add(package.Id); - } - } - - - Dependencies = builder.ToString(); - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors; - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/NugetPack.msbuild b/tools/msbuild.extensions/NugetPack.msbuild deleted file mode 100644 index 07e232d..0000000 --- a/tools/msbuild.extensions/NugetPack.msbuild +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogMessage(MessageImportance.Normal, e.Data); - } - }; - process.ErrorDataReceived += - (s, e) => - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogError(e.Data); - } - }; - process.Start(); - - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - process.WaitForExit(); - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors; - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/NugetRestore.msbuild b/tools/msbuild.extensions/NugetRestore.msbuild deleted file mode 100644 index dd4d7a0..0000000 --- a/tools/msbuild.extensions/NugetRestore.msbuild +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogMessage(MessageImportance.Normal, e.Data); - } - }; - process.ErrorDataReceived += - (s, e) => - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogError(e.Data); - } - }; - process.Start(); - - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - process.WaitForExit(); - } - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors; - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/OpenCover.msbuild b/tools/msbuild.extensions/OpenCover.msbuild deleted file mode 100644 index 67fafde..0000000 --- a/tools/msbuild.extensions/OpenCover.msbuild +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogMessage(MessageImportance.Normal, e.Data); - } - }; - process.ErrorDataReceived += - (s, e) => - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogError(e.Data); - } - }; - process.Start(); - - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - process.WaitForExit(); - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors && (process.ExitCode == 0); - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/PublicKeySignatureFromAssembly.msbuild b/tools/msbuild.extensions/PublicKeySignatureFromAssembly.msbuild deleted file mode 100644 index 1457937..0000000 --- a/tools/msbuild.extensions/PublicKeySignatureFromAssembly.msbuild +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - { - text.Append(e.Data); - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogMessage(MessageImportance.Normal, e.Data); - } - }; - process.ErrorDataReceived += - (s, e) => - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogError(e.Data); - } - }; - process.Start(); - - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - process.WaitForExit(); - - const string startString = "Public key (hash algorithm: sha1):"; - const string endString = "Public key token is"; - var publicKeyInfo = text.ToString(); - var startIndex = publicKeyInfo.IndexOf(startString); - var endIndex = publicKeyInfo.IndexOf(endString); - PublicKey = publicKeyInfo.Substring(startIndex + startString.Length, endIndex - (startIndex + startString.Length)); - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors; - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/PublicKeySignatureFromKeyFile.msbuild b/tools/msbuild.extensions/PublicKeySignatureFromKeyFile.msbuild deleted file mode 100644 index 0d89b53..0000000 --- a/tools/msbuild.extensions/PublicKeySignatureFromKeyFile.msbuild +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogMessage(MessageImportance.Normal, e.Data); - } - }; - publicKeyProcess.ErrorDataReceived += - (s, e) => - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogError(e.Data); - } - }; - publicKeyProcess.Start(); - - publicKeyProcess.BeginOutputReadLine(); - publicKeyProcess.BeginErrorReadLine(); - publicKeyProcess.WaitForExit(); - } - - var text = new System.Text.StringBuilder(); - { - var info = new System.Diagnostics.ProcessStartInfo - { - FileName = SnExe, - Arguments = string.Format("-tp \"{0}\"", publicKeyFile), - UseShellExecute = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - }; - - var process = new System.Diagnostics.Process(); - process.StartInfo = info; - process.OutputDataReceived += - (s, e) => - { - text.Append(e.Data); - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogMessage(MessageImportance.Normal, e.Data); - } - }; - process.ErrorDataReceived += - (s, e) => - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogError(e.Data); - } - }; - process.Start(); - - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - process.WaitForExit(); - } - - const string startString = "Public key (hash algorithm: sha1):"; - const string endString = "Public key token is"; - var publicKeyText = text.ToString(); - var startIndex = publicKeyText.IndexOf(startString); - var endIndex = publicKeyText.IndexOf(endString); - PublicKey = publicKeyText.Substring(startIndex + startString.Length, endIndex - (startIndex + startString.Length)); - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors; - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/ReportGenerator.msbuild b/tools/msbuild.extensions/ReportGenerator.msbuild deleted file mode 100644 index 76a9a6b..0000000 --- a/tools/msbuild.extensions/ReportGenerator.msbuild +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogMessage(MessageImportance.Normal, e.Data); - } - }; - process.ErrorDataReceived += - (s, e) => - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - Log.LogError(e.Data); - } - }; - process.Start(); - - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - process.WaitForExit(); - - // Log.HasLoggedErrors is true if the task logged any errors -- even if they were logged - // from a task's constructor or property setter. As long as this task is written to always log an error - // when it fails, we can reliably return HasLoggedErrors. - return !Log.HasLoggedErrors && (process.ExitCode == 0); - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/ReportGeneratorOutputToCsv.msbuild b/tools/msbuild.extensions/ReportGeneratorOutputToCsv.msbuild deleted file mode 100644 index b4ed745..0000000 --- a/tools/msbuild.extensions/ReportGeneratorOutputToCsv.msbuild +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - 0) - { - line.Append(","); - } - - line.Append( - string.Format( - System.Globalization.CultureInfo.InvariantCulture, - "\"{0}\"", - item.Name)); - } - - builder.AppendLine(line.ToString()); - line = new System.Text.StringBuilder(); - foreach (var item in metrics) - { - if (line.Length > 0) - { - line.Append(","); - } - - line.Append( - string.Format( - System.Globalization.CultureInfo.InvariantCulture, - "{0}", - item.Coverage)); - } - - builder.AppendLine(line.ToString()); - using (var writer = new System.IO.StreamWriter(OutputFile)) - { - writer.Write(builder.ToString()); - } - } - ]]> - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/SetEnvironmentVariable.msbuild b/tools/msbuild.extensions/SetEnvironmentVariable.msbuild deleted file mode 100644 index 93291d0..0000000 --- a/tools/msbuild.extensions/SetEnvironmentVariable.msbuild +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/msbuild.extensions/TemplateFile.msbuild b/tools/msbuild.extensions/TemplateFile.msbuild deleted file mode 100644 index a49dc5e..0000000 --- a/tools/msbuild.extensions/TemplateFile.msbuild +++ /dev/null @@ -1,80 +0,0 @@ - - - - - -