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
<Project> | |
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | |
<PropertyGroup> | |
<TargetFramework>netstandard1.0</TargetFramework> | |
<IsPackable>true</IsPackable> | |
<IncludeBuildOutput>false</IncludeBuildOutput> | |
<ContentTargetFolders>contentFiles</ContentTargetFolders> | |
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> |
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
<Project> | |
<Target Name="IncludePackageReferenceInVSIX" | |
Condition="$(CI)" | |
Inputs="@(PackageReference -> WithMetadataValue('IncludeInVSIX', 'true'))" | |
Outputs="%(PackageReference.Identity)" | |
DependsOnTargets="ResolvePackageAssets" | |
AfterTargets="ResolveReferences"> | |
<PropertyGroup> | |
<IncludeInVSIXPackageId>%(PackageReference.Identity)</IncludeInVSIXPackageId> | |
</PropertyGroup> |
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
// Requires package reference to https://www.nuget.org/packages/symspell | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
class Program | |
{ | |
static void Main(string[] args) |
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
ok |
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
query { | |
organization(login: "moq") { | |
repository(name: "moq") { | |
dependencyGraphManifests(withDependencies: true) { | |
nodes { | |
filename | |
dependencies { | |
nodes { | |
packageManager | |
packageName |
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 abstract class FormsTests | |
{ | |
static FormsTests() | |
{ | |
// Force loading of XAML assembly. | |
Debug.WriteLine(typeof(XamlCompilationAttribute).FullName); | |
var mock = new Mock<IPlatformServices> { DefaultValue = DefaultValue.Mock }; | |
mock.Setup(x => x.BeginInvokeOnMainThread(It.IsAny<Action>())) | |
.Callback<Action>(action => action()); |
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
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$statusUrl = '$(GitHub.StatusUrl)' | |
$token = '$(GitHub.Token)' | |
if ($env:FIXEDSOURCEVERSION -eq $true) { return; } | |
# When the commit that triggered the build/release is a PR merge commit, | |
# this task will adjust the Build.SourceVersion to the original commit, not the | |
# merge commit |
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
Feature: AutoFix | |
Applies code fixes during build | |
Scenario: Can apply StyleCop code fix automatically | |
Given Foo.csproj = | |
""" | |
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<LangVersion>Latest</LangVersion> | |
<TargetFramework>netstandard2.0</TargetFramework> |
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
# Add to your profile so you can run `Cleanup-VS` from any PS prompt | |
Function Cleanup-VS | |
{ | |
$script = (Split-Path -parent $PSCommandPath) + "\vscleanup.ps1" | |
&$script | |
} |
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 ObservableExtensions | |
{ | |
static readonly Action<Exception> rethrow = e => ExceptionDispatchInfo.Capture(e).Throw(); | |
static readonly Action nop = () => { }; | |
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext) | |
=> Subscribe(source, onNext, rethrow, nop); | |
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError) | |
=> Subscribe(source, onNext, onError, nop); |