doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
c84b9bae-f356-4a2e-8bfd-303bf191dfb5 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using ValveKeyValue;
namespace GUI.Utils
{
internal static class Settings
{
public class AppConfig
{
public List<string> GameSearchPaths { get; set; } = new List<string>();
public string Back... | ```c#
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using ValveKeyValue;
namespace GUI.Utils
{
internal static class Settings
{
public class AppConfig
{
public List<string> GameSearchPaths { get; set; } = new List<string>();
public string Back... |
bb25253c-47f0-450b-abf5-cc802c06b3cd | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using downr.Services;
using Microsoft.AspNetCore.Mvc;
namespace downr.Controllers
{
public class HomeController : Controller
{
IYamlIndexer _indexer;
public HomeController(IYamlIndexer indexer)
{
_indexer = indexer;
}
... | ```c#
using System;
using System.Linq;
using downr.Services;
using Microsoft.AspNetCore.Mvc;
namespace downr.Controllers
{
public class HomeController : Controller
{
IYamlIndexer _indexer;
public HomeController(IYamlIndexer indexer)
{
_indexer = indexer;
}
... |
81fd6818-a176-433b-84ca-5bbe1546f714 | {
"language": "C#"
} | ```c#
<div class="sticky-notes">
<div class="sticky-note">
<i class="pin"></i>
<div class="content green">
<h1>
GC Handicapping System
</h1>
<p>
New <a href="/disciplines/golf-croquet/resources">GC Handicapping System</a> comes int... | ```c#
<div class="sticky-notes">
<div class="sticky-note">
<i class="pin"></i>
<div class="content green">
<h1>
GC Handicapping System
</h1>
<p>
New <a href="/disciplines/golf-croquet/resources">GC Handicapping System</a> came into... |
35d5d1e9-b1ef-4981-9b20-0c858c75667a | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.LanguageServer.CustomProtocol;
using Newtonsoft.Json.Linq;
using Roslyn.T... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.LanguageServer.CustomProtocol;
using Newtonsoft.Json.Linq;
using Roslyn.T... |
c5843b41-2294-41da-8c97-12c5946e547d | {
"language": "C#"
} | ```c#
using Loupe.Extensibility;
using Loupe.Extensibility.Client;
namespace Loupe.Extension.Export
{
/// <summary>
/// Top-level class for integrating with the Loupe framework
/// </summary>
[LoupeExtension(ConfigurationEditor = typeof(ExportConfigurationDialog),
MachineConfiguration = typeof... | ```c#
using Loupe.Extensibility;
using Loupe.Extensibility.Client;
namespace Loupe.Extension.Export
{
/// <summary>
/// Top-level class for integrating with the Loupe framework
/// </summary>
[LoupeExtension(ConfigurationEditor = typeof(ExportConfigurationDialog),
CommonConfiguration = typeof(... |
d8292751-5aa0-43dd-a508-e6b820ac4b13 | {
"language": "C#"
} | ```c#
using Microsoft.PowerShell.EditorServices.Session;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Event;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Message;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Response;
using Nito.AsyncEx;
using System.Threading.Tasks;
namespace M... | ```c#
using Microsoft.PowerShell.EditorServices.Session;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Event;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Message;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Response;
using Microsoft.PowerShell.EditorServices.Utility;
using Nito.... |
12a4bb71-e848-4396-bb80-85d1dfed4ade | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Cors;
namespace CORS.Controllers
{
public class ValuesController : ApiController
{
// GET api/values
public IEnumerable<string> Get()
{
return new string[] { "This is a CORS requ... | ```c#
using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Cors;
namespace CORS.Controllers
{
public class ValuesController : ApiController
{
// GET api/values
public IEnumerable<string> Get()
{
return new string[] { "This is a CORS requ... |
18edeb35-6b5d-434e-aaa0-257a324d3330 | {
"language": "C#"
} | ```c#
using System;
using System.Text;
namespace Manos.Server {
public interface IHttpResponse {
IHttpTransaction Transaction {
get;
}
HttpHeaders Headers {
get;
}
HttpResponseStream Stream {
get;
}
Encoding Encoding {
get;
}
int StatusCode {
get;
set;
}
bool WriteStat... | ```c#
using System;
using System.IO;
using System.Text;
namespace Manos.Server {
public interface IHttpResponse {
IHttpTransaction Transaction {
get;
}
HttpHeaders Headers {
get;
}
HttpResponseStream Stream {
get;
}
StreamWriter Writer {
get;
}
Encoding Encoding {
get;
}
... |
7d7d55dc-0e05-4fd3-8847-c1a018c28c87 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Giles.Core.Configuration
{
[Serializable]
public class Filter
{
public Filter() { }
public Filter(string convertToFilter)
{
foreach (var entry in FilterLookUp.Where(entry => convertToFilt... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Giles.Core.Configuration
{
[Serializable]
public class Filter
{
public Filter() { }
public Filter(string convertToFilter)
{
foreach (var entry in FilterLookUp.Where(entry => convertToFilt... |
df364e9d-5d1e-4338-8ef2-dd1d2c7c0a13 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MVCLibraryManagementSystem.Controllers
{
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
return View... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MVCLibraryManagementSystem.Controllers
{
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
return View();
}... |
af5b98f5-9ac5-4b69-8f2b-c4c3363ea6f1 | {
"language": "C#"
} | ```c#
using System;
using System.Windows;
using System.Windows.Controls;
using vmPing.Classes;
namespace vmPing.Views
{
/// <summary>
/// Interaction logic for IsolatedPingWindow.xaml
/// </summary>
public partial class IsolatedPingWindow : Window
{
private int SelStart = 0;
privat... | ```c#
using System;
using System.Windows;
using System.Windows.Controls;
using vmPing.Classes;
namespace vmPing.Views
{
/// <summary>
/// Interaction logic for IsolatedPingWindow.xaml
/// </summary>
public partial class IsolatedPingWindow : Window
{
private int SelStart = 0;
privat... |
a2a4605c-bfb4-4c90-84dc-6339be6be8a3 | {
"language": "C#"
} | ```c#
using System;
namespace NuGet
{
public static class NuGetConstants
{
public static readonly string DefaultFeedUrl = "https://go.microsoft.com/fwlink/?LinkID=230477";
public static readonly string V1FeedUrl = "https://go.microsoft.com/fwlink/?LinkID=206669";
public stati... | ```c#
using System;
namespace NuGet
{
public static class NuGetConstants
{
public static readonly string DefaultFeedUrl = "https://go.microsoft.com/fwlink/?LinkID=230477";
public static readonly string V1FeedUrl = "https://go.microsoft.com/fwlink/?LinkID=206669";
public stati... |
0ad68951-9ab8-4945-a4f7-26d58f5067a0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AppHarbor
{
class Program
{
static void Main(string[] args)
{
}
}
}
```
Initialize a WindowsContainer when program starts | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.Windsor;
namespace AppHarbor
{
class Program
{
static void Main(string[] args)
{
var container = new WindsorContainer();
}
}
}
``` |
b6ce5672-6bc2-4349-a918-d6122e823dd8 | {
"language": "C#"
} | ```c#
using System.Windows;
using Dogstar.Properties;
namespace Dogstar
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App
{
void Application_Startup(object sender, StartupEventArgs e)
{
if (Settings.Default.UpgradeCheck)
{
Settings.Default.Upgrade();
Set... | ```c#
using System.Windows;
using Dogstar.Properties;
namespace Dogstar
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App
{
void Application_Startup(object sender, StartupEventArgs e)
{
if (Settings.Default.UpgradeCheck)
{
Settings.Default.Upgrade();
Set... |
00fc5a5b-301b-47c1-8f00-71bc00aa2f19 | {
"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.Osu.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
public class DrawableSpinnerTick :... | ```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.Osu.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
public class DrawableSpinnerTick :... |
7c307aca-fc00-42b0-90b8-02a9f859515b | {
"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.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
... | ```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.Framework.Graphics;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
... |
187ab8e6-d3a6-4ba9-ba68-2d61fcf41efc | {
"language": "C#"
} | ```c#
using System;
using GAIT.Utilities.Logging;
using NLog;
using Topshelf;
using static GAIT.Utilities.GeneralBootstrapper;
namespace Rik.CodeCamp.Host
{
internal class CodeCampControl : ServiceControl
{
private Bootstrapper _bootstrapper;
private readonly ILogger _logger;
public C... | ```c#
using System;
using GAIT.Utilities.Logging;
using NLog;
using Rik.CodeCamp.Core;
using Topshelf;
using static GAIT.Utilities.GeneralBootstrapper;
namespace Rik.CodeCamp.Host
{
internal class CodeCampControl : ServiceControl
{
private Bootstrapper _bootstrapper;
private readonly ILogger _... |
cd47307c-a350-4b2b-bad9-fe5bcc94f8f6 | {
"language": "C#"
} | ```c#
using System;
using System.Windows;
using SteamAccountSwitcher.Properties;
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for Options.xaml
/// </summary>
public partial class Options : Window
{
public Options()
{
InitializeComponent();
... | ```c#
using System;
using System.Windows;
using SteamAccountSwitcher.Properties;
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for Options.xaml
/// </summary>
public partial class Options : Window
{
public Options()
{
InitializeComponent();
... |
60ef7697-57cb-4f5e-9d74-c9885cba6565 | {
"language": "C#"
} | ```c#
using System;
namespace FractionCalculator
{
using Class;
public class TestProgram
{
public static void Main()
{
try
{
Fraction fraction1 = new Fraction(22, 7);
Fraction fraction2 = new Fraction(40, 4);
Fraction ... | ```c#
using System;
namespace FractionCalculator
{
using Class;
public class TestProgram
{
public static void Main()
{
try
{
Fraction fraction1 = new Fraction(22, 7);
Fraction fraction2 = new Fraction(40, 4);
Fraction ... |
3ff84a0e-4bde-4f72-ae8e-e4090e8749e5 | {
"language": "C#"
} | ```c#
//-----------------------------------------------------------------------
// <copyright file="AsyncOperationTest.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace AsyncEnum35Sa... | ```c#
//-----------------------------------------------------------------------
// <copyright file="AsyncOperationTest.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace AsyncEnum35Sa... |
f3241ea7-d368-4b51-b36b-af9de3bbfa1f | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Composition;
using System.Linq;
using System.Threading;
using Microsoft.CodeAnalysis.Host.... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Composition;
using System.Linq;
using System.Threading;
using Microsoft.CodeAnalysis.Error... |
067936a3-1fb8-4dee-853c-2716cc2f0d03 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
namespace SendEmailWithLogo
{
class Program
{
static void Main(string[] args)
{
var toAddress = "... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
namespace SendEmailWithLogo
{
class Program
{
static void Main(string[] args)
{
var toAddress = "... |
4fc1d392-0300-4886-9b92-c9f323e4807f | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.ServiceProcess;
namespace PolymeliaDeployController
{
using System.Configuration;
using System.Data.Entity;
using Microsoft.Owin.Hosting;
using PolymeliaDeploy;
using PolymeliaDeploy.Controller;
using PolymeliaDeploy.Data;
using Polymel... | ```c#
using System;
using System.Linq;
using System.ServiceProcess;
namespace PolymeliaDeployController
{
using System.Configuration;
using System.Data.Entity;
using Microsoft.Owin.Hosting;
using PolymeliaDeploy;
using PolymeliaDeploy.Controller;
using PolymeliaDeploy.Data;
using Polymel... |
a474b2aa-9089-4ddc-9bd9-64a1236dd189 | {
"language": "C#"
} | ```c#
using System;
using System.Xml;
using System.Xml.Linq;
using Rainbow.Model;
namespace Rainbow.Diff.Fields
{
public class XmlComparison : FieldTypeBasedComparison
{
public override bool AreEqual(IItemFieldValue field1, IItemFieldValue field2)
{
if (string.IsNullOrWhiteSpace(field1.Value) && string.IsNul... | ```c#
using System.Xml;
using System.Xml.Linq;
using Rainbow.Model;
using Sitecore.Diagnostics;
namespace Rainbow.Diff.Fields
{
public class XmlComparison : FieldTypeBasedComparison
{
public override bool AreEqual(IItemFieldValue field1, IItemFieldValue field2)
{
if (string.IsNullOrWhiteSpace(field1.Value) &... |
8508deff-9eb2-4132-81ea-82e38e5c519a | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Serilog.Core;
using Serilog.Debugging;
using Serilog.Events;
using Serilog.Sinks.Graylog.Core;
using Serilog.Sinks.Graylog.Core.Transport;
namespace Serilog.Sinks.Graylog
{
public class GraylogSink : ILogEventSink
{
pr... | ```c#
using System;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Serilog.Core;
using Serilog.Debugging;
using Serilog.Events;
using Serilog.Sinks.Graylog.Core;
using Serilog.Sinks.Graylog.Core.Transport;
namespace Serilog.Sinks.Graylog
{
public class GraylogSink : ILogEventSink, IDisposable
... |
a262f527-bd5e-4e65-b911-aeaf07a5b27b | {
"language": "C#"
} | ```c#
using NServiceBus;
public static class ConfigBuilder
{
public static EndpointConfiguration BuildDefaultConfig(string endpointName)
{
var configuration = new EndpointConfiguration(endpointName);
configuration.SendFailedMessagesTo("error");
configuration.UsePersistence<InMemoryPers... | ```c#
using NServiceBus;
public static class ConfigBuilder
{
public static EndpointConfiguration BuildDefaultConfig(string endpointName)
{
var configuration = new EndpointConfiguration(endpointName);
configuration.SendFailedMessagesTo("error");
configuration.UsePersistence<InMemoryPers... |
95a7fa90-467b-49dd-b0fa-3e2524a369b2 | {
"language": "C#"
} | ```c#
using System.Windows;
using System.Windows.Controls;
namespace Certify.UI.Controls.ManagedCertificate
{
public partial class TestProgress : UserControl
{
protected Certify.UI.ViewModel.ManagedCertificateViewModel ItemViewModel => UI.ViewModel.ManagedCertificateViewModel.Current;
protecte... | ```c#
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace Certify.UI.Controls.ManagedCertificate
{
public partial class TestProgress : UserControl
{
protected Certify.UI.ViewModel.ManagedCertificateViewModel ItemViewModel => UI.ViewModel.ManagedCertificateViewM... |
ce751b2f-fd91-4e77-b19c-e31353c565c9 | {
"language": "C#"
} | ```c#
#region License
/*
Copyright [2011] [Jeffrey Cameron]
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 a... | ```c#
#region License
/*
Copyright [2011] [Jeffrey Cameron]
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 a... |
9ade7e45-f712-4dfe-ac38-5cf39b863af9 | {
"language": "C#"
} | ```c#
namespace BScript.Expressions
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BScript.Language;
public class NewExpression : IExpression
{
private IExpression expression;
private IList<IExpression> argexprs;
... | ```c#
namespace BScript.Expressions
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BScript.Language;
using BScript.Utilities;
public class NewExpression : IExpression
{
private IExpression expression;
private IL... |
affd31c0-a194-4905-8102-67f44f2f35b9 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Serialization;
using NBi.Core.Etl;
using NBi.Xml.Items;
using System.IO;
using NBi.Core.Batch;
using NBi.Xml.Settings;
namespace NBi.Xml.Decoration.Command
{
public class SqlRunXml : DecorationCommandXml, IBatchR... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Serialization;
using NBi.Core.Etl;
using NBi.Xml.Items;
using System.IO;
using NBi.Core.Batch;
using NBi.Xml.Settings;
namespace NBi.Xml.Decoration.Command
{
public class SqlRunXml : DecorationCommandXml, IBatchR... |
dac32345-0444-487e-8617-1349c00462f8 | {
"language": "C#"
} | ```c#
@model System.Linq.IQueryable<ForumSystem.Web.ViewModels.Answers.AnswerViewModel>
@using ForumSystem.Web.ViewModels.Answers;
@foreach (var answer in Model)
{
<div class="panel panel-success">
<div class="panel-heading">
<h3>
@answer.Post.Title
</h3>
<... | ```c#
@model System.Linq.IQueryable<ForumSystem.Web.ViewModels.Answers.AnswerViewModel>
@using ForumSystem.Web.ViewModels.Answers;
<div class="panel panel-success">
<div class="panel-heading">
<h3>
@Html.ActionLink(Model.FirstOrDefault().Post.Title, "Display", "Questions", new { id = Model.Fi... |
ec267cd0-16b3-4efa-a949-1a2d1cfcfe00 | {
"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.Beatmaps.Formats;
namespace osu.Game.Skinning
{
public class LegacySkinDecoder : LegacyDecoder<LegacySkinConfiguration>
{
public Le... | ```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.Beatmaps.Formats;
namespace osu.Game.Skinning
{
public class LegacySkinDecoder : LegacyDecoder<LegacySkinConfiguration>
{
public Le... |
13afce8f-d17c-4a88-9db9-269ff9f537c0 | {
"language": "C#"
} | ```c#
using KafkaNet;
using KafkaNet.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace kafka_tests.Fakes
{
public class FakeKafkaConnection : IKafkaConnection
{
private Uri _address;
public Func<ProduceRespo... | ```c#
using KafkaNet;
using KafkaNet.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace kafka_tests.Fakes
{
public class FakeKafkaConnection : IKafkaConnection
{
private Uri _address;
public Func<ProduceRespo... |
cefdcd70-e50a-429c-8093-cf209ab9d49f | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using DataTool.ToolLogic.List;
using Utf8Json;
using Utf8Json.Resolvers;
using static DataTool.Helper.IO;
using static DataTool.Helper.Logger;
namespace DataTool.JSON {
public class JSONTool {
internal void OutputJSON(object jObj, ListFlags toolFlags) {
Comp... | ```c#
using System;
using System.IO;
using DataTool.ToolLogic.List;
using Utf8Json;
using Utf8Json.Resolvers;
using static DataTool.Helper.IO;
using static DataTool.Helper.Logger;
namespace DataTool.JSON {
public class JSONTool {
internal void OutputJSON(object jObj, ListFlags toolFlags) {
Comp... |
80f23140-d7b0-4454-93d9-ee52ed41de52 | {
"language": "C#"
} | ```c#
// Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System.Linq;
using NUnit.Framework;
namespace NodaTime.Test
{
/// <summary>
/// Tests for DateTimeZoneProviders.
/// </summary>
... | ```c#
// Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System.Linq;
using NodaTime.Testing.TimeZones;
using NodaTime.Xml;
using NUnit.Framework;
namespace NodaTime.Test
{
/// <summary>
///... |
7d10fc85-2b53-4175-9649-7a7bfa643d1e | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
namespace ErgastApi.Responses.Models
{
public class Driver
{
[JsonProperty("driverId")]
public string DriverId { get; private set; }
/// <summary>
/// Drivers who participated in the 2014 season onwards have a permanent driver number.... | ```c#
using System;
using Newtonsoft.Json;
namespace ErgastApi.Responses.Models
{
public class Driver
{
[JsonProperty("driverId")]
public string DriverId { get; private set; }
/// <summary>
/// Drivers who participated in the 2014 season onwards have a permanent driver number.... |
e8739899-f942-4188-bcb8-d40c3d14f71e | {
"language": "C#"
} | ```c#
using System.Linq.Expressions;
using Remotion.Linq.Parsing.ExpressionTreeVisitors.Transformation;
namespace NHibernate.Linq.ExpressionTransformers
{
/// <summary>
/// Remove redundant casts to the same type or to superclass (upcast) in <see cref="ExpressionType.Convert"/>, <see cref=" ExpressionType.Conv... | ```c#
using System.Linq.Expressions;
using Remotion.Linq.Parsing.ExpressionTreeVisitors.Transformation;
namespace NHibernate.Linq.ExpressionTransformers
{
/// <summary>
/// Remove redundant casts to the same type or to superclass (upcast) in <see cref="ExpressionType.Convert"/>, <see cref=" ExpressionType.Conv... |
fe2fb59b-44a8-484d-9fae-85ee3dc1e74c | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.ServiceBus;
namespace Microsoft.Azure.WebJobs.Script.Description
{
public class EventHubBindingMetadata : Bindin... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.ServiceBus;
namespace Microsoft.Azure.WebJobs.Script.Description
{
public class EventHubBindingMetadata : Bindin... |
9d42edd2-2b9d-43e7-b960-e88153c7757c | {
"language": "C#"
} | ```c#
using Topshelf;
namespace MiNET.Service
{
public class MiNetService
{
private MiNetServer _server;
private void Start()
{
_server = new MiNetServer();
_server.StartServer();
}
private void Stop()
{
_server.StopServer();
}
private static void Main(string[] args)
{
HostFactory.R... | ```c#
using System;
using Topshelf;
namespace MiNET.Service
{
public class MiNetService
{
private MiNetServer _server;
private void Start()
{
_server = new MiNetServer();
_server.StartServer();
}
private void Stop()
{
_server.StopServer();
}
private static void Main(string[] args)
{
... |
b3a01615-89da-40c1-916e-8c1d69da9819 | {
"language": "C#"
} | ```c#
using System.Text;
namespace Microsoft.Build.Logging.StructuredLogger
{
public class StringWriter
{
public static string GetString(object rootNode)
{
var sb = new StringBuilder();
WriteNode(rootNode, sb, 0);
return sb.ToString();
... | ```c#
using System.Text;
namespace Microsoft.Build.Logging.StructuredLogger
{
public class StringWriter
{
public static string GetString(object rootNode)
{
var sb = new StringBuilder();
WriteNode(rootNode, sb, 0);
return sb.ToString();
... |
1bf0724a-540f-4ad7-811c-88738a79a72c | {
"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 osuTK;
using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using 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 osuTK;
using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using os... |
37fa0aee-891a-4304-ada9-4230c6c457af | {
"language": "C#"
} | ```c#
Hello @ViewData.Model.FirstName,<br /><br />
Thank you for signing up for Rambla! You have taken the first step towards expanding your rentability.<br /><br />
@{
string URL = Url.Action("activateaccount", "Account", new RouteValueDictionary(new { id = ViewData.Model.ActivationId }), Request.Url.Scheme.T... | ```c#
@{
string URL = Url.Action("activateaccount", "Account", new RouteValueDictionary(new { id = ViewData.Model.ActivationId }), Request.Url.Scheme.ToString(), Request.Url.Host);
}
<p>Hi @ViewData.Model.FirstName,</p>
<p>Welcome to <strong>Rambla</strong>, a marketplace that facilitates sharing of items bet... |
ba64f067-05df-4595-941d-39444392740c | {
"language": "C#"
} | ```c#
using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Text.BraceCompletion;
using Microsoft.VisualStudio.Utilities;
namespace DanTup.DartVS
{
[Export(typeof(IBraceCompletionDefaultProvider))]
[ContentType(DartContentTypeDefinition.DartContentType)]
[BracePair('{', '}')]
class BraceCompletion... | ```c#
using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Text.BraceCompletion;
using Microsoft.VisualStudio.Utilities;
namespace DanTup.DartVS
{
[Export(typeof(IBraceCompletionDefaultProvider))]
[ContentType(DartContentTypeDefinition.DartContentType)]
[BracePair('{', '}')]
[BracePair('(', ')')]... |
76a2b60b-fa11-4d66-80c6-6a9e7c5cc605 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Game.Graphics;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mods
{
public abstract class ModSuddenDeath : Mod... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Game.Graphics;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mods
{
public abstract class ModSuddenDeath : Mod... |
a4b22ebe-2f1e-4814-9540-771b32d3b837 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace LessMsi.Cli
{
internal class ShowHelpCommand : LessMsiCommand
{
public override void Run(List<string> args)
{
ShowHelp("");
}
public static void ShowHelp(string errorMessage)
{
string helpString =
@"Usage:
lessmsi <command> [options... | ```c#
using System;
using System.Collections.Generic;
namespace LessMsi.Cli
{
internal class ShowHelpCommand : LessMsiCommand
{
public override void Run(List<string> args)
{
ShowHelp("");
}
public static void ShowHelp(string errorMessage)
{
string helpString =
@"Usage:
lessmsi <command> [options... |
87fe17f0-98f7-44b6-af42-9ddd58718ef2 | {
"language": "C#"
} | ```c#
using CefSharp;
namespace TweetDck.Core.Handling{
class ContextMenuNotification : ContextMenuBase{
public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model){
model.Clear();
base.OnBef... | ```c#
using CefSharp;
namespace TweetDck.Core.Handling{
class ContextMenuNotification : ContextMenuBase{
public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model){
model.Clear();
base.OnBef... |
7739c317-264b-4611-9f63-da2de3e99ff7 | {
"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("MonoGameUtils")]
[assembly: Assembl... | ```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("MonoGameUtils")]
[assembly: Assembly... |
ab36a2f8-83fe-4914-89f7-e66d4a6855e5 | {
"language": "C#"
} | ```c#
using UnityEngine;
namespace Pear.InteractionEngine.Interactions
{
/// <summary>
/// Copies interactions from the current object to the supplied objects
/// </summary>
public class CopyInteractions: MonoBehaviour
{
[Tooltip("Objects that interactions will be copied to")]
public GameObject[] CopyTo;
... | ```c#
using UnityEngine;
namespace Pear.InteractionEngine.Interactions
{
/// <summary>
/// Copies interactions from the current object to the supplied objects
/// </summary>
public class CopyInteractions: MonoBehaviour
{
[Tooltip("Objects that interactions will be copied to")]
public GameObject[] CopyTo;
... |
c2da94b5-dbbf-4e4d-a0a6-c269320339df | {
"language": "C#"
} | ```c#
@model WebEditor.Models.Create
@{
ViewBag.Title = "New Game";
}
@section scripts {
<script src="@Url.Content("~/Scripts/GameNew.js")" type="text/javascript"></script>
}
@using (Html.BeginForm()) {
@Html.ValidationSummary(true, "Unable to create game. Please correct the errors below.")
... | ```c#
@model WebEditor.Models.Create
@{
ViewBag.Title = "New Game";
}
@section scripts {
<script src="@Url.Content("~/Scripts/GameNew.js")" type="text/javascript"></script>
}
@using (Html.BeginForm()) {
@Html.ValidationSummary(true, "Unable to create game. Please correct the errors below.")
... |
3ab4c1a0-fb45-4a2e-aaaf-137e6ac090ce | {
"language": "C#"
} | ```c#
using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
public string Middle { get; set; }
p... | ```c#
using System.Collections.Generic;
using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
public string ... |
b0c72201-81e0-4539-bc9d-379a4bab6fed | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
namespace Leeroy
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRu... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;
namespace Leeroy
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
if (arg... |
1ea11353-0879-4239-8d95-757fe54689b7 | {
"language": "C#"
} | ```c#
Order: 10
Description: Tutorials to get you up and running quickly
RedirectFrom:
- docs/overview
- docs/overview/features
---
@Html.Partial("_ChildPages")```
Add link to resources to Getting Started guide | ```c#
Order: 10
Description: Tutorials to get you up and running quickly
RedirectFrom:
- docs/overview
- docs/overview/features
---
<div class="alert alert-info">
<p>
See also <a href="/community/resources/">Community Resources</a> for a lot of helpful courses, videos, presentations and blog posts whic... |
383450f4-a8f7-453d-9585-3b3fede93429 | {
"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... |
c8f2cbf2-1329-4160-b172-086a89a0c171 | {
"language": "C#"
} | ```c#
/* Copyright 2018 Jeremy Herbison
This file is part of AudioWorks.
AudioWorks 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 Foundation, either version 3 of the License, or (at your option) any later
version.... | ```c#
/* Copyright 2018 Jeremy Herbison
This file is part of AudioWorks.
AudioWorks 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 Foundation, either version 3 of the License, or (at your option) any later
version.... |
690d7578-7a69-458f-b4ff-f0b69b9a37fd | {
"language": "C#"
} | ```c#
using Xunit.Abstractions;
namespace Cascara.Tests
{
public abstract class CascaraTestFramework
{
public CascaraTestFramework(ITestOutputHelper output)
{
Output = output;
}
protected ITestOutputHelper Output
{
get;
}
}
}
```
Ad... | ```c#
using System;
using System.Xml.Linq;
using Xunit.Abstractions;
namespace Cascara.Tests
{
public abstract class CascaraTestFramework
{
protected static string BuildXmlElement(string name, params Tuple<string, string>[] attrs)
{
return BuildXmlElement(name, "", attrs);
... |
cd4d873c-842e-46ef-9ad4-35a11be9d274 | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("Intro Settings")]
public class IntroData
{
[DisplayName("Duration")]
public int Duration { get; set; } = -1;
[DisplayName("Re... | ```c#
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("Intro Settings")]
public class IntroData
{
[DisplayName("Duration")]
public int Duration { get; set; } = -1;
[DisplayName("Re... |
4c67aed8-8bac-42c9-8ca1-8d1f6f67e57e | {
"language": "C#"
} | ```c#
using IO = System.IO;
namespace dokas.EncodingConverter.Logic
{
internal sealed class FileData
{
public string Path { get; private set; }
public string Name { get; private set; }
public string Extension { get; private set; }
public FileData(string path)
{
... | ```c#
using System;
using IO = System.IO;
namespace dokas.EncodingConverter.Logic
{
internal sealed class FileData
{
public string Path { get; private set; }
public string Name { get; private set; }
public string Extension { get; private set; }
public FileData(string path)
... |
27df204d-4018-4af9-a6ee-a62f2f181970 | {
"language": "C#"
} | ```c#
@model Kooboo.CMS.Sites.ABTest.ABPageSetting
@using Kooboo.CMS.Sites.ABTest;
@{
ViewBag.Title = "Edit A/B page setting";
Layout = "~/Views/Shared/Blank.cshtml";
}
@section Panel{
<ul class="panel">
<li>
<a data-ajaxform="">
@Html.IconImage("save") @("Save".Localize... | ```c#
@model Kooboo.CMS.Sites.ABTest.ABPageSetting
@using Kooboo.CMS.Sites.ABTest;
@{
ViewBag.Title = "Edit A/B page setting";
Layout = "~/Views/Shared/Blank.cshtml";
}
@section Panel{
<ul class="panel">
<li>
<a data-ajaxform="">
@Html.IconImage("save") @("Save".Localize... |
9b4ed07d-6657-4cfa-a137-fe0c252657c3 | {
"language": "C#"
} | ```c#
#region -- License Terms --
//
// MessagePack for CLI
//
// Copyright (C) 2010 FUJIWARA, Yusuke
//
// 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.apac... | ```c#
#region -- License Terms --
//
// MessagePack for CLI
//
// Copyright (C) 2010 FUJIWARA, Yusuke
//
// 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.apac... |
c2836452-f548-4e7e-af83-20204e07eb69 | {
"language": "C#"
} | ```c#
#region Copyright © 2014 Ricardo Amaral
/*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
*/
#endregion
using CefSharp;
namespace SlackUI {
internal class BrowserRequestHandler : IRequestHandler {
#region Public Methods
public boo... | ```c#
#region Copyright © 2014 Ricardo Amaral
/*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
*/
#endregion
using CefSharp;
namespace SlackUI {
internal class BrowserRequestHandler : IRequestHandler {
#region Public Methods
public boo... |
5c59d622-65df-441a-ad0b-83540a2cbdf8 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
... | ```c#
using System;
using System.Collections.Generic;
using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
... |
83c8ef04-961b-4904-aa31-67f07d468e9d | {
"language": "C#"
} | ```c#
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("StripeTests")]
```
Make internals visible to Newtonsoft.Json | ```c#
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Newtonsoft.Json")]
[assembly: InternalsVisibleTo("StripeTests")]
``` |
3b81ace2-01d3-4008-9295-25921c49c6d8 | {
"language": "C#"
} | ```c#
using Dolstagis.Web;
using Dolstagis.Web.Sessions;
namespace WebApp
{
public class HomeModule : Module
{
public HomeModule()
{
Services.For<ISessionStore>().Singleton().Use<InMemorySessionStore>();
AddStaticFiles("~/content");
AddViews("~/... | ```c#
using Dolstagis.Web;
using Dolstagis.Web.Sessions;
namespace WebApp
{
public class HomeModule : Module
{
public HomeModule()
{
Services.For<ISessionStore>().Singleton().Use<InMemorySessionStore>();
AddStaticFiles("~/content");
AddViews("~/... |
b51fd9a7-e58e-4f70-a2cc-bc043bd3af32 | {
"language": "C#"
} | ```c#
using System;
using System.Linq.Expressions;
using Xunit;
namespace DelegateDecompiler.Tests
{
public class EnumTests : DecompilerTestsBase
{
public enum TestEnum
{
Foo,
Bar
}
[Fact]
public void TestEnumParameterEqualsEnumConstant()
... | ```c#
using System;
using System.Linq.Expressions;
using Xunit;
namespace DelegateDecompiler.Tests
{
public class EnumTests : DecompilerTestsBase
{
public enum TestEnum
{
Foo,
Bar
}
[Fact]
public void TestEnumParameterEqualsEnumCons... |
0702bd9e-2576-479a-bc05-1b756a9b67b8 | {
"language": "C#"
} | ```c#
using Ardalis.GuardClauses;
using System;
using Xunit;
namespace GuardClauses.UnitTests
{
public class GuardAgainsOutOfRange
{
[Fact]
public void DoesNothingGivenInRangeValueUsingShortcutMethod()
{
Guard.AgainsOutOfRange(2, "index", 1, 5);
}
[Fact]
... | ```c#
using Ardalis.GuardClauses;
using System;
using Xunit;
namespace GuardClauses.UnitTests
{
public class GuardAgainsOutOfRange
{
[Theory]
[InlineData(1, 1, 5)]
[InlineData(2, 1, 5)]
[InlineData(3, 1, 5)]
public void DoesNothingGivenInRangeValueUsingShortcutMethod(in... |
3f366ecc-d7c0-47e4-985d-aec2f54c0f15 | {
"language": "C#"
} | ```c#
namespace Nancy.Owin.Tests
{
using System;
using global::Owin;
using Microsoft.Owin.Testing;
using Nancy.Testing;
using Xunit;
public class AppBuilderExtensionsFixture
{
/*[Fact]
public void When_host_Nancy_via_IAppBuilder_then_should_handle_request... | ```c#
namespace Nancy.Owin.Tests
{
using System;
using global::Owin;
using Microsoft.Owin.Testing;
using Nancy.Testing;
using Xunit;
public class AppBuilderExtensionsFixture
{
#if !__MonoCS__
[Fact]
public void When_host_Nancy_via_IAppBuilder_then_should... |
b3efab15-9abd-4a3f-a347-be765d14158b | {
"language": "C#"
} | ```c#
using System;
using System.Configuration;
namespace librato4net
{
public class AppSettingsLibratoSettings : ILibratoSettings
{
// ReSharper disable once InconsistentNaming
private static readonly AppSettingsLibratoSettings settings = new AppSettingsLibratoSettings();
private con... | ```c#
using System;
using System.Configuration;
namespace librato4net
{
public class AppSettingsLibratoSettings : ILibratoSettings
{
// ReSharper disable once InconsistentNaming
private static readonly AppSettingsLibratoSettings settings = new AppSettingsLibratoSettings();
private con... |
8a584c3a-638e-4bed-a7b3-72c4543be5ae | {
"language": "C#"
} | ```c#
using System;
namespace Satrabel.OpenContent.Components.TemplateHelpers
{
public class Ratio
{
private readonly float _ratio;
public int Width { get; private set; }
public int Height { get; private set; }
public float AsFloat
{
get { return Width / He... | ```c#
using System;
namespace Satrabel.OpenContent.Components.TemplateHelpers
{
public class Ratio
{
private readonly float _ratio;
public int Width { get; private set; }
public int Height { get; private set; }
public float AsFloat
{
get { return (float)Wid... |
9a74eae8-127f-48e0-8619-5cc2b939c99c | {
"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.
namespace System.Diagnostics
{
/// <summary>Provides a set of static methods for working with Exceptions.<... | ```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.
namespace System.Diagnostics
{
/// <summary>Provides a set of static methods for working with Exceptions.<... |
c8991320-37fd-4355-b895-b777948cc9ac | {
"language": "C#"
} | ```c#
using BatteryCommander.Web.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
namespace BatteryCommander.Web.Controllers
{
[Authorize, ApiExplorerSettings(IgnoreApi = true)]
public class AdminController : Controller
{
// Admin Tasks:
// A... | ```c#
using BatteryCommander.Web.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.IO;
namespace BatteryCommander.Web.Controllers
{
[Authorize, ApiExplorerSettings(IgnoreApi = true)]
public class AdminController : Controller
{
// Admin Tas... |
c7e4b786-94f7-4a27-bd7c-846f4bcbd1c6 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
namespace osu.Game.Audio
{
public class SampleInfoList : List<SampleInfo>
{
public SampleInfoList()
{
... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
namespace osu.Game.Audio
{
public class SampleInfoList : List<SampleInfo>
{
public SampleInfoList()
... |
8f298739-510d-4340-92cc-06440306c86e | {
"language": "C#"
} | ```c#
@model Portal.CMS.Web.Areas.Builder.ViewModels.Build.CustomViewModel
@{
ViewBag.Title = "Error";
Layout = "";
}
<!DOCTYPE html>
<html lang="en-gb">
<head>
<title>Portal CMS: @ViewBag.Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable... | ```c#
@model Portal.CMS.Web.Areas.Builder.ViewModels.Build.CustomViewModel
@{
ViewBag.Title = "Error";
Layout = "";
}
<!DOCTYPE html>
<html lang="en-gb">
<head>
<title>Portal CMS: @ViewBag.Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable... |
42dfed95-ac08-4c87-a677-0cb9eb3b5193 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class BackToMenu : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.Escape)){
Application.LoadLevel(0);
GameObject GUI;
GUI = GameObject.Find("... | ```c#
using UnityEngine;
using System.Collections;
public class BackToMenu : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.Escape)){
Application.LoadLevel(0);
GameObject guiSys;
guiSys = GameObject.... |
c4445fe2-1a1a-4bd3-bc5d-4ebe7e42048b | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Linq;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.NET.TestFramework.Commands
{
p... | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Linq;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.NET.TestFramework.Commands
{
p... |
3745c43f-5fed-4c8b-81ea-a0d83be38718 | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
namespace GitHub.Unity
{
class GitCommitTask : ProcessTask<string>
{
private const string TaskName = "git commit";
private readonly string arguments;
public GitCommitTask(string message, string body,
CancellationToken token, IOut... | ```c#
using System;
using System.Threading;
namespace GitHub.Unity
{
class GitCommitTask : ProcessTask<string>
{
private const string TaskName = "git commit";
private readonly string arguments;
public GitCommitTask(string message, string body,
CancellationToken token, IOut... |
62f01104-6c1e-4490-8349-3de68f7ca369 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Hangman {
public class Row {
public Cell[] Cells;
public Row(Cell[] cells) {
Cells = cells;
}
public string Draw(int width) {
// return new String(' ', width - Text.Length) + Text;
return String.Join("\n", Lines());
... | ```c#
using System;
using System.Collections.Generic;
namespace Hangman {
public class Row {
public Cell[] Cells;
private int Width;
public Row(Cell[] cells) {
Cells = cells;
}
public string Draw(int width) {
// return new String(' ', width - Text.Length) + Text;
Width = width... |
bc41c4e1-2b25-4032-8765-face80e2f7f0 | {
"language": "C#"
} | ```c#
// Copyright ©2017 Simonray (http://github.com/simonray). All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using ExchangeRate.Model;
using System.Net;
using System.Text.RegularExpressions;
namespace ExchangeRate.Providers
{
/// <exclude />... | ```c#
// Copyright ©2017 Simonray (http://github.com/simonray). All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using ExchangeRate.Model;
using System.Net;
using System.Text.RegularExpressions;
namespace ExchangeRate.Providers
{
/// <exclude />... |
8ce716fa-5e05-49da-81a3-24b2e5d6c357 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
namespace Scrutor
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class ServiceDescriptorAttribute : Attribute
{
public ServiceDescriptorAttribute(... | ```c#
using System;
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
namespace Scrutor
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class ServiceDescriptorAttribute : Attribute
{
public ServiceDescriptorAttribute() : this(null) { }
... |
1dcb1b2b-9593-4c90-b780-76ffc7dac339 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
namespace ConsoleApp
{
public class Table
{
public void OutputMigrationCode(string tableName, IEnumerable<Column> columns)
{
var writer = Out;
writer.Write(@"namespace... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
namespace ConsoleApp
{
public class Table
{
private readonly string tableName;
private readonly IEnumerable<Column> columns;
public Table(string tableName, IEnumerable<Column> columns... |
b1cfd5f1-9fd3-48e8-a644-70c219120585 | {
"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... |
a60cc21a-1ffc-484b-8a5d-cd54ff9ebe99 | {
"language": "C#"
} | ```c#
using System;
using Agiil.Data;
using Agiil.Domain;
using Autofac;
using NHibernate;
using NHibernate.Cfg;
namespace Agiil.Bootstrap.Data
{
public class NHibernateModule : Module
{
protected override void Load(ContainerBuilder builder)
{
// Configuration
builder
.Register((ctx, p... | ```c#
using System;
using Agiil.Data;
using Agiil.Domain;
using Autofac;
using NHibernate;
using NHibernate.Cfg;
namespace Agiil.Bootstrap.Data
{
public class NHibernateModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder
.Register(BuildNHibernateConfiguration)
... |
a34d2095-0888-4534-a210-ffe020bbb235 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled thr... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled thr... |
a991042c-75a5-48a2-9271-d19ba9325b35 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DeploymentCockpit.Data.Repositories;
using DeploymentCockpit.Interfaces;
using DeploymentCockpit.Models;
namespace DeploymentCockpit.Data
{
public class UnitOfWork : IUnitOfWork
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DeploymentCockpit.Data.Repositories;
using DeploymentCockpit.Interfaces;
using DeploymentCockpit.Models;
namespace DeploymentCockpit.Data
{
public class UnitOfWork : IUnitOfWork
{
... |
f84034b2-b608-4a8d-80a5-eb1fbb7dcfbf | {
"language": "C#"
} | ```c#
namespace Cassette.Views
{
#if NET35
public interface IHtmlString
{
string ToHtmlString();
}
public class HtmlString : IHtmlString
{
string _htmlString;
public HtmlString(string htmlString)
{
this._htmlString = htmlString;
}
publi... | ```c#
#if NET35
namespace Cassette.Views
{
public interface IHtmlString
{
string ToHtmlString();
}
public class HtmlString : IHtmlString
{
string _htmlString;
public HtmlString(string htmlString)
{
this._htmlString = htmlString;
}
publi... |
c85510ee-bbe4-4fc8-9e9a-816cf7997832 | {
"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.Globalization;
using NUnit.Framework;
using osu.Framework.Localisation;
namespace osu.Framework.Tests.Localisation
{
[TestFixture]
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 System.Globalization;
using NUnit.Framework;
using osu.Framework.Localisation;
namespace osu.Framework.Tests.Localisation
{
[TestFixture]
public clas... |
2d1fee9b-bdee-4f54-b208-05acfb826e9e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using Plugin.Permissions.Abstractions;
namespace Plugin.Media.Abstractions
{
/// <summary>
/// Permission exception.
/// </summary>
public class MediaPermissionException : Exception
{
/// <summary>
/// Permission required that is ... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using Plugin.Permissions.Abstractions;
namespace Plugin.Media.Abstractions
{
/// <summary>
/// Permission exception.
/// </summary>
public class MediaPermissionException : Exception
{
/// <summary>
/// Permission required that is ... |
7b89a616-e403-4925-b188-289098c6d666 | {
"language": "C#"
} | ```c#
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Criteo.Profiling.Tracing.Transport;
namespace Criteo.Profiling.Tracing.Middleware
{
public class TracingHandler : DelegatingHandler
{
private readonly ITraceInjector<HttpHeaders> _injector;
private r... | ```c#
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Criteo.Profiling.Tracing.Transport;
namespace Criteo.Profiling.Tracing.Middleware
{
public class TracingHandler : DelegatingHandler
{
private readonly ZipkinHttpTraceInjector _injector;
private reado... |
81f3d170-c548-4f98-a3d6-76daf3e9f188 | {
"language": "C#"
} | ```c#
using LmpGlobal;
using LmpUpdater.Appveyor.Contracts;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Net;
namespace LmpUpdater.Appveyor
{
public class AppveyorUpdateChecker
{
public static RootObject LatestBuild
{
get
{
... | ```c#
using LmpGlobal;
using LmpUpdater.Appveyor.Contracts;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Net;
namespace LmpUpdater.Appveyor
{
public class AppveyorUpdateChecker
{
public static RootObject LatestBuild
{
get
{
... |
e9dab18e-ee0d-4f8d-ba94-de7c5a39d907 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Windows.Forms;
namespace JPMeshConverter {
public partial class Form1 : Form {
private ModelFileDialog fileDialog;
public Form1() {
InitializeComponent();
fileDialog = new ModelFileDialog(System.AppDomain.CurrentDomain.Base... | ```c#
using System;
using System.IO;
using System.Windows.Forms;
namespace JPMeshConverter {
public partial class Form1 : Form {
private ModelFileDialog fileDialog;
public Form1() {
InitializeComponent();
fileDialog = new ModelFileDialog(System.AppDomain.CurrentDomain.Base... |
1fcbf220-e095-4671-acd2-9e4e9d0d3603 | {
"language": "C#"
} | ```c#
//-----------------------------------------------------------------------
// <copyright file="IntegrationTests.cs" company="Experian Data Quality">
// Copyright (c) Experian. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System;
using Syst... | ```c#
//-----------------------------------------------------------------------
// <copyright file="IntegrationTests.cs" company="Experian Data Quality">
// Copyright (c) Experian. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System;
using Syst... |
2ee6ad50-1f9e-42ad-a898-7de3225616e5 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Cash_Flow_Projection.Models
{
public static class Balance
{
public static Decimal CurrentBalance(this IEnumerable<Entry> entries, Account account = Account.Cash)
{
return GetLastBalanceEntry(entries,... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Cash_Flow_Projection.Models
{
public static class Balance
{
public static Decimal CurrentBalance(this IEnumerable<Entry> entries, Account account = Account.Cash)
{
return GetLastBalanceEntry(entries,... |
ec5d2e25-2f08-4b53-b069-4cc2853d6e75 | {
"language": "C#"
} | ```c#
using LunaClient.Base;
using LunaClient.Base.Interface;
using LunaClient.VesselUtilities;
using LunaCommon.Message.Data.Vessel;
using LunaCommon.Message.Interface;
using System.Collections.Concurrent;
namespace LunaClient.Systems.VesselPartModuleSyncSys
{
public class VesselPartModuleSyncMessageHandler : Su... | ```c#
using LunaClient.Base;
using LunaClient.Base.Interface;
using LunaClient.VesselUtilities;
using LunaCommon.Message.Data.Vessel;
using LunaCommon.Message.Interface;
using System.Collections.Concurrent;
namespace LunaClient.Systems.VesselPartModuleSyncSys
{
public class VesselPartModuleSyncMessageHandler : Su... |
50920f73-314c-48d5-9dcc-d17e90c86032 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
namespace ExtendedControls
{
public class StatusStripCustom : StatusStrip
{
public const int WM_NCHITTEST = 0x84;
public const int WM_NCLBUTTONDOWN = 0x... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
namespace ExtendedControls
{
public class StatusStripCustom : StatusStrip
{
public const int WM_NCHITTEST = 0x84;
public const int WM_NCLBUTTONDOWN = 0x... |
ec9d8248-92b1-4aee-97a3-9f686bcbbf7e | {
"language": "C#"
} | ```c#
/*
Copyright 2017 James Craig
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 or agreed to in writi... | ```c#
/*
Copyright 2017 James Craig
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 or agreed to in writi... |
9281b778-d8e1-4f14-acbe-f23e4d688e51 | {
"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.Localisation;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings... | ```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.Sprites;
using osu.Framework.Localisation;
using osu.Game.Localisation;
... |
5be35892-601d-4af8-8f7a-daa0b3caf516 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Identifies the method to calculate the result
/// </summary>
public enum CalculationType : byte
{
/// <summary>
/// Deduction is taken as a per... | ```c#
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Identifies the method to calculate the result
/// </summary>
public enum CalculationType : byte
{
/// <summary>
/// Deduction is taken as a per... |
38921b60-e0d1-4115-8d14-772a0f44e9e4 | {
"language": "C#"
} | ```c#
using System;
using System.Windows.Forms;
namespace DrawShip.Viewer
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
var applicationContext = new ApplicationContext();
var runMode = applicationContext.GetRunM... | ```c#
using System;
using System.Net;
using System.Windows.Forms;
namespace DrawShip.Viewer
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
ServicePointManager.ServerCertificateValidationCallback = (sender, certifica... |
717ece2a-9d17-442f-883d-d7b2cc19b9e8 | {
"language": "C#"
} | ```c#
//*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 License
//
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... | ```c#
//*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 License
//
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... |
8fe69291-95c4-4329-9c73-06fbd3a48f5c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Media;
using System.Text;
using System.Threading.Tasks;
namespace Sketchball.GameComponents
{
public class SoundManager
{
private SoundPlayer currentPlayer;
private DateTime lastPlay = new DateTime();
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Media;
using System.Text;
using System.Threading.Tasks;
namespace Sketchball.GameComponents
{
public class SoundManager
{
private SoundPlayer currentPlayer;
private DateTime lastPlay = new DateTime();
... |
b0cf895f-639d-4215-815f-0cf5ed089f74 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
namespace IronAHK.Rusty
{
partial class Core
{
#region Disk
static string[] Glob(string pattern)
{
return new string[] { };
}
#endregion
#region Process
static Process FindProcess(string name)
... | ```c#
using System;
using System.Diagnostics;
namespace IronAHK.Rusty
{
partial class Core
{
#region Disk
static string[] Glob(string pattern)
{
return new string[] { };
}
#endregion
#region Process
static Process FindProcess(string name)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.