doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
c20c43d4-8f6f-4f9a-8bb0-e38ccf402803 | {
"language": "C#"
} | ```c#
using AVKit;
namespace MediaManager.Platforms.Ios.Video
{
public class PlayerViewController : AVPlayerViewController
{
protected MediaManagerImplementation MediaManager => CrossMediaManager.Apple;
public override void ViewWillDisappear(bool animated)
{
base.ViewWillD... | ```c#
using AVKit;
namespace MediaManager.Platforms.Ios.Video
{
public class PlayerViewController : AVPlayerViewController
{
protected static MediaManagerImplementation MediaManager => CrossMediaManager.Apple;
public override void ViewWillDisappear(bool animated)
{
base.Vi... |
89c212e3-5a95-44c7-88e4-8d88b0b3bc26 | {
"language": "C#"
} | ```c#
using RimWorld;
using Verse;
namespace MTW_AncestorSpirits
{
class ThoughtWorker_NoShrineRoom : ThoughtWorker
{
private static RoomRoleDef shrineRoomDef = DefDatabase<RoomRoleDef>.GetNamed("MTW_ShrineRoom");
protected override ThoughtState CurrentStateInternal(Pawn p)
{
... | ```c#
using RimWorld;
using Verse;
namespace MTW_AncestorSpirits
{
class ThoughtWorker_NoShrineRoom : ThoughtWorker
{
private static RoomRoleDef shrineRoomDef = DefDatabase<RoomRoleDef>.GetNamed("MTW_ShrineRoom");
protected override ThoughtState CurrentStateInternal(Pawn p)
{
... |
f4154046-5b26-412e-b43c-133f50d9c8a1 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
namespace LINQToTTreeLib.ExecutionCommon
{
/// <summary>
/// Runs an execution request
/// </summary>
interface IQueryExectuor
{
/// <summary>
/// Run request, and return the results
/// </summary>
... | ```c#
using System.Collections.Generic;
using System.IO;
namespace LINQToTTreeLib.ExecutionCommon
{
/// <summary>
/// Runs an execution request
/// </summary>
interface IQueryExectuor
{
/// <summary>
/// Run request, and return the results
/// </summary>
... |
a0424da5-7c68-4d6c-bc33-ad4b8834daa7 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Threading.Tasks;
using FluentAssertions;
using WeCantSpell.Tests.Utilities;
using Xunit;
namespace WeCantSpell.Tests.Integration.CSharp
{
public class CommentSpellingTests : CSharpTestBase
{
public static IEnumerable<object[]> can_find_mistakes_in_c... | ```c#
using System.Collections.Generic;
using System.Threading.Tasks;
using FluentAssertions;
using WeCantSpell.Tests.Utilities;
using Xunit;
namespace WeCantSpell.Tests.Integration.CSharp
{
public class CommentSpellingTests : CSharpTestBase
{
public static IEnumerable<object[]> can_find_mistakes_in_c... |
884a41df-327e-4ad6-aa44-d603c944969a | {
"language": "C#"
} | ```c#
namespace WebScriptHook.Framework.Messages.Outputs
{
/// <summary>
/// Sent by the component to request a channel for itself on the server.
/// This tells the server the name of this component, as well as the maximum number of requests
/// the component can handle per tick.
/// Once the se... | ```c#
namespace WebScriptHook.Framework.Messages.Outputs
{
/// <summary>
/// Sent by the component to request a channel for itself on the server.
/// This tells the server the name of this component, as well as the maximum number of requests
/// the component can handle per tick.
/// Once the se... |
a119dac9-030a-4b17-a53d-c7d4b3ec6f18 | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.ComponentModel;
using Microsoft.AspNetCore.ResponseCaching.Internal;
namespace Microsoft.AspNetCore.Builder
{
public class Resp... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.ComponentModel;
using Microsoft.AspNetCore.ResponseCaching.Internal;
namespace Microsoft.AspNetCore.Builder
{
public class Resp... |
f0ebb53d-7683-42e5-9f97-7082fed10cfb | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Data;
using Tera.Game;
namespace DamageMeter.UI
{
/// <summary>
/// Logique d'interaction pour HistoryLink.xaml
/// </summary>
public partial class HistoryLink
{
... | ```c#
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Data;
using Tera.Game;
namespace DamageMeter.UI
{
/// <summary>
/// Logique d'interaction pour HistoryLink.xaml
/// </summary>
public partial class HistoryLink
{
... |
6b04695f-a330-40b8-9f88-8fb3cd63aa93 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
// ReSharper disable AccessToDisposedClosure
namespace VGAudio.Cli
{
internal static class Batch
{
public static bool BatchConvert(Options options)
{
if (options.Job != JobType.Batch) return false... | ```c#
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
// ReSharper disable AccessToDisposedClosure
namespace VGAudio.Cli
{
internal static class Batch
{
public static bool BatchConvert(Options options)
{
if (options.Job != JobType.Batch) return false... |
e7aa3618-30e3-49aa-a11a-c160d9ea7100 | {
"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 BenchmarkDotNet.Attributes;
using osu.Game.Online.API;
using osu.Game.Rulesets.Osu;
namespace osu.Game.Benchmarks
{
public class BenchmarkRuleset : Bench... | ```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 BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Engines;
using osu.Game.Online.API;
using osu.Game.Rulesets.Osu;
namespace osu.Game.Benchmarks
{
public... |
b4109255-4f86-4658-8ce1-cb310b0915f4 | {
"language": "C#"
} | ```c#
using System.IO;
namespace DevTyr.Gullap.Model
{
public static class MetaContentExtensions
{
public static string GetTargetFileName(this MetaContent content, SitePaths paths)
{
var isPage = content.Page != null;
string userDefinedFileName = content.GetOverriddenFileNam... | ```c#
using System.IO;
namespace DevTyr.Gullap.Model
{
public static class MetaContentExtensions
{
public static string GetTargetFileName(this MetaContent content, SitePaths paths)
{
var isPage = content.Page != null;
string userDefinedFileName = content.GetOverriddenFileNam... |
1c86295c-c031-49a4-8e8c-e7b1c34207b8 | {
"language": "C#"
} | ```c#
using Glimpse.Agent.Web;
using Microsoft.AspNet.Builder;
using Glimpse.Host.Web.AspNet;
using Microsoft.Framework.DependencyInjection;
namespace Glimpse.Agent.AspNet.Sample
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGlimp... | ```c#
using System.Collections.Generic;
using System.Reflection;
using System.Text.RegularExpressions;
using Glimpse.Agent.Web;
using Glimpse.Agent.Web.Framework;
using Glimpse.Agent.Web.Options;
using Microsoft.AspNet.Builder;
using Glimpse.Host.Web.AspNet;
using Microsoft.Framework.DependencyInjection;
namespace Gl... |
ab436394-95cf-4c5d-b76a-ae6209b3a947 | {
"language": "C#"
} | ```c#
@{
Layout = "~/Views/Shared/_LayoutPublic.cshtml";
}
@section metaPage
{
<meta property="og:type" content="website">
<meta property="og:image" content="@(AppConfiguration.Value.SiteUrl + "/content/images/logo-og.jpg")">
}
@RenderBody()```
Fix og:image path for home page | ```c#
@{
Layout = "~/Views/Shared/_LayoutPublic.cshtml";
}
@section metaPage
{
<meta property="og:type" content="website">
<meta property="og:image" content="@(AppConfiguration.Value.SiteUrl + "/images/logo-og.jpg")">
}
@RenderBody()``` |
cacf0de9-4324-44c4-bda4-aaa1c2a17027 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace SqlDiffFramework
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Applicat... | ```c#
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using SqlDiffFramework.Forms;
namespace SqlDiffFramework
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Ena... |
2e6f46e4-880d-4897-8c90-7f910d053969 | {
"language": "C#"
} | ```c#
namespace WeatherDataFunctionApp
{
using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Host;
public static class WeatherDataService
{
... | ```c#
namespace WeatherDataFunctionApp
{
using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Host;
public static class Weat... |
9fbd65f2-3465-4773-bf9a-f0e7914ae67e | {
"language": "C#"
} | ```c#
using Microsoft.Web.Administration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Threading;
using System.Threadin... | ```c#
using Microsoft.Web.Administration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Threading;
using System.Threadin... |
e669720e-23ca-404e-a129-02d043618485 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CreviceApp.Threading
{
// http://www.codeguru.com/csharp/article.php/c18931/Understanding-the-... | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CreviceApp.Threading
{
// http://www.codeguru.com/csharp/article.php/c18931/Understanding-the-... |
df574036-09aa-45f2-ad19-c830ce5a8611 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ecologylab.serialization;
using ecologylab.attributes;
namespace ecologylabFundamentalTestCases.Polymorphic
{
/**
*
* <configuration>
<pref_double name="index_thumb_dist" value=... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ecologylab.serialization;
using ecologylab.attributes;
namespace ecologylabFundamentalTestCases.Polymorphic
{
/**
*
* <configuration>
<pref_double name="index_thumb_dist" value=... |
5a76aa2a-c2ba-4e14-8211-628056fb4cec | {
"language": "C#"
} | ```c#
using System;
using osu.Framework.Configuration;
using osu.Framework.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
{
public class CheckBoxOption : BasicCheckBox
{
private Bindable<bool> bindable;
public Bindable<bool> Bindable
{
set
{
... | ```c#
using System;
using osu.Framework.Configuration;
using osu.Framework.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
{
public class CheckBoxOption : BasicCheckBox
{
private Bindable<bool> bindable;
public Bindable<bool> Bindable
{
set
... |
50590221-c272-4ccd-aad3-f94051283547 | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using NUnit.Framework;
namespace Atata.WebDriverExtras.Tests
{
[TestFixture]
[Parallelizable(ParallelScope.None)]
public class SafeWaitTests
{
private SafeWait<object> wait;
[SetUp]
public void SetUp()
{
wait = ne... | ```c#
using System;
using System.Threading;
using NUnit.Framework;
namespace Atata.WebDriverExtras.Tests
{
[TestFixture]
[Parallelizable(ParallelScope.None)]
public class SafeWaitTests
{
private SafeWait<object> wait;
[SetUp]
public void SetUp()
{
wait = ne... |
315d3e0c-54b3-4c20-b822-020eab180861 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Im... | ```c#
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
u... |
29d1ab20-f492-4899-8896-8dc6f2a49baf | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="WinAPI.NET">
// Copyright (c) Marek Dzikiewicz, All Rights Reserved.
// </copyright>
// ---------------------------------------------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="WinAPI.NET">
// Copyright (c) Marek Dzikiewicz, All Rights Reserved.
// </copyright>
// ---------------------------------------------------------... |
a7d81395-f6b1-4d18-a186-ffeffe0a1534 | {
"language": "C#"
} | ```c#
using Silk.Data.SQL.Expressions;
using Silk.Data.SQL.Queries;
using System.Threading.Tasks;
namespace Silk.Data.SQL.ORM.Operations
{
public abstract class DataOperation
{
/// <summary>
/// Gets a value indicating if the operation can be executed as part of a batch operation.
/// </summary>
... | ```c#
using Silk.Data.SQL.Expressions;
using Silk.Data.SQL.Queries;
using System.Threading.Tasks;
namespace Silk.Data.SQL.ORM.Operations
{
public abstract class DataOperation
{
/// <summary>
/// Gets a value indicating if the operation can be executed as part of a batch operation.
/// </summary>
... |
723cbb1d-cf60-4797-9bad-1ff7af2b8cff | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
namespace SimpleReport.Model.Replacers
{
/// <summary>
/// Used to replace xml code and remo... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
namespace SimpleReport.Model.Replacers
{
/// <summary>
/// Used to replace xml code and remo... |
b31f89f9-b638-4acb-9fd6-2999b129c29c | {
"language": "C#"
} | ```c#
using System;
using System.Web;
using System.Web.Hosting;
using System.Configuration;
namespace NuGet.Server.Infrastructure
{
public class PackageUtility
{
internal static string PackagePhysicalPath;
private static string DefaultPackagePhysicalPath = HostingEnvironment.MapPath... | ```c#
using System;
using System.Web;
using System.Web.Hosting;
using System.Configuration;
using System.IO;
namespace NuGet.Server.Infrastructure
{
public class PackageUtility
{
internal static string PackagePhysicalPath;
private static string DefaultPackagePhysicalPath = HostingE... |
ecd67b71-aa5f-43fb-ae53-39e57bd6b165 | {
"language": "C#"
} | ```c#
using static System.Console;
namespace ConsoleApp
{
class Program
{
private static void Main()
{
var connectionString = @"Server=.\SQLEXPRESS;Database=LearnORM;Trusted_Connection=True;";
var schemaName = "dbo";
var tableName = "Book";
var ... | ```c#
using static System.Console;
namespace ConsoleApp
{
class Program
{
private static void Main(string[] args)
{
if (args.Length != 3)
{
WriteLine("Usage: schema2fm.exe connectionstring schema table");
return;
}
... |
460701b5-6793-49d9-bb45-8dda97cb6758 | {
"language": "C#"
} | ```c#
#region License
//
// Copyright (c) 2013, Kooboo team
//
// Licensed under the BSD License
// See the file LICENSE.txt for details.
//
#endregion
using Kooboo.CMS.Sites.Extension.ModuleArea;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Koobo... | ```c#
#region License
//
// Copyright (c) 2013, Kooboo team
//
// Licensed under the BSD License
// See the file LICENSE.txt for details.
//
#endregion
using Kooboo.CMS.Sites.Extension.ModuleArea;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Koobo... |
30c46e43-f3c1-4680-bdc6-1f47122cbb56 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DigitalOcean.Structs
{
public class Droplet
{
public int id { get; set; }
public string name { get; set; }
public int image_id { get; ... | ```c#
using System.Collections.Generic;
namespace DigitalOcean.Structs
{
public class Droplet
{
public int id { get; set; }
public int image_id { get; set; }
public string name { get; set; }
public int region_id { get; set; }
public int size_id { get; set; }
pub... |
6e0b4e56-1785-424a-baa5-86acaeb2bf4e | {
"language": "C#"
} | ```c#
using MyDocs.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Windows.Storage;
using Logic = MyDocs.Common.Model.Logic;
namespace JsonNetDal
{
public class SubDocument
{
public string Title { get; set; }
public string File { ... | ```c#
using MyDocs.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Windows.Storage;
using Logic = MyDocs.Common.Model.Logic;
namespace JsonNetDal
{
public class SubDocument
{
public string Title { get; set; }
public Uri Fi... |
775b65c6-082b-45aa-b8ab-739ad973bb7e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Threading.Tasks;
namespace Cronus.Core.Eventing
{
/// <summary>
/// Represents an in memory event messaging destribution
/// </summary>
public class ... | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Cronus.Core.Eventing
{
/// <summary>
/// Represents an in memory event messaging destribution
/// </summary>
public class InMemoryEventBus : AbstractEventBus
{
/// <summary>
//... |
31fe9ce9-a158-4f64-a4ce-446c816da57c | {
"language": "C#"
} | ```c#
using Gigobyte.Daterpillar.Arguments;
using Gigobyte.Daterpillar.Commands;
using System;
namespace Gigobyte.Daterpillar
{
public class Program
{
internal static void Main(string[] args)
{
InitializeWindow();
start:
var options = new Options();
... | ```c#
using Gigobyte.Daterpillar.Arguments;
using Gigobyte.Daterpillar.Commands;
using System;
namespace Gigobyte.Daterpillar
{
public class Program
{
internal static void Main(string[] args)
{
InitializeWindow();
do
{
var commandLineOptions... |
8e30d633-6228-4901-81e8-8db656cd295c | {
"language": "C#"
} | ```c#
#if NET45
using System;
using Microsoft.Owin.Hosting;
namespace MvcSample
{
public class Program
{
const string baseUrl = "http://localhost:9001/";
public static void Main()
{
using (WebApp.Start<Startup>(new StartOptions(baseUrl)))
{
Cons... | ```c#
using System;
#if NET45
using Microsoft.Owin.Hosting;
#endif
namespace MvcSample
{
public class Program
{
const string baseUrl = "http://localhost:9001/";
public static void Main()
{
#if NET45
using (WebApp.Start<Startup>(new StartOptions(baseUrl)))
{
... |
119de941-4ed0-4fdf-8200-d4856c00237c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Azure.WebJobs;
namespace TaskWebJob
{
// To learn more about Microsoft Azure WebJobs SDK, please see http://go.microsoft.com/fwlink/?LinkID=320976
class Program
{
// Please set the following connecti... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Azure.WebJobs;
namespace TaskWebJob
{
// To learn more about Microsoft Azure WebJobs SDK, please see http://go.microsoft.com/fwlink/?LinkID=320976
class Program
{
// Please set the following connecti... |
07ba4e26-718f-4014-a46d-c6cef6dc8d21 | {
"language": "C#"
} | ```c#
/*
----------------------------------------------------------------------
Numenta Platform for Intelligent Computing (NuPIC)
Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
with Numenta, Inc., for a separate license for this software code, the
following terms and conditions apply:
Th... | ```c#
/*
----------------------------------------------------------------------
Numenta Platform for Intelligent Computing (NuPIC)
Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
with Numenta, Inc., for a separate license for this software code, the
following terms and conditions apply:
Th... |
d12fc465-9bab-4c54-9a8d-c54848e0e31d | {
"language": "C#"
} | ```c#
using NBi.Core.ResultSet;
using System;
using System.Globalization;
using System.Linq;
namespace NBi.Core.Scalar.Comparer
{
public class ToleranceFactory
{
public static Tolerance Instantiate(IColumnDefinition columnDefinition)
{
if (columnDefinition.Role != ColumnRole.Value... | ```c#
using NBi.Core.ResultSet;
using System;
using System.Globalization;
using System.Linq;
namespace NBi.Core.Scalar.Comparer
{
public class ToleranceFactory
{
public static Tolerance Instantiate(IColumnDefinition columnDefinition)
{
if (string.IsNullOrEmpty(columnDefinition.Tol... |
81c5eea0-700a-4944-8809-bf675d99c478 | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using ActiproSoftware.Text.Implementation;
using NQuery.Language.Services.BraceMatching;
namespace NQuery.Language.ActiproWpf
{
public sealed class NQu... | ```c#
using System;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using ActiproSoftware.Text.Implementation;
using NQuery.Language.Services.BraceMatching;
using NQuery.Language.Wpf;
namespace NQuery.Language.ActiproWpf
{
... |
63ee139b-f275-404b-a0f8-e72795c570ae | {
"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.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings
{
public class SettingsTextBox : SettingsItem<string... | ```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.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings
{
public class SettingsTextBox : SettingsItem<string... |
db1be16d-f116-492b-b0b2-be4e9350495f | {
"language": "C#"
} | ```c#
namespace NuGetPe
{
public static class NuGetConstants
{
public static readonly string DefaultFeedUrl = "http://www.nuget.org/api/v2/";
public static readonly string V2LegacyFeedUrl = "https://nuget.org/api/v2/";
public static readonly string PluginFeedUrl = "http://www.myget.org/... | ```c#
namespace NuGetPe
{
public static class NuGetConstants
{
public static readonly string DefaultFeedUrl = "https://www.nuget.org/api/v2/";
public static readonly string V2LegacyFeedUrl = "https://nuget.org/api/v2/";
public static readonly string PluginFeedUrl = "http://www.myget.org... |
0ffe243d-0a92-4e45-a559-6f63a30abcd5 | {
"language": "C#"
} | ```c#
/* © 2017 Ivan Pointer
MIT License: https://github.com/ivanpointer/NuLog/blob/master/LICENSE
Source on GitHub: https://github.com/ivanpointer/NuLog */
using NuLog.LogEvents;
using System;
using System.Threading.Tasks;
namespace NuLog.Targets
{
public class ConsoleTarget : LayoutTargetBase
{
pub... | ```c#
/* © 2017 Ivan Pointer
MIT License: https://github.com/ivanpointer/NuLog/blob/master/LICENSE
Source on GitHub: https://github.com/ivanpointer/NuLog */
using NuLog.LogEvents;
using System;
namespace NuLog.Targets
{
public class ConsoleTarget : LayoutTargetBase
{
public override void Write(LogEve... |
fd617caa-9c6a-42f0-a9e9-a0a5c9dc7437 | {
"language": "C#"
} | ```c#
// <copyright file="QtCreatorBuilder.cs" company="Mark Final">
// Opus package
// </copyright>
// <summary>QtCreator package</summary>
// <author>Mark Final</author>
[assembly: Opus.Core.DeclareBuilder("QtCreator", typeof(QtCreatorBuilder.QtCreatorBuilder))]
// Automatically generated by Opus v0.20
name... | ```c#
// <copyright file="QtCreatorBuilder.cs" company="Mark Final">
// Opus package
// </copyright>
// <summary>QtCreator package</summary>
// <author>Mark Final</author>
[assembly: Opus.Core.DeclareBuilder("QtCreator", typeof(QtCreatorBuilder.QtCreatorBuilder))]
// Automatically generated by Opus v0.20
name... |
3838911a-b07b-4ff9-ae2d-d3bf656702cb | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using Autofac;
using Autofac.Integration.Mvc;
using Zk.Models;
using Zk.Services;
using Zk.Repositories;
namespace Zk
{
public static class IocConfig
{
public static void RegisterDependencies()
{
var builder = new ContainerBuilder();
builder.... | ```c#
using System.Web.Mvc;
using Autofac;
using Autofac.Integration.Mvc;
using Zk.Models;
using Zk.Services;
using Zk.Repositories;
namespace Zk
{
public static class IocConfig
{
public static void RegisterDependencies()
{
var builder = new ContainerBuilder();
builder.... |
3aa7e860-e7da-4583-a9b5-0d17d38d0540 | {
"language": "C#"
} | ```c#
using System;
namespace DAQ.Environment
{
public class PHBonesawFileSystem : DAQ.Environment.FileSystem
{
public PHBonesawFileSystem()
{
Paths.Add("MOTMasterDataPath", "C:\\Users\\cafmot\\Box\\CaF MOT\\MOTData\\MOTMasterData\\");
Paths.Add("scriptListPath", "C:\\C... | ```c#
using System;
namespace DAQ.Environment
{
public class PHBonesawFileSystem : DAQ.Environment.FileSystem
{
public PHBonesawFileSystem()
{
Paths.Add("MOTMasterDataPath", "C:\\Users\\cafmot\\Box Sync\\CaF MOT\\MOTData\\MOTMasterData\\");
Paths.Add("scriptListPath", "... |
6bf594d7-8b9d-438f-8cda-549851e5240c | {
"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.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.Visua... | ```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.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.Visua... |
9885fac5-d62d-4881-ac5a-948360eaab42 | {
"language": "C#"
} | ```c#
@model dynamic
@using Umbraco.Web.Templates
@if (Model.value != null)
{
var url = Model.value.image;
if(Model.editor.config != null && Model.editor.config.size != null){
url += "?width=" + Model.editor.config.size.width;
url += "&height=" + Model.editor.config.size.height;
if... | ```c#
@model dynamic
@using Umbraco.Web.Templates
@if (Model.value != null)
{
var url = Model.value.image;
if(Model.editor.config != null && Model.editor.config.size != null){
url += "?width=" + Model.editor.config.size.width;
url += "&height=" + Model.editor.config.size.height;
if... |
f427c8db-e224-4f08-9a7d-448b9ab61b29 | {
"language": "C#"
} | ```c#
using System;
using Sancho.DOM.XamarinForms;
using Sancho.XAMLParser;
using TabletDesigner.Helpers;
using Xamarin.Forms;
namespace TabletDesigner
{
public interface ILogAccess
{
void Clear();
string Log { get; }
}
public partial class TabletDesignerPage : ContentPage
{
... | ```c#
using System;
using Sancho.DOM.XamarinForms;
using Sancho.XAMLParser;
using TabletDesigner.Helpers;
using Xamarin.Forms;
namespace TabletDesigner
{
public interface ILogAccess
{
void Clear();
string Log { get; }
}
public partial class TabletDesignerPage : ContentPage
{
... |
b25b05ac-e813-431c-b1c2-a2ea4d5b94f4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.Ast.Transforms;
using ICSharpCode.NRefactory.CSharp;
namespace JSIL {
public class DeclarationHoister : ContextTrackingVisitor<object> {
public readonly BlockStatement Output;
public Va... | ```c#
using System;
using System.Collections.Generic;
using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.Ast.Transforms;
using ICSharpCode.NRefactory.CSharp;
namespace JSIL {
public class DeclarationHoister : ContextTrackingVisitor<object> {
public readonly BlockStatement Output;
public Va... |
d3516996-c0b7-4d8d-a73f-f3c4ddcd2a88 | {
"language": "C#"
} | ```c#
using Avalonia.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Data.Core
{
internal abstract class SettableNode : ExpressionNode
{
public bool SetTargetValue(object value, BindingPriority priority)
... | ```c#
using Avalonia.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Data.Core
{
internal abstract class SettableNode : ExpressionNode
{
public bool SetTargetValue(object value, BindingPriority priority)
... |
52e7c497-ba71-47ae-befa-049575db20d4 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
namespace FilterLists.SharedKernel.Logging
{
public static class HostRun... | ```c#
using System;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
namespace FilterLists.SharedKernel.Logging
{
public static class HostRunner
{
public static async Task... |
e135cb8c-b866-4e01-8af1-9fdb320bdcf3 | {
"language": "C#"
} | ```c#
using System;
using System.Xml;
namespace FluentNHibernate.Mapping
{
public class ImportPart : IMappingPart
{
private readonly Cache<string, string> attributes = new Cache<string, string>();
private readonly Type importType;
public ImportPart(Type importType)
{... | ```c#
using System;
using System.Xml;
namespace FluentNHibernate.Mapping
{
public class ImportPart : IMappingPart
{
private readonly Cache<string, string> attributes = new Cache<string, string>();
private readonly Type importType;
public ImportPart(Type importType)
{... |
aba9ffc7-753d-4a77-b024-635d899e681f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Xaml.Behaviors;
namespace Monitorian.Core.Views.Behaviors
{
public class FocusElementAction : TriggerAction<DependencyObject>
{
public UIEleme... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Xaml.Behaviors;
namespace Monitorian.Core.Views.Behaviors
{
public class FocusElementAction : TriggerAction<DependencyObject>
{
public UIEleme... |
890a93b9-e18a-4b19-844e-f1074ece58a4 | {
"language": "C#"
} | ```c#
#if !NO_UNITY
using System;
using UnityEngine;
using UnityEngine.Events;
namespace FullSerializer {
partial class fsConverterRegistrar {
public static Internal.Converters.UnityEvent_Converter Register_UnityEvent_Converter;
}
}
namespace FullSerializer.Internal.Converters {
// The standard FS... | ```c#
#if !NO_UNITY
using System;
using UnityEngine;
using UnityEngine.Events;
namespace FullSerializer {
partial class fsConverterRegistrar {
// Disable the converter for the time being. Unity's JsonUtility API cannot be called from
// within a C# ISerializationCallbackReceiver callback.
... |
70a5b82e-788b-4e79-b2b6-cda04dba4d55 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Newtonsoft.Json;
using SurveyMonkey.Enums;
namespace SurveyMonkey.Containers
{
[JsonConverter(typeof(TolerantJsonConverter))]
public class Recipient : IPageableContainer
{
public long? Id { get; set; }
public long? SurveyId { get; set; }
... | ```c#
using System.Collections.Generic;
using Newtonsoft.Json;
using SurveyMonkey.Enums;
namespace SurveyMonkey.Containers
{
[JsonConverter(typeof(TolerantJsonConverter))]
public class Recipient : IPageableContainer
{
public long? Id { get; set; }
public long? SurveyId { get; set; }
... |
d2701097-6bc4-41d0-9231-b2bbf9b645af | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.IO;
using DspAdpcm.Encode.Adpcm;
using DspAdpcm.Encode.Adpcm.Formats;
using DspAdpcm.Encode.Pcm;
using DspAdpcm.Encode.Pcm.Formats;
namespace DspAdpcm.Cli
{
public static class DspAdpcmCli
{
public static int Main(string[] args)
{
... | ```c#
using System;
using System.Diagnostics;
using System.IO;
using DspAdpcm.Encode.Adpcm;
using DspAdpcm.Encode.Adpcm.Formats;
using DspAdpcm.Encode.Pcm;
using DspAdpcm.Encode.Pcm.Formats;
namespace DspAdpcm.Cli
{
public static class DspAdpcmCli
{
public static int Main(string[] args)
{
... |
28e77423-104f-4da7-b72c-447ab29f7cc4 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
namespace SkypeSharp {
/// <summary>
/// Class representing a Skype CHAT object
/// </summary>
public class Chat : SkypeObject {
/// <summary>
/// List of users in this chat
/// </summary>
public IEnumer... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace SkypeSharp {
/// <summary>
/// Class representing a Skype CHAT object
/// </summary>
public class Chat : SkypeObject {
/// <summary>
/// List of users in this chat
... |
61d0b1fe-bd46-4255-89d2-856794dfb911 | {
"language": "C#"
} | ```c#
using System;
namespace SeleniumExtension.SauceLabs
{
public class SauceDriverKeys
{
public static string SAUCELABS_USERNAME
{
get
{
var userName = Environment.GetEnvironmentVariable("SAUCELABS_USERNAME", EnvironmentVariableTarget.User);
... | ```c#
using System;
namespace SeleniumExtension.SauceLabs
{
public class SauceDriverKeys
{
public static string SAUCELABS_USERNAME
{
get
{
var userName = Environment.GetEnvironmentVariable("SAUCELABS_USERNAME");
if(string.IsNullOrEmpty(u... |
13f3c15b-ed5a-4196-9c76-2d6043d4a6fe | {
"language": "C#"
} | ```c#
namespace Metrics.Integrations.Linters
{
using System;
using System.IO;
using System.Text;
// TODO: Improve logging.
public class LogManager : IDisposable
{
public StringBuilder LogWriter { get; }
private bool saved = false;
public LogManager()
{
... | ```c#
namespace Metrics.Integrations.Linters
{
using System;
using System.IO;
using System.Text;
// TODO: Improve logging.
public class LogManager : IDisposable
{
public StringBuilder LogWriter { get; }
private bool saved = false;
private bool error = false;
pub... |
e62db394-8b57-4444-8b58-c15f98db2cda | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using KAGTools.Data;
using Newtonsoft.Json;
namespace KAGTools.Helpers
{
public static class ApiHelper
{
private const string UrlPlayer... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using KAGTools.Data;
using Newtonsoft.Json;
namespace KAGTools.Helpers
{
public static class ApiHelper
{
private const string UrlPlayer... |
46e6573b-2aa4-4e16-a89d-16270787db72 | {
"language": "C#"
} | ```c#
using System;
using Gtk;
namespace gtksharp_clock
{
class MainClass
{
public static void Main(string[] args)
{
Application.Init();
MainWindow win = new MainWindow();
win.Show();
Application.Run();
}
}
}
```
Add clock Face and Window classes. Draw a line. Setting FG color is TODO. | ```c#
using System;
using Gtk;
// http://www.mono-project.com/docs/gui/gtksharp/widgets/widget-colours/
namespace gtksharp_clock
{
class MainClass
{
public static void Main(string[] args)
{
Application.Init();
ClockWindow win = new ClockWindow ();
win.Show();
Application.Run();
}
}
class Clock... |
98277785-d3bd-4502-a7d2-fb0759cc4e88 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace RabidWarren.Collections.Generic
{
public static class Enumerable
{
public static Multimap<TKey, TElement> ToMultimap<TSource, TKey, TElement>(
this IEnumerable<TSource> source,
... | ```c#
// -----------------------------------------------------------------------
// <copyright file="Enumerable.cs" company="Ron Parker">
// Copyright 2014 Ron Parker
// </copyright>
// <summary>
// Provides an extension method for converting IEnumerables to Multimaps.
// </summary>
// ------------------------... |
ab0de76a-a9c1-4114-8421-eae117404d02 | {
"language": "C#"
} | ```c#
<!DOCTYPE html>
<html ng-app="VoteOn-Poll">
<head>
<title>Vote On</title>
<meta name="viewport" content="initial-scale=1">
@Styles.Render("~/Bundles/StyleLib/AngularMaterial")
@Styles.Render("~/Bundles/StyleLib/FontAwesome")
@Styles.Render("~/Bundles/VotingStyle")
</head>
<body>
<div l... | ```c#
<!DOCTYPE html>
<html ng-app="VoteOn-Poll">
<head>
<title>Vote On</title>
<meta name="viewport" content="initial-scale=1">
@Styles.Render("~/Bundles/StyleLib/AngularMaterial")
@Styles.Render("~/Bundles/StyleLib/FontAwesome")
@Styles.Render("~/Bundles/VotingStyle")
</head>
<body>
<div l... |
1da214a5-18c4-45c3-98b2-4d64d2580b73 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Taiko.Mods
{
public class T... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Taiko.Mods
{
public class T... |
aad0f7fb-1075-4680-b9eb-bad298ad0351 | {
"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 osu.Framework.Timing;
using osu.Framework.Configuration;
namespace osu.Game.Screens.Play.ReplaySettings
{
public class PlaybackSettings : Repla... | ```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 osu.Framework.Timing;
using osu.Framework.Configuration;
namespace osu.Game.Screens.Play.ReplaySettings
{
public class PlaybackSettings : Repla... |
1569a2d5-8d39-499b-b789-f2af6648b10a | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
namespace Stripe
{
public class StripeStatusTransitions : StripeEntity
{
[JsonConverter(typeof(StripeDateTimeConverter))]
[JsonProperty("canceled")]
public DateTime? Canceled { get; set; }
[JsonConverter(t... | ```c#
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
namespace Stripe
{
public class StripeStatusTransitions : StripeEntity
{
[JsonConverter(typeof(StripeDateTimeConverter))]
[JsonProperty("canceled")]
public DateTime? Canceled { get; set; }
[JsonConverter(t... |
306f76e9-00c9-4132-bf10-0e990899723d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Acklann.Daterpillar.TextTransformation
{
public class ScriptBuilderFactory
{
public ScriptBuilderFactory()
{
LoadAssemblyTypes();
}
public IScriptBuilder CreateInstance(string ... | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Acklann.Daterpillar.TextTransformation
{
public class ScriptBuilderFactory
{
public ScriptBuilderFactory()
{
LoadAssemblyTypes();
}
public IScriptBuilder CreateInstance(string ... |
17e9ab95-4dc0-4d76-b035-a991b644ffad | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using System.Web.Http;
using CroquetAustralia.Domain.Features.TournamentEntry.Commands;
using CroquetAustralia.Domain.Features.TournamentEntry.Events;
using CroquetAustralia.Domain.Services.Queues;
namespace CroquetAustralia.WebApi.Controllers
{
[RoutePrefix("tournament... | ```c#
using System;
using System.Threading.Tasks;
using System.Web.Http;
using CroquetAustralia.Domain.Features.TournamentEntry;
using CroquetAustralia.Domain.Features.TournamentEntry.Commands;
using CroquetAustralia.Domain.Features.TournamentEntry.Events;
using CroquetAustralia.Domain.Services.Queues;
namesp... |
e9d56482-2ec4-4d23-aea6-4cb18f61679b | {
"language": "C#"
} | ```c#
using System.Xml.Serialization;
namespace DevelopmentInProgress.DipState
{
public enum DipStateType
{
[XmlEnum("1")]
Standard = 1,
[XmlEnum("2")]
Auto = 3
}
}```
Add a root state type | ```c#
using System.Xml.Serialization;
namespace DevelopmentInProgress.DipState
{
public enum DipStateType
{
[XmlEnum("1")]
Standard = 1,
[XmlEnum("2")]
Auto = 2,
[XmlEnum("3")]
Root = 3
}
}``` |
dff95961-2981-448a-ae81-ebe73f31f61c | {
"language": "C#"
} | ```c#
namespace Sitecore.FakeDb.Serialization.Tests.Deserialize
{
using System.Linq;
using Xunit;
[Trait("Deserialize", "Deserializing a tree of items")]
public class DeserializeTree : DeserializeTestBase
{
public DeserializeTree()
{
this.Db.Add(new DsDbItem(SerializationId.SampleTemplateFolde... | ```c#
namespace Sitecore.FakeDb.Serialization.Tests.Deserialize
{
using System.Linq;
using Xunit;
[Trait("Deserialize", "Deserializing a tree of items")]
public class DeserializeTree : DeserializeTestBase
{
public DeserializeTree()
{
this.Db.Add(new DsDbItem(SerializationId.SampleTemplateFolde... |
d4ed9dd8-8e3f-4530-8755-e029618e3832 | {
"language": "C#"
} | ```c#
using PluginContracts;
using System;
using System.Collections.Generic;
using Xunit;
namespace PluginLoader.Tests
{
public class Plugins_Tests
{
[Fact]
public void PluginsFoundFromLibsFolder()
{
// Arrange
var path = @"..\..\..\..\LAN\bin\Debug\netstandard1.... | ```c#
using PluginContracts;
using System;
using System.Collections.Generic;
using Xunit;
namespace PluginLoader.Tests
{
public class Plugins_Tests
{
[Fact]
public void PluginsFoundFromLibsFolder()
{
// Arrange
var path = @"..\..\..\..\Libs";
// Act
... |
69ddda0c-53cb-4278-86c3-c2ae8d66f464 | {
"language": "C#"
} | ```c#
using System.Web;
using System.Web.Mvc;
namespace SimpleMvcSitemap
{
class BaseUrlProvider : IBaseUrlProvider
{
public string GetBaseUrl(HttpContextBase httpContext)
{
//http://stackoverflow.com/a/1288383/205859
HttpRequestBase request = httpContext.Request;
... | ```c#
using System.Web;
using System.Web.Mvc;
namespace SimpleMvcSitemap
{
class BaseUrlProvider : IBaseUrlProvider
{
public string GetBaseUrl(HttpContextBase httpContext)
{
//http://stackoverflow.com/a/1288383/205859
HttpRequestBase request = httpContext.Request;
... |
45b37421-8aac-48f9-a20b-12573a4b0cfa | {
"language": "C#"
} | ```c#
using System.Collections.Specialized;
using System.Text;
using Moq;
using NUnit.Framework;
namespace LastPass.Test
{
[TestFixture]
class FetcherTest
{
[Test]
public void Login()
{
var webClient = new Mock<IWebClient>();
webClient
.Setup(... | ```c#
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using Moq;
using NUnit.Framework;
namespace LastPass.Test
{
[TestFixture]
class FetcherTest
{
[Test]
public void Login()
{
const string url = "https://lastpass.com/login.php";
c... |
af9e0436-3577-42e8-acec-6b20dc201784 | {
"language": "C#"
} | ```c#
namespace simple
{
using System;
using System.IO;
using k8s;
class PodList
{
static void Main(string[] args)
{
var k8sClientConfig = new KubernetesClientConfiguration();
IKubernetes client = new Kubernetes(k8sClientConfig);
Conso... | ```c#
namespace simple
{
using System;
using System.IO;
using k8s;
class PodList
{
static void Main(string[] args)
{
var k8sClientConfig = KubernetesClientConfiguration.BuildConfigFromConfigFile();
IKubernetes client = new Kubernetes(k8sClientConfi... |
9d77099e-c2d8-41c0-a12c-1f4eca64216b | {
"language": "C#"
} | ```c#
using System;
using NUnit.Framework;
using FluentAssertions;
using SketchSolve;
using System.Linq;
namespace SketchSolve.Spec
{
[TestFixture()]
public class Solver
{
[Test()]
public void HorizontalConstraintShouldWork ()
{
var parameters = new Parameter[]{
new Parameter(0),
new Parameter(1),... | ```c#
using System;
using NUnit.Framework;
using FluentAssertions;
using SketchSolve;
using System.Linq;
namespace SketchSolve.Spec
{
[TestFixture()]
public class Solver
{
[Test()]
public void HorizontalConstraintShouldWork ()
{
var parameters = new Parameter[]{
new Parameter(0),
new Parameter(1),... |
b8254aec-bff3-4dbd-acfa-e3f6d41f2755 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
namespace osu.Framework.Development
{
public static class Debug... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
namespace osu.Framework.Development
{
public static class Debug... |
89030ac0-c7a4-47f4-b1a3-19bea44f62b7 | {
"language": "C#"
} | ```c#
using CommonMarkSharp.Blocks;
using CommonMarkSharp.Inlines;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonMarkSharp.InlineParsers
{
public class AnyParser : IParser<InlineString>
{
public AnyParser... | ```c#
using CommonMarkSharp.Blocks;
using CommonMarkSharp.Inlines;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace CommonMarkSharp.InlineParsers
{
public class AnyParser : IParser<InlineS... |
9c5f475b-9176-487a-84e2-05dc9ef7badf | {
"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.Localisation;
using osu.Framework.Platform;
using osu.Game.Database;
using osu.Ga... | ```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.Threading;
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Fra... |
82b6d900-6c95-478a-9392-fb83fa6adfef | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Nest
{
public class SynonymTokenFilter : TokenFilterSettings
{
public SynonymTokenFilter() : base("synonym")
{
}
[JsonProperty("synonyms_path", NullValueHandling = NullValueHandling.Ignore)]
... | ```c#
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Nest
{
public class SynonymTokenFilter : TokenFilterSettings
{
public SynonymTokenFilter() : base("synonym")
{
}
[JsonProperty("synonyms_path", NullValueHandling = NullValueHandling.Ignore)]
... |
fab993a6-ca2a-40ac-81a7-9b78c165c1f7 | {
"language": "C#"
} | ```c#
/* Copyright (c) 2016 Kevin Fischer
*
* This Source Code Form is subject to the terms of the MIT License.
* If a copy of the license was not distributed with this file,
* You can obtain one at https://opensource.org/licenses/MIT. */
using UnityEngine;
using System.Collections.Generic;
using System.Collectio... | ```c#
/* Copyright (c) 2016 Kevin Fischer
*
* This Source Code Form is subject to the terms of the MIT License.
* If a copy of the license was not distributed with this file,
* You can obtain one at https://opensource.org/licenses/MIT. */
using UnityEngine;
using System.Collections.Generic;
using System.Collectio... |
56120e29-9f14-4645-a1eb-09ca9f9b054f | {
"language": "C#"
} | ```c#
using AvalonStudio.Extensibility;
using ReactiveUI;
using Splat;
using System;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Threading;
using WalletWasabi.Gui.Helpers;
using WalletWasabi.Logging;
using WalletWasabi.Wallets;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{... | ```c#
using AvalonStudio.Extensibility;
using ReactiveUI;
using Splat;
using System;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Threading;
using WalletWasabi.Gui.Helpers;
using WalletWasabi.Logging;
using WalletWasabi.Wallets;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{... |
e31afad9-d0aa-46d8-b216-308bbe834d18 | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. 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.Reactive.Linq;
using System.Threading.Channels;
namespace SignalRSamples
{
public static class ObservableExtension... | ```c#
// Copyright (c) .NET Foundation. 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.Reactive.Linq;
using System.Threading.Channels;
namespace SignalRSamples
{
public static class ObservableExtension... |
edeaf522-beec-4ba7-97df-ab94c0cdae72 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Totem.Runtime.Timeline
{
/// <summary>
/// Describes a series of domain events
/// </summary>
public interface ITimeline : IFluent
{
void Append(TimelinePosition cause, IReadOnlyList<Event> events);... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Totem.Runtime.Timeline
{
/// <summary>
/// Describes a series of domain events
/// </summary>
public interface ITimeline : IFluent
{
void Append(TimelinePosition cause, Many<Event> events);
void ... |
94fc3e9b-b9d7-45fa-93be-0ea4956f9ec8 | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyProduct("Espera")]
[assembly: AssemblyCopyright("Copyright © 2013 Dennis Daume")]
[assembly: AssemblyVersion("1.7.0.6")]
[assembly: AssemblyFileVersion("1.7.0.6")]```
Fix assembly version for Shimmer | ```c#
using System.Reflection;
[assembly: AssemblyProduct("Espera")]
[assembly: AssemblyCopyright("Copyright © 2013 Dennis Daume")]
[assembly: AssemblyVersion("1.7.6")]
[assembly: AssemblyFileVersion("1.7.6")]
[assembly: AssemblyInformationalVersion("1.7.6")]``` |
ecebcade-cacf-4e44-869d-e84a8f176697 | {
"language": "C#"
} | ```c#
using System.Net;
using System.Web.Mvc;
namespace SFA.DAS.EmployerAccounts.Web.Controllers
{
public class ErrorController : Controller
{
[Route("accessdenied")]
public ActionResult AccessDenied()
{
Response.StatusCode = (int)HttpStatusCode.Forbidden;
retu... | ```c#
using System.Net;
using System.Web.Mvc;
using SFA.DAS.Authentication;
using SFA.DAS.EmployerAccounts.Interfaces;
using SFA.DAS.EmployerAccounts.Web.ViewModels;
namespace SFA.DAS.EmployerAccounts.Web.Controllers
{
public class ErrorController : BaseController
{
public ErrorController(
... |
6aecc344-6647-45af-9dec-17e44493b9af | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Webkit;
using Android.Widget;
using Repository.Internal;
using static Repository.Internal.Verif... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Webkit;
using Android.Widget;
using Repository.Internal;
using static Repository.Internal.Verif... |
888b2f24-1467-4409-83d5-43a0addd3123 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SlackAPI
{
public abstract class Response
{
/// <summary>
/// Should always be checked before trying to process a response.
/// </summary>
public ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SlackAPI
{
public abstract class Response
{
/// <summary>
/// Should always be checked before trying to process a response.
/// </summary>
public ... |
a25a9735-6bf8-47fe-9edd-c14ab8fcc446 | {
"language": "C#"
} | ```c#
using System;
using UnityEngine;
namespace CloudBread.OAuth
{
public class OAuth2Setting : ScriptableObject
{
static bool _useFacebook;
static public string FaceBookRedirectAddress;
static bool _useGooglePlay;
public static string GooglePlayRedirectAddress;
static bool _useKaKao;
public ... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEditor;
namespace CloudBread.OAuth
{
public class OAuth2Setting : ScriptableObject
{
private const string SettingAssetName = "CBOAuth2Setting";
private const string SettingsPath = "CloudBread/Resources";
priva... |
3feb2819-bab9-4bd3-bf37-18aa2ca4f552 | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
namespace Glimpse.Internal
{
public class TimeSpanConverter : JsonConverter
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
var result = 0.0;
var convertedNullable = v... | ```c#
using System;
using System.Globalization;
using Newtonsoft.Json;
namespace Glimpse.Internal
{
public class TimeSpanConverter : JsonConverter
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
var result = 0.0;
... |
977396f7-a44a-4036-804c-86e8eae62931 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
namespace Digirati.IIIF.Model.Types
{
public class Collection : IIIFPresentationBase
{
[JsonProperty(Order = 100, PropertyName = "collections")]
public Collection[] Collections { get; set; }
[JsonProperty(Order = 101, PropertyName = "manifests")]
p... | ```c#
using Newtonsoft.Json;
namespace Digirati.IIIF.Model.Types
{
public class Collection : IIIFPresentationBase
{
[JsonProperty(Order = 100, PropertyName = "collections")]
public Collection[] Collections { get; set; }
[JsonProperty(Order = 101, PropertyName = "manifests")]
p... |
0647a170-97af-465e-914c-72915305184b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NutPackerLib
{
public class OriginalNameAttribute : Attribute
{
public string Name { get; private set; }
public OriginalNameAttribute(string name)
{
... | ```c#
using System;
namespace NutPackerLib
{
/// <summary>
/// Original name of something.
/// </summary>
public class OriginalNameAttribute : Attribute
{
public string Name { get; private set; }
public OriginalNameAttribute(string name)
{
Name = name;
... |
97f0ee47-61f2-43ab-a5e7-746a85c4e5b0 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata Framework")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2017")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: As... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata Framework")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2017")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: As... |
a6d3dbdf-72bc-4ebe-b9c0-63f9abb4c45e | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata Framework")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2017")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: As... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata Framework")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2017")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: As... |
493c9167-ac5b-4fcd-9962-2851374efc18 | {
"language": "C#"
} | ```c#
using Topshelf;
namespace PaletteInsightAgentService
{
/// <summary>
/// Service layer that wraps the PaletteInsightAgentLib. Topshelf keeps this pretty thin for us.
/// </summary>
internal class PaletteInsightAgentService
{
// Service name & description.
private const strin... | ```c#
using Topshelf;
namespace PaletteInsightAgentService
{
/// <summary>
/// Service layer that wraps the PaletteInsightAgentLib. Topshelf keeps this pretty thin for us.
/// </summary>
internal class PaletteInsightAgentService
{
// Service name & description.
private const strin... |
dc29b117-a3b2-4008-b588-45269e1eee1d | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Text;
using TeamCitySharp;
using TeamCitySharp.Locators;
namespace DTMF.Logic
{
public class TeamCity
{
public static bool IsRunning(StringBuilder sb, string appName)
{
//remove prefix and suffixes from app names so same app can go to multiple ... | ```c#
using System.Linq;
using System.Text;
using TeamCitySharp;
using TeamCitySharp.Locators;
namespace DTMF.Logic
{
public class TeamCity
{
public static bool IsRunning(StringBuilder sb, string appName)
{
//remove prefix and suffixes from app names so same app can go to multiple ... |
9f023ce4-51e6-45af-84e3-3b2737ee63b1 | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
[assembly: AssemblyMetadata("Serviceable", "True")]
[asse... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
[assembly: AssemblyMetadata("Serviceable", "True")]
[asse... |
d7b3bb41-553b-4cf2-9d45-173b63ab631b | {
"language": "C#"
} | ```c#
using System;
namespace ChamberLib
{
public static class MathHelper
{
public static int RoundToInt(this float x)
{
return (int)Math.Round(x);
}
public static float ToRadians(this float degrees)
{
return degrees * 0.01745329251994f; // pi /... | ```c#
using System;
namespace ChamberLib
{
public static class MathHelper
{
public static int RoundToInt(this float x)
{
return (int)Math.Round(x);
}
public static float ToRadians(this float degrees)
{
return degrees * 0.01745329251994f; // pi /... |
293a1975-467c-48b0-87f0-049bbda9683b | {
"language": "C#"
} | ```c#
//------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright (C) 2009, mEthLab Interactive
//------------------------------------------------------------------------------
//-------------------------------------------------------------------------... | ```c#
//------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright (C) 2009, mEthLab Interactive
//------------------------------------------------------------------------------
//-------------------------------------------------------------------------... |
87ae38f5-4e63-43e6-9f02-3a778da96242 | {
"language": "C#"
} | ```c#
using Ploeh.AutoFixture;
using Ploeh.AutoFixture.AutoMoq;
using Ploeh.AutoFixture.Xunit;
namespace AppHarbor.Tests
{
public class AutoCommandDataAttribute : AutoDataAttribute
{
public AutoCommandDataAttribute()
: base(new Fixture().Customize(new AutoMoqCustomization()))
{
}
}
}
```
Use DomainCustom... | ```c#
using Ploeh.AutoFixture;
using Ploeh.AutoFixture.AutoMoq;
using Ploeh.AutoFixture.Xunit;
namespace AppHarbor.Tests
{
public class AutoCommandDataAttribute : AutoDataAttribute
{
public AutoCommandDataAttribute()
: base(new Fixture().Customize(new DomainCustomization()))
{
}
}
}
``` |
f2d0448d-6994-49fc-ae3d-b35e06d1aad4 | {
"language": "C#"
} | ```c#
namespace Gu.Wpf.UiAutomation
{
using System.Windows.Automation;
public class Thumb : UiElement
{
public Thumb(AutomationElement automationElement)
: base(automationElement)
{
}
public TransformPattern TransformPattern => this.AutomationElement.TransformPa... | ```c#
namespace Gu.Wpf.UiAutomation
{
using System.Windows;
using System.Windows.Automation;
public class Thumb : UiElement
{
private const int DragSpeed = 500;
public Thumb(AutomationElement automationElement)
: base(automationElement)
{
}
public T... |
d3f987fe-86d3-4a23-9ade-31dea7ab0990 | {
"language": "C#"
} | ```c#
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Plugins.Yaml.ProjectModel;
using JetBrains.ReSharper.Plugins.Yaml.Settings;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Resources;
using JetBrains.ReSharper.Psi.Parsing;
using JetBrains.Text;
using JetBrains.UI.Icons;
namespace JetB... | ```c#
using JetBrains.Application.UI.Icons.Special.ThemedIcons;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Plugins.Yaml.ProjectModel;
using JetBrains.ReSharper.Plugins.Yaml.Settings;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.Parsing;
using JetBrains.Text;
using JetBrains.UI.Icons;
name... |
4372c87b-c5e2-4a15-9b2e-7506f36a26ab | {
"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 Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
public clas... | ```c#
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
public clas... |
70190975-92c9-45b6-be28-076cc0f87ab1 | {
"language": "C#"
} | ```c#
namespace NuGetGallery.Migrations
{
using System.Data.Entity.Migrations;
public partial class CuratedFeedPackageUniqueness : DbMigration
{
public override void Up()
{
// ADD uniqueness constraint - as an Index, since it seems reasonable to look up curated package entri... | ```c#
namespace NuGetGallery.Migrations
{
using System.Data.Entity.Migrations;
public partial class CuratedFeedPackageUniqueness : DbMigration
{
public override void Up()
{
// ADD uniqueness constraint - as an Index, since it seems reasonable to look up curated package entri... |
f1172516-0c83-4d1e-afc7-2c5102b07eb2 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Reflection;
using Mongo.Migration.Extensions;
using Mongo.Migration.Migrations.Adapters;
namespace Mongo.Migration.Migrations.Locators
{
internal class TypeMigrationDependencyLocator<TMigrationType> : MigrationLocator<TMigrationType>
where TMigrationType... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Mongo.Migration.Extensions;
using Mongo.Migration.Migrations.Adapters;
namespace Mongo.Migration.Migrations.Locators
{
internal class TypeMigrationDependencyLocator<TMigrationType> : MigrationLocator<TMigration... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.