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
using System; | |
using CodeCop.Core; | |
using CodeCop.Core.Fluent; | |
using NUnit.Framework; | |
namespace CodeCop.Tests | |
{ | |
public class CodeCopStructBugTests | |
{ | |
public unsafe struct WithPtr |
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
using System; | |
using System.Buffers; | |
using System.Runtime.CompilerServices; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
namespace Locals | |
{ | |
class Program | |
{ |
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
using System; | |
using System.IO; | |
using System.Runtime.CompilerServices; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using ProtoBuf; | |
namespace Locals | |
{ | |
class Program |
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
namespace Tests | |
{ | |
using System; | |
using System.Diagnostics; | |
using System.Security; | |
using System.Threading; | |
using NUnit.Framework; | |
public class PerformanceCounterCategoryTest | |
{ |
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 override void WriteValue(Guid value) | |
{ | |
InternalWriteValue(JsonToken.String); | |
string text = null; | |
#if HAVE_CHAR_TO_STRING_WITH_CULTURE | |
text = value.ToString("D", CultureInfo.InvariantCulture); | |
#else | |
text = value.ToString("D"); |
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
var workItem = _writerWorkItem; | |
var buffer = workItem.Buffer; | |
var bufferWriter = workItem.BufferWriter; | |
buffer.SetLength(4); | |
buffer.Position = 4; | |
record.WriteTo(bufferWriter); | |
var length = (int) buffer.Length - 4; | |
bufferWriter.Write(length); // length suffix | |
buffer.Position = 0; |
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 string GetBlobReadonlySasToken(CloudStorageAccount account) | |
{ | |
var now = DateTimeOffset.Now; | |
// to address emulator running on http | |
var nonHttps = account.BlobEndpoint.ToString().StartsWith("http:"); | |
var sas = account.GetSharedAccessSignature(new SharedAccessAccountPolicy | |
{ | |
Services = SharedAccessAccountServices.Blob, |
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
using System; | |
using System.Runtime.CompilerServices; | |
public class C | |
{ | |
public static void A(Span<int> a) | |
{ | |
a[0] = 1; | |
a[1] = 2; | |
a[2] = 3; |
OlderNewer