doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
5c059dfe-e3a3-40e6-9083-720f1972ba1b | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Windows.Storage.Streams;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media.Imaging;
namespace TestAppUWP.Core
{
// ReSharper disable once InconsistentNaming
public static class UIElementExtension
{
public static async Task<IBuffer> RenderTar... | ```c#
using System;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
using Windows.Graphics.Display;
using Windows.Graphics.Imaging;
using Windows.Storage.Streams;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media.Imaging;
namespace TestAppUWP.Core
{
// ReSharper disable once In... |
4d322b44-9f49-4eac-97bd-55673bedef85 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace AppHarbor
{
public class ConsoleProgressBar
{
private const char ProgressBarCharacter = '\u2592';
public static void Render(double percentage, ConsoleColor color, string message)
{
ConsoleColor originalColor = Console.ForegroundColor;
Console.CursorLeft = ... | ```c#
using System;
using System.IO;
namespace AppHarbor
{
public class ConsoleProgressBar
{
private const char ProgressBarCharacter = '\u2592';
public static void Render(double percentage, ConsoleColor color, string message)
{
ConsoleColor originalColor = Console.ForegroundColor;
Console.CursorLeft = ... |
3f3a0ca4-faa0-43d8-87b9-aac144935b90 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using WalletWasabi.Models;
namespace WalletWasabi.Gui.ViewModels.Validation
{
public delegate void ValidateMethod(IErrorList errors);
public static class Validator
{
//public static IEnumerable<(string propertyName... | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using WalletWasabi.Models;
namespace WalletWasabi.Gui.ViewModels.Validation
{
public delegate void ValidateMethod(IErrorList errors);
}
``` |
5fb90a66-c4f3-4686-98d5-1817fdf13954 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace M... | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace M... |
d95b4555-7ba5-47c6-8390-7b04723d6bf8 | {
"language": "C#"
} | ```c#
namespace net.opgenorth.yegvote.droid.Service
{
using System;
using System.IO;
using Android.Content;
using Environment = Android.OS.Environment;
/// <summary>
/// This class will figure out where to store files.
/// </summary>
/// <remarks>Different versions of Android have ... | ```c#
using Android.Runtime;
namespace net.opgenorth.yegvote.droid.Service
{
using System;
using System.IO;
using Android.Content;
using Environment = Android.OS.Environment;
/// <summary>
/// This class will figure out where to store files.
/// </summary>
/// <remarks>Different v... |
ad7977c8-c062-44a0-98e2-d4632b69bc1a | {
"language": "C#"
} | ```c#
using DavidLievrouw.Utils.ForTesting.DotNet;
using DavidLievrouw.Voter.Api.Users.Models;
using DavidLievrouw.Voter.Security;
using FakeItEasy;
using NUnit.Framework;
namespace DavidLievrouw.Voter.Api.Users.Handlers {
[TestFixture]
public class LogoutHandlerTests {
LogoutHandler _sut;
[SetUp]
pu... | ```c#
using DavidLievrouw.Utils.ForTesting.DotNet;
using DavidLievrouw.Voter.Api.Users.Models;
using DavidLievrouw.Voter.Security;
using FakeItEasy;
using NUnit.Framework;
namespace DavidLievrouw.Voter.Api.Users.Handlers {
[TestFixture]
public class LogoutHandlerTests {
LogoutHandler _sut;
[SetUp]
pu... |
54de89d5-2fed-4181-a288-df699529738f | {
"language": "C#"
} | ```c#
using System;
using NSec.Cryptography;
using Xunit;
namespace NSec.Tests.Algorithms
{
public static class Sha256Tests
{
public static readonly string HashOfEmpty = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
[Fact]
public static void HashEmpty()
{
... | ```c#
using System;
using NSec.Cryptography;
using Xunit;
namespace NSec.Tests.Algorithms
{
public static class Sha256Tests
{
public static readonly string HashOfEmpty = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
[Fact]
public static void Properties()
{... |
81cfef91-4dd3-4481-a5ae-dcfc90149c57 | {
"language": "C#"
} | ```c#
namespace Nancy.Hosting.Self
{
/// <summary>
/// Configuration for automatic url reservation creation
/// </summary>
public class UrlReservations
{
public UrlReservations()
{
this.CreateAutomatically = false;
this.User = "Everyone";
}... | ```c#
namespace Nancy.Hosting.Self
{
using System;
using System.Security.Principal;
/// <summary>
/// Configuration for automatic url reservation creation
/// </summary>
public class UrlReservations
{
private const string EveryoneAccountName = "Everyone";
priva... |
bad81cd4-49ea-46be-8673-f2dfbeeab028 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
namespace PalmDB.Serialization
{
internal class UIntPalmValue : IPalmValue<uint>
{
public int Length { get; }
public UIntPalmValue(int length)
{
Guard.NotNegative(length, nameof(length));
this.Length = length;
... | ```c#
using System;
using System.Threading.Tasks;
namespace PalmDB.Serialization
{
/// <summary>
/// Represents a <see cref="uint"/> value inside a palm database.
/// </summary>
internal class UIntPalmValue : IPalmValue<uint>
{
/// <summary>
/// Gets the length of this uint block.
... |
e66eee28-5c1c-4fd2-aa9d-23c20fd5a0b5 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Screens.Edit.Screens.Compose;
... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Screens.Edit.Screens.Compose;
... |
e9125b3c-7cd3-4f31-8a99-aa9fe864e3fa | {
"language": "C#"
} | ```c#
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using NullGuard;
namespace GitHub.VisualStudio.Converters
{
/// <summary>
/// Convert a count to visibility based on the following rule:
/// * If count == 0, return Visibility.Visible
/// * If count > 0, r... | ```c#
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using NullGuard;
namespace GitHub.VisualStudio.Converters
{
/// <summary>
/// Convert a count to visibility based on the following rule:
/// * If count == 0, return Visibility.Visible
/// * If count > 0, r... |
7eecc5eb-814a-4c19-ae31-f69d0ff6f40b | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
using System.Linq;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Scoring;
using osu.Game.Screens.Play;
names... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
using System.Linq;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Visu... |
a4ad9044-9c0a-4835-ac43-e73d0dfdfbd7 | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
namespace AxosoftAPI.NET.Models
{
public class WorkLog : BaseModel
{
[JsonProperty("project")]
public Project Project { get; set; }
[JsonProperty("release")]
public Release Release { get; set; }
[JsonProperty("user")]
public User User { get; set; }
[JsonPr... | ```c#
using System;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace AxosoftAPI.NET.Models
{
public class WorkLog : BaseModel
{
[JsonProperty("project")]
public Project Project { get; set; }
[JsonProperty("release")]
public Release Release { get; set; }
[JsonProperty("user")]
public ... |
e87a3afc-e3ea-45f0-92ef-344a4c9a49e3 | {
"language": "C#"
} | ```c#
using System;
namespace DevelopmentInProgress.DipState
{
public class LogEntry
{
public LogEntry(string message)
{
Message = message;
Time = DateTime.Now;
}
public DateTime Time { get; private set; }
public string Message { get; private se... | ```c#
using System;
namespace DevelopmentInProgress.DipState
{
public class LogEntry
{
public LogEntry(string message)
{
Message = message;
Time = DateTime.Now;
}
public DateTime Time { get; private set; }
public string Message { get; private se... |
a2bd93a3-4de4-4caf-97eb-f65e08182068 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SGEnviro.Utilities
{
public class NumberParseException : Exception
{
public NumberParseException(string message) { }
}
public class Parsing
{
public static void ParseFloatOrThrowE... | ```c#
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
namespace SGEnviro.Utilities
{
public class NumberParseException : Exception
{
public NumberParseException(string message) { }
}
public class Parsing
{
public st... |
d2e223cd-28d7-447a-b65c-eceb83d9206b | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using Pixie;
using Pixie.Markup;
using Pixie.Options;
using Pixie.Terminal;
namespace ParseOptions
{
public static class Program
{
private static readonly FlagOption syntaxOnlyFlag = new FlagOption(
OptionForm.Short("fsyntax-only"),
Option... | ```c#
using System;
using System.Linq;
using Pixie;
using Pixie.Markup;
using Pixie.Options;
using Pixie.Terminal;
using Pixie.Transforms;
namespace ParseOptions
{
public static class Program
{
private static readonly FlagOption syntaxOnlyFlag = new FlagOption(
OptionForm.Short("fsyntax-on... |
37c4d04e-c1b4-41a2-aec0-153588ea91f6 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Group.Net.Groups
{
public class PermutationGroup<T> where T : IComparable<T>
{
protected readonly IList<IList<int>> Generators;
public int GeneratorCount
{
get { return Generators.Count; }
}
public PermutationGroup(IList<IList<int>> gene... | ```c#
using System;
using System.Collections.Generic;
namespace Group.Net.Groups
{
public class PermutationGroup<T> where T : IComparable<T>
{
protected readonly IList<IList<int>> Generators;
public int GeneratorCount
{
get { return Generators.Count; }
}
public PermutationGroup(IList<IList<int>> gener... |
2c474bb2-0195-4336-b2a7-c901918d94ed | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Globalization;
using Tgstation.Server.Api.Models;
namespace Tgstation.Server.Host.Core
{
/// <summary>
/// Extensions for <see cref="IApplicationBuilder"/>
/// </summary>
stati... | ```c#
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Globalization;
using Tgstation.Server.Api.Models;
namespace Tgstation.Server.Host.Core
{
/// <summary>
/// Extensions for <see cref="IApplicationBuilder"/>
/// </summary>
stati... |
dea0f1dd-7cb2-4592-9c7a-c346d8bb9447 | {
"language": "C#"
} | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using System.Collections.Generic;
using Microsoft.Practices.Unity;
namespace EOLib
{
public static class UnityExtensions
{
public static void Regis... | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using System.Collections.Generic;
using Microsoft.Practices.Unity;
namespace EOLib
{
public static class UnityExtensions
{
public static IUnityCont... |
1c4bc62d-6e82-41fc-8c5b-1821fa0615c7 | {
"language": "C#"
} | ```c#
using System.Windows.Input;
namespace RegEditor
{
public static class ComandsContextMenu
{
public static readonly RoutedUICommand CreateKey = new RoutedUICommand(
"Create Key", "CreateKey", typeof(MainWindow));
public static readonly RoutedUICommand UpdateKey = new RoutedUI... | ```c#
using System.Windows.Input;
namespace RegEditor
{
public static class ComandsContextMenu
{
public static readonly RoutedUICommand CreateKey = new RoutedUICommand(
"Create Key", "CreateKey", typeof(MainWindow));
public static readonly RoutedUICommand UpdateKey = new RoutedUI... |
e7a932cf-4a79-4b97-9145-c435929f8c25 | {
"language": "C#"
} | ```c#
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using ReactiveUI;
using Splat;
using WalletWasabi.Gui.Controls.TransactionDetails.ViewModels;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
public class TransactionInfoTabViewModel : WasabiDocu... | ```c#
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using ReactiveUI;
using Splat;
using WalletWasabi.Gui.Controls.TransactionDetails.ViewModels;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
public class TransactionInfoTabViewModel : WasabiDocu... |
96151b7e-b293-4825-b0a3-7e241f6748f1 | {
"language": "C#"
} | ```c#
namespace SqlStreamStore
{
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using SqlStreamStore.MySql;
using Xunit;
using Xunit.Abstractions;
public class MySqlStreamStoreFixturePool : IAsyncLifetime
{
private readonly ConcurrentQueue<MySq... | ```c#
namespace SqlStreamStore
{
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using SqlStreamStore.MySql;
using Xunit;
using Xunit.Abstractions;
public class MySqlStreamStoreFixturePool : IAsyncLifetime
{
private readonly ConcurrentQueue<MySq... |
1a20f915-fd41-4fce-bbd6-50b6846f569e | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets... |
95ae83e0-5129-4e62-bc3c-e9aad280d57f | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Tournament.Components;
using osu.Framework.Graphics.Shapes;
using osuTK.Graphics;
name... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Tournament.Components;
using osu.Framework.Gra... |
19ce2f05-77f4-4df5-ac13-98a3c46d1a16 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Alexa.NET.Management.AccountLinking;
using Refit;
namespace Alexa.NET.Management.Internals
{
[Headers("Authorization: Bearer")]
public interface IClientAccountLinkingApi
{
[Get("/skills/{sk... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Alexa.NET.Management.AccountLinking;
using Refit;
namespace Alexa.NET.Management.Internals
{
[Headers("Authorization: Bearer")]
public interface IClientAccountLinkingApi
{
[Get("/skills/{sk... |
a609ef4a-e90f-4a6c-aaba-9304f2cb3e02 | {
"language": "C#"
} | ```c#
using System;
using ClosedXML.Excel;
namespace ClosedXML_Examples.Misc
{
public class WorkbookProperties : IXLExample
{
#region Variables
// Public
// Private
#endregion
#region Properties
// Public
// Private
... | ```c#
using System;
using ClosedXML.Excel;
namespace ClosedXML_Examples.Misc
{
public class WorkbookProperties : IXLExample
{
#region Variables
// Public
// Private
#endregion
#region Properties
// Public
// Private
... |
2c0edacb-9047-46fd-ac2f-afef97d2f529 | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0")]
```
Update version to at least above published version on nuget.org | ```c#
using System.Reflection;
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyInformationalVersion("2.1.0")]
``` |
d4d79a02-d1e9-4bb2-85ae-713872d4899c | {
"language": "C#"
} | ```c#
using System;
using MessageBird.Utilities;
using Newtonsoft.Json;
namespace MessageBird.Json.Converters
{
class RFC3339DateTimeConverter : JsonConverter
{
private const string Format = "yyyy-MM-dd'T'HH:mm:ssK";
public override void WriteJson(JsonWriter writer, object value, JsonSerializ... | ```c#
using System;
using MessageBird.Utilities;
using Newtonsoft.Json;
namespace MessageBird.Json.Converters
{
class RFC3339DateTimeConverter : JsonConverter
{
private const string Format = "yyyy-MM-dd'T'HH:mm:ssK";
public override void WriteJson(JsonWriter writer, object value, JsonSerializ... |
06895c01-f44f-4f25-a304-3ac73082f288 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Engine.cgimin.texture;
using System.IO;
namespace Mugo
{
public static class TextureLoader
{
private static readonly Dictionary<String, TextureHolder> textures = new Dictionary<string, TextureHolder>();
public static TextureHolder Load(String path)
... | ```c#
using System;
using System.Collections.Generic;
using Engine.cgimin.texture;
using System.IO;
namespace Mugo
{
public static class TextureLoader
{
private static readonly Dictionary<String, TextureHolder> textures = new Dictionary<string, TextureHolder>();
public static TextureHolder Load(String path)
... |
2ac41041-acd8-434a-9f48-5d49b211cc2e | {
"language": "C#"
} | ```c#
namespace DynamixelServo.Driver
{
public enum ComplianceSlope
{
S2 = 2,
S4 = 4,
S8 = 8,
S16 = 16,
S32 = 32,
Default = 32,
S64 = 64,
S128 = 128
}
}
```
Add description to default Compliance slope | ```c#
namespace DynamixelServo.Driver
{
public enum ComplianceSlope
{
S2 = 2,
S4 = 4,
S8 = 8,
S16 = 16,
S32 = 32,
/// <summary>
/// Same as S32
/// </summary>
Default = 32,
S64 = 64,
S128 = 128
}
}
``` |
e1431020-b970-4593-a3ed-379a7ea7c302 | {
"language": "C#"
} | ```c#
using System;
using Recurly;
using Recurly.Resources;
namespace RecurlyTestRig
{
class Program
{
static void Main(string[] args)
{
var client = new Recurly.Client("subdomain-client-lib-test", "382c053318a04154905c4d27a48f74a6");
var site = client.GetSit... | ```c#
using System;
using Recurly;
using Recurly.Resources;
namespace RecurlyTestRig
{
class Program
{
static void Main(string[] args)
{
try {
var subdomain = Environment.GetEnvironmentVariable("RECURLY_SUBDOMAIN");
var apiKey = Environment.GetEnvi... |
0bf09146-3c90-4801-9a96-0a69354810be | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using MongoDB.Driver;
namespace RapidCore.Mongo.Testing
{
/// <summary>
/// Base class for functional tests that need access to
/// a Mongo database.
///
/// It provides simple helpers that we use ourselves.
/// </summary>
public abstract class Mongo... | ```c#
using System.Collections.Generic;
using MongoDB.Driver;
namespace RapidCore.Mongo.Testing
{
/// <summary>
/// Base class for functional tests that need access to
/// a Mongo database.
///
/// It provides simple helpers that we use ourselves.
/// </summary>
public abstract class Mongo... |
616ce14e-1404-4fe9-bea9-ab69e4a5caff | {
"language": "C#"
} | ```c#
using GitHub.Api;
using GitHub.Models;
using GitHub.Services;
using Microsoft.TeamFoundation.Controls;
using System.ComponentModel.Composition;
namespace GitHub.VisualStudio.TeamExplorer.Connect
{
[TeamExplorerSection(GitHubConnectSection1Id, TeamExplorerPageIds.Connect, 10)]
[PartCreationPolicy(Creatio... | ```c#
using GitHub.Api;
using GitHub.Models;
using GitHub.Services;
using Microsoft.TeamFoundation.Controls;
using System.ComponentModel.Composition;
namespace GitHub.VisualStudio.TeamExplorer.Connect
{
[TeamExplorerSection(GitHubConnectSection1Id, TeamExplorerPageIds.Connect, 11)]
[PartCreationPolicy(Creatio... |
6b12236d-310a-47a7-8162-6a4edf55265d | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.ServiceBus;
namespace Microsoft.Azure.WebJobs.Script.Description
{
public class EventHubBindingMetadata : Bindin... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.ServiceBus;
namespace Microsoft.Azure.WebJobs.Script.Description
{
public class EventHubBindingMetadata : Bindin... |
40d092f3-2a98-4971-93f7-31946062dea9 | {
"language": "C#"
} | ```c#
using System;
using System.Windows;
using DereTore.Applications.StarlightDirector.Extensions;
namespace DereTore.Applications.StarlightDirector.UI.Controls.Pages {
public partial class SummaryPage : IDirectorPage {
public SummaryPage() {
InitializeComponent();
Table = new Ob... | ```c#
using System;
using System.Windows;
using DereTore.Applications.StarlightDirector.Extensions;
namespace DereTore.Applications.StarlightDirector.UI.Controls.Pages {
public partial class SummaryPage : IDirectorPage {
public SummaryPage() {
InitializeComponent();
Table = new Ob... |
9bdd2d01-42ba-40b2-b79b-459651c0e7a2 | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Autofac.Extras.Tests.DynamicProxy2")]
[assembly: AssemblyDescription("")]
```
Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion wit... | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Autofac.Extras.Tests.DynamicProxy2")]
``` |
5dde77a2-8cc2-4c8e-8283-992e05f73e1f | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using Arkivverket.Arkade.Core.Resources;
using Arkivverket.Arkade.Core.Testing;
using Arkivverket.Arkade.Core.Util;
using Serilog;
namespace Arkivverket.Arkade.Core.Base.Noark5
{
public abstract class Noark5BaseTest : IArkad... | ```c#
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using Arkivverket.Arkade.Core.Resources;
using Arkivverket.Arkade.Core.Testing;
using Arkivverket.Arkade.Core.Util;
using Serilog;
namespace Arkivverket.Arkade.Core.Base.Noark5
{
public abstract class Noark5BaseTest : IArkad... |
94dfd06f-fb44-4d2d-8661-0f3563cededd | {
"language": "C#"
} | ```c#
// Program.cs
// <copyright file="Program.cs"> This code is protected under the MIT License. </copyright>
using System;
using System.Collections.Generic;
using CardsLibrary;
namespace ConsoleTesting
{
/// <summary>
/// The main program (for testing at the moment).
/// </summary>
publi... | ```c#
// Program.cs
// <copyright file="Program.cs"> This code is protected under the MIT License. </copyright>
using System;
using System.Collections.Generic;
using CardsLibrary;
namespace ConsoleTesting
{
/// <summary>
/// The main program (for testing at the moment).
/// </summary>
public class Pro... |
9fa033b5-b40c-4da6-8d14-3bf912c64528 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using PlayerRank.Scoring;
namespace PlayerRank
{
public class League
{
private readonly List<Game> m_Games = new List<Game>();
public IEnumerable<PlayerScore> GetLeaderBoard(IScoringStrategy scoringStrategy)
{
ILi... | ```c#
using System.Collections.Generic;
using System.Linq;
using PlayerRank.Scoring;
namespace PlayerRank
{
public class League
{
private readonly List<Game> m_Games = new List<Game>();
public IEnumerable<PlayerScore> GetLeaderBoard(IScoringStrategy scoringStrategy)
{
sco... |
50e74231-673e-4efb-9617-54bb56e7fd91 | {
"language": "C#"
} | ```c#
namespace NBench.VisualStudio.TestAdapter
{
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using System;
using System.Collections.Generic;
public class NBenchTestDiscoverer : ITestDiscoverer
{
public v... | ```c#
namespace NBench.VisualStudio.TestAdapter
{
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
public class NBenchTestDiscoverer : ITestDiscoverer
... |
c3c1fa75-729d-46b1-bd6b-d5bf7b183c8f | {
"language": "C#"
} | ```c#
namespace NBench.VisualStudio.TestAdapter
{
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
public class NBenchTestDiscoverer : ITestDiscoverer
... | ```c#
namespace NBench.VisualStudio.TestAdapter
{
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
public class NBenchTestDiscoverer : ITestDiscoverer
... |
d05b5370-fd5b-4a8d-b7ba-6c1cc8a5e063 | {
"language": "C#"
} | ```c#
// 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.
using System.Collections.Generic;
using Xunit;
namespace System.Reflection.Emit.Tests
{
public class Prop... | ```c#
// 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.
using System.Collections.Generic;
using Xunit;
namespace System.Reflection.Emit.Tests
{
public class Prop... |
125666f8-7829-47eb-aeb6-7489622f1b43 | {
"language": "C#"
} | ```c#
// Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
using System;
using PInvoke;
using Xunit;
using static PInvoke.DwmApi;
public class Dwm... | ```c#
// Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
using System;
using PInvoke;
using Xunit;
using static PInvoke.DwmApi;
public class Dwm... |
9b67bf30-3ff6-420f-8b86-822a578f9c2b | {
"language": "C#"
} | ```c#
@model CRP.Controllers.ViewModels.ReportViewModel
@{
ViewBag.Title = "ViewReport";
}
<div class="boundary">
<p>
@Html.ActionLink("Back to Item", "Details", "ItemManagement", null, null, "Reports", new { id = Model.ItemId }, null) |
@Html.ActionLink("Generate Excel Report", "Cre... | ```c#
@model CRP.Controllers.ViewModels.ReportViewModel
@{
ViewBag.Title = "ViewReport";
}
<div class="boundary">
<p>
@Html.ActionLink("Generate Excel Report", "CreateExcelReport", "Excel", new { id = Model.ItemReportId, itemId = Model.ItemId }, new { @class = "btn" })
</p>
<p>@Html... |
52aac3b3-f260-4b62-b03d-2c62fcf9df1f | {
"language": "C#"
} | ```c#
using MbCache.Logic;
namespace MbCache.Configuration
{
/// <summary>
/// Creates the proxy.
/// The implementation of this interface needs a default ctor
/// </summary>
public interface IProxyFactory
{
/// <summary>
/// Called once after this object is instansiated.
/// </summary>
voi... | ```c#
using MbCache.Logic;
namespace MbCache.Configuration
{
/// <summary>
/// Creates the proxy.
/// </summary>
public interface IProxyFactory
{
/// <summary>
/// Called once after this object is instansiated.
/// </summary>
void Initialize(CacheAdapter cache);
/// <summary>
/// Creat... |
714f7016-4edf-485a-83f7-03d3d48f25d4 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("libgit2sharp.Tests")]
[assembly: As... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
using Xunit;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("libgit2sharp.Tests")]
... |
59ebb1bb-7431-48a5-a99e-f8a0afbb9333 | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Program.cs" company="https://martincostello.com/">
// Martin Costello (c) 2016
// </copyright>
// <summary>
// Program.cs
// </summary>
// ------------------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Program.cs" company="https://martincostello.com/">
// Martin Costello (c) 2016
// </copyright>
// <summary>
// Program.cs
// </summary>
// ------------------------------... |
ca1225ad-89bd-4b7b-a3d0-23b16be117eb | {
"language": "C#"
} | ```c#
using System;
namespace Sakuno.ING.Game.Models
{
public sealed class PlayerShipSlot : Slot
{
public PlayerShip Owner { get; }
public int Index { get; }
public override SlotItem? Item => _slotItem;
private PlayerSlotItem? _slotItem;
public PlayerSlotItem? PlayerS... | ```c#
using System;
namespace Sakuno.ING.Game.Models
{
public sealed class PlayerShipSlot : Slot
{
public PlayerShip Owner { get; }
public int Index { get; }
public override SlotItem? Item => _slotItem;
private PlayerSlotItem? _slotItem;
public PlayerSlotItem? PlayerS... |
8b38f474-4f74-4f76-8c25-147fe0f3918c | {
"language": "C#"
} | ```c#
namespace DanTup.DartVS.ProjectSystem
{
using Microsoft.VisualStudio.Project;
public class DartProjectConfig : ProjectConfig
{
internal DartProjectConfig(DartProjectNode project, string configuration, string platform)
: base(project, configuration, platform)
{
}
... | ```c#
namespace DanTup.DartVS.ProjectSystem
{
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Project;
public class DartProjectConfig : ProjectConfig
{
internal DartProjectConfig(DartProjectNode project, string configuration, string platform)
: base(project, configuratio... |
eab51355-f4ea-4a81-9585-692cf0274ad4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace borkedLabs.CrestScribe
{
public class ScribeQueryWorker
{
private BlockingCollection<SsoCharacter> _queryQueu... | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace borkedLabs.CrestScribe
{
public class ScribeQueryWorker
{
private BlockingCollection<SsoCharacter> _queryQueu... |
e5cc09eb-460b-4b40-bce4-e6056b3efb26 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Okra.TodoSample.Data
{
[Export(typeof(ITodoRepository))]
public class TodoRepository : ITodoRepository
{
private IList<TodoItem> todoItems;
... | ```c#
using System;
using System.Collections.Generic;
using System.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Okra.TodoSample.Data
{
[Export(typeof(ITodoRepository))]
public class TodoRepository : ITodoRepository
{
private IList<TodoItem> todoItems;
... |
f759d912-a160-4db6-8625-bca19cf2b123 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
namespace Modix.Data.Utilities
{
public static class Extensions
{
public static string Truncate(this string value, int maxLength, int maxLines, string suffix = "…")
{
if (string.IsNullOrEmpty(value)) return value;
if (value.Length... | ```c#
using System;
using System.Linq;
namespace Modix.Data.Utilities
{
public static class Extensions
{
public static string Truncate(this string value, int maxLength, int maxLines, string suffix = "…")
{
if (string.IsNullOrEmpty(value)) return value;
if (value.Length... |
21f73824-8d4d-40b6-a823-1ff9cce734bc | {
"language": "C#"
} | ```c#
using System.IO;
using System.Linq;
using ICSharpCode.SharpZipLib.Tar;
namespace AppHarbor
{
public static class CompressionExtensions
{
public static void ToTar(this DirectoryInfo sourceDirectory, Stream output)
{
var archive = TarArchive.CreateOutputTarArchive(output);
archive.RootPath = sourceDi... | ```c#
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ICSharpCode.SharpZipLib.Tar;
namespace AppHarbor
{
public static class CompressionExtensions
{
public static void ToTar(this DirectoryInfo sourceDirectory, Stream output)
{
var archive = TarArchive.CreateOutputTarArchive(output... |
3e635667-a57e-4a25-8211-0dbeb4b3cea3 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Online.Rooms;
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
namespace osu.Game.Tests.Vis... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Rooms;
using osu.Game.Screens.OnlinePlay.Multipl... |
3655d72c-bbe4-47d9-8f05-58b90f6ac7c7 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using BenchmarkDotNet.Attributes;
using osu.Framework.Bindables;
namespace osu.Framework.Benchmarks
{
public class BenchmarkBindableInstantiation... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using BenchmarkDotNet.Attributes;
using osu.Framework.Bindables;
namespace osu.Framework.Benchmarks
{
[MemoryDiagnoser]
public class Benchmar... |
cc94b057-3633-46bf-85d7-081076f44b08 | {
"language": "C#"
} | ```c#
using Bit.Core.Contracts;
using Bit.Core.Models;
using System.Data.SqlClient;
using System.Threading.Tasks;
namespace Bit.Data.Implementations
{
public class SqlServerJsonLogStore : ILogStore
{
public virtual AppEnvironment ActiveAppEnvironment { get; set; }
public virtual IContentFormat... | ```c#
using Bit.Core.Contracts;
using Bit.Core.Models;
using System.Data.SqlClient;
using System.Threading.Tasks;
namespace Bit.Data.Implementations
{
public class SqlServerJsonLogStore : ILogStore
{
public virtual AppEnvironment ActiveAppEnvironment { get; set; }
public virtual IContentFormat... |
de79ffcc-8a3d-410f-aa1e-4d0a1fc36fcd | {
"language": "C#"
} | ```c#
using System.IO;
using System.Text;
using Mapsui.Extensions;
using Mapsui.Styles;
using SkiaSharp;
using Svg.Skia;
namespace Mapsui.Rendering.Skia
{
public static class BitmapHelper
{
public static BitmapInfo LoadBitmap(object bitmapData)
{
// todo: Our BitmapRegistry stores ... | ```c#
using System.IO;
using System.Text;
using Mapsui.Extensions;
using Mapsui.Styles;
using SkiaSharp;
using Svg.Skia;
namespace Mapsui.Rendering.Skia
{
public static class BitmapHelper
{
public static BitmapInfo LoadBitmap(object bitmapStream)
{
// todo: Our BitmapRegistry store... |
3daf869b-4f73-4e2c-bc18-8f0114097ee2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using NewPackageAction = NuGet.Client.Resolution.PackageAction;
namespace NuGet.Client.Installation
{
public class UninstallActionHandler : IA... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using NewPackageAction = NuGet.Client.Resolution.PackageAction;
namespace NuGet.Client.Installation
{
public class UninstallActionHandler : IA... |
744c6a44-48a1-49b1-8ffe-1defe588baf1 | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel.DataAnnotations;
namespace SpaceBlog.Models
{
public class Article
{
public Article()
{
Date = DateTime.Now;
}
[Key]
public int Id { get; set; }
[Required]
[MaxLength(50)]
public strin... | ```c#
using System;
using System.ComponentModel.DataAnnotations;
namespace SpaceBlog.Models
{
public class Article
{
public Article()
{
Date = DateTime.Now;
}
[Key]
public int Id { get; set; }
[Required]
[MaxLength(50, ErrorMessage = "The T... |
9f2075de-1c44-42aa-b1f5-b21640909ffd | {
"language": "C#"
} | ```c#
@{
ViewBag.Title = "Resume";
}
<div class="col-sm-8 col-sm-offset-2">
<div class="col-xs-12 col-sm-6 col-sm-offset-3 list-group" id="aboutButtonGroup">
<button type="button" class="list-group-item storyList" id="2015"><p class="text-center">2015</p></button>
<button type="button" class... | ```c#
@{
ViewBag.Title = "Resume";
}
<div class="col-sm-8 col-sm-offset-2">
<div class="col-xs-12 col-sm-6 col-sm-offset-3 list-group" id="aboutButtonGroup">
<button type="button" class="list-group-item storyList" id="2015"><p class="text-center">Information Technology Intern</p></button>
<b... |
5cbbb869-c5b0-4c15-a8cb-526b1dd30b23 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Platform;
using osu.Framew... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Platform;
using osu.Framew... |
04002849-d1b9-4f73-bdc0-d2f9e8bf9bdd | {
"language": "C#"
} | ```c#
using AvalonStudio.Extensibility;
using AvalonStudio.Shell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WalletWasabi.Blockchain.TransactionBuilding;
using WalletWasabi.Gui.Helpers;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
... | ```c#
using AvalonStudio.Extensibility;
using AvalonStudio.Shell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WalletWasabi.Blockchain.TransactionBuilding;
using WalletWasabi.Gui.Helpers;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
... |
9a027578-bea0-4655-88f6-8d7d6f1d2f80 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.UI.Resources;
namespace Orchard.Packaging {
public class ResourceManifest : IResourceManifestProvider {
public void BuildManifests(ResourceManifestBuilder builder) {
builder.Add().... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.Environment.Extensions;
using Orchard.UI.Resources;
namespace Orchard.Packaging {
[OrchardFeature("Gallery")]
public class ResourceManifest : IResourceManifestProvider {
public void Build... |
bfd51232-85ae-4785-b8d4-4691217f6bb5 | {
"language": "C#"
} | ```c#
namespace Stripe.Terminal
{
using System;
using Newtonsoft.Json;
public class ReaderListOptions : ListOptions
{
/// <summary>
/// A location ID to filter the response list to only readers at the specific location.
/// </summary>
[JsonProperty("location")]
p... | ```c#
namespace Stripe.Terminal
{
using System;
using Newtonsoft.Json;
public class ReaderListOptions : ListOptions
{
/// <summary>
/// Filters readers by device type.
/// </summary>
[JsonProperty("device_type")]
public string DeviceType { get; set; }
//... |
4f196e43-7e64-4c0e-aecd-8955c63d13de | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Im... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Im... |
7753b793-95b4-42d5-9fe8-eb8ebd38d156 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Serialization;
namespace Msiler.AssemblyParser
{
public class OpCodeInfo
{
public string Name { get; set; }
public string Description { get; set; }
}
public static class Helpers
{
... | ```c#
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Serialization;
namespace Msiler.AssemblyParser
{
public class OpCodeInfo
{
public string Name { get; set; }
public string Description { get; set; }
}
public static class Helpers
{
... |
7507ec91-dd18-4a88-bd5a-b9195a7d915b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Burr.Tests
{
public class Readme
{
public Readme()
{
// create an anonymous client
var client = new GitHubClient();
// create... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Burr.Tests
{
public class Readme
{
public Readme()
{
// create an anonymous client
var client = new GitHubClient();
// create... |
9964bd7c-6624-4037-9021-e03c53b376b0 | {
"language": "C#"
} | ```c#
using System;
using ValveResourceFormat.Serialization;
namespace GUI.Types.ParticleRenderer.Initializers
{
public class RandomAlpha : IParticleInitializer
{
private readonly int alphaMin = 255;
private readonly int alphaMax = 255;
private readonly Random random;
public R... | ```c#
using System;
using ValveResourceFormat.Serialization;
namespace GUI.Types.ParticleRenderer.Initializers
{
public class RandomAlpha : IParticleInitializer
{
private readonly int alphaMin = 255;
private readonly int alphaMax = 255;
private readonly Random random;
public R... |
5c862e65-e92c-41af-a4d9-d57389e89bb3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Web.Areas.Admin.Controllers
{
class ElmahResult : ActionResult
{
private string _resouceType;
public ElmahResult(string resouceType)
{
_resouceType = ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Web.Areas.Admin.Controllers
{
class ElmahResult : ActionResult
{
private string _resouceType;
public ElmahResult(string resouceType)
{
_resouceType = ... |
43c15c7c-e66e-4b0f-b988-46f85d180218 | {
"language": "C#"
} | ```c#
// Copyright 2017 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using NUnitLite;
using System.Reflection;
namespace NodaTime.Test
{
class Program
{
public static int Main(string[] args)
{
... | ```c#
// <copyright file="Program.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
//
// Copyright (c) 2009-2017 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of thi... |
b058219b-ab67-43ed-ac08-16128a83a84b | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using System.Windows;
using System.Windows.Threading;
namespace Homie.Common
{
public class ExceptionUtils
{
public enum ExitCodes
{
Ok = 0,
UnhandledException = 91,
UnobservedTaskException = 92,
Dispa... | ```c#
using System;
using System.Reflection;
using System.Windows;
using System.Windows.Threading;
namespace Homie.Common
{
public class ExceptionUtils
{
public enum ExitCodes
{
Ok = 0,
UnhandledException = 91,
UnobservedTaskException = 92,
Dispa... |
e541f509-4850-48e9-b910-4561f4b31811 | {
"language": "C#"
} | ```c#
using System;
namespace DiscogsClient.Internal
{
public class TokenAuthenticationInformation
{
public string Token { get; set; }
private string _secretToken;
public TokenAuthenticationInformation(string token)
{
this.Token = token;
_secretToken = ... | ```c#
using System;
namespace DiscogsClient.Internal
{
public class TokenAuthenticationInformation
{
public string Token { get; set; }
private string _secretToken;
public TokenAuthenticationInformation(string token)
{
this.Token = token;
_secretToken = ... |
22074d52-97ef-41a3-a84e-6fd93336d969 | {
"language": "C#"
} | ```c#
using System;
using EvilDICOM.Core.Enums;
namespace EvilDICOM.Core.IO.Data
{
public class DataRestriction
{
public static string EnforceLengthRestriction(uint lengthLimit, string data)
{
if (data.Length > lengthLimit)
{
Console.Write(
... | ```c#
using System;
using EvilDICOM.Core.Enums;
using EvilDICOM.Core.Logging;
namespace EvilDICOM.Core.IO.Data
{
public class DataRestriction
{
public static string EnforceLengthRestriction(uint lengthLimit, string data)
{
if (data.Length > lengthLimit)
{
... |
8d05bfa1-56a6-4008-a23d-406d2bb8e7cb | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NHibernate.Test.TestDialects
{
public class PostgreSQL82TestDialect : TestDialect
{
public PostgreSQL82TestDialect(Dialect.Dialect dialect)
: base(dialect)
{
}
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NHibernate.Test.TestDialects
{
public class PostgreSQL82TestDialect : TestDialect
{
public PostgreSQL82TestDialect(Dialect.Dialect dialect)
: base(dialect)
{
}
... |
42aa1607-1304-4e64-92a4-e0995a966d59 | {
"language": "C#"
} | ```c#
using System;
using System.Web.UI.WebControls;
namespace R7.HelpDesk
{
public partial class Comments
{
protected Panel pnlInsertComment;
protected Label lblAttachFile1;
protected FileUpload TicketFileUpload;
protected Label lblAttachFile2;
protected FileUpload fuAttachment;
protected Pa... | ```c#
using System;
using System.Web.UI.WebControls;
namespace R7.HelpDesk
{
public partial class Comments
{
protected Panel pnlInsertComment;
protected Label lblAttachFile1;
protected FileUpload TicketFileUpload;
protected Label lblAttachFile2;
protected FileUpload fuAttachment;
protected Pa... |
a45ce3d8-ce01-4457-b78c-8d76f2de1925 | {
"language": "C#"
} | ```c#
/*
* Created by SharpDevelop.
* User: Lars Magnus
* Date: 12.06.2014
* Time: 20:52
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using Nancy.Hosting.Self;
namespace webstats
{
class Program
{
public static void Main(string[] args)
{
// Start ... | ```c#
/*
* Created by SharpDevelop.
* User: Lars Magnus
* Date: 12.06.2014
* Time: 20:52
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Linq;
using System.Threading;
using Nancy.Hosting.Self;
namespace webstats
{
class Program
{
... |
f43c0504-2ad5-4480-99ff-17e9c9afaea0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.ApplicationModel;
namespace PCLAppConfig.FileSystemStream
{
public class UWPAppConfigPathExtractor : IAppConfigPathExtractor
{
public string Path
{
get
{... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.ApplicationModel;
namespace PCLAppConfig.FileSystemStream
{
public class UWPAppConfigPathExtractor : IAppConfigPathExtractor
{
public string Path
{
get
{... |
6cdff649-4b77-42df-b445-778cc7daba41 | {
"language": "C#"
} | ```c#
using Content.Shared.GameObjects.Components.Movement;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Physics;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.Physics;
using Robust.Client.Player;
using Robust.Shared.GameObjects.Components;
using Robust.Shared... | ```c#
using Content.Shared.GameObjects.Components.Movement;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Physics;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.Physics;
using Robust.Client.Player;
using Robust.Shared.GameObjects.Components;
using Robust.Shared... |
999ae6cb-748e-4f1c-a786-8bc083305be8 | {
"language": "C#"
} | ```c#
using System.Collections;
using PatchKit.Api;
using UnityEngine;
namespace PatchKit.Unity.UI
{
public abstract class UIApiComponent : MonoBehaviour
{
private Coroutine _loadCoroutine;
private bool _isDirty;
private ApiConnection _apiConnection;
public bool LoadOnAwake ... | ```c#
using System.Collections;
using PatchKit.Api;
using UnityEngine;
namespace PatchKit.Unity.UI
{
public abstract class UIApiComponent : MonoBehaviour
{
private Coroutine _loadCoroutine;
private bool _isDirty;
private ApiConnection _apiConnection;
public bool LoadOnStart ... |
66832dab-5509-45d7-ad5a-ddee19b686a3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Examine;
namespace Umbraco.Examine
{
/// <summary>
/// Utility to rebuild all indexes ensuring minimal data queries
/// </summary>
public class IndexRebuilder
{
private readonly... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Examine;
namespace Umbraco.Examine
{
/// <summary>
/// Utility to rebuild all indexes ensuring minimal data queries
/// </summary>
public class IndexRebuilder
{
private readonly... |
aefcc133-1518-4ba6-adce-76c16836e2a6 | {
"language": "C#"
} | ```c#
// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved.
using System.IO;
namespace UnrealBuildTool.Rules
{
public class VaRest : ModuleRules
{
public VaRest(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PrivateIncludePaths.AddRange(
new str... | ```c#
// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved.
using System.IO;
namespace UnrealBuildTool.Rules
{
public class VaRest : ModuleRules
{
public VaRest(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PrecompileForTargets = PrecompileTargetsTy... |
03fad1e2-d59b-46d4-9709-a9f7dfca4ba3 | {
"language": "C#"
} | ```c#
namespace WalletWasabi.Backend.Models.Responses
{
public class VersionsResponse
{
public string ClientVersion { get; set; }
public string BackendMajorVersion { get; set; }
}
}
```
Add back typo with JsonProperty and explain in comment why it's necessary. | ```c#
using Newtonsoft.Json;
namespace WalletWasabi.Backend.Models.Responses
{
public class VersionsResponse
{
public string ClientVersion { get; set; }
// KEEP THE TYPO IN IT! Otherwise the response would not be backwards compatible.
[JsonProperty(PropertyName = "BackenMajordVersion")]
public string Backen... |
6d1d70ce-1de4-42cb-a355-359c81472c09 | {
"language": "C#"
} | ```c#
#region Copyright and license
// // <copyright file="NotNullTests.cs" company="Oliver Zick">
// // Copyright (c) 2016 Oliver Zick. All rights reserved.
// // </copyright>
// // <author>Oliver Zick</author>
// // <license>
// // Licensed under the Apache License, Version 2.0 (the "License");
// // you... | ```c#
#region Copyright and license
// // <copyright file="NotNullTests.cs" company="Oliver Zick">
// // Copyright (c) 2016 Oliver Zick. All rights reserved.
// // </copyright>
// // <author>Oliver Zick</author>
// // <license>
// // Licensed under the Apache License, Version 2.0 (the "License");
// // you... |
b4202ca8-8fc8-46b3-a657-fd7fe693ee43 | {
"language": "C#"
} | ```c#
using System;
public struct Foo : ICloneable
{
public int CloneCounter { get; private set; }
public object Clone()
{
CloneCounter++;
return this;
}
}
public static class Program
{
public static ICloneable BoxAndCast<T>(T Value)
{
return (ICloneable)Value;
}
... | ```c#
using System;
public struct Foo : ICloneable
{
public int CloneCounter { get; private set; }
public object Clone()
{
CloneCounter++;
return this;
}
}
public static class Program
{
public static ICloneable BoxAndCast<T>(T Value)
{
return (ICloneable)Value;
}
... |
cd622cff-5dd6-4598-a81c-4f6774a2f62e | {
"language": "C#"
} | ```c#
#region Usings
using System.Collections.Generic;
using System.Text.RegularExpressions;
#endregion
namespace Buildron.Infrastructure.BuildsProvider.TeamCity
{
/// <summary>
/// Build queue parser.
/// </summary>
public static class BuildQueueParser
{
#region Fields
private static Regex s_getBuildConfigur... | ```c#
#region Usings
using System.Collections.Generic;
using System.Text.RegularExpressions;
#endregion
namespace Buildron.Infrastructure.BuildsProvider.TeamCity
{
/// <summary>
/// Build queue parser.
/// </summary>
public static class BuildQueueParser
{
#region Fields
private static Regex s_getBuildConfigur... |
27587715-d3cc-4f0f-a9c0-3b0aa73f42fd | {
"language": "C#"
} | ```c#
using System;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
using BenchmarkDotNet.Order;
namespace NHasher.Benchmarks
{
[ClrJob, CoreJob]
[MemoryDiagnoser]
public class Benchmarks
{
private const int N = 10000;
private readonly byte[] _data;
pr... | ```c#
using System;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
namespace NHasher.Benchmarks
{
[ClrJob, CoreJob]
[MemoryDiagnoser]
public class Benchmarks
{
private byte[] _data;
private readonly MurmurHash3X64L128 _murmurHash3X64L128 = new MurmurHash3X64L... |
bddca62f-220e-4b52-a2a7-498cdde5d722 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// Nuget: Title
[assembly: AssemblyTitle( "D2L Security For Web API" )]
// Nuget: Description
[assembly: AssemblyDescription( "A library that implements Web API components for authenticating D2L services." )]
// Nuget: Author
[assembly:... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle( "D2L.Security.WebApi" )]
[assembly: AssemblyDescription( "A library that implements Web API components for authenticating D2L services." )]
[assembly: AssemblyCompany( "Desire2Learn" )]
[assembly: AssemblyProduct( "B... |
02a76ced-43df-4e01-8c28-aed0cf8612fc | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Text;
using System.Xml;
using Xunit;
public class XmlWriterTests
{
[Fact]
public static void WriteWithEncodin... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Text;
using System.Xml;
using Xunit;
public class XmlWriterTests
{
[Fact]
[ActiveIssue(1263)]
public stat... |
8783825f-d0be-4242-8e39-24af243c1588 | {
"language": "C#"
} | ```c#
namespace MiX.Integrate.Shared.Entities.Assets
{
/// <summary>Instance of a custom asset detail data point/summary>
public class AdditionalDetailItem
{
public AdditionalDetailItem(int id, string label, string value)
{
Id = id;
Label = label;
Value = value;
}
/// <summary>... | ```c#
namespace MiX.Integrate.Shared.Entities.Assets
{
/// <summary>Instance of a custom asset detail data point/summary>
public class AdditionalDetailItem
{
public AdditionalDetailItem(long id, string label, string value)
{
Id = id;
Label = label;
Value = value;
}
/// <summary... |
b363f62d-9e39-4e7f-841b-6f03fd9be55b | {
"language": "C#"
} | ```c#
using LiveSplit.UI;
using LiveSplit.UI.Components;
using System;
using System.Windows.Forms;
using System.Xml;
namespace LiveSplit.View
{
public partial class ComponentSettingsDialog : Form
{
public XmlNode ComponentSettings { get; set; }
public IComponent Component { get; set; }
... | ```c#
using LiveSplit.UI;
using LiveSplit.UI.Components;
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
namespace LiveSplit.View
{
public partial class ComponentSettingsDialog : Form
{
public XmlNode ComponentSettings { get; set; }
public IComponent Component... |
e80f2a37-b178-4d89-b433-f83220b8f632 | {
"language": "C#"
} | ```c#
using System;
using FluentAssertions;
using OpenMagic.Extensions;
using OpenMagic.Specifications.Helpers;
using TechTalk.SpecFlow;
namespace OpenMagic.Specifications.Steps.Extensions.UriExtensions
{
[Binding]
public class IsReposondingSteps
{
private readonly GivenData _given;
privat... | ```c#
using System;
using FluentAssertions;
using OpenMagic.Extensions;
using OpenMagic.Specifications.Helpers;
using TechTalk.SpecFlow;
namespace OpenMagic.Specifications.Steps.Extensions.UriExtensions
{
[Binding]
public class IsReposondingSteps
{
private readonly GivenData _given;
privat... |
f4669ffc-603f-42ec-9018-36e90c23b450 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Contain... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Contain... |
750d66b6-1143-4dc2-9faa-fb60f603f2a0 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Structure;
using Microsoft.CodeAnalysis.Text;
namespa... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Structure;
using Microsoft.CodeAnalysis.Text;
namespa... |
0938d449-a0ae-401e-9ebc-c9938d991075 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Judgements
{
public class CatchBananaJudgement : CatchJ... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Judgements
{
public class CatchBananaJudgement : CatchJ... |
b8b9d6a6-731d-42a6-9f21-6089e74cd923 | {
"language": "C#"
} | ```c#
using Foundation;
using System;
using UIKit;
using MyTrips.ViewModel;
using Humanizer;
namespace MyTrips.iOS
{
public partial class TripsTableViewController : UITableViewController
{
const string TRIP_CELL_IDENTIFIER = "TRIP_CELL_IDENTIFIER";
PastTripsViewModel ViewModel { get; set; }
pub... | ```c#
using Foundation;
using System;
using UIKit;
using MyTrips.ViewModel;
using Humanizer;
namespace MyTrips.iOS
{
public partial class TripsTableViewController : UITableViewController
{
const string TRIP_CELL_IDENTIFIER = "TRIP_CELL_IDENTIFIER";
PastTripsViewModel ViewModel { get; set; }
pub... |
dc4b43d1-853e-4ed4-a5ff-0435adacc1d0 | {
"language": "C#"
} | ```c#
using System;
using System.Globalization;
using System.Windows.Data;
namespace KodiRemote.Wp81.Converters
{
public class ShorterStringConverter : IValueConverter
{
public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string str... | ```c#
using System;
using System.Globalization;
using System.Windows.Data;
namespace KodiRemote.Wp81.Converters
{
public class ShorterStringConverter : IValueConverter
{
public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value ... |
0562f3d7-b22e-412c-bb5c-66fc0ff632b6 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Urho3DNet")]
[assembly: AssemblyDescr... | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Urho3DNet")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Urho3D")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyC... |
5884e202-4f04-4f69-95f6-e59abc21d2ff | {
"language": "C#"
} | ```c#
using System;
namespace AllReady.Providers
{
public interface IConvertDateTimeOffset
{
DateTimeOffset ConvertDateTimeOffsetTo(string timeZoneId, DateTimeOffset dateTimeOffset, int hour = 0, int minute = 0, int second = 0);
DateTimeOffset ConvertDateTimeOffsetTo(TimeZoneInfo timeZoneInfo,... | ```c#
using System;
namespace AllReady.Providers
{
public interface IConvertDateTimeOffset
{
DateTimeOffset ConvertDateTimeOffsetTo(string timeZoneId, DateTimeOffset dateTimeOffset, int hour = 0, int minute = 0, int second = 0);
}
public class DateTimeOffsetConverter : IConvertDateTimeOffset
... |
0f17d07d-4577-407f-a52f-578827c22a6b | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using Newtonsoft.Json;
namespace osu.Game.Users
{
public class User
{
[JsonProperty(@"id")]
public long Id = 1;
[Jso... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using Newtonsoft.Json;
namespace osu.Game.Users
{
public class User
{
[JsonProperty(@"id")]
public long Id = 1;
[Jso... |
4e69c492-c89a-4d37-894e-0c179c644e92 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
namespace AppHarbor.Commands
{
public class CreateCommand : ICommand
{
private readonly IAppHarborClient _appHarborClient;
private readonly IApplicationConfiguration _applicationConfiguration;
public CreateCommand(IAppHarborClient appHarborClient, IApplicationConfigurat... | ```c#
using System;
using System.Linq;
namespace AppHarbor.Commands
{
public class CreateCommand : ICommand
{
private readonly IAppHarborClient _appHarborClient;
private readonly IApplicationConfiguration _applicationConfiguration;
public CreateCommand(IAppHarborClient appHarborClient, IApplicationConfigurat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.