Skip to content

Instantly share code, notes, and snippets.

Avatar
🕸️
Bugfixing

Maryam Ariyan maryamariyan

🕸️
Bugfixing
  • Vancouver, Canada
View GitHub Profile
@maryamariyan
maryamariyan / SampleApplication.csproj
Created Aug 14, 2020
Debugging Extensions libraries on runtime repo
View SampleApplication.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="C:\git\runtime\artifacts\bin\Microsoft.Extensions.DependencyInjection\net5.0-Debug\Microsoft.Extensions.DependencyInjection.dll" />
<Reference Include="C:\git\runtime\artifacts\bin\Microsoft.Extensions.Logging.Abstractions\netstandard2.0-Debug\Microsoft.Extensions.Logging.Abstractions.dll" />
@maryamariyan
maryamariyan / triage.md
Last active Dec 4, 2020
Triage notes on Microsoft.Extensions areas
View triage.md

Issues to consider for 6.0 on Extensions:

Presentation DI+HttpClientFactory

Meta:

  • Nullable annotations: #43605
  • API documentation debt on each of the areas: e.g #43871 and about 10 more similar.
  • General documentation regarding extensions: Currently docs are spread between both dotnet/docs and dotnet/AspNetCore.Docs. Would be good to drive an effort to ensure the ASP.NET Core docs have been sufficiently refactored to focus on web-specific examples and reduce duplication with docs in dotnet/docs (representing the basis for all .NET workloads, not just web), while ensuring the ASP.NET Core docs also maintain their own set of web focused content for Extensions.
@maryamariyan
maryamariyan / CustomFormatter.cs
Last active Nov 27, 2020
custom formatter implementation template
View CustomFormatter.cs
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Logging.Console;
using Microsoft.Extensions.Options;
using System;
using System.IO;
namespace ConsoleApp46
{
public class CustomFormatter : ConsoleFormatter, IDisposable
View Program.cs
using System;
using System.Collections.Generic;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.FileSystemGlobbing;
using CustomOptionsConfigurationExensionsNamespace;
class Program
{
static void Main()
{
@maryamariyan
maryamariyan / AugmentingGenerator.cs
Last active Nov 19, 2020
Source Generation for Configuration Binding
View AugmentingGenerator.cs
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
using System.Text;
namespace Generators
{
[Generator]
public class AugmentingGenerator : ISourceGenerator
{
@maryamariyan
maryamariyan / Program.cs
Created Nov 5, 2020
LoggerColorBehavior usage
View Program.cs
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Logging.Console;
using Microsoft.Extensions.Options;
using System;
using System.IO;
using System.Threading.Tasks;
namespace ConsoleApp77
{
@maryamariyan
maryamariyan / Program.cs
Created Sep 3, 2020
EventSourceLoggerOutOfProcess
View Program.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Globalization;
using System.Text.Json;
using Microsoft.Diagnostics.NETCore.Client;
using Microsoft.Diagnostics.Tracing;
using Microsoft.Extensions.Logging;
View Docs.txt
What is a console log formatter?
What are the in-box console log formatters?
Simple
JSON
SystemD
Compact
How do register a new formatter?
How do I select which formatter to use (via both code and config)?
How do I author a new formatter?
View UseAppFiltersUseCase.cs
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.EventSource;
using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp46
{
View UseFilterSpecsToChangeLogLevels.cs
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.EventSource;
using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp46
{
class Program