Using the Doc
filter in Chrome seems to merge entries during redirects, losing info. Instead, use the Filter input.
- Chrome:
mime-type: text/html
- FireFox:
cause: document
using System; | |
using System.Net; | |
using System.Net.Sockets; | |
namespace MyNamespace | |
{ | |
/// <summary> | |
/// Extension methods on <see cref="System.Net.IPAddress"/>. | |
/// </summary> | |
public static class IPAddressExtensions |
<?xml version="1.0" encoding="utf-16"?> | |
<!-- | |
Inspired by: https://collinmbarrett.com/stylecop-ordering-resharper/ | |
Source: https://gist.github.com/angularsen/98bfab4d5e887ab37143214fad1fadbd | |
Modifications: | |
- Sort by Name after all other sorting criteria | |
--> | |
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"> | |
<TypePattern DisplayName="StyleCop Classes, Interfaces, & Structs" RemoveRegions="All"> | |
<TypePattern.Match> |
#nullable enable | |
using System; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.Filters; | |
namespace Digma.Api.Common.Telemetry | |
{ | |
/// <summary> | |
/// Action filter to construct a simpler telemetry name from the route name or the route template. |
// Original source: https://github.com/Faithlife/FaithlifeUtility/blob/master/src/Faithlife.Utility/GuidUtility.cs | |
using System; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Faithlife.Utility | |
{ | |
/// <summary> |
### Keybase proof | |
I hereby claim: | |
* I am angularsen on github. | |
* I am angularsen (https://keybase.io/angularsen) on keybase. | |
* I have a public key ASBk63TsyBng27LKfVncxiMbyB326LmFLu2_IjffuoOFDAo | |
To claim this, I am signing this object: |
#if UNITY_EDITOR | |
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Text; | |
using UnityEditor; | |
using UnityEditor.Compilation; | |
using UnityEngine; | |
/// <summary> |
# Disable EOL conversions by default | |
* -text | |
## Unity ## | |
*.cs diff=csharp text | |
*.cginc text | |
*.shader text | |
*.mat merge=unityyamlmerge |
void Main() | |
{ | |
ElectricCurrent sourceQuantity = ElectricCurrent.Parse("8A"); | |
ElectricCurrentUnit milliAmpsUnit = ElectricCurrent.ParseUnit("mA"); | |
// 8000 | |
double milliAmps = sourceQuantity.As(milliAmpsUnit); | |
// 8,000 mA (current culture, happens to be US English on my Windows) | |
Console.WriteLine(sourceQuantity.ToString(milliAmpsUnit)); |
/// <remarks>Inspired by: http://stackoverflow.com/a/22135756/134761 </remarks> | |
public static class PropertyPath<TSource> | |
{ | |
public static string GetString(Expression<Func<TSource, object>> expression, string separator = ".") | |
{ | |
return string.Join(separator, GetPropertyPathSegments(expression)); | |
} | |
public static IReadOnlyList<string> GetPropertyPathSegments(Expression<Func<TSource, object>> expression) | |
{ |