doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
87e8511c-7802-42bc-be74-92763ab57001 | {
"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.
// Passing a very large struct by value on the stack, on arm32 and x86,
// can cause it to be copied from a te... | ```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.
// Passing a very large struct by value on the stack, on arm32 and x86,
// can cause it to be copied from a te... |
029bca51-cc13-4e90-8906-7cb65c9cce29 | {
"language": "C#"
} | ```c#
using System;
using JetBrains.Application;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.Tree;
using JetBrains.ReSharper.UnitTestFramework;
namespace ReSharperFixieRunner.UnitTestProvider
{
[FileUnitTestExplorer]
public class FixieTestFileExplorer : IUnitTestFileExplorer
{
pr... | ```c#
using System;
using System.Linq;
using JetBrains.Application;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.Tree;
using JetBrains.ReSharper.UnitTestFramework;
namespace ReSharperFixieRunner.UnitTestProvider
{
[FileUnitTestExplorer]
public class FixieTestFile... |
fcdec120-6dea-4a71-9774-9e8460a631c5 | {
"language": "C#"
} | ```c#
using Bootstrap.StructureMap;
using Manufacturing.DataCollector.Datasources.Simulation;
using StructureMap;
using StructureMap.Configuration.DSL;
using StructureMap.Graph;
using StructureMap.Pipeline;
namespace Manufacturing.DataPusher
{
public class DataPusherContainer : IStructureMapRegistration
{
... | ```c#
using Bootstrap.StructureMap;
using Manufacturing.DataCollector;
using Manufacturing.DataCollector.Datasources.Simulation;
using StructureMap;
using StructureMap.Configuration.DSL;
using StructureMap.Graph;
using StructureMap.Pipeline;
namespace Manufacturing.DataPusher
{
public class DataPusherContainer : ... |
d115fd82-3e42-442a-9ecf-cdd3d5efac47 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using GitVersion.Common;
using LibGit2Sharp;
namespace GitVersion.VersionCalculation
{
/// <summary>
/// Version is 0.1.0.
/// BaseVersionSource is the "root" commit reachable from the current commit.
/// Does not increment.
/// </summary>
p... | ```c#
using System;
using System.Collections.Generic;
using GitVersion.Common;
using LibGit2Sharp;
namespace GitVersion.VersionCalculation
{
/// <summary>
/// Version is 0.1.0.
/// BaseVersionSource is the "root" commit reachable from the current commit.
/// Does not increment.
/// </summary>
p... |
a61d3cd4-69dc-47a8-a498-efc6c2f529e7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace Rs317.Extended
{
/// <summary>
/// Operation codes for the RS317 packets.
/// </summary>
public enum RsNetworkOperationCode : byte
{
/// <summary>
/// Operation code for packet type that indicates a login
/// success.
/// ... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace Rs317.Extended
{
/// <summary>
/// Operation codes for the RS317 packets.
/// </summary>
public enum RsNetworkOperationCode : byte
{
}
}
``` |
742fb26a-f648-4dc7-ae65-395c03b3433f | {
"language": "C#"
} | ```c#
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
private readonly IRouteHandler _routeHandler;
protected Mapper(IRouteHandler routeHandler)
{
_routeHandler = routeHandler;
}
protected Route GenerateRoute(string path, string controller, string action, string[] ... | ```c#
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
private readonly IRouteHandler _routeHandler;
protected Mapper(IRouteHandler routeHandler)
{
_routeHandler = routeHandler;
}
protected Route GenerateRoute(string path, string controller, string action, string[] ... |
0a691c59-bb44-4a5c-ab84-b700dd0735c6 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.Formats.Alembic.Importer;
namespace UnityEditor.Formats.Alembic.Exporter.UnitTests
{
public class AssetRenameTests
{
readonly List<string> deleteFileList... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.Formats.Alembic.Importer;
namespace UnityEditor.Formats.Alembic.Exporter.UnitTests
{
public class AssetRenameTests
{
readonly List<string> deleteFileList... |
a5d98e1f-111c-4768-bcfb-6f527976ea61 | {
"language": "C#"
} | ```c#
using System;
using System.Text.RegularExpressions;
namespace InternetSeparationAdapter
{
public static class UtilsExtension
{
// http://stackoverflow.com/a/33113820
public static string Base64UrlEncode(this byte[] arg)
{
var s = Convert.ToBase64String(arg); // Regular base64 encoder
... | ```c#
using System;
using System.Text.RegularExpressions;
namespace InternetSeparationAdapter
{
public static class UtilsExtension
{
// http://stackoverflow.com/a/33113820
public static string Base64UrlEncode(this byte[] arg)
{
var s = Convert.ToBase64String(arg); // Regular base64 encoder
... |
c37540b3-f3dd-483e-9015-442a0da47b4a | {
"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.Online.Chat;
namespace osu.Game.Online.API.Requests
{
public class MarkChannelAsReadRequest : APIRequest
{
private readonly Channel... | ```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.Online.Chat;
namespace osu.Game.Online.API.Requests
{
public class MarkChannelAsReadRequest : APIRequest
{
private readonly Channel... |
4a2f6ccf-65e9-453a-ad0f-5d3f94e7ddd4 | {
"language": "C#"
} | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace DNTPersianUtils.Core.Tests
{
[TestClass]
public class PersianNumbersUtilsTests
{
[TestMethod]
public void Test_ToPersianNumbers_Works()
{
var actual = 123.ToPersianNumbers();
Assert.AreEqual... | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace DNTPersianUtils.Core.Tests
{
[TestClass]
public class PersianNumbersUtilsTests
{
[TestMethod]
public void Test_English_ToPersianNumbers_Works()
{
var actual = 123.ToPersianNumbers();
Assert.... |
48b562e1-05aa-4a89-b659-1104e23397a8 | {
"language": "C#"
} | ```c#
using Glimpse.Web;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Glimpse.Agent.Web
{
public class MasterRequestProfiler : IRequestRuntime
{
private readonly IDiscoverableCollection<IRequestProfiler> _requestProfiliers;
private ... | ```c#
using Glimpse.Web;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Glimpse.Agent.Web
{
public class MasterRequestProfiler : IRequestRuntime
{
private readonly IEnumerable<IRequestProfiler> _requestProfiliers;
private readonly IEn... |
cd72d6fb-6c22-4a07-9a80-7d1f34118544 | {
"language": "C#"
} | ```c#
@inject SiteOptions Options
@inject Microsoft.AspNetCore.Identity.SignInManager<LondonTravelUser> SignInManager
@if (SignInManager.IsSignedIn(User))
{
<form asp-route="SignOut" method="post" id="signOutForm" class="navbar-right">
<ul class="nav navbar-nav navbar-right">
<li>
... | ```c#
@inject SiteOptions Options
@inject Microsoft.AspNetCore.Identity.SignInManager<LondonTravelUser> SignInManager
@if (SignInManager.IsSignedIn(User))
{
<form asp-route="SignOut" method="post" id="signOutForm" class="navbar-right">
<ul class="nav navbar-nav navbar-right">
<li>
... |
73bd086c-f657-4090-bd1d-7b08616a1e3a | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.Weather
{
public class Settings : WidgetSettingsBase
{
[Category("Style")]
[DisplayName("Unit Type")]
public TemperatureUnitType UnitType { get; set; }
[... | ```c#
using System;
using System.ComponentModel;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.Weather
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Style.FontSettings.FontSize = 16;
}
[Category("Style")]
[D... |
252718ff-b2c4-4c34-b730-b200e26e7fdb | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Finance
{
public class PartialCandleTokenizer : AbstractCandleTokenizer
{
private AbstractCandleTokenizer ct;
private int start;
private int length;
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Finance
{
public class PartialCandleTokenizer : AbstractCandleTokenizer
{
private AbstractCandleTokenizer ct;
private int start;
private int length;
... |
ae9d9977-6a33-44c9-add2-d9e060ee4410 | {
"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.IO;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Interop... | ```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.IO;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Interop... |
498e02cf-c5fc-4646-aaf8-bd3cdd80badc | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
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: AssemblyTit... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
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: AssemblyTit... |
7316ef6f-3f4a-4368-b08b-18c248054d56 | {
"language": "C#"
} | ```c#
namespace Hypermedia.Relations
{
/// <summary>
/// Collection of basic relations commonly used.
/// For a comprehensive list <see href="https://www.iana.org/assignments/link-relations/link-relations.xhtml"/>
/// </summary>
public static class DefaultHypermediaRelations
{
/// <summ... | ```c#
namespace Hypermedia.Relations
{
/// <summary>
/// Collection of basic relations commonly used.
/// For a comprehensive list <see href="https://www.iana.org/assignments/link-relations/link-relations.xhtml"/>
/// </summary>
public static class DefaultHypermediaRelations
{
/// <summ... |
9cfa4bd8-0bd3-471e-aeb4-a39213ba8695 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEditor;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Audio.Editor
{
[CustomEditor(typeof(TextToSpeech))]
public class TextToSpeechInspector : UnityEditor.Editor
{
private SerializedProperty ... | ```c#
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEditor;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Audio.Editor
{
[CustomEditor(typeof(TextToSpeech))]
public class TextToSpeechInspector : UnityEditor.Editor
{
private SerializedProperty ... |
205b5b61-8c9e-40cc-850b-82d38ae2204b | {
"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 Xunit;
namespace System.Net.NetworkInformation.Tests
{
public class NetworkChangeTest
{
... | ```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 Xunit;
namespace System.Net.NetworkInformation.Tests
{
public class NetworkChangeTest
{
... |
163edeb9-55fe-43a9-8629-2aed7785c8fb | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using Xunit;
namespace Rollbar.Test {
public class RollbarClientFixture {
private readonly RollbarClient _rollbarClient;
public RollbarClientFixture() {
this._rollbarClient= new RollbarClient();
}
[Fact]
public void Client_rendered... | ```c#
using Newtonsoft.Json;
using Xunit;
namespace Rollbar.Test {
public class RollbarClientFixture {
private readonly RollbarClient _rollbarClient;
public RollbarClientFixture() {
this._rollbarClient= new RollbarClient();
}
[Fact]
public void Client_rendered... |
b668d8aa-aaa1-4fa6-8f25-9afda0c893d0 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using Newtonsoft.Json;
namespace BmpListener.Bgp
{
public abstract class BgpMessage
{
protected BgpMessage(ref ArraySegment<byte> data)
{
var bgpHeader = new BgpHeader(data);
Type = bgpHeader.Type;
var offset = data.Off... | ```c#
using System;
using System.Linq;
using Newtonsoft.Json;
namespace BmpListener.Bgp
{
public abstract class BgpMessage
{
protected BgpMessage(ref ArraySegment<byte> data)
{
var bgpHeader = new BgpHeader(data);
Type = bgpHeader.Type;
var offset = data.Off... |
26a910ea-64d6-40bd-815a-e224a5101eb1 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
namespace osu.Framework.Graphics.Containers
{
/// <summary>
/// An element which starts hidden and can be toggled to visi... | ```c#
// Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
namespace osu.Framework.Graphics.Containers
{
/// <summary>
/// An element which starts hidden and can be toggled to visi... |
e5e04117-e42c-475a-9a5a-d285fd6dae59 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MailTest
{
public partial class LogOut : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}```
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MailTest
{
public partial class LogOut : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Modifyi... |
5050172b-99a1-4ab3-8d07-edf5c7cb76ee | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
namespace osu.Framework.Configuration
{
public class BindableBool : Bindable<bool>
{
public BindableBool(bool value = false)
... | ```c#
// Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
namespace osu.Framework.Configuration
{
public class BindableBool : Bindable<bool>
{
public BindableBool(bool value = false)
... |
180d0c1f-5779-40b2-9826-eec74803e2da | {
"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.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Platform;
usin... | ```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.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Platform;
usin... |
da7f541c-b976-44d8-90cf-10434a25979a | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Linq;
using osu.Framework.IO.Stores;
namespace osu.Framework.Audio.Track
{
public class TrackManager : AudioCol... | ```c#
// Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Linq;
using osu.Framework.IO.Stores;
namespace osu.Framework.Audio.Track
{
public class TrackManager : AudioCol... |
7e0aa028-25e6-4522-b9e4-18c0aa41f571 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Arango.Test
{
[TestClass]
public class CollectionTests
{
[TestMethod]
public void TestMethod1()
{
}
}
}
```
Make tests for delete collection methods. | ```c#
using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Arango.Client;
namespace Arango.Test
{
[TestClass]
public class CollectionTests
{
private ArangoDatabase _database;
public CollectionTests()
{
string alias = "t... |
8d142f0e-b2b6-4a12-9097-27077134246e | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using Sitecore.Data.Managers;
using Sitecore.Globalization;
namespace Unicorn.Data
{
public static class SourceItemExtensions
{
/// <summary>
/// Helper method to get a specific version from a source item, if it exists
/// </summary>
/// <returns>Null if the version do... | ```c#
using System;
using System.Linq;
namespace Unicorn.Data
{
public static class SourceItemExtensions
{
/// <summary>
/// Helper method to get a specific version from a source item, if it exists
/// </summary>
/// <returns>Null if the version does not exist or the version if it exists</returns>
public ... |
ea9ed0b2-096a-40de-9a4b-1167907daa3a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace Samesound
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Applicatio... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace Samesound
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Applicatio... |
0411fa22-ec61-4bba-a012-ef247fe10513 | {
"language": "C#"
} | ```c#
using System.Runtime.CompilerServices;
using System.Reflection;
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Management")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Utility")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Security")]
[assembly:InternalsVisibleTo("Microsoft.P... | ```c#
using System.Runtime.CompilerServices;
using System.Reflection;
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Management")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Utility")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Security")]
[assembly:InternalsVisibleTo("Microsoft.P... |
2928b444-4c64-4dbe-a86d-803cfa3a047c | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
namespace Nest
{
public interface IEmptyResponse : IResponse
{
}
[JsonObject]
//TODO Only used by clearscroll, does it really not return anything useful?
public class EmptyResponse : BaseResponse, IEmptyResponse
{
}
}```
Clear scroll does indeed return an empty response | ```c#
using Newtonsoft.Json;
namespace Nest
{
public interface IEmptyResponse : IResponse
{
}
[JsonObject]
public class EmptyResponse : BaseResponse, IEmptyResponse
{
}
}``` |
3e51545e-bbde-4246-ac62-ac908b370cdb | {
"language": "C#"
} | ```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, string[] excludedDirectoryNames)
{
var archive = TarArch... | ```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, string[] excludedDirectoryNames)
{
var archive = TarArch... |
c1647244-c28d-4687-b942-35932c65aa7d | {
"language": "C#"
} | ```c#
using Discord;
using Discord.Commands;
using System;
namespace CoinBot.Discord.Commands
{
public abstract class CommandBase : ModuleBase
{
protected static void AddAuthor(EmbedBuilder builder)
{
builder.WithAuthor(new EmbedAuthorBuilder
{
Name = "FunFair CoinBot - right click above to block",
... | ```c#
using Discord;
using Discord.Commands;
using System;
namespace CoinBot.Discord.Commands
{
public abstract class CommandBase : ModuleBase
{
protected static void AddAuthor(EmbedBuilder builder)
{
builder.WithAuthor(new EmbedAuthorBuilder
{
Name = "FunFair CoinBot - right click above to block",
... |
8579c819-2e94-4a44-bf34-a7e245690e75 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Collections.ObjectModel;
using GalaSoft.MvvmLight;
namespace DesktopWidgets.WindowViewModels
{
public class SelectItemViewModel : ViewModelBase
{
private object _selectedItem;
public SelectItemViewModel(IEnumerable<object> items)
{
... | ```c#
using System.Collections.Generic;
using System.Collections.ObjectModel;
using GalaSoft.MvvmLight;
namespace DesktopWidgets.WindowViewModels
{
public class SelectItemViewModel : ViewModelBase
{
private object _selectedItem;
public SelectItemViewModel(IEnumerable<object> items)
{
... |
3093dd9e-19ee-4818-b844-aa2d7b21fcb7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.XR.Management;
using UnityEngine;
using UnityEngine.XR.Management;
namespace SuperSystems.UnityBuild
{
public class XRPluginManagement : BuildAction, IPreBuildAction, IPreBuildPerPlatformAction
{
[Header("XR Sett... | ```c#
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.XR.Management;
using UnityEngine;
using UnityEngine.XR.Management;
namespace SuperSystems.UnityBuild
{
public class XRPluginManagement : BuildAction, IPreBuildPerPlatformAction, IPostBuildPerPlatformAction
{
[Hea... |
8fa6b6c3-b24b-41f7-81a6-3f88476f9115 | {
"language": "C#"
} | ```c#
using System;
using System.Web;
using System.Web.Mvc;
using Serilog;
namespace Commencement.Mvc
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleAndLogErrorAttribute());
}
}
... | ```c#
using System;
using System.Web;
using System.Web.Mvc;
using Serilog;
namespace Commencement.Mvc
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleAndLogErrorAttribute());
}
}
... |
73737ba7-e996-4711-b4ef-b48dcb03b680 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using SurveyMonkey.Containers;
using SurveyMonkey.RequestSettings;
namespace SurveyMonkey
{
public partial class SurveyMonkeyApi
{
public List<Response> GetResponseOverviews(int id)
{
string endPoint ... | ```c#
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using SurveyMonkey.Containers;
using SurveyMonkey.RequestSettings;
namespace SurveyMonkey
{
public partial class SurveyMonkeyApi
{
private enum SurveyOrCollector
{
Survey,
Collector
... |
8fb227d3-eff3-4eca-b362-3ab672d78b2f | {
"language": "C#"
} | ```c#
using Medallion.Threading.Postgres;
using Microsoft.Data.SqlClient;
using Npgsql;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Medallion.Threading.Tests.Tests... | ```c#
using Medallion.Threading.Postgres;
using Microsoft.Data.SqlClient;
using Npgsql;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Medallion.Threading.Tests.Tests... |
124e08a1-f7c6-4a1a-9866-6eb92697694e | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace NSync.Client
{
public class UpdateManager
{
Func<string, Stream> openPath;
Func<string, IObservable<string>> downloadUrl;
public UpdateManager(string url,
Func<string, Stream> openPathMock = null,
Func<string, IObs... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using NSync.Core;
namespace NSync.Client
{
public class UpdateManager
{
Func<string, Stream> openPath;
Func<string, IObservable<string>> download... |
809ec2a8-aa0c-451d-a1cf-99eb8261bb3f | {
"language": "C#"
} | ```c#
using System;
#pragma warning disable 1591
namespace E247.Fun
{
public struct Unit : IEquatable<Unit>
{
public static readonly Unit Value = new Unit();
public override int GetHashCode() =>
0;
public override bool Equals(object obj) =>
obj is Unit;
... | ```c#
using System;
#pragma warning disable 1591
namespace E247.Fun
{
public struct Unit : IEquatable<Unit>
{
public static readonly Unit Value = new Unit();
public override int GetHashCode() =>
0;
public override bool Equals(object obj) =>
obj is Unit;
... |
a758f60a-4067-4c36-a000-fa34373f6859 | {
"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.Diagnostics.CodeAnalysis;
namespace osu.Framework.Extensions.ObjectExtensions
{
/// <summary>
/// Extensions that apply to all objects.
//... | ```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.Diagnostics.CodeAnalysis;
namespace osu.Framework.Extensions.ObjectExtensions
{
/// <summary>
/// Extensions that apply to all objects.
//... |
6d870356-f01d-454e-a6c7-fe00e66bc8a5 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace SFA.DAS.EmployerUsers.Api.Controllers
{
[RoutePrefix("api/status")]
public class StatusController : ApiController
{
[HttpGet, Route("")]
publi... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace SFA.DAS.EmployerUsers.Api.Controllers
{
[RoutePrefix("api/status")]
public class StatusController : ApiController
{
[Route("")]
public IHttpAc... |
ded6133b-447f-4991-b58b-276127b67c64 | {
"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.Linq;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Tournament.Screens.TeamWin;
namespace osu.Game.Tournament.Tests.Screens
{
... | ```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.Linq;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Tournament.Screens.TeamWin;
namespace osu.Game.Tournament.Tests.Screens
{
... |
04ca57be-6860-4926-8fc5-37b53f00a999 | {
"language": "C#"
} | ```c#
using Portal.CMS.Entities.Entities.Settings;
using System.Collections.Generic;
using System.Linq;
namespace Portal.CMS.Entities.Seed
{
public static class SettingSeed
{
public static void Seed(PortalEntityModel context)
{
var settingList = context.Settings.ToList();
... | ```c#
using Portal.CMS.Entities.Entities.Settings;
using System.Collections.Generic;
using System.Linq;
namespace Portal.CMS.Entities.Seed
{
public static class SettingSeed
{
public static void Seed(PortalEntityModel context)
{
var settingList = context.Settings.ToList();
... |
b56806f4-6a19-4a07-84a0-c89a8ebbd185 | {
"language": "C#"
} | ```c#
using WebApiToTypeScript.Enums;
using WebApiToTypeScript.Interfaces;
using WebApiToTypeScript.Types;
namespace WebApiToTypeScript
{
public abstract class ServiceAware
{
protected string IHaveQueryParams = WebApiToTypeScript.IHaveQueryParams;
protected string IEndpoint = WebApiToTypeScript... | ```c#
using WebApiToTypeScript.Enums;
using WebApiToTypeScript.Interfaces;
using WebApiToTypeScript.Types;
namespace WebApiToTypeScript
{
public abstract class ServiceAware
{
protected string IHaveQueryParams = WebApiToTypeScript.IHaveQueryParams;
protected string IEndpoint = WebApiToTypeScript... |
215fb1dc-28ed-41e6-9d2d-a2227e49e978 | {
"language": "C#"
} | ```c#
using System.Net;
using System.Threading.Tasks;
using FlatBuffers;
using InWorldz.Arbiter.Serialization;
using InWorldz.Chrysalis.Util;
namespace InWorldz.Chrysalis.Controllers
{
/// <summary>
/// Handles incoming requests related to geometry
/// </summary>
internal class GeometryController
... | ```c#
using System.Net;
using System.Threading.Tasks;
using FlatBuffers;
using InWorldz.Arbiter.Serialization;
using InWorldz.Chrysalis.Util;
namespace InWorldz.Chrysalis.Controllers
{
/// <summary>
/// Handles incoming requests related to geometry
/// </summary>
internal class GeometryController
... |
77b356fc-afdc-475a-9193-e1faac50d9b5 | {
"language": "C#"
} | ```c#
using System;
using ModestTree;
namespace Zenject
{
[NoReflectionBaking]
public class InstantiateCallbackConditionCopyNonLazyBinder : ConditionCopyNonLazyBinder
{
public InstantiateCallbackConditionCopyNonLazyBinder(BindInfo bindInfo)
: base(bindInfo)
{
}
... | ```c#
using System;
using ModestTree;
namespace Zenject
{
[NoReflectionBaking]
public class InstantiateCallbackConditionCopyNonLazyBinder : ConditionCopyNonLazyBinder
{
public InstantiateCallbackConditionCopyNonLazyBinder(BindInfo bindInfo)
: base(bindInfo)
{
}
... |
feafc727-68c4-4699-9557-dbae518f5ac5 | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
namespace DotNetKit.Windows.Documents
{
/// <summary>... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
namespace DotNetKit.Windows.Documents
{
/// <summary>... |
8015f0b8-0b92-4213-9390-58f036aa36dc | {
"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.Mods;
namespace osu.Game.Rulesets.Taiko.Mods
{
public class TaikoModEasy : ModEasy
{
public override string Description =>... | ```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.Mods;
namespace osu.Game.Rulesets.Taiko.Mods
{
public class TaikoModEasy : ModEasy
{
public override string Description =>... |
03b6b5d6-c2de-4d75-910c-209420ac22ae | {
"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.
namespace osu.Game.Skinning
{
public enum GlobalSkinConfiguration
{
AnimationFramerate
}
}
```
Add LayeredHitSamples skin config lookup | ```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.
namespace osu.Game.Skinning
{
public enum GlobalSkinConfiguration
{
AnimationFramerate,
LayeredHitSounds,
}
}
``` |
2ef2c47c-6ef1-4280-82db-8392beabd17c | {
"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, 11)]
[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, 10)]
[PartCreationPolicy(Creatio... |
4526cf4c-80ad-468a-b717-cde7c9d0f744 | {
"language": "C#"
} | ```c#
using System;
using AnlabMvc.Models.Roles;
using AnlabMvc.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace AnlabMvc.Controllers
{
[Authorize(Roles = RoleCodes.Admin)]
public class SystemController : ApplicationController... | ```c#
using System;
using AnlabMvc.Models.Roles;
using AnlabMvc.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace AnlabMvc.Controllers
{
[Authorize(Roles = RoleCodes.Admin)]
public class SystemController : ApplicationController... |
2c91ea15-0de5-425f-add4-d24a4c7ffaa8 | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
namespace RestfulRouting
{
public static class HtmlHelperExtensions
{
public static MvcHtmlString PutOverrideTag(this HtmlHelper html)
{
return MvcHtmlString.Create("<input type=\"hidden\" name=\"_method\" value=\"put\" />");
}
... | ```c#
using System.Web.Mvc;
using System.Web.Mvc.Html;
namespace RestfulRouting
{
public static class HtmlHelperExtensions
{
public static MvcHtmlString PutOverrideTag(this HtmlHelper html)
{
return html.Hidden("_method", "put");
}
public static MvcHtml... |
bf1bdcaa-ce9a-4d1b-b16a-a34703b96238 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
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: AssemblyTit... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
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: AssemblyTit... |
4de37e0e-8b2c-49fe-9abc-ba438441da32 | {
"language": "C#"
} | ```c#
using UnityEngine;
public class PaddleController : MonoBehaviour {
[SerializeField]
private float _speed;
[SerializeField]
private Planet _planet;
[SerializeField]
private float _orbitAngle;
[SerializeField]
private float _orbitDistance;
public enum MoveDirection {
... | ```c#
using UnityEngine;
public class PaddleController : MonoBehaviour {
[SerializeField]
private float _speed;
[SerializeField]
private Planet _planet;
[SerializeField]
private float _orbitAngle;
[SerializeField]
private float _orbitDistance;
[SerializeField, Range( -1, 1 )]
... |
88bbce72-de97-4bde-abd5-d2f1bfbc2e22 | {
"language": "C#"
} | ```c#
// Copyright 2015 SnapMD, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law... | ```c#
// Copyright 2015 SnapMD, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law... |
ae45dccd-1d01-496c-bdad-0573465fd790 | {
"language": "C#"
} | ```c#
using System.IO;
using OmniSharp.Solution;
namespace OmniSharp.Build
{
public class BuildCommandBuilder
{
private readonly ISolution _solution;
public BuildCommandBuilder(ISolution solution)
{
_solution = solution;
}
public string Executable
... | ```c#
using System.IO;
using OmniSharp.Solution;
namespace OmniSharp.Build
{
public class BuildCommandBuilder
{
private readonly ISolution _solution;
private readonly OmniSharpConfiguration _config;
public BuildCommandBuilder(
ISolution solution,
OmniSharpConfi... |
61c61e59-02c5-458f-820c-273e89fe3174 | {
"language": "C#"
} | ```c#
using System;
using SQLite;
namespace Toggl.Phoebe.Data.DataObjects
{
[Table ("Project")]
public class ProjectData : CommonData
{
public ProjectData ()
{
}
public ProjectData (ProjectData other) : base (other)
{
Name = other.Name;
Color... | ```c#
using System;
using SQLite;
namespace Toggl.Phoebe.Data.DataObjects
{
[Table ("Project")]
public class ProjectData : CommonData
{
public ProjectData ()
{
}
public ProjectData (ProjectData other) : base (other)
{
Name = other.Name;
Color... |
9aba7e7a-1d5f-4790-9e45-849d25296c4e | {
"language": "C#"
} | ```c#
using RedFolder.Models;
using RedFolder.ViewModels;
using SendGrid;
using SendGrid.Helpers.Mail;
using System.Net;
using System.Threading.Tasks;
using System.Web;
namespace RedFolder.Services
{
public class SendGridEmail : IEmail
{
private const string CONTACT_THANK_YOU_TEMPLATE = "d-b7898a39f2c... | ```c#
using RedFolder.Models;
using RedFolder.ViewModels;
using SendGrid;
using SendGrid.Helpers.Mail;
using System.Net;
using System.Threading.Tasks;
using System.Web;
namespace RedFolder.Services
{
public class SendGridEmail : IEmail
{
private const string CONTACT_THANK_YOU_TEMPLATE = "d-b7898a39f2c... |
a1503394-6760-4141-8030-007a15adeca6 | {
"language": "C#"
} | ```c#
namespace Acme.Helpers
{
/// <summary>
/// Horizontal alignment options.
/// </summary>
public enum HorizontalAlignment { Left, Right, }
public enum PagerVerticalAlignment { Top, Bottom, Both }
}
```
Refactor pagination to a common base class | ```c#
namespace Acme.Helpers
{
/// <summary>
/// Horizontal alignment options.
/// </summary>
public enum HorizontalAlignment { Left, Right, }
}
``` |
9172b649-37ca-47bd-9050-3108d362cef5 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Web;
using Nancy;
using Nancy.ErrorHandling;
namespace NancyBenchmark
{
public class Global : HttpApplication
{
protected void Application_Start()
{
}
}
}```
Set improved ThreadPool values for nancy | ```c#
using System;
using System.Collections.Generic;
using System.Web;
using Nancy;
using Nancy.ErrorHandling;
using System.Threading;
namespace NancyBenchmark
{
public class Global : HttpApplication
{
protected void Application_Start()
{
var threads = 40 * Environment.ProcessorCo... |
7bb24e0a-7da0-499d-91bf-8a8386630bce | {
"language": "C#"
} | ```c#
// Copyright (c) 2018 Sarin Na Wangkanai, All Rights Reserved.
// The Apache v2. See License.txt in the project root for license information.
namespace Wangkanai.Detection
{
public enum DeviceType
{
Desktop,
Tablet,
Mobile
}
}```
Add new type of devices | ```c#
// Copyright (c) 2018 Sarin Na Wangkanai, All Rights Reserved.
// The Apache v2. See License.txt in the project root for license information.
namespace Wangkanai.Detection
{
public enum DeviceType
{
Desktop,
Tablet,
Mobile,
Tv,
Console,
Car
}
}
``` |
c2829407-4ad0-4269-8da6-3320168149cd | {
"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 Android.App;
using osu.Game;
using osu.Game.Updater;
namespace osu.Android
{
public class OsuGameAndroid : OsuGame
{
public ov... | ```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 Android.App;
using osu.Game;
using osu.Game.Updater;
namespace osu.Android
{
public class OsuGameAndroid : OsuGame
{
public ov... |
739cd4e3-5980-41e4-a356-b124731d9ed2 | {
"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.
namespace osu.Game.Utils
{
public static class FormatUtils
{
/// <summary>
/// Turns the provided accuracy into a percentage with 2 decimal ... | ```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.
namespace osu.Game.Utils
{
public static class FormatUtils
{
/// <summary>
/// Turns the provided accuracy into a percentage with 2 decimal ... |
48e5a5bd-02fd-4d14-8669-85c8fc5a24c9 | {
"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.
namespace osu.Game.Utils
{
/// <summary>
/// Provides access to the system's power status.
/// Currently implemented on iOS and Android only.
/// </... | ```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.
namespace osu.Game.Utils
{
/// <summary>
/// Provides access to the system's power status.
/// Currently implemented on iOS and Android only.
/// </... |
f1f2cc1a-5d28-4712-8330-3451d714f82f | {
"language": "C#"
} | ```c#
using RestSharp;
using jRace.PrivateClass.Main;
Namespace Inject {
public class Inject {
file = new jRace.PrivateClass.Main();
brows = new jRace.PrivateClass.Brows();
private main() {
var browser = brows.runproc(get());
brows.getID(browser);
brows.Select(ID);
return(load... | ```c#
using RestSharp;
using jRace.PrivateClass.Main;
Namespace Inject {
public class Inject {
file = new jRace.PrivateClass.Main();
brows = new jRace.PrivateClass.Brows();
private main() {
var browser = brows.runproc(get());
var bID = brows.getID(browser());
brows.Select(bID, int);
... |
ab2aa67d-759f-4ab6-bb9b-d6a8bc10d678 | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
using System.Threading.Tasks;
using PortableWordPressApi;
namespace ApiConsole
{
class Program
{
static void Main(string[] args)
{
Task.WhenAll(AsyncMain());
Console.WriteLine("Press any key to close.");
Console.Read();
}
private static async Task AsyncM... | ```c#
using System;
using System.Net.Http;
using System.Threading.Tasks;
using PortableWordPressApi;
namespace ApiConsole
{
class Program
{
static void Main(string[] args)
{
Task.WaitAll(AsyncMain());
Console.WriteLine("Press any key to close.");
Console.Read();
}
private static async Task AsyncM... |
dc798bb4-3b68-4b37-99b9-dc7dd6de6b72 | {
"language": "C#"
} | ```c#
using System;
using System.ServiceModel;
namespace Nvents.Services.Network
{
[ServiceBehavior(
InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple)]
public class EventService : IEventService
{
public event EventHandler<EventPublishedEventArgs> EventPubl... | ```c#
using System;
using System.ServiceModel;
using System.Threading;
namespace Nvents.Services.Network
{
[ServiceBehavior(
InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple)]
public class EventService : IEventService
{
public event EventHandler<EventPubl... |
abc809a8-2196-4d7a-b7c9-bbfc143bad49 | {
"language": "C#"
} | ```c#
using Android.App;
using Android.Widget;
using Android.OS;
namespace MatXiTest.Droid
{
[Activity(Label = "MatXiTest", MainLauncher = true, Icon = "@mipmap/icon")]
public class MainActivity : Activity
{
int count = 1;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedI... | ```c#
using Android.App;
using Android.Widget;
using Android.OS;
using System.Security.Cryptography;
namespace MatXiTest.Droid
{
[Activity(Label = "MatXiTest", MainLauncher = true, Icon = "@mipmap/icon")]
public class MainActivity : Activity
{
int count = 1;
protected override void OnCreate(Bundle savedInstan... |
47132de9-821d-4628-ba82-08e07e71d9b7 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Android.Content;
namespace Plugin.FirebasePushNotification
{
[BroadcastReceiver]
public class PushNotificationDeletedReceiver : BroadcastReceiver
{
public override void OnReceive(Context context, Intent intent)
{
IDictionary<string,... | ```c#
using System.Collections.Generic;
using Android.Content;
namespace Plugin.FirebasePushNotification
{
[BroadcastReceiver(Enabled = true, Exported = false)]
public class PushNotificationDeletedReceiver : BroadcastReceiver
{
public override void OnReceive(Context context, Intent intent)
... |
49ea8958-5d24-4199-8628-e1af8284b407 | {
"language": "C#"
} | ```c#
using System;
namespace FezEngine.Structure {
public class Level {
public static bool IsNoFlat = false;
public bool orig_get_Flat() {
return false;
}
public bool get_Flat() {
return orig_get_Flat() || !IsNoFlat;
}
}
}
```
Fix logic fa... | ```c#
using System;
namespace FezEngine.Structure {
public class Level {
public static bool IsNoFlat = false;
public bool orig_get_Flat() {
return false;
}
public bool get_Flat() {
return orig_get_Flat() && !IsNoFlat;
}
}
}
``` |
7f63f45c-070f-415e-9eb0-ee563166234a | {
"language": "C#"
} | ```c#
@{
ViewBag.Title = "Er is iets fout gegaan";
}
<div id="top"></div>
<div class="row">
<div class="col-lg-4 col-md-3 col-sm-2 col-xs-2"></div>
<div class="col-lg-4 col-md-6 col-sm-8 col-xs-8">
<div class="panel panel-default dark">
<div class="panel-heading">
<h1... | ```c#
@{
ViewBag.Title = "Er is iets fout gegaan";
}
<div id="top"></div>
<div class="row">
<div class="col-lg-4 col-md-3 col-sm-2 col-xs-2"></div>
<div class="col-lg-4 col-md-6 col-sm-8 col-xs-8">
<div class="panel panel-default dark">
<div class="panel-heading">
<h1... |
264a8a9d-2acc-49c8-9ee4-a374f6972b5e | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Windows;
using System.Windows.Forms;
using EnvDTE;
using MessageBox = System.Windows.Forms.MessageBox;
namespace Twainsoft.SolutionRenamer.VSPackage.GUI
{
public partial class RenameProjectDialog
{
private Project CurrentProject { get; set; }
... | ```c#
using System;
using System.IO;
using System.Windows;
using System.Windows.Forms;
using EnvDTE;
using MessageBox = System.Windows.Forms.MessageBox;
namespace Twainsoft.SolutionRenamer.VSPackage.GUI
{
public partial class RenameProjectDialog
{
private Project CurrentProject { get; set; }
... |
a4dcba79-0001-42c9-98a7-ce6ae12967ff | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CreviceApp.Core.Config
{
public class UserInterfaceConfig
{
public Func<Point, Point> TooltipPositionBinding;
pu... | ```c#
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CreviceApp.Core.Config
{
public class UserInterfaceConfig
{
public Func<Point, Point> TooltipPositionBinding;
pu... |
bd3ad6a3-3145-439f-8575-925200eca759 | {
"language": "C#"
} | ```c#
//
// Copyright 2019 Google LLC
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache Licens... | ```c#
//
// Copyright 2019 Google LLC
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache Licens... |
99f9da5a-87d4-421b-8110-73d647a97e40 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Stripe.Infrastructure;
namespace Stripe
{
public class StripeEphemeralKeyService : StripeService
{
public StripeEphemeralKeyService(string apiKey = null) : base(apiKey) { }
//Sync
publ... | ```c#
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Stripe.Infrastructure;
namespace Stripe
{
public class StripeEphemeralKeyService : StripeBasicService<StripeEphemeralKey>
{
public StripeEphemeralKeyService(string apiKey = null) : base(apiKey) { }
... |
0eb4dde0-41f3-40c0-b843-b96843a7bde4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LevelManager : MonoBehaviour {
public EnemySpaceShip enemy;
public void SetupLevel() {
LayoutObject();
}
private void LayoutObject() {
Instantiate(enemy, new Vector3(9f, 0... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LevelManager : MonoBehaviour {
public EnemySpaceShip enemy;
public PlayerSpaceShip player;
public void SetupLevel() {
LayoutObject();
}
private void LayoutObject() {
I... |
ad5fd027-861d-4ce0-bf59-1ff0547cf944 | {
"language": "C#"
} | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-ge... | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-ge... |
b418eab8-d0b7-4c89-b52e-d2e49e5c7a04 | {
"language": "C#"
} | ```c#
using System.Web.Http;
namespace Nora
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
confi... | ```c#
using System.Web.Http;
namespace Nora
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.... |
4090f32d-3933-4da4-8f81-88c3445c0aa9 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Experimental.Responses
{
using Exceptions;
using System.Collections.Generic;
public class TraktListResponse<TContentType> : ATraktResponse<List<TContentType>>, ITraktResponseHeaders
{
public string SortBy { get; set; }
public string SortHow { get; set; }
... | ```c#
namespace TraktApiSharp.Experimental.Responses
{
using Exceptions;
using System.Collections;
using System.Collections.Generic;
public class TraktListResponse<TContentType> : ATraktResponse<List<TContentType>>, ITraktResponseHeaders, IEnumerable<TContentType>
{
public string SortBy { ... |
19d5afe0-411a-4471-b381-ab8d7d6f428e | {
"language": "C#"
} | ```c#
// © Alexander Kozlenko. Licensed under the MIT License.
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
using Serilog;
using Serilog.Events;
namespace Anemonis.MicrosoftOffice.AddinHost.Middleware
{
/// <summary>Represents request tr... | ```c#
// © Alexander Kozlenko. Licensed under the MIT License.
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
using Serilog;
using Serilog.Events;
namespace Anemonis.MicrosoftOffice.AddinHost.Middleware
{
/// <summary>Represents request tr... |
1a18d3f7-997c-407b-93d9-52634c686396 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Reflection;
using Shouldly;
using Xunit;
namespace libpolyglot.Tests
{
public class Assembly_tests
{
public static IEnumerable<object[]> TestAssemblies()
{
yield return new object[] { "EmptyVB.dll", Language.Vb };
yie... | ```c#
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Shouldly;
using Xunit;
namespace libpolyglot.Tests
{
public class Assembly_tests
{
public static IEnumerable<object[]> TestAssemblies()
{
yield return new object[] { "EmptyVB.dll", Language.Vb }... |
b162b45e-c3d2-4195-8c53-fb9c81689b62 | {
"language": "C#"
} | ```c#
namespace Prometheus.HttpExporter.AspNetCore.HttpRequestCount
{
public class HttpRequestCountOptions : HttpExporterOptionsBase
{
public Counter Counter { get; set; } =
Metrics.CreateCounter(DefaultName, DefaultHelp, HttpRequestLabelNames.All);
private const string Defa... | ```c#
namespace Prometheus.HttpExporter.AspNetCore.HttpRequestCount
{
public class HttpRequestCountOptions : HttpExporterOptionsBase
{
public Counter Counter { get; set; } =
Metrics.CreateCounter(DefaultName, DefaultHelp, HttpRequestLabelNames.All);
private const string Defa... |
1030a114-49fd-4250-a3b8-90ced9d4fd74 | {
"language": "C#"
} | ```c#
using System;
namespace Gma.QrCodeNet.Encoding.Positioning.Stencils
{
internal abstract class PatternStencilBase : BitMatrix
{
protected const bool O = false;
protected const bool X = true;
internal PatternStencilBase(int version)
{
Version = version;
}
public int Version { get; private set; }... | ```c#
using System;
namespace Gma.QrCodeNet.Encoding.Positioning.Stencils
{
internal abstract class PatternStencilBase : BitMatrix
{
protected const bool O = false;
protected const bool X = true;
internal PatternStencilBase(int version)
{
Version = version;
}
public int Version { get; private set; }... |
09778167-ba5a-4420-a087-7baef8d80818 | {
"language": "C#"
} | ```c#
namespace HelixToolkit.Wpf.SharpDX
{
using System;
using System.Collections.Generic;
using HelixToolkit.SharpDX.Shared.Utilities;
[Serializable]
public class PointGeometry3D : Geometry3D
{
public IEnumerable<Geometry3D.Point> Points
{
get
... | ```c#
namespace HelixToolkit.Wpf.SharpDX
{
using System;
using System.Collections.Generic;
using HelixToolkit.SharpDX.Shared.Utilities;
[Serializable]
public class PointGeometry3D : Geometry3D
{
public IEnumerable<Geometry3D.Point> Points
{
get
... |
d2a0b26e-d39b-412d-ba44-34941e561efe | {
"language": "C#"
} | ```c#
using NadekoBot.Services.Database.Models;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace NadekoBot.Services.Database.Repositories.Impl
{
public class QuoteRepository : Repository<Quote>, IQuoteRepository
{
public ... | ```c#
using NadekoBot.Services.Database.Models;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace NadekoBot.Services.Database.Repositories.Impl
{
public class QuoteRepository : Repository<Quote>, IQuoteRepository
{
public ... |
8c86e7e4-7668-420e-b7a6-5f9eca93925b | {
"language": "C#"
} | ```c#
using System;
using System.ServiceModel;
using Service;
namespace Client
{
class Program
{
static void Main(string[] args)
{
var address = new EndpointAddress(new Uri("http://localhost:9000/MyService"));
var binding = new BasicHttpBinding();
var facto... | ```c#
using System;
using System.ServiceModel;
using Service;
namespace Client
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter server address: ");
var hostAddress = Console.ReadLine();
var address = new EndpointAddress(new Uri(stri... |
1a5ce49e-e585-4cf7-aa7c-100593eed53d | {
"language": "C#"
} | ```c#
using System;
namespace XeroApi.Model
{
public class BankTransaction : EndpointModelBase
{
[ItemId]
public Guid? BankTransactionID { get; set; }
public Account BankAccount { get; set; }
public string Type { get; set; }
public string Reference { get;... | ```c#
using System;
namespace XeroApi.Model
{
public class BankTransaction : EndpointModelBase
{
[ItemId]
public Guid? BankTransactionID { get; set; }
public Account BankAccount { get; set; }
public string Type { get; set; }
public string Reference { get;... |
4a6f3e7c-aed6-4fe9-9b16-083cc0178a1a | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using TddCourse.CalculatorExample;
namespace TddCourse.Tests.Unit.Part08_ParameterizedTests
{
public class Parameterized_Range
{
[Test]
public void Divide_DividendIsZero_ReturnsQuotientEqualToZero(
[Range(@from: 1, to: 5, step: 1)] double divisor)
... | ```c#
using NUnit.Framework;
using TddCourse.CalculatorExample;
namespace TddCourse.Tests.Unit.Part08_ParameterizedTests
{
public class Parameterized_Range
{
[Test]
public void Divide_DividendIsZero_ReturnsQuotientEqualToZero(
[Range(@from: 1, to: 5, step: 1)] int divisor)
{... |
347c0d65-7201-4b94-9f97-300b85154b28 | {
"language": "C#"
} | ```c#
using System;
using JetBrains.ReSharper.Plugins.Yaml.Psi.Tree;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.ExtensionsAPI.Tree;
using JetBrains.ReSharper.Psi.Parsing;
using JetBrains.ReSharper.Psi.Tree;
using JetBrains.Text;
using JetBrains.Util;
namespace JetBrains.ReSharper.Plugins.Yaml.Psi.Pa... | ```c#
using System;
using JetBrains.ReSharper.Plugins.Yaml.Psi.Tree;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.ExtensionsAPI.Tree;
using JetBrains.ReSharper.Psi.Parsing;
using JetBrains.ReSharper.Psi.Tree;
using JetBrains.Text;
using JetBrains.Util;
namespace JetBrains.ReSharper.Plugins.Yaml.Psi.Pa... |
0ad2c1d6-c49b-4705-a90b-a7c8cd1087f7 | {
"language": "C#"
} | ```c#
using System;
using Foundatio.Serializer;
using Microsoft.Extensions.Logging;
namespace Foundatio {
public class SharedOptions {
public ISerializer Serializer { get; set; }
public ILoggerFactory LoggerFactory { get; set; }
}
public class SharedOptionsBuilder<TOption, TBuilder> : Opti... | ```c#
using System;
using Foundatio.Serializer;
using Microsoft.Extensions.Logging;
namespace Foundatio {
public class SharedOptions {
public ISerializer Serializer { get; set; }
public ILoggerFactory LoggerFactory { get; set; }
}
public class SharedOptionsBuilder<TOption, TBuilder> : Opti... |
7b1ca2a3-2271-4bf3-a644-1590c4f1ea18 | {
"language": "C#"
} | ```c#
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
namespace WhoaAlgebraic
{
public class ScoreManager : MonoBehaviour
{
public static int score; // The player's score.
Text text; // Reference to the Text component.
void Awake()
... | ```c#
using UnityEngine;
using UnityEngine.UI;
namespace WhoaAlgebraic
{
public class ScoreManager : MonoBehaviour
{
public static int score; // The player's score.
public Text text; // Reference to the Text component.
void Awake()
{
... |
c273320e-4c22-4bb4-8229-9434e9b1c081 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.ServiceModel;
using System.ServiceModel.Web;
namespace Samples.Glitter
{
[ServiceContract]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
... | ```c#
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.ServiceModel;
using System.ServiceModel.Web;
namespace Samples.Glitter
{
[ServiceContract]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
... |
74eab4fa-126b-4c8d-b92b-d1d709ab1f5f | {
"language": "C#"
} | ```c#
using System;
using ClrSpy.Native;
using NUnit.Framework;
namespace ClrSpy.UnitTests.Native
{
[TestFixture]
public class PointerUtilsTests
{
[TestCase(0x07fffffffL, Int32.MaxValue)]
[TestCase(0x080000000L, Int32.MinValue)]
[TestCase(0x000000001L, 1)]
[Test... | ```c#
using System;
using System.Collections.Generic;
using ClrSpy.Native;
using NUnit.Framework;
namespace ClrSpy.UnitTests.Native
{
[TestFixture]
public class PointerUtilsTests
{
public static IEnumerable<LongToIntPtrCase> LongToIntPtrCases
{
get
{
... |
7612b03f-aa00-4331-8743-275866ae5def | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Text;
using JetBrains.Util;
using JetBrains.Util.Logging;
namespace JetBrains.ReSharper.Plugins.Unity.Yaml.Psi
{
public static class UnityFileSystemPathExtension
{
private static readonly ILogger ourLogger = Logger.GetLogger("UnityFileSystemPathExtensio... | ```c#
using JetBrains.Util;
namespace JetBrains.ReSharper.Plugins.Unity.Yaml.Psi
{
public static class UnityFileSystemPathExtension
{
public static bool SniffYamlHeader(this FileSystemPath sourceFile)
{
var isYaml = sourceFile.ReadBinaryStream(reader =>
{
... |
531aca7d-b1d3-4789-b30a-5099c57d7a98 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System.Collections.Generic;
namespace RepoZ.Api.Common.Git
{
public class RepositoryActionConfiguration
{
[JsonProperty("repository-actions")]
public List<RepositoryAction> RepositoryActions { get; set; } = new List<RepositoryAction>();
[JsonProperty("file... | ```c#
using Newtonsoft.Json;
using System.Collections.Generic;
namespace RepoZ.Api.Common.Git
{
public class RepositoryActionConfiguration
{
[JsonProperty("repository-actions")]
public List<RepositoryAction> RepositoryActions { get; set; } = new List<RepositoryAction>();
[JsonProperty("file... |
97f6da2a-2c68-4097-af4b-5754844893d2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace NServiceMVC.Examples.Todomvc
{
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace NServiceMVC.Examples.Todomvc
{
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801
... |
0c8d651c-51f0-480d-b135-949b2277af49 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
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: AssemblyTitl... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
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("... |
93bb23b0-4fcd-4d47-8537-457e4c776dbf | {
"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.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transforms;
namespace osu.Game.Graphics.Sprites
{
public clas... | ```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.Graphics.Sprites;
namespace osu.Game.Graphics.Sprites
{
public class OsuSpriteText : SpriteText
{
public OsuSpriteText()
... |
2e62163e-4f3e-4001-8fba-953c70b27d47 | {
"language": "C#"
} | ```c#
#region
using System.Diagnostics;
using System.IO;
using DesktopWidgets.Classes;
#endregion
namespace DesktopWidgets.Helpers
{
internal static class ProcessHelper
{
public static void Launch(string path, string args = "", string startIn = "",
ProcessWindowStyle style = ProcessWindo... | ```c#
#region
using System.Diagnostics;
using System.IO;
using DesktopWidgets.Classes;
#endregion
namespace DesktopWidgets.Helpers
{
internal static class ProcessHelper
{
public static void Launch(string path, string args = "", string startIn = "",
ProcessWindowStyle style = ProcessWindo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.