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.Runtime.CompilerServices; | |
public class C | |
{ | |
public static void A(Span<int> a) | |
{ | |
a[0] = 1; | |
a[1] = 2; | |
a[2] = 3; |
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 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 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 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 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 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 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 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 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
remote="$1" | |
url="$2" | |
z40=0000000000000000000000000000000000000000 | |
IFS=' ' | |
while read local_ref local_sha remote_ref remote_sha | |
do | |
if [ "$local_sha" = $z40 ] | |
then |
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 class SqlClientSqlCommandSet : IDisposable | |
{ | |
private static readonly Type SqlCmdSetType; | |
private readonly object _instance; | |
private int _countOfCommands; | |
private readonly static Action<object, SqlConnection> SetConnection; | |
private readonly static Func<object, SqlConnection> GetConnection; | |
private readonly static Action<object, SqlTransaction> SetTransaction; | |
private readonly static Func<object, SqlCommand> GetCommand; |
NewerOlder