doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
6601bec0-6f55-4e74-9526-e48a31aeb79b | {
"language": "C#"
} | ```c#
using EasyRabbitMQ.Configuration;
using RabbitMQ.Client;
namespace EasyRabbitMQ.Infrastructure
{
internal class ConnectionFactory : IConnectionFactory
{
private readonly IConfiguration _configuration;
public ConnectionFactory(IConfiguration configuration)
{
_configur... | ```c#
using EasyRabbitMQ.Configuration;
using RabbitMQ.Client;
namespace EasyRabbitMQ.Infrastructure
{
internal class ConnectionFactory : IConnectionFactory
{
private readonly IConfiguration _configuration;
private const string ClientProvidedName = "EasyRabbitMQ";
public ConnectionFac... |
0371eb5c-53ae-46b9-8b25-807c056e5009 | {
"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.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Configuration;
using osu.Framework.Platform;
namespace os... | ```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.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Configuration;
using osu.Framework.Platform;
namespace os... |
8f49b3bd-3351-49fd-ae2c-444ee4fb7d80 | {
"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... |
45324b2d-6ade-4eca-9d72-7f40fa753715 | {
"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 System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics.UserInterface.Tab;
using OpenTK;
namespace osu... | ```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 System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics.UserInterface.Tab;
using OpenTK;
namespace osu... |
843fc441-5593-4624-aaee-9cd7376acd58 | {
"language": "C#"
} | ```c#
@using Microsoft.Web.Mvc
@model CRP.Controllers.ViewModels.PaymentConfirmationViewModel
@{
ViewBag.Title = "Confirmation";
}
<div class="boundary">
<h2>Registration Confirmation</h2>
<p>You have successfully registered for the following event:</p>
<div>
<label>Item: </label>
@Mo... | ```c#
@using Microsoft.Web.Mvc
@model CRP.Controllers.ViewModels.PaymentConfirmationViewModel
@{
ViewBag.Title = "Confirmation";
}
<div class="boundary">
<h2>Registration Confirmation</h2>
<p>You have successfully registered for the following event:</p>
<div>
<label>Item: </label>
@Mo... |
e41d1657-3f98-407a-8fe3-25c7a81adf18 | {
"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 Microsoft.AspNet.Mvc.OptionDescriptors;
using Microsoft.Framework.Dependen... | ```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 Microsoft.AspNet.Mvc.OptionDescriptors;
using Microsoft.Framework.Dependen... |
39dc8d84-090b-4ec0-a209-32995039a673 | {
"language": "C#"
} | ```c#
#define DEBUG_COMMANDS
//using UnityEditor;
//using UnityEngine;
//using System.Collections;
using System.Diagnostics;
public class ShellHelpers {
public static Process StartProcess(string filename, string arguments) {
#if DEBUG_COMMANDS
UnityEngine.Debug.Log("Running: " + filename + " " + arguments);
#end... | ```c#
//define DEBUG_COMMANDS
using System.Diagnostics;
public class ShellHelpers {
public static Process StartProcess(string filename, string arguments) {
#if DEBUG_COMMANDS
UnityEngine.Debug.Log("Running: " + filename + " " + arguments);
#endif
Process p = new Process();
p.StartInfo.Arguments = argumen... |
0086d5de-eb07-44a6-b518-f2dd3cc79cab | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using Basic.Swagger;
namespace Basic.Controllers
{
[SwaggerTag("Manipulate Carts to your heart's content", "http://www.tempuri.org")]
public class SwaggerAnnotationsController
{
[HttpPost("/carts")]
[SwaggerRes... | ```c#
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using Basic.Swagger;
namespace Basic.Controllers
{
[SwaggerTag("Manipulate Carts to your heart's content", "http://www.tempuri.org")]
public class SwaggerAnnotationsController
{
[HttpPost("/carts")]
[SwaggerRes... |
01a1dc49-e8de-4427-ab78-c609996b38d5 | {
"language": "C#"
} | ```c#
using System.Reflection;
// 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("CakeMail.RestClient")]
[assembly: AssemblyDescription("CakeMail.RestClien... | ```c#
using System.Reflection;
// 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("CakeMail.RestClient")]
[assembly: AssemblyDescription("CakeMail.RestClien... |
65fc7a4c-5f29-4fe4-863a-3be06e1c0b27 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Bartender;
using ConsoleApplication.Registries;
using CoreApplication.Domain.Personne.Create;
using CoreApplication.Domain.Personne.Read;
using StructureMap;
namespace ConsoleApplication
{
public class Program
{
static IContainer Container { get;... | ```c#
using System;
using System.Threading.Tasks;
using Bartender;
using ConsoleApplication.Registries;
using CoreApplication.Domain.Personne.Create;
using CoreApplication.Domain.Personne.Read;
using StructureMap;
namespace ConsoleApplication
{
public class Program
{
static IContainer Container { get;... |
9c9b3c32-04d7-4cc2-b76e-86b1d492d4b8 | {
"language": "C#"
} | ```c#
using System.IO;
using Microsoft.Extensions.Logging;
using OmniSharp.MSBuild.ProjectFile;
using TestUtility;
using Xunit;
using Xunit.Abstractions;
namespace OmniSharp.MSBuild.Tests
{
public class ProjectFileInfoTests
{
private readonly TestAssets _testAssets;
private readonly ILogger _l... | ```c#
using System.IO;
using Microsoft.Extensions.Logging;
using OmniSharp.MSBuild.ProjectFile;
using TestUtility;
using Xunit;
using Xunit.Abstractions;
namespace OmniSharp.MSBuild.Tests
{
public class ProjectFileInfoTests
{
private readonly TestAssets _testAssets;
private readonly ILogger _l... |
6abc1418-8903-41de-93ef-1a7da2a00c16 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using ServiceBase.Configuration;
using System;
using System.IO;
using ServiceBase.Extensions;
namespace IdentityBase.Public
{
public class Program
{
public static void Main(string[] ... | ```c#
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using ServiceBase.Configuration;
using ServiceBase.Extensions;
using System;
using System.IO;
namespace IdentityBase.Public
{
public class Program
{
public static void Main(string[] ... |
97aaf6c9-69f0-4a43-8731-5c239eadca26 | {
"language": "C#"
} | ```c#
using jab.Attributes;
using NSwag;
using Xunit;
using System.Linq;
namespace jab
{
public class TestExample
{
[Theory, ParameterisedClassData(typeof(ApiOperations), "samples/example.json")]
public void DeleteMethodsShouldNotTakeFormEncodedData(
SwaggerService service,
... | ```c#
using jab.Attributes;
using NSwag;
using Xunit;
using System.Linq;
namespace jab
{
public partial class TestExample
{
const string testDefinition = "samples/example.json";
[Theory, ParameterisedClassData(typeof(ApiOperations), testDefinition)]
public void DeleteMethodsShouldNotT... |
b2a8f8de-15f3-488c-9469-d9a0e028ac73 | {
"language": "C#"
} | ```c#
using System.Windows.Input;
namespace clipman.Settings
{
public static class Keyboard
{
public static Key ClearTextboxKey = Key.Escape;
}
}
```
Add global keyboard shortcut listener | ```c#
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Windows.Input;
using System.Windows.Interop;
namespace clipman.Settings
{
public static class Keyboard
{
public static Key ClearTextboxKey = Key.Escape;
}
public class KeyboardMonitor : ID... |
b2d5177a-6d5b-4f63-aff4-f413ab8c40cf | {
"language": "C#"
} | ```c#
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
namespace StyleCop.Analyzers.Test
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.R... | ```c#
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
namespace StyleCop.Analyzers.Test
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.R... |
9906dc9e-18d6-4ec5-bd68-8185e1ed9add | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using Xunit;
using Should;
using Timer = SlackConnector.Connections.Monitoring.Timer;
namespace SlackConnector.Tests.Unit.Connections.Monitoring
{
public class TimerTests
{
[Fact]
public void should_run_task_at_least_5_times()
{
/... | ```c#
using System;
using System.Threading;
using Xunit;
using Should;
using Timer = SlackConnector.Connections.Monitoring.Timer;
namespace SlackConnector.Tests.Unit.Connections.Monitoring
{
public class TimerTests
{
[Fact]
public void should_run_task_at_least_5_times()
{
/... |
980972f2-ea9f-4292-aafe-63e5d91635c7 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using TimeLog.Api.Core.Documentation.Models.RestDocumentationHelpers.Core;
namespace TimeLog.Api.Core.Documentation.Models.RestDocumentationHelpers
{
public class RestMethodDoc
{
#region Variables
public IReadOnlyList<RestResponse> Re... | ```c#
using System.Collections.Generic;
using System.Linq;
using TimeLog.Api.Core.Documentation.Models.RestDocumentationHelpers.Core;
namespace TimeLog.Api.Core.Documentation.Models.RestDocumentationHelpers
{
public class RestMethodDoc
{
#region Variables
public IReadOnlyList<RestResponse> Re... |
7e5019bb-42eb-4dd9-b195-448436873bc9 | {
"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.Shapes;
namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations
{
/// <summary>
... | ```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.Shapes;
namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations
{
/// <summary>
... |
54dc97b9-d274-4c15-8552-d246c7267e49 | {
"language": "C#"
} | ```c#
using System;
using System.Buffers;
namespace Dbus
{
internal static class ExtensionMethods
{
public static void Dump(this ReadOnlySequence<byte> buffers)
{
foreach (var segment in buffers)
{
var buffer = segment.Span;
dump(buffer);... | ```c#
using System;
using System.Buffers;
namespace Dbus
{
internal static class ExtensionMethods
{
public static void Dump(this ReadOnlySequence<byte> buffers)
{
var counter = 0;
foreach (var segment in buffers)
{
var buffer = segment.Span;
... |
9b1d4c09-51be-4426-ae01-bcf7b389ed69 | {
"language": "C#"
} | ```c#
/* Copyright 2015 Realm Inc - All Rights Reserved
* Proprietary and Confidential
*/
using System.IO;
using NUnit.Framework;
using Realms;
namespace IntegrationTests.Shared
{
[TestFixture]
public class AccessTests
{
protected string _databasePath;
protected Realm _realm;
[... | ```c#
/* Copyright 2015 Realm Inc - All Rights Reserved
* Proprietary and Confidential
*/
using System.IO;
using NUnit.Framework;
using Realms;
namespace IntegrationTests.Shared
{
[TestFixture]
public class AccessTests
{
protected string _databasePath;
protected Realm _realm;
[... |
b10bcbfc-e98f-4156-adf0-9bde444864dc | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System.Collections.Generic;
namespace SurveyMonkey.Containers
{
[JsonConverter(typeof(TolerantJsonConverter))]
public class QuestionDisplayOptionsCustomOptions
{
public List<string> OptionSet { get; set; }
public int StartingPosition { get; set; }
... | ```c#
using Newtonsoft.Json;
using System.Collections.Generic;
namespace SurveyMonkey.Containers
{
[JsonConverter(typeof(TolerantJsonConverter))]
public class QuestionDisplayOptionsCustomOptions
{
public List<string> OptionSet { get; set; }
public int StartingPosition { get; set; }
... |
2ed1a5d9-c023-4104-9066-19af825b9de3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation.Language;
namespace Microsoft.PowerShell.EditorServices
{
internal class PesterDocumentSymbolProvider : DocumentSymbolProvider
{
protected override bool CanProvideFor(ScriptFile scriptFile)
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation.Language;
namespace Microsoft.PowerShell.EditorServices
{
internal class PesterDocumentSymbolProvider : DocumentSymbolProvider
{
protected override bool CanProvideFor(ScriptFile scriptFile)
... |
b89df622-65ef-406d-a0d0-ace6ff253333 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
namespace SteamIrcBot
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main( stri... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Reflection;
using System.IO;
namespace SteamIrcBot
{
static class Program
{
/// <summary>
/// The main entry point for the application.
//... |
c80c63a4-282c-4210-94db-156dfac48862 | {
"language": "C#"
} | ```c#
using System;
namespace MK.Ext
{
/// <summary>
/// DateTime Json Extensions
/// </summary>
public static class DateTimeJsonExt
{
private static readonly DateTime D1970_01_01 = new DateTime(1970, 1, 1);
public static string JsonValue(this DateTime d)
{
return "( new Date(" + System.Convert.ToInt64((... | ```c#
using System;
namespace MK.Ext
{
/// <summary>
/// DateTime Json Extensions
/// </summary>
public static class DateTimeJsonExt
{
private static readonly DateTime D1970_01_01 = new DateTime(1970, 1, 1);
public static string JsonValue(this DateTime d)
{
return "( new Date(" + ((d.Ticks - D1970_01_01.... |
96b2c68e-86af-4dd9-94ca-7bc7cbb4a02d | {
"language": "C#"
} | ```c#
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="assets/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" media="screen">
<!-- HTML... | ```c#
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Sweet Water Revolver</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="assets/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" media="screen">
<!-- HTML5 ... |
b74adf7a-0a90-4a41-ab26-8058593dc728 | {
"language": "C#"
} | ```c#
using AutoMapper;
using BusinessEntities;
using BusinessEntities.Dictionaries;
using DataModel;
using DataModel.Dictionaries;
namespace BLL.Mapping
{
public class AutomapperProfile : Profile
{
public AutomapperProfile()
{
CreateMap<Animal, AnimalEntity>();
CreateMap<Council, CouncilEnti... | ```c#
using AutoMapper;
using BusinessEntities;
using BusinessEntities.Dictionaries;
using DataModel;
using DataModel.Dictionaries;
namespace BLL.Mapping
{
public class AutomapperProfile : Profile
{
public AutomapperProfile()
{
CreateMap<Animal, AnimalEntity>();
CreateMap<Council, CouncilEnti... |
f9e6ab58-fa8a-4523-8230-534de262501a | {
"language": "C#"
} | ```c#
@using CarFuel.Models
@model Car
<h2>@Model.Make (@Model.Model)</h2>
<div class="well well-sm">
Average consumption is <strong>@(Model.AverageKmL?.ToString("n2"))</strong> km/L
</div>```
Add Message if AvgKmL is null | ```c#
@using CarFuel.Models
@model Car
<h2>@Model.Make (@Model.Model)</h2>
<div class="well well-sm">
@if (Model.AverageKmL == null)
{
<div>
Not has enough data to calculate consumption rate.
Please add more fill up.
</div>
}
Average consumption is <strong>@(Mo... |
1db10189-ad70-4fa6-bd0a-69c174c009eb | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using PlanEatSave.Models;
using PlanEatSave.Utils;
namespace PlanEatSave.DataAceessLayer
{
public class PantryService
{
private ApplicationDbContext _context;
private IPlanEatSaveLogger _lo... | ```c#
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using PlanEatSave.Models;
using PlanEatSave.Utils;
namespace PlanEatSave.DataAceessLayer
{
public class PantryService
{
private ApplicationDbContext _context;
private IPlanEatSaveLogger _lo... |
da201133-b4f6-461c-95a7-303cff665053 | {
"language": "C#"
} | ```c#
namespace ElectronNET.API.Entities
{
/// <summary>
///
/// </summary>
public class Data
{
/// <summary>
/// Gets or sets the text.
/// </summary>
/// <value>
/// The text.
/// </value>
public string Text { get; set; }
/// <summ... | ```c#
namespace ElectronNET.API.Entities
{
/// <summary>
///
/// </summary>
public class Data
{
/// <summary>
/// Gets or sets the text.
/// </summary>
/// <value>
/// The text.
/// </value>
public string Text { get; set; }
/// <summ... |
eb8c542f-87ce-44b9-9ecb-266c68ec5ccd | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(VRSubjectController))]
public class VRSubjectInspector : Editor
{
VRSubjectController instance;
public override void OnInspectorGUI()
{
instance =... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(VRSubjectController))]
public class VRSubjectInspector : Editor
{
VRSubjectController instance;
public override void OnInspectorGUI()
{
instance =... |
13272243-ab58-43fe-accc-ddfee4883667 | {
"language": "C#"
} | ```c#
using System.Text;
namespace TweetDck.Plugins{
static class PluginScriptGenerator{
public static string GenerateConfig(PluginConfig config){
return config.AnyDisabled ? "window.TD_PLUGINS.disabled = [\""+string.Join("\",\"", config.DisabledPlugins)+"\"];" : string.Empty;
}
... | ```c#
using System.Text;
namespace TweetDck.Plugins{
static class PluginScriptGenerator{
public static string GenerateConfig(PluginConfig config){
return config.AnyDisabled ? "window.TD_PLUGINS.disabled = [\""+string.Join("\",\"", config.DisabledPlugins)+"\"];" : string.Empty;
}
... |
e31c9df3-3a8f-44d8-beae-47776aebbca9 | {
"language": "C#"
} | ```c#
@{
ViewBag.Title = "Registreer je vandaag bij de Oogstplanner";
}
<div class="flowtype-area">
<!-- START RESPONSIVE RECTANGLE LAYOUT -->
<!-- Top bar -->
<div id="top">
<h1>Registreer je vandaag bij de Oogstplanner</h1>
</div>
<!-- Fixed main screen -->
<div id="login" class="bg imglogin">
<!... | ```c#
@{
ViewBag.Title = "Registreer je vandaag bij de Oogstplanner";
}
<div class="flowtype-area">
<!-- START RESPONSIVE RECTANGLE LAYOUT -->
<!-- Top bar -->
<div id="top">
</div>
<!-- Fixed main screen -->
<div id="login" class="bg imglogin">
<div class="row">
<div class="mainbox col-md-12 col-sm-12 col... |
34af49f3-33e1-4434-909a-d01eee3b65ff | {
"language": "C#"
} | ```c#
using UnityEngine;
namespace LiteNetLibManager
{
[System.Serializable]
public class LiteNetLibScene
{
[SerializeField]
private Object sceneAsset;
[SerializeField]
private string sceneName = string.Empty;
public string SceneName
{
get { ret... | ```c#
using UnityEngine;
namespace LiteNetLibManager
{
[System.Serializable]
public struct LiteNetLibScene
{
[SerializeField]
private Object sceneAsset;
[SerializeField]
private string sceneName;
public string SceneName
{
get { return sceneName;... |
52d418f0-4af2-42ae-8910-b09119c89084 | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Threading.Tasks;
using Abp.AspNetCore.Mvc.Extensions;
using Abp.Authorization;
using Abp.Dependency;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc.Filters;
namespace Abp.AspNetCore.Mvc.Authorization
{
public class AbpAuthorizationFilter : IAsyncAuth... | ```c#
using System.Linq;
using System.Threading.Tasks;
using Abp.AspNetCore.Mvc.Extensions;
using Abp.Authorization;
using Abp.Dependency;
using Microsoft.AspNetCore.Mvc.Authorization;
using Microsoft.AspNetCore.Mvc.Filters;
namespace Abp.AspNetCore.Mvc.Authorization
{
//TODO: Register only actions which define A... |
f464307e-7b89-4d29-9ad4-784be76a9125 | {
"language": "C#"
} | ```c#
using System;
using Gtk;
using Castle.ActiveRecord.Framework.Config;
using Castle.ActiveRecord;
using HumanRightsTracker.Models;
namespace HumanRightsTracker
{
class MainClass
{
public static void Main (string[] args)
{
XmlConfigurationSource config = new XmlConfigurationSource("Config/ARConfig.xml");
... | ```c#
using System;
using System.Reflection;
using Gtk;
using Castle.ActiveRecord.Framework.Config;
using Castle.ActiveRecord;
using HumanRightsTracker.Models;
namespace HumanRightsTracker
{
class MainClass
{
public static void Main (string[] args)
{
XmlConfigurationSource config = new XmlConfigurationSource(... |
380cb2ef-58e3-4a8a-9be0-53933ece8ec0 | {
"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 osu.Framework.Graphics;
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Objects.Drawabl... | ```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 osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Ma... |
235d76d4-35b5-4218-94bc-2e91f86c0e36 | {
"language": "C#"
} | ```c#
using Autofac;
using Autofac.Integration.Mvc;
using Raven.Client;
using Raven.Client.Document;
namespace Compilify.Web.Infrastructure.DependencyInjection
{
public class RavenDbModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.Regist... | ```c#
using Autofac;
using Autofac.Integration.Mvc;
using Raven.Client;
using Raven.Client.Document;
namespace Compilify.Web.Infrastructure.DependencyInjection
{
public class RavenDbModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.Regist... |
427ad106-1711-4210-ba0d-551eaf595e5c | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using SFA.DAS.EmployerUsers.WebClientComponents;
namespace SFA.DAS.EmployerUsers.Web.Controllers
{
public class HomeController : ControllerBase
{
public ActionResult Index()
{
return View();
}
public ActionResult CatchAll(str... | ```c#
using System;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Web.Mvc;
using Microsoft.Azure;
using SFA.DAS.EmployerUsers.WebClientComponents;
namespace SFA.DAS.EmployerUsers.Web.Controllers
{
public class HomeController : ControllerBase
{
public A... |
4b7c4f11-e6f9-4d97-825c-bf3dabcef4e2 | {
"language": "C#"
} | ```c#
using System;
namespace HelloServer
{
class MainClass
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
```
Add basic hello server version | ```c#
using System;
using System.Threading.Tasks;
using Grpc.Core;
using Hello;
namespace HelloServer
{
class HelloServerImpl : HelloService.HelloServiceBase
{
// Server side handler of the SayHello RPC
public override Task<HelloResp> SayHello(HelloReq request, ServerCallContext context)
{
return Task.From... |
110f732d-535c-473e-b38e-d1807db8b761 | {
"language": "C#"
} | ```c#
using PluginContracts;
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace LAN
{
public class LANInterface : IPluginV1
{
public string Name { get; } = "LAN";
public string Description { get; } = "LAN communication interface ... | ```c#
using PluginContracts;
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace LAN
{
public class LANInterface : IPluginV1
{
public string Name { get; } = "LAN";
public string Description { get; } = "LAN commu... |
06e01050-0e8a-4510-b238-ea86cfd7f858 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using DotVVM.Framework.Controls;
using DotVVM.Framework.Hosting;
using Newtonsoft.Json;
namespace DotVVM.Framework.ResourceManagement
{
/// <summary>
/// CSS in header. It's perfect for critical CSS.
/// </summary>
public class InlineStylesheetResource : ResourceBas... | ```c#
using System;
using System.IO;
using DotVVM.Framework.Controls;
using DotVVM.Framework.Hosting;
using Newtonsoft.Json;
namespace DotVVM.Framework.ResourceManagement
{
/// <summary>
/// CSS in header. It's perfect for small css. For example critical CSS.
/// </summary>
public class InlineStyleshee... |
199b5636-7621-4c53-9382-0f1bf6694198 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace LearnosityDemo
{
public class Program
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace LearnosityDemo
{
public static class Program
{
... |
b06fc5b7-a4e2-4dc0-aecb-775436fb758f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace DesktopWidgets.WidgetBase.Settings
{
public class WidgetClockSettingsBase : WidgetSettingsBase
{
protected WidgetClockSettingsBase()
{
Style.FontSettings.FontSize = 24;
}
[... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace DesktopWidgets.WidgetBase.Settings
{
public class WidgetClockSettingsBase : WidgetSettingsBase
{
protected WidgetClockSettingsBase()
{
Style.FontSettings.FontSize = 24;
}
[... |
739c0d13-16b4-40b2-97b4-8406d7248676 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Net.Http;
namespace Octokit.Internal
{
public class Request : IRequest
{
public Request()
{
Headers = new Dictionary<string, string>();
Parameters = new Dictionary<string, string>();
AllowAut... | ```c#
using System;
using System.Collections.Generic;
using System.Net.Http;
namespace Octokit.Internal
{
public class Request : IRequest
{
public Request()
{
Headers = new Dictionary<string, string>();
Parameters = new Dictionary<string, string>();
AllowAut... |
ae3756a9-b11d-4161-8359-14fa97809736 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using System.Xml;
namespace PROProtocol
{
public class Language
{
private const string FileName = "Resources/Lang.xml";
private Dictionary<string, string> _texts = new Dictionary<string, string>();
public Language()... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
namespace PROProtocol
{
public class Language
{
private class DescendingLengthComparer : IComparer<string>
{
public int Compare(string x, string y)
{
in... |
e797c0dc-986c-4e49-8096-aba9dfe7a55d | {
"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... |
252942a7-8a04-4dca-866f-c6e5d26a219a | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel.Composition;
using System.Text;
using NVika.Abstractions;
using NVika.Parsers;
namespace NVika.BuildServers
{
internal sealed class GitHub : BuildServerBase
{
private readonly IEnvironment _environment;
[ImportingConstructor]
internal Git... | ```c#
using System;
using System.ComponentModel.Composition;
using System.Text;
using NVika.Abstractions;
using NVika.Parsers;
namespace NVika.BuildServers
{
internal sealed class GitHub : BuildServerBase
{
private readonly IEnvironment _environment;
[ImportingConstructor]
internal Git... |
f39e3fd1-264c-4467-81aa-2be198861063 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace AppHarbor
{
public class TypeNameMatcher<T>
{
private readonly IEnumerable<Type> _candidateTypes;
public TypeNameMatcher(IEnumerable<Type> candidateTypes)
{
if (candidateTypes.Any(x => !typeof(T).IsAssignableFrom(x)))
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace AppHarbor
{
public class TypeNameMatcher<T>
{
private readonly IEnumerable<Type> _candidateTypes;
public TypeNameMatcher(IEnumerable<Type> candidateTypes)
{
if (candidateTypes.Any(x => !typeof(T).IsAssignableFrom(x)))
{
... |
582c459c-35e8-4db9-8e79-d9c1bd5b5d83 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using JetBrains.ReSharper.Feature.Services.LiveTemplates.Scope;
using JetBrains.ReSharper.Plugins.Unity.ShaderLab.ProjectModel;
using JetBrains.ReSharper.Plugins.Unity.ShaderLab.Psi;
using JetBrains.ReSharper.Psi;
namespace JetBrains.ReSharper.Plugins.Unity.Featur... | ```c#
using System;
using System.Collections.Generic;
using JetBrains.ReSharper.Feature.Services.LiveTemplates.Scope;
using JetBrains.ReSharper.Plugins.Unity.ShaderLab.ProjectModel;
using JetBrains.ReSharper.Plugins.Unity.ShaderLab.Psi;
using JetBrains.ReSharper.Psi;
namespace JetBrains.ReSharper.Plugins.Unity.Featur... |
85d31af7-89bd-4e3a-b85d-2a25345a58e4 | {
"language": "C#"
} | ```c#
using System.Drawing;
using System.Globalization;
namespace ClosedXML.Utils
{
internal static class ColorStringParser
{
public static Color ParseFromHtml(string htmlColor)
{
try
{
if (htmlColor[0] != '#')
htmlColor = '#' + htmlC... | ```c#
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
namespace ClosedXML.Utils
{
internal static class ColorStringParser
{
public static Color ParseFromHtml(string htmlColor)
{
try
{
if (htmlColor[0] == '#' &... |
e4efa3b0-2075-42fb-8430-2c4a457b8353 | {
"language": "C#"
} | ```c#
using System;
namespace Glimpse.Agent.Web
{
public interface IIgnoredRequestPolicy
{
bool ShouldIgnore(IContext context);
}
}```
Update context that is passed through | ```c#
using System;
using Glimpse.Web;
namespace Glimpse.Agent.Web
{
public interface IIgnoredRequestPolicy
{
bool ShouldIgnore(IHttpContext context);
}
}``` |
6992d7f9-11ec-4db9-b38c-888de0883645 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MainCamera : MonoBehaviour {
public GameObject cursor;
private IEnumerator currentMove;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
//this.transfor... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MainCamera : MonoBehaviour {
public GameObject cursor;
private IEnumerator currentMove;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
//this.transfor... |
78ce8598-430b-4796-b385-fce941a92a04 | {
"language": "C#"
} | ```c#
// This file is Part of CalDavSynchronizer (http://outlookcaldavsynchronizer.sourceforge.net/)
// Copyright (c) 2015 Gerhard Zehetbauer
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software ... | ```c#
// This file is Part of CalDavSynchronizer (http://outlookcaldavsynchronizer.sourceforge.net/)
// Copyright (c) 2015 Gerhard Zehetbauer
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software ... |
643602e8-6a50-4933-9cb7-de683c068f53 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class GUIBehavior : MonoBehaviour {
public Texture barTexture;
public wolf wolfData;
public int boxWidth = 34;
public int boxHeight = 30;
void OnGUI () {
//Print the bar
GUI.Box (new Rect(Screen.width - barTexture.width - 18,10,barTexture.width + ... | ```c#
using UnityEngine;
using System.Collections;
public class GUIBehavior : MonoBehaviour {
public Texture barTexture;
public wolf wolfData;
public int boxWidth = 34;
public int boxHeight = 30;
void OnGUI () {
//Print the bar
GUI.Box (new Rect(Screen.width - barTexture.width - 18,10,barTexture.width + ... |
2ff85fcb-b2cf-498f-a72e-34215128311d | {
"language": "C#"
} | ```c#
using ConDep.Dsl.SemanticModel;
using ConDep.Dsl.SemanticModel.WebDeploy;
using Microsoft.Web.Deployment;
namespace ConDep.Dsl.Operations.Application.Execution.RunCmd
{
public class RunCmdProvider : WebDeployProviderBase
{
private const string NAME = "runCommand";
public RunCmdProvider(str... | ```c#
using ConDep.Dsl.SemanticModel;
using ConDep.Dsl.SemanticModel.WebDeploy;
using Microsoft.Web.Deployment;
namespace ConDep.Dsl.Operations.Application.Execution.RunCmd
{
public class RunCmdProvider : WebDeployProviderBase
{
private const string NAME = "runCommand";
public RunCmdProvider(str... |
f5a34788-a15c-480c-8653-eba0aed05b88 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using MBEV = Microsoft.Build.Evaluation;
using MBEX = Microsoft.Build.Execution;
namespace MSBuildTracer
{
class ImportTracer
{
private MBEV.... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using MBEV = Microsoft.Build.Evaluation;
using MBEX = Microsoft.Build.Execution;
namespace MSBuildTracer
{
class ImportTracer
{
private MBEV.... |
a676915c-87a9-468f-8942-0ad84a1ac2cf | {
"language": "C#"
} | ```c#
//
// NSUrlConnection.cs:
// Author:
// Miguel de Icaza
//
using System;
using System.Reflection;
using System.Collections;
using System.Runtime.InteropServices;
using MonoMac.ObjCRuntime;
namespace MonoMac.Foundation {
public partial class NSUrlConnection {
static Selector selSendSynchrono... | ```c#
//
// NSUrlConnection.cs:
// Author:
// Miguel de Icaza
//
using System;
using System.Reflection;
using System.Collections;
using System.Runtime.InteropServices;
using MonoMac.ObjCRuntime;
namespace MonoMac.Foundation {
public partial class NSUrlConnection {
static Selector selSendSynchrono... |
e8af8f9f-ca2b-41e9-8b26-af86bc8d8819 | {
"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.Beatmaps
{
/// <summary>
/// The type of countdown shown before the start of gameplay on a given beatmap.
/// </summary>
public e... | ```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.ComponentModel;
namespace osu.Game.Beatmaps
{
/// <summary>
/// The type of countdown shown before the start of gameplay on a given beatmap.
... |
48b27654-831f-47aa-850e-3179a4f72500 | {
"language": "C#"
} | ```c#
using System;
using O365.Security.ETW;
namespace hiddentreasure_etw_demo
{
public static class RemoteThreadInjection
{
public static UserTrace CreateTrace()
{
var filter = new EventFilter(Filter
.EventIdIs(3));
filter.OnEvent += (IEventRecord r) =... | ```c#
using System;
using O365.Security.ETW;
namespace hiddentreasure_etw_demo
{
public static class RemoteThreadInjection
{
public static UserTrace CreateTrace()
{
var filter = new EventFilter(Filter
.EventIdIs(3));
filter.OnEvent += (IEventRecord r) =... |
d74b0eb6-837a-4481-981c-83338d991c4f | {
"language": "C#"
} | ```c#
using BruTile.Predefined;
using BruTile.Web;
using Mapsui.Layers;
namespace Mapsui.Utilities
{
public static class OpenStreetMap
{
private const string DefaultUserAgent = "Default Mapsui user-agent";
private static readonly BruTile.Attribution OpenStreetMapAttribution = new BruTile.Attri... | ```c#
using BruTile.Predefined;
using BruTile.Web;
using Mapsui.Layers;
namespace Mapsui.Utilities
{
public static class OpenStreetMap
{
private const string DefaultUserAgent = "Default Mapsui user-agent";
private static readonly BruTile.Attribution OpenStreetMapAttribution = new BruTile.Attri... |
7b26ef01-7e06-4913-8f08-0488d9650463 | {
"language": "C#"
} | ```c#
using PubNubMessaging.Core;
using System;
using Utf8Json;
namespace BitFlyer.Apis
{
public class RealtimeApi
{
private readonly Pubnub _pubnub;
public RealtimeApi()
{
_pubnub = new Pubnub("nopublishkey", BitFlyerConstants.SubscribeKey);
}
public void... | ```c#
using PubNubMessaging.Core;
using System;
using System.Text;
using Utf8Json;
namespace BitFlyer.Apis
{
public class RealtimeApi
{
private readonly Pubnub _pubnub;
public RealtimeApi()
{
_pubnub = new Pubnub("nopublishkey", BitFlyerConstants.SubscribeKey);
}
... |
9ed9b405-493d-40de-8056-3d33d217d900 | {
"language": "C#"
} | ```c#
namespace Poller.Data
{
using Microsoft.AspNet.Identity.EntityFramework;
using Models;
using Migrations;
using System.Data.Entity;
public class PollerDb : IdentityDbContext<ApplicationUser>
{
public PollerDb()
: base("PollerDbConnection", throwIfV1Schema: false)
... | ```c#
namespace Poller.Data
{
using Microsoft.AspNet.Identity.EntityFramework;
using Models;
using Migrations;
using System.Data.Entity;
public class PollerDb : IdentityDbContext<ApplicationUser>
{
public PollerDb()
: base("PollerD", throwIfV1Schema: false)
{
... |
cbbb206c-716e-4d6d-bf21-06689bef533a | {
"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;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"F")]
F,
[Description(@"D")]
... | ```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;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"F")]
F,
[Description(@"F")]
... |
406d3039-4a43-4c41-9fd9-d830e6171a14 | {
"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... |
f84f17ed-ffb7-42a0-9b11-76d33790617c | {
"language": "C#"
} | ```c#
using System;
using System.Data.Entity;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace NoteFolder.Models {
public class FileDbContext : DbContext {
public DbSet<File> Files { get; set; }
}
public class File {
public int ID { get; set; }
public string Name { get; set; ... | ```c#
using System;
using System.Data.Entity;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace NoteFolder.Models {
public class FileTestInit : DropCreateDatabaseAlways<FileDbContext> {
protected override void Seed(FileDbContext db) {
var docs = new File { Name = "Documents", Desc... |
075e5884-3472-4c4b-be15-48ee4b158f9e | {
"language": "C#"
} | ```c#
namespace Prometheus.HttpMetrics
{
public sealed class HttpRequestDurationOptions : HttpMetricsOptionsBase
{
private const string DefaultName = "http_request_duration_seconds";
private const string DefaultHelp =
"Provides the duration in seconds of HTTP requests from an ASP.NE... | ```c#
namespace Prometheus.HttpMetrics
{
public sealed class HttpRequestDurationOptions : HttpMetricsOptionsBase
{
private const string DefaultName = "http_request_duration_seconds";
private const string DefaultHelp =
"Provides the duration in seconds of HTTP requests from an ASP.NE... |
f01abe50-c8d7-4367-b1b0-624da11e269e | {
"language": "C#"
} | ```c#
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// =====================... | ```c#
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// =====================... |
52d65a33-5a0a-42e5-b747-c3254a9b264b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PX.Data;
using PX.SM.BoxStorageProvider;
using PX.Common;
public partial class Pages_SM_SM202670 : System.Web.UI.Page
{
protected void Page_Load(object sender, Eve... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PX.Data;
using PX.SM.BoxStorageProvider;
using PX.Common;
public partial class Pages_SM_SM202670 : System.Web.UI.Page
{
protected void Page_Load(object sender, Eve... |
adca15df-810c-492b-8eac-531efe709477 | {
"language": "C#"
} | ```c#
using System.IO;
namespace Cassette.BundleProcessing
{
public abstract class ParseReferences<T> : IBundleProcessor<T>
where T : Bundle
{
public void Process(T bundle)
{
foreach (var asset in bundle.Assets)
{
if (ShouldParseAsset(... | ```c#
using System.IO;
namespace Cassette.BundleProcessing
{
public abstract class ParseReferences<T> : IBundleProcessor<T>
where T : Bundle
{
public void Process(T bundle)
{
foreach (var asset in bundle.Assets)
{
if (ShouldParseAsset(... |
55f752a1-b8d9-46eb-8e40-91b13e31ad43 | {
"language": "C#"
} | ```c#
using Consola.Library;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tests.Scriptables
{
public class Progeny : Scriptable
{
[Description("Simple Name Field")]
public string Name { get; set; }
}
}
```
Up... | ```c#
using Consola.Library;
using Consola.Library.util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tests.Scriptables
{
public class Progeny : Scriptable
{
[Description("Simple Name Field")]
public string Name {... |
8d234060-d385-4f54-a84a-c595f6385c6b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
namespace CompetitionPlatform
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder(... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
namespace CompetitionPlatform
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder(... |
b34007fe-ab77-46fb-adf9-0dbc9fbc0083 | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="StringExtensions.cs" company="Catel development team">
// Copyright (c) 2008 - 2015 Catel development team. All rights reserved.
// </copyright>
// -----------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="StringExtensions.cs" company="Catel development team">
// Copyright (c) 2008 - 2015 Catel development team. All rights reserved.
// </copyright>
// -----------------------... |
3cfe6d3a-cab8-4cf3-9049-e7a655a1cb85 | {
"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.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;... | ```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.Framework.Graphics.Shapes;
using osu.Game.Graphics;... |
d241ea42-6003-48bb-a32f-b972e13a6275 | {
"language": "C#"
} | ```c#
using Orders.com.Web.Api.Filters;
using System.Web.Http;
namespace Orders.com.Web.Api
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
GlobalConfiguration.Configuration.DependencyRes... | ```c#
using Orders.com.Web.Api.Filters;
using System.Web.Http;
namespace Orders.com.Web.Api
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
GlobalConfiguration.Configuration.DependencyRes... |
4465992c-11d8-41d1-9e7e-b4629d737622 | {
"language": "C#"
} | ```c#
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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://w... | ```c#
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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://w... |
76901fc1-cf0f-4982-9213-59be6375664a | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using System.Text.RegularExpressions;
using System.Text;
using transf.Log;
namespace transf
{
class Program
{
/// <summary>
/// Prompts for a nickname until a valid nickname is found.
/// </summary>
/// <returns>The vali... | ```c#
using System;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using System.Text.RegularExpressions;
using System.Text;
using transf.Log;
namespace transf
{
class Program
{
/// <summary>
/// Prompts for a nickname until a valid nickname is found.
/// </summary>
/// <returns>The vali... |
3beb4296-182d-407a-8eeb-ffacf8544ea6 | {
"language": "C#"
} | ```c#
using Gtk;
using NLog;
using SlimeSimulation.Controller.WindowController.Templates;
namespace SlimeSimulation.View.WindowComponent.SimulationControlComponent
{
internal class GrowthPhaseControlBox : AbstractSimulationControlBox
{
private static readonly Logger Logger = LogManager.GetCurrentClassL... | ```c#
using Gtk;
using NLog;
using SlimeSimulation.Controller.WindowController.Templates;
namespace SlimeSimulation.View.WindowComponent.SimulationControlComponent
{
internal class GrowthPhaseControlBox : AbstractSimulationControlBox
{
private static readonly Logger Logger = LogManager.GetCurrentClassL... |
f31feae4-9532-4ae1-ac1b-ee902e7971fe | {
"language": "C#"
} | ```c#
@model IPagedList<MMLibrarySystem.Models.BookListController.BookListItem>
@{
ViewBag.Title = "Book List";
}
@using (Ajax.BeginForm(new AjaxOptions()
{
HttpMethod = "GET",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "bookListContainer"
}))
{
<fieldset style="border:1px solid ... | ```c#
@model IPagedList<MMLibrarySystem.Models.BookListController.BookListItem>
@{
ViewBag.Title = "Book List";
}
@using (Ajax.BeginForm(new AjaxOptions()
{
HttpMethod = "GET",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "bookListContainer"
}))
{
<fieldset style="border:1px solid ... |
1530a7fd-ba2a-4b80-9b03-c81f0178ca7a | {
"language": "C#"
} | ```c#
using System.Diagnostics;
namespace GOALWorker
{
public static class LightNotifier
{
//TODO: Jared Implement call to each light here for their team
public static void NotifyLightsForTeam(string teamname)
{
Trace.TraceInformation("GOALWorker is Sending Light Request fo... | ```c#
using System.Diagnostics;
using System.Net;
using System.Text;
using System.IO;
namespace GOALWorker
{
public static class LightNotifier
{
//TODO: Jared Implement call to each light here for their team
public static void NotifyLightsForTeam(string teamname)
{
Trace.Tr... |
e0c94230-9a0e-4971-82be-d5421c3ce2d1 | {
"language": "C#"
} | ```c#
@model Tigwi.UI.Models.IAccountModel
@{
ViewBag.Title = "ShowAccount";
}
@section LeftInfos
{
<p>Oh Hai @Model.Name</p>
@if(User.Identity.IsAuthenticated)
{
@Html.Partial("_FollowPerson", Model)
@Html.Partial("_AccountFollowedPublicLists", Model)
}
}
... | ```c#
@model Tigwi.UI.Models.IAccountModel
@{
ViewBag.Title = "ShowAccount";
}
@section LeftInfos
{
<h3>@Model.Name</h3>
<p>@Model.Description</p>
@if(User.Identity.IsAuthenticated)
{
@Html.Partial("_FollowPerson", Model)
@Html.Partial("_AccountFollowedPubl... |
b0f7206a-e978-4b4c-9893-f1893d51a3e6 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace PublicHolidays.Test
{
[TestClass]
public class PublicHolidaysApiTest
{
[TestMethod]
public void TestGet()
{
var holidays = JpPublicHolidays.PublicHolidays.Get().Result;
... | ```c#
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace PublicHolidays.Test
{
[TestClass]
public class PublicHolidaysApiTest
{
[TestMethod]
public async Task TestGet()
{
var holidays = await JpPu... |
65e817e5-2a51-4c61-9c7c-2e731c791dba | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PKMDS_CS;
namespace PKMDS_Save_Editor
{
public partial class frmMain : Form
{
public frmMain()
{
... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PKMDS_CS;
namespace PKMDS_Save_Editor
{
public partial class frmMain : Form
{
public frmMain()
{
... |
cf62ac9e-f89b-41a2-9c4a-6a4a8ec443a8 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _db... | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _db... |
84ae4c51-a978-419e-a03d-fdd9017adcf7 | {
"language": "C#"
} | ```c#
public class BuildVersion
{
public GitVersion GitVersion { get; private set; }
public string Version { get; private set; }
public string Milestone { get; private set; }
public string SemVersion { get; private set; }
public string GemVersion { get; private set; }
public string VsixVersion {... | ```c#
public class BuildVersion
{
public GitVersion GitVersion { get; private set; }
public string Version { get; private set; }
public string Milestone { get; private set; }
public string SemVersion { get; private set; }
public string GemVersion { get; private set; }
public string VsixVersion {... |
b01118d6-2400-4b17-beb4-5394601056f3 | {
"language": "C#"
} | ```c#
@model string
<div class="container">
<form action="/" method="POST">
<div class="control-group">
<div class="controls controls-row">
<div class="input-prepend">
<span class="add-on">Ask me</span>
<input id="query" name="query" clas... | ```c#
@model string
<div class="container">
<form action="/" method="POST">
<div class="control-group">
<div class="controls controls-row">
<div class="input-prepend">
<span class="add-on">Ask me</span>
<input id="query" name="query" clas... |
6ef8a459-860d-4d6a-9fb4-81088e220d17 | {
"language": "C#"
} | ```c#
using System;
namespace WpfMath.Utils
{
internal static class Result
{
public static Result<TValue> Ok<TValue>(TValue value) => new Result<TValue>(value, null);
public static Result<TValue> Error<TValue>(Exception error) => new Result<TValue>(default, error);
}
internal readonly ... | ```c#
using System;
namespace WpfMath.Utils
{
internal static class Result
{
public static Result<TValue> Ok<TValue>(TValue value) => new Result<TValue>(value, null);
public static Result<TValue> Error<TValue>(Exception error) => new Result<TValue>(default, error);
}
internal readonly ... |
ef4432f8-fc05-4417-bfb7-a15b702e8a3a | {
"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.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Obje... | ```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.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Obje... |
0bc77c0a-521c-45ae-b8d9-52dbcc426396 | {
"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.
#nullable disable
using System;
using NUnit.Framework;
using osu.Framework.Graphics.Containers;
using osu.Framework.Tests.Visual;
namespace osu.Framework.Tests.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.
#nullable disable
using System;
using NUnit.Framework;
using osu.Framework.Graphics.Containers;
using osu.Framework.Tests.Visual;
namespace osu.Framework.Tests.C... |
d63165ce-9576-4783-a9a4-b600adbbb92a | {
"language": "C#"
} | ```c#
// Copyright 2021 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
namespace Nuke.Common.Utilities
{
public static partial class StringExtensions
{
private static readonly string[] KnownWords =
{
"DotNet",
... | ```c#
// Copyright 2021 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
namespace Nuke.Common.Utilities
{
public static partial class StringExtensions
{
private static readonly string[] KnownWords =
{
"DotNet",
... |
d22f688d-70ab-4192-9383-cdd7a7c05616 | {
"language": "C#"
} | ```c#
/*
** Project ShiftDrive
** (C) Mika Molenkamp, 2016.
*/
using Microsoft.Xna.Framework;
namespace ShiftDrive {
/// <summary>
/// A <seealso cref="GameObject"/> representing a single asteroid.
/// </summary>
internal sealed class Asteroid : GameObject {
public Asteroid() {
... | ```c#
/*
** Project ShiftDrive
** (C) Mika Molenkamp, 2016.
*/
using System;
using Microsoft.Xna.Framework;
namespace ShiftDrive {
/// <summary>
/// A <seealso cref="GameObject"/> representing a single asteroid.
/// </summary>
internal sealed class Asteroid : GameObject {
private float angu... |
63173ea3-a390-427d-92cc-0aee4afe51aa | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Text;
using Microsoft.Azure.Jobs.Host.Bindings;
using Microsoft.ServiceBus.Messaging;
namespace Microsoft.Azure.Jobs.ServiceBus.Triggers
{
internal class BrokeredMessageValueProvider : IValueProvider
{
private readonly object _value;
private re... | ```c#
using System;
using System.IO;
using System.Text;
using Microsoft.Azure.Jobs.Host.Bindings;
using Microsoft.ServiceBus.Messaging;
namespace Microsoft.Azure.Jobs.ServiceBus.Triggers
{
internal class BrokeredMessageValueProvider : IValueProvider
{
private readonly object _value;
private re... |
4db17367-86a3-4ce0-a8c8-70d3174e6572 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Objects.Get.Shows
{
using Basic;
using Newtonsoft.Json;
/// <summary>
/// A collection of images for a Trakt show.
/// </summary>
public class TraktShowImages
{
/// <summary>
/// A fanart image set for various sizes.
/// </summary>
... | ```c#
namespace TraktApiSharp.Objects.Get.Shows
{
using Basic;
using Newtonsoft.Json;
/// <summary>A collection of images and image sets for a Trakt show.</summary>
public class TraktShowImages
{
/// <summary>Gets or sets the fan art image set.</summary>
[JsonProperty(PropertyName ... |
8df14025-485d-4a1a-9fa2-177af72f686a | {
"language": "C#"
} | ```c#
using System;
public class Hangman {
public static void Main(string[] args) {
Console.WriteLine("Hello, World!");
Console.WriteLine("You entered the following {0} command line arguments:",
args.Length );
for (int i=0; i < args.Length; i++) {
Console.WriteLine("{0}", args[i]);
}
... | ```c#
using System;
using Table;
public class Hangman {
public static void Main(string[] args) {
Console.WriteLine("Hello, World!");
Console.WriteLine("You entered the following {0} command line arguments:",
args.Length );
for (int i=0; i < args.Length; i++) {
Console.WriteLine("{0}", args... |
fe8e343b-dadc-4298-8c35-3b2ea995dd5b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PhotoLife.Services
{
class VotingService
{
}
}
```
Add vote method to voting service | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PhotoLife.Data.Contracts;
using PhotoLife.Factories;
using PhotoLife.Models;
using PhotoLife.Services.Contracts;
namespace PhotoLife.Services
{
public class VotingService
{
p... |
dfa3abe7-c411-4e4b-beeb-d345c70cde06 | {
"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("PogoLocationFeeder")]
[assembly: A... | ```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("PogoLocationFeeder")]
[assembly: A... |
a7b6e8d3-c863-4cf2-b104-96e948b1cd96 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using Microsoft.Build.Evaluation;
using NuGet.Extensions.MSBuild;
using NuGet.Extensions.Tests.TestData;
using NUnit.Framework;
namespace NuGet.Extensions.Tests.MSBuild
{
[TestFixture]
public class ProjectAdapterTests
{
[Test]
public void ProjectWithD... | ```c#
using System;
using System.Linq;
using Microsoft.Build.Evaluation;
using NuGet.Extensions.MSBuild;
using NuGet.Extensions.Tests.TestData;
using NUnit.Framework;
namespace NuGet.Extensions.Tests.MSBuild
{
[TestFixture]
public class ProjectAdapterTests
{
private const string _expectedBinaryDep... |
cdc539c4-4cee-4914-966b-b46405399285 | {
"language": "C#"
} | ```c#
using System;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
namespace SamplesButtonMadness
{
public partial class AppDelegate : NSApplicationDelegate
{
TestWindowController mainWindowController;
public AppDelegate ()
{
}
public override void Finish... | ```c#
using System;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
namespace SamplesButtonMadness
{
public partial class AppDelegate : NSApplicationDelegate
{
TestWindowController mainWindowController;
public AppDelegate ()
{
}
public override void Finish... |
788e6ae7-e162-4987-80ee-6782364bf0ae | {
"language": "C#"
} | ```c#
using System;
namespace SurveyMonkey.RequestSettings
{
public class GetSurveyListSettings : IPagingSettings
{
public enum SortByOption
{
Title,
DateModified,
NumResponses
}
public enum SortOrderOption
{
ASC,
... | ```c#
using System;
namespace SurveyMonkey.RequestSettings
{
public class GetSurveyListSettings : IPagingSettings
{
public enum SortByOption
{
Title,
DateModified,
NumResponses
}
public enum SortOrderOption
{
ASC,
... |
b450c677-c534-48f8-9fbf-7759a727bc7d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace BabbyJotz {
public partial class WebViewPage : ContentPage {
public WebViewPage(string title, Func<Task<string>> htmlFunc) {
InitializeComponent();
Title = title;
... | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace BabbyJotz {
public partial class WebViewPage : ContentPage {
public WebViewPage(string title, Func<Task<string>> htmlFunc) {
InitializeComponent();
Title = title;
... |
cc29f9e5-c823-4d50-b5f2-72a95db1642b | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Xml.Serialization;
namespace XeroApi.Model
{
public abstract class EndpointModelBase : ModelBase
{
}
public abstract class ModelBase
{
[XmlAttribute("status")]
public ValidationStatus ValidationStatus
{
... | ```c#
using System.Collections.Generic;
using System.Xml.Serialization;
namespace XeroApi.Model
{
public abstract class EndpointModelBase : ModelBase
{
}
public abstract class ModelBase : IModelBase
{
[XmlAttribute("status")]
public ValidationStatus ValidationStatus
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.