Skip to content

Instantly share code, notes, and snippets.

Bryan Wilhite BryanWilhite

Block or report user

Report or block BryanWilhite

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
BryanWilhite / ObjectValueActionResult.cs
Created May 15, 2019
xUnit: A test object for IActionResult types, wrapping JsonResult, NoContentResult, ObjectResult etc.
View ObjectValueActionResult.cs
using System;
using Microsoft.AspNetCore.Mvc;
using Xunit;
namespace My.Tests.Models
/// <summary>
/// Defines all subclasses of <see cref="ActionResult"/>
/// that have status codes and <see cref="object"/> values.
/// </summary>

Keybase proof

I hereby claim:

  • I am bryanwilhite on github.
  • I am rasx ( on keybase.
  • I have a public key ASBi2AwL78DryZEklKF1Ob5hjZ2yks8bjQXZgOoBGD05KQo

To claim this, I am signing this object:

View dashboard-hero.component.spec.ts
import { async, ComponentFixture, TestBed
} from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { addMatchers, click } from '../../testing';
import { Hero } from '../model/hero';
BryanWilhite / Program.cs
Created Oct 23, 2017
.NET Core: using ServiceCollection() and AddConsole() in a console app
View Program.cs
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
namespace Songhay.HelloWorlds.Shell
class Program
static void Main(string[] args)
BryanWilhite / CommonDbmsUtility.cs
Created Aug 5, 2017
View CommonDbmsUtility.cs
using System;
using System.Collections;
using System.Data;
using System.Data.Common;
namespace Songhay.DataAccess
/// <summary>
/// Generic procedures for data access.
/// </summary>
BryanWilhite / OracleEntityGenerator.ctor.cs
Created Jul 24, 2017
Text Templating for EF Code-First over Oracle
View OracleEntityGenerator.ctor.cs
using Songhay.DataAccess.Oracle.Models;
using System.Collections.Generic;
namespace Songhay.DataAccess.Oracle.TextTemplating
public partial class OracleEntityGenerator
public OracleEntityGenerator(IEnumerable<OracleTableMetadata> metadata)
this.TableOrViewMetadata = metadata;
BryanWilhite / Deploy-ArchiveFolder.ps1
Created Jun 27, 2017
deploys to target folder from ZIP archive
View Deploy-ArchiveFolder.ps1
Write-Output $_
exit 1
$id = [System.Security.Principal.WindowsIdentity]::GetCurrent()
Write-Output "Running as $($id.Name)..."
Add-Type -AssemblyName "System.IO"
BryanWilhite / FeedController.cs
Created Jun 14, 2017
ASP.NET Web API RSS Feed Controller
View FeedController.cs
using Newtonsoft.Json.Linq;
using Songhay.Extensions;
using Songhay.Web.Extensions;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web.Http;
BryanWilhite / MimeTypes.cs
Last active Jun 3, 2017
Swashbucke IOperationFilter Example for XML Consumption/Production
View MimeTypes.cs
namespace Songhay.Models
/// <summary>
/// Selected MIME types
/// </summary>
public static class MimeTypes
/// <summary>
/// The application atom XML
/// </summary>
BryanWilhite / sample.xml
Created Jan 23, 2017
sample *.pubxml with AddReplaceRuleForAppPath
View sample.xml
<?xml version="1.0" encoding="utf-8"?>
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit
<Project ToolsVersion="4.0" xmlns="">
You can’t perform that action at this time.