Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View maryamariyan's full-sized avatar
:octocat:
Focusing

Maryam Ariyan maryamariyan

:octocat:
Focusing
  • Vancouver, Canada
View GitHub Profile
@maryamariyan
maryamariyan / SampleApplication.csproj
Created August 14, 2020 16:27
Debugging Extensions libraries on runtime repo
<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 December 4, 2020 21:34
Triage notes on Microsoft.Extensions areas

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 November 27, 2020 01:19
custom formatter implementation template
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
@maryamariyan
maryamariyan / Program.cs
Created November 19, 2020 14:08
ambiguous match
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 November 19, 2020 13:13
Source Generation for Configuration Binding
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 November 5, 2020 18:08
LoggerColorBehavior usage
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 September 3, 2020 18:05
EventSourceLoggerOutOfProcess
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;
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?
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
{
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