This file contains 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
using System; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using IdentityModel.Client; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; | |
namespace Auth |
This file contains 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
namespace Dodo.EventStream | |
open System | |
open System.IO | |
open System.Threading.Tasks | |
open Microsoft.Azure.WebJobs | |
open Microsoft.Azure.WebJobs.Extensions.Http | |
open Microsoft.AspNetCore.Http | |
open Microsoft.Extensions.Logging | |
open System.Text.Json |
This file contains 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
using System; | |
using System.Buffers; | |
using System.IO; | |
using System.Text.Encodings.Web; | |
using System.Text.Json; | |
using Microsoft.Azure.Cosmos; | |
namespace Cosmos.Serialization | |
{ | |
/// <summary> |
This file contains 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 unsafe partial struct Uuid | |
{ | |
public string ToStringWithStringCreate(string? format, IFormatProvider? formatProvider) | |
{ | |
// ... same as original ToString | |
var uuidString = string.Create(32, this, (span, state) => | |
{ | |
fixed (char* uuidChars = &span.GetPinnableReference()) | |
{ | |
FormatNThis(state, uuidChars); |
This file contains 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
private unsafe void FormatD(char* dest) | |
{ | |
// dddddddd-dddd-dddd-dddd-dddddddddddd | |
uint* destUints = (uint*)dest; | |
char** destUintsAsChars = (char**)&destUints; | |
uint* tableToHex = TableToHex; | |
dest[8] = dest[13] = dest[18] = dest[23] = '-'; | |
destUints[0] = tableToHex[(byte)(_a >> 24)]; | |
destUints[1] = tableToHex[(byte)(_a >> 16)]; |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
namespace GuidBenchmarks | |
{ | |
public static class Program | |
{ | |
public static void Main(string[] args) |
This file contains 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
using System.Diagnostics.CodeAnalysis; | |
using System.Runtime.CompilerServices; | |
[assembly:IgnoresAccessChecksTo("System.Private.CoreLib")] | |
namespace Uuid.CoreLib | |
{ | |
public static class Internal | |
{ | |
public static unsafe void GetRandomBytes(byte* buffer, int length) |
This file contains 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
using System; | |
namespace Infrastructure.ApiClients.Http | |
{ | |
public class HttpCallException : Exception | |
{ | |
public HttpCallException(int? statusCode, string message) : base(message) | |
{ | |
StatusCode = statusCode; | |
} |
This file contains 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
using System; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
namespace Uuid1 | |
{ | |
[StructLayout(LayoutKind.Explicit, Pack = 1)] | |
[SuppressMessage("ReSharper", "InconsistentNaming")] |
This file contains 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
using System; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
namespace Uuid1 | |
{ | |
public unsafe struct Uuidv1 : IFormattable | |
{ | |
static Uuidv1() |
NewerOlder