Skip to content

Instantly share code, notes, and snippets.

View RikkiGibson's full-sized avatar

Rikki Gibson RikkiGibson

View GitHub Profile
private static void ValidateGoogleSchedule(List<GoogleRouteSchedule> routeSchedules)
{
foreach (GoogleRouteSchedule routeSchedule in routeSchedules)
{
foreach (GoogleDaySchedule routeDaySchedule in routeSchedule.Days)
{
var stopSchedules = routeDaySchedule.StopSchedules;
var pairs = stopSchedules.Take(stopSchedules.Count - 1).Zip(stopSchedules.Skip(1), (fst, snd) => (fst, snd));
foreach (var (fst, snd) in pairs)
{
# This script scrapes AzDo data and writes out a CSV of build runtimes
$roslynPipelineId = "15"
$baseURL = "https://dev.azure.com/dnceng/public/_apis/"
$runsURL = "$baseURL/pipelines/$roslynPipelineId/runs?api-version=6.0-preview.1"
$buildsURL = "$baseURL/build/builds/"
$runs = (Invoke-WebRequest -uri $runsURL | ConvertFrom-Json)
$wantedRecords = @(
@RikkiGibson
RikkiGibson / required-props-1st-feb-2021.md
Last active February 1, 2021 21:37
Design notes on "required properties" from Feb 1st 2021

inits() vs other keywords

In the 28th January meeting we decided the inits() syntax is the one we're happiest with so far. There are likely multiple areas of concern about it, but one noteworthy concern is about the keyword that begins the "inits" clause.

A few reasons for concern about the keyword "inits":

  • inits is VB-ish, in the way that VB says Overrides while C# says override.
  • inits strongly resembles init, but init has an unrelated meaning, which we may want to introduce independently to method signatures. (The proposed init modifier on a method enables it to call init accessors, while making the method only callable during construction.)

The biggest reason I can think of to separate inits from init is the following: A "helper" should not be limited to only being called during construction. If object instances are sometimes allocated from scratch and used, and other times are fetched from a pool and used, it may be desirable to call a helper both during and after constr

RunTest command line
--dotnet C:\Program Files\dotnet\dotnet.exe --logs C:\Users\rikki\src\roslyn2\artifacts\log\Debug --configuration Debug --tfm net472 --timeout 90 --include '\.UnitTests' --html --platform x86
Running 'C:\Program Files\dotnet\dotnet.exe --version'..
6.0.100
Assembly Schedule: Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests.dll
Partition: 1 method count 2310 delta 310
ConvertNamespaceTestState 0
ExceptionCodeAction 0
Microsoft.CodeAnalysis.AddMissingImports.CSharpAddMissingImportsRefactoringProviderTests 9