This file contains hidden or 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
# Place the script in the solution folder | |
# Add the ca.ruleset to the solution folder | |
# Run the Powershell Script to add Code Analysis and StyleCop to all your .NET Core Projects. | |
$projects = (Get-ChildItem . -recurse) | Where-Object {$_.extension -eq ".csproj"} | |
foreach ($project in $projects) { | |
$content = Get-Content $project.FullName | |
if (!($content | Select-String -pattern "<CodeAnalysisRuleSet>ca.ruleset</CodeAnalysisRuleSet>")) { | |
$content = $content.Replace("</Project>", "`t<PropertyGroup>`r`n`t`t<CodeAnalysisRuleSet>ca.ruleset</CodeAnalysisRuleSet>`r`n`t</PropertyGroup>`r`n</Project>") | |
$content | Out-File $project.FullName -Encoding Default | |
} |
This file contains hidden or 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
function Get-PasswordFromPmp { | |
<# | |
#.SYNOPSIS | |
# Gets a password from PMP. | |
# | |
#.DESCRIPTION | |
# Gets a password from PMP. | |
# | |
#.PARAMETER pmpServer | |
# The server name and port where PMP is hosted. |
This file contains hidden or 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 Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; | |
namespace Roslyn.CodeGeneration | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) |
This file contains hidden or 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
#r "System.Drawing" | |
#r "QRCoder.dll" | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Net; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using QRCoder; |
This file contains hidden or 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 Insights | |
{ | |
using System.Configuration; | |
using System.Linq; | |
using System.Reflection; | |
using Microsoft.ApplicationInsights.Channel; | |
using Microsoft.ApplicationInsights.Extensibility; | |
/// <summary> | |
/// Version TelemetryInitializer |
NewerOlder