This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Factory. Provides a static method that initializes a new try-catch wrapper. | |
/// </summary> | |
public static class DangerousOperation | |
{ | |
/// <summary> | |
/// Starts a new try-catch block. | |
/// </summary> | |
/// <param name="action">The 'try' block's action.</param> | |
/// <returns>Returns a new instance of the <see cref="TryCatchBlock"/> class that wraps the 'try' block.</returns> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-16"?> | |
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"> | |
<TypePattern DisplayName="COM interfaces" Priority="2000"> | |
<TypePattern.Match> | |
<And> | |
<Kind Is="Interface" /> | |
<Or> | |
<HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" /> | |
<HasAttribute Name="System.Runtime.InteropServices.ComImport" /> | |
</Or> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Import Project="..\dir.props" /> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The build.rsp response file is a text file that contains MSBuild.exe command line switches. | |
# Each switch can be on a separate line or all switches can be on one line. | |
# Comment lines are prefaced with a # symbol. | |
# The @ switch is used to pass another response file. | |
# More information: | |
# https://msdn.microsoft.com/en-us/library/ms164311.aspx | |
# /nologo | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$files = gci -Recurse *.csproj | |
$files | %{ | |
$file = $_ | |
$xml = [Xml](Get-Content $file) | |
$nsm = [Xml.XmlNamespaceManager]$xml.NameTable | |
$nsm.AddNamespace('msb', $xml.DocumentElement.NamespaceURI) | |
$restorePackages = $xml.SelectSingleNode('//msb:RestorePackages', $nsm) | |
$restorePackages.ParentNode.RemoveChild($restorePackages) | |
$nugetTarget = $xml.SelectSingleNode('//msb:Target[@Name="EnsureNuGetPackageBuildImports"]', $nsm) | |
$nugetTarget.ParentNode.RemoveChild($nugetTarget) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class StringExtensions | |
{ | |
public static string Replace(this string instance, string oldValue, string newValue, StringComparison comparisonType) | |
{ | |
if (instance == null) | |
{ | |
throw new ArgumentNullException("instance"); | |
} | |
if (string.IsNullOrEmpty(oldValue)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
namespace Sys | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Common | |
{ | |
using System; | |
using System.Collections.ObjectModel; | |
using System.Diagnostics; | |
using System.Linq; | |
[DebuggerDisplay( | |
"Display name = {Name}, alpha-2 = {TwoLetterCode}, alpha-3 = {ThreeLetterCode}, numeric = {NumericCode}")] | |
public sealed class Country |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="AfterBuild" DependsOnTargets="BuildPackage" /> | |
<Target Name="BuildPackage" DependsOnTargets="BuildPackageCore" Outputs="$(Packages)" Condition=" '$(BuildPackage)' == 'True' " /> | |
<Target Name="BuildPackageCore"> | |
<PropertyGroup> | |
<!-- Escape the OutDir's trailing slash --> | |
<_PackagesOutDir Condition="HasTrailingSlash('$(OutDir)')">"$(OutDir)\"</_PackagesOutDir> | |
<_PackagesOutDir Condition="!HasTrailingSlash('$(OutDir)')">"$(OutDir)\\"</_PackagesOutDir> | |
</PropertyGroup> | |
<Exec ContinueOnError="ErrorAndContinue" ConsoleToMSBuild="True" Command=""$(SolutionDir)tools\nuget.exe" pack "$(MSBuildThisFileFullPath)" -Symbols -IncludeReferencedProjects -OutputDirectory $(_PackagesOutDir) -Properties Configuration=$(Configuration)"> | |
<Output TaskParameter="ConsoleOutput" ItemName="_out" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Program Files (x86)\MSBuild\12.0\Bin\Microsoft.Common.CurrentVersion.targets | |
<Target Name="_CheckForInvalidConfigurationAndPlatform"></Target> | |
<Target Name="Build" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" Returns="$(TargetPath)" /> | |
<Target Name="BeforeBuild" /> | |
<Target Name="AfterBuild" /> | |
<Target Name="CoreBuild" DependsOnTargets="$(CoreBuildDependsOn)"></Target> | |
<Target Name="Rebuild" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(RebuildDependsOn)" Returns="$(TargetPath)" /> | |
<Target Name="BeforeRebuild" /> | |
<Target Name="AfterRebuild" /> | |
<Target Name="BuildGenerateSources" DependsOnTargets="BuildGenerateSourcesTraverse;$(BuildGenerateSourcesAction)" /> |
OlderNewer