This file contains hidden or 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
public static class ExtensionMethods | |
{ | |
/// <summary> | |
/// Returns friendly name for enum as long as enum is decorated with a Display or Description Attribute, otherwise returns Enum.ToString() | |
/// </summary> | |
/// <param name="value">Enum</param> | |
/// <returns>Friendly name via DescriptionAttribute</returns> | |
public static string ToFriendlyName(this Enum value) | |
{ | |
Type type = value.GetType(); |
This file contains hidden or 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
import { UnitedStatesDateParserFormatter } from './us-date-parser-formatter'; | |
describe('UnitedStatesDateParserFormatter', () => { | |
let sut: UnitedStatesDateParserFormatter; | |
beforeEach(() => { sut = new UnitedStatesDateParserFormatter(); }); | |
describe('Parsing', () => { | |
it('should parse null undefined and empty string as null', () => { | |
expect(sut.parse(null as any)).toBeNull(); |
This file contains hidden or 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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"foreground": "#2B2B2B", | |
"style": "plain", | |
"template": "\ue0c5", |