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.Numerics; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Diagnosers; | |
using BenchmarkDotNet.Jobs; | |
namespace DotNetBenchmarks; | |
[MemoryDiagnoser] | |
[SimpleJob(RuntimeMoniker.Net80, baseline: true)] | |
[SimpleJob(RuntimeMoniker.Net90)] |
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.Diagnostics.CodeAnalysis; | |
using Microsoft.Extensions.Options; | |
using Microsoft.OpenApi.Extensions; | |
using Microsoft.OpenApi.Models; | |
using Microsoft.OpenApi.Writers; | |
namespace Microsoft.AspNetCore.OpenApi; | |
public static class OpenApiYamlEndpoint | |
{ |
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
// Copyright (c) Martin Costello, 2023. All rights reserved. | |
// Licensed under the Apache 2.0 license. | |
using System.Linq.Expressions; | |
using NSubstitute.Core; | |
using NSubstitute.ExceptionExtensions; | |
namespace NSubstitute; | |
/// <summary> |
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 Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<EnablePreviewFeatures>true</EnablePreviewFeatures> | |
<ImplicitUsings>enable</ImplicitUsings> | |
<TargetFramework>net6.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Shouldly" Version="4.0.3" /> | |
</ItemGroup> | |
<ItemGroup> |
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.Net; | |
using System.Reflection; | |
using System.Text.Json; | |
using System.Text.Json.Serialization; | |
namespace Refit; | |
/// <summary> | |
/// A class representing an implementation of <see cref="IHttpContentSerializer"/> that can be | |
/// used with the <c>System.Text.Json</c> source generators. This class cannot be inherited. |
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.Text.Json; | |
using System.Text.Json.Serialization; | |
using System.Text.Json.Serialization.Metadata; | |
namespace Microsoft.AspNetCore.Http; | |
/// <summary> | |
/// Provides extension methods for writing a JSON serialized value to the HTTP response. | |
/// </summary> | |
/// <remarks> |
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
// There may be corner cases where the naive string matching incorrectly | |
// changes your source file. Check your diff before committing any changes. | |
using System.Text; | |
// Change to whatever your favourite indentation is | |
const string Indent = " "; | |
// Get all the C# files in the specified directory | |
var fileNames = Directory.GetFiles(args[0], "*.cs", SearchOption.AllDirectories); |
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 Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>net6.0</TargetFramework> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" /> | |
<PackageReference Include="xunit" Version="2.4.1" /> | |
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" /> | |
</ItemGroup> |
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
name: update-dotnet-sdk | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
jobs: | |
update-dotnet-sdk: | |
name: Update .NET SDK | |
runs-on: ubuntu-latest | |
steps: |
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
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
char matrix[3][3]; | |
int win(0); | |
int loss(0); | |
int draw(0); | |
char player; |
NewerOlder