This example shows how to read an embedded portable PDB file
using the System.Reflection.Metadata
classes.
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 BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Text; | |
var summary = BenchmarkRunner.Run<Lookups>(); | |
[MemoryDiagnoser] | |
public class Lookups | |
{ |
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 MySqlConnector; | |
using System.Diagnostics; | |
var threadCount = args.Length == 1 && int.TryParse(args[0], out var tc) ? tc : 100; | |
var csb = new MySqlConnectionStringBuilder | |
{ | |
Server = // REDACTED | |
UserID = // REDACTED | |
Password = // REDACTED |
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 Dapper; | |
using MySqlConnector; | |
await MethodToRunAsync(); | |
async Task Method1Async() | |
{ | |
using (var domain = new MySqlConnection()) | |
{ | |
await domain.OpenDBAsync(); |
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
static readonly object s_lock = new object(); | |
static readonly SemaphoreSlim s_semaphore = new SemaphoreSlim(1); | |
static int s_data; | |
[Benchmark] | |
public int Lock() | |
{ | |
lock (s_lock) | |
{ | |
s_data++; |
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
// Licensed to the .NET Foundation under one or more agreements. | |
// The .NET Foundation licenses this file to you under the MIT license. | |
// See the LICENSE file in the project root for more information. | |
namespace System.Runtime.CompilerServices | |
{ | |
internal static class RuntimeHelpers | |
{ | |
/// <summary> | |
/// Slices the specified array using the specified range. |
User Input | Bing Suggestion |
---|---|
man | msn |
Yah | Yahoo |
prostrate | prostate |
pray city | party city |
hard rich heaven | hard rock heaven |
ten virgin | teen virgin |
free born | free porn |
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
HRESULT FontFileStream::ReadFileFragment(const void ** fragmentStart, UINT64 fileOffset, UINT64 fragmentSize, void ** fragmentContext) | |
{ | |
if (fragmentStart != nullptr) | |
*fragmentStart = nullptr; | |
if (fragmentContext != nullptr) | |
*fragmentContext = nullptr; | |
if (fragmentStart == nullptr || fragmentContext == nullptr) | |
return E_POINTER; | |
if (fileOffset >= m_length || fileOffset + fragmentSize > m_length) | |
return E_INVALIDARG; |
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 reservedWords = new[] | |
{ | |
"ACCESSIBLE", | |
"ADD", | |
"ALL", | |
"ALTER", | |
"ANALYZE", | |
"AND", | |
"AS", | |
"ASC", |
NewerOlder