doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
b81a35d5-f49a-4f52-8179-65f0979b50c3 | {
"language": "C#"
} | ```c#
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
namespace VersionOne.Bugzilla.BugzillaAPI.Testss
{
[TestClass()]
public class given_a_Bug
{
private IBug _bug;
private string _expectedReassignToPayload;
[TestInitialize()]
public vo... | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace VersionOne.Bugzilla.BugzillaAPI.Testss
{
[TestClass()]
public class given_a_Bug
{
private IBug _bug;
private string _expectedReassignToPayload;
[TestInitialize()]
public void SetContext()
{
... |
5a25e5d4-814a-4aa7-900d-1f2ee9b2e91d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Glimpse.Extensions;
namespace Glimpse.Internal
{
public class DefaultMessageTypeProcessor : IMessageTypeProcessor
{
private readonly static Type[] _exclusions = { typeof(object) };
public vi... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Glimpse.Extensions;
namespace Glimpse.Internal
{
public class DefaultMessageTypeProcessor : IMessageTypeProcessor
{
private readonly static Type[] _exclusions = { typeof(object) };
public vi... |
55ba3d34-8ee6-4b20-985e-d79dfabca51b | {
"language": "C#"
} | ```c#
@model IdentityServer3.Core.ViewModels.AuthorizeResponseViewModel
@{
ViewBag.PageID = "authorize-response";
ViewBag.Title = "Please wait";
ViewBag.HideSigninLink = "true";
Layout = "~/Views/Shared/_Layout-NoBanner.cshtml";
}
<h1 class="heading-xlarge">You've logged in</h1>
<form id="m... | ```c#
@model IdentityServer3.Core.ViewModels.AuthorizeResponseViewModel
@{
ViewBag.PageID = "authorize-response";
ViewBag.Title = "Please wait";
ViewBag.HideSigninLink = "true";
Layout = "~/Views/Shared/_Layout-NoBanner.cshtml";
}
<h1 class="heading-xlarge">@ViewBag.Title</h1>
<form id="mai... |
622f871b-6efb-405d-8055-eda8490b1fde | {
"language": "C#"
} | ```c#
// Copyright (c) Solal Pirelli 2014
// See License.txt file for more details
using ThinMvvm.WindowsPhone.SampleApp.Resources;
using ThinMvvm.WindowsPhone.SampleApp.ViewModels;
namespace ThinMvvm.WindowsPhone.SampleApp
{
public sealed class App : AppBase
{
protected override string Language
... | ```c#
// Copyright (c) Solal Pirelli 2014
// See License.txt file for more details
using ThinMvvm.WindowsPhone.SampleApp.Resources;
using ThinMvvm.WindowsPhone.SampleApp.ViewModels;
namespace ThinMvvm.WindowsPhone.SampleApp
{
public sealed class App : AppBase
{
private readonly IWindowsPhoneNavigatio... |
15d6a7ef-e194-452a-a804-60b4302269cc | {
"language": "C#"
} | ```c#
namespace Bakery.Security
{
using System;
public static class RandomExtensions
{
public static Byte[] GetBytes(this IRandom random, Int32 count)
{
if (count <= 0)
throw new ArgumentOutOfRangeException(nameof(count));
var buffer = new Byte[count];
for (var i = 0; i < count; i++... | ```c#
namespace Bakery.Security
{
using System;
public static class RandomExtensions
{
public static Byte[] GetBytes(this IRandom random, Int32 count)
{
if (count <= 0)
throw new ArgumentOutOfRangeException(nameof(count));
var buffer = new Byte[count];
for (var i = 0; i < count; i++... |
bdb2b67d-47d2-4bbd-8f23-480aee8e53e9 | {
"language": "C#"
} | ```c#
// Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
//
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
// https://www.imagemagick.org/script/license.php
//
// Unle... | ```c#
// Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
//
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
// https://www.imagemagick.org/script/license.php
//
// Unle... |
82b53c7d-02b0-4a32-8971-236450e95653 | {
"language": "C#"
} | ```c#
using IntegrationEngine.Api.Controllers;
using IntegrationEngine.Core.Storage;
using IntegrationEngine.Model;
using IntegrationEngine.Scheduler;
using Moq;
using NUnit.Framework;
namespace IntegrationEngine.Tests.Api.Controllers
{
public class CronTriggerControllerTest
{
[Test]
public vo... | ```c#
using IntegrationEngine.Api.Controllers;
using IntegrationEngine.Core.Storage;
using IntegrationEngine.Model;
using IntegrationEngine.Scheduler;
using Moq;
using NUnit.Framework;
namespace IntegrationEngine.Tests.Api.Controllers
{
public class CronTriggerControllerTest
{
[Test]
public vo... |
4b318426-c2cc-41a4-8a13-d8859c6ed564 | {
"language": "C#"
} | ```c#
namespace TestHttpCompositionConsoleApp
{
using Serviceable.Objects.Remote.Composition.Host;
using Serviceable.Objects.Remote.Composition.Host.Commands;
class Program
{
static void Main(string[] args)
{
/*
* Principles:
*
* Tes... | ```c#
namespace TestHttpCompositionConsoleApp
{
using Serviceable.Objects.Remote.Composition.Host;
using Serviceable.Objects.Remote.Composition.Host.Commands;
class Program
{
static void Main(string[] args)
{
/*
* Principles:
*
* Tes... |
0f9c1c3d-0f38-4873-af88-df4ac95f7d47 | {
"language": "C#"
} | ```c#
@using Orchard.Mvc.Html;
@{
Layout.Title = T("New Blog");
}
<div class="edit-item">
<div class="edit-item-primary">
@if (Model.Content != null) {
<div class="edit-item-content">
@Display(Model.Content)
</div>
}
</div>
<div class="edit-item-se... | ```c#
@using Orchard.Mvc.Html;
<div class="edit-item">
<div class="edit-item-primary">
@if (Model.Content != null) {
<div class="edit-item-content">
@Display(Model.Content)
</div>
}
</div>
<div class="edit-item-secondary group">
@if (Model.Acti... |
54ce1f05-73e5-4e74-b7ce-d317f8fda11c | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using SurveyMonkey.RequestSettings;
namespace SurveyMonkey.Helpers
{
internal class RequestSettingsHelper
{
internal static RequestData GetPopulatedProperties(object obj)
{
var output = new RequestData();
foreach (PropertyInf... | ```c#
using System;
using System.Reflection;
using SurveyMonkey.RequestSettings;
namespace SurveyMonkey.Helpers
{
internal class RequestSettingsHelper
{
internal static RequestData GetPopulatedProperties(object obj)
{
var output = new RequestData();
foreach (PropertyInf... |
8ec9d383-bada-477d-b816-5e8c983be2f7 | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Raven.Bundles.Contrib.IndexedAttachments")]
[assembly: AssemblyDescription("Plugin for RavenDB that extracts text from attachments so they can be indexed.")]
[assembly: AssemblyVersion("2.0.2.0")]
[assembly: AssemblyFileVersion("2.0.2.0")]
```
Set Indexe... | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Raven.Bundles.Contrib.IndexedAttachments")]
[assembly: AssemblyDescription("Plugin for RavenDB that extracts text from attachments so they can be indexed.")]
[assembly: AssemblyVersion("2.0.3.0")]
[assembly: AssemblyFileVersion("2.0.3.0")]
``` |
c328b3ac-1c14-423d-b265-3566917346d8 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Konsola.Metadata
{
public class ObjectMetadata
{
public ObjectMetadata(
Type type,
IEnumerable<PropertyMetadata> properties,
IEnumerable<AttributeMetadata> attributes)
{
Type = type;
Properties = properties;
Attributes = attribute... | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
namespace Konsola.Metadata
{
public class ObjectMetadata
{
public ObjectMetadata(
Type type,
IEnumerable<PropertyMetadata> properties,
IEnumerable<AttributeMetadata> attributes)
{
Type = type;
Properties = properties;
Att... |
db38a86e-934c-4310-acb9-e372b8407c7f | {
"language": "C#"
} | ```c#
/*
* Copyright (c) 2018 Google LLC
*
* 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 agre... | ```c#
/*
* Copyright (c) 2018 Google LLC
*
* 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 agre... |
1fa2aeb9-4975-4914-92f1-7a70e87eb9ed | {
"language": "C#"
} | ```c#
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using LiberisLabs.CompaniesHouse.Response.CompanyProfile;
using LiberisLabs.CompaniesHouse.UriBuilders;
namespace LiberisLabs.CompaniesHouse
{
public class CompaniesHouseCompanyProfileClient : ICompaniesHouseCompanyProfileClient
... | ```c#
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using LiberisLabs.CompaniesHouse.Response.CompanyProfile;
using LiberisLabs.CompaniesHouse.UriBuilders;
namespace LiberisLabs.CompaniesHouse
{
public class CompaniesHouseCompanyProfileClient : ICompaniesHouseCompanyProfileClient
... |
c27893e2-b19a-4a21-a56b-24188311c74e | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Microsoft.Owin;
using Owin;
using BundlerMiddleware;
[assembly: OwinStartup(typeof(BundlerTestSite.Startup))]
namespace BundlerTestSite
{
public class Startup
{
public static BundlerRouteTable MarkdownRoutes = new BundlerRouteTable();
pu... | ```c#
using System;
using System.Threading.Tasks;
using Microsoft.Owin;
using Owin;
using BundlerMiddleware;
[assembly: OwinStartup(typeof(BundlerTestSite.Startup))]
namespace BundlerTestSite
{
public class Startup
{
public static BundlerRouteTable MarkdownRoutes = new BundlerRouteTable();
pu... |
9bf8d732-0ecf-4214-87d3-a76f11a403d2 | {
"language": "C#"
} | ```c#
// Copyright (c) 2011 - OJ Reeves & Jeremiah Peschka
//
// This file is provided to you 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
//
/... | ```c#
// Copyright (c) 2011 - OJ Reeves & Jeremiah Peschka
//
// This file is provided to you 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
//
/... |
b85c96e9-a033-4e34-8457-3a282f7425f3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mindscape.Raygun4Net
{
public class RaygunClientBase
{
protected internal const string SentKey = "AlreadySentByRaygun";
protected bool CanSend(Exception exception)
{
return exception == null ||... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mindscape.Raygun4Net
{
public class RaygunClientBase
{
protected internal const string SentKey = "AlreadySentByRaygun";
protected bool CanSend(Exception exception)
{
return exception == null ||... |
eb1bd4b4-4957-4195-bbe7-d227502c7ea0 | {
"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.Containers;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Multiplayer.RoomStatuses;
using osu.... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Multiplayer.RoomStatus... |
006da4a8-eda3-46ea-9a78-6514495dc806 | {
"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;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetBeatmapRequest : APIRequest<AP... | ```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;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetBeatmapRequest : APIRequest<AP... |
1eb9aaf8-444d-43ce-909e-815674ae1c66 | {
"language": "C#"
} | ```c#
using System.Linq;
using NakedFunctions;
namespace AW
{
public static class Helpers
{
/// <summary>
/// Returns a random instance from the set of all instance of type T
/// </summary>
public static T Random<T>(IContext context) where T : class
{
/... | ```c#
using System;
using System.Linq;
using NakedFunctions;
namespace AW
{
public static class Helpers
{
/// <summary>
/// Returns a random instance from the set of all instance of type T
/// </summary>
public static T Random<T>(IContext context) where T : class
{... |
9b3cfb96-4483-44e2-9986-348e2bee07a4 | {
"language": "C#"
} | ```c#
using System.IO;
using Arkivverket.Arkade.Core.Base;
using Arkivverket.Arkade.GUI.Properties;
namespace Arkivverket.Arkade.GUI.Util
{
public static class ArkadeProcessingAreaLocationSetting
{
public static string Get()
{
Settings.Default.Reload();
retu... | ```c#
using System.IO;
using Arkivverket.Arkade.Core.Base;
using Arkivverket.Arkade.GUI.Properties;
namespace Arkivverket.Arkade.GUI.Util
{
public static class ArkadeProcessingAreaLocationSetting
{
public static string Get()
{
Settings.Default.Reload();
retu... |
e9bf838d-d9ad-45db-a30c-be688df320bb | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RandomWalkConsole
{
class Program
{
static void Main(string[] args)
{
}
}
}
```
Implement random walk for 2D | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace RandomWalkConsole
{
class Program
{
static void Main(string[] args)
{
var unfinished = Enumerable.Range(0, 1000)
.Select(_ => Walk2())
... |
509756e8-baf6-4ac6-b335-6bd5c073396f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace Dashboard
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace Dashboard
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.LowercaseUrls = true;
... |
a7d5b912-f9c8-4845-b665-1e534816c093 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace MonoGameUtils.Drawing
{
/// <summary>
/// Various useful utility methods that don't obviously go elsewhere.... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace MonoGameUtils.Drawing
{
/// <summary>
/// Various useful utility methods that don't obviously go elsewhere.... |
25697d1a-2f9e-489a-a213-889ef532bf53 | {
"language": "C#"
} | ```c#
// Copyright (c) MarinAtanasov. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the project root for license information.
//
using System;
using System.Linq;
namespace AppBrix.Events.Schedule.Impl
{
internal abstract class PriorityQueueItem
{
#region Construction... | ```c#
// Copyright (c) MarinAtanasov. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the project root for license information.
//
using System;
using System.Linq;
namespace AppBrix.Events.Schedule.Impl
{
internal abstract class PriorityQueueItem
{
#region Properties
... |
80b3c7f3-2a15-44fa-bf39-2a8605bff2b4 | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
namespace RightpointLabs.Pourcast.Web.Controllers
{
using RightpointLabs.Pourcast.Application.Orchestrators.Abstract;
public class HomeController : Controller
{
private readonly ITapOrchestrator _tapOrchestrator;
private readonly IIdentityOrchestrator _identit... | ```c#
using System.Web.Mvc;
namespace RightpointLabs.Pourcast.Web.Controllers
{
using RightpointLabs.Pourcast.Application.Orchestrators.Abstract;
public class HomeController : Controller
{
private readonly ITapOrchestrator _tapOrchestrator;
private readonly IIdentityOrchestrator _identit... |
66c32e27-70fc-47ed-94de-11649d284983 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Verdeler
{
internal class MultipleConcurrencyLimiter<TSubject>
{
private readonly List<ConcurrencyLimiter<TSubject>> _concurrencyLimiters =
new List<ConcurrencyLimiter<TSubject>... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Verdeler
{
internal class MultipleConcurrencyLimiter<TSubject>
{
private readonly List<ConcurrencyLimiter<TSubject>> _concurrencyLimiters =
new List<ConcurrencyLimiter<TSubject>... |
1c993782-f333-4fe1-ac86-4462b27ce021 | {
"language": "C#"
} | ```c#
// -----------------------------------------------------------------------
// <copyright file="RemotingSystem.cs" company="Asynkron HB">
// Copyright (C) 2015-2017 Asynkron HB All rights reserved
// </copyright>
// -----------------------------------------------------------------------
using System... | ```c#
// -----------------------------------------------------------------------
// <copyright file="RemotingSystem.cs" company="Asynkron HB">
// Copyright (C) 2015-2017 Asynkron HB All rights reserved
// </copyright>
// -----------------------------------------------------------------------
using System... |
256efbce-364f-4160-a669-5d29278161d1 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace GreekNakamaTorrentUpload.WinClass.Helper
{
static class Helper
{
static public void BrowseFiles(TextBo... | ```c#
using Newtonsoft.Json;
using System;
using System.IO;
using System.Windows.Forms;
namespace GreekNakamaTorrentUpload.WinClass.Helper
{
static class Helper
{
static public Exception LoadedError = new Exception("Error while load the file. Error code: 0x01.");
static public void BrowseFil... |
8a421d10-07bb-44ad-a04e-7a6adc7e53bd | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using NUnit.Framework;
using Palaso.TestUtilities;
using Palaso.UI.WindowsForms.WritingSystems;
using Palaso.WritingSystems;
namespace PalasoUIWindowsFor... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using NUnit.Framework;
using Palaso.TestUtilities;
using Palaso.UI.WindowsForms.WritingSystems;
using Palaso.UI.WindowsForms.WritingSystems.WSTree;
using ... |
cfc5d432-963f-4d3d-9b47-c6fa2549e8a3 | {
"language": "C#"
} | ```c#
#region (c) 2010-2011 Lokad - CQRS for Windows Azure - New BSD License
// Copyright (c) Lokad 2010-2011, http://www.lokad.com
// This code is released as Open Source under the terms of the New BSD Licence
#endregion
using System;
namespace Lokad.Cqrs.Core.Inbox.Events
{
public sealed class Fa... | ```c#
#region (c) 2010-2011 Lokad - CQRS for Windows Azure - New BSD License
// Copyright (c) Lokad 2010-2011, http://www.lokad.com
// This code is released as Open Source under the terms of the New BSD Licence
#endregion
using System;
namespace Lokad.Cqrs.Core.Inbox.Events
{
public sealed class Fa... |
8582aecc-24d1-47e0-8465-0eb482f3efb2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Codestellation.Galaxy.Domain;
using Codestellation.Quarks.Collections;
using Nejdb.Bson;
namespace Codestellation.Galaxy.WebEnd.Models
{
public class DeploymentListModel
{
public readonly DeploymentModel[] Deployments;
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Codestellation.Galaxy.Domain;
using Codestellation.Quarks.Collections;
using Nejdb.Bson;
namespace Codestellation.Galaxy.WebEnd.Models
{
public class DeploymentListModel
{
public readonly DeploymentModel[] Deployments;
... |
ca8a5258-7f14-45fa-b1c9-145f978d1a26 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace ApiTest.InventoryApi
{
public class UnitOfMeasure
{
public int id { get; set; }
public string code { get; set; }
}
public sealed class InventoryStatus
{
public static string Active = "active";
publi... | ```c#
using System.Collections.Generic;
namespace ApiTest.InventoryApi
{
public class UnitOfMeasure
{
public int id { get; set; }
public string code { get; set; }
}
public sealed class InventoryStatus
{
public static string Active = 0;
public stati... |
be6273a5-e240-4a55-bc6a-34638e73725f | {
"language": "C#"
} | ```c#
using System;
using NUnit.Framework;
using Realms;
using System.Threading;
namespace IntegrationTests.Shared
{
[TestFixture]
public class NotificationTests
{
private string _databasePath;
private Realm _realm;
private void WriteOnDifferentThread(Action<Realm> action)
... | ```c#
using System;
using NUnit.Framework;
using Realms;
using System.Threading;
using System.IO;
namespace IntegrationTests.Shared
{
[TestFixture]
public class NotificationTests
{
private string _databasePath;
private Realm _realm;
private void WriteOnDifferentThread(Action<Realm... |
328df318-927a-4f0a-a363-6138a5f1b44a | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using SO115App.API.Models.Classi.Soccorso;
using SO115App.API.Models.Servizi.Infrastruttura.GestioneSoccorso;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace SO115App.FakePersistenceJSon.GestioneIntervento
{
public class... | ```c#
using Newtonsoft.Json;
using SO115App.API.Models.Classi.Soccorso;
using SO115App.API.Models.Servizi.Infrastruttura.GestioneSoccorso;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace SO115App.FakePersistenceJSon.GestioneIntervento
{
public class... |
6ffc30f8-cc1f-40f8-837a-9d29a62a1b08 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using GGProductions.LetterStorm.Data.Collections;
namespace Test.GGProductions.LetterStorm.Data.Collections
{
[TestClass]
public class LessonBookTests
{
[TestMethod]
public void CreateSampleLessonTest()
{
... | ```c#
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using GGProductions.LetterStorm.Data.Collections;
namespace Test.GGProductions.LetterStorm.Data.Collections
{
[TestClass]
public class LessonBookTests
{
[TestMethod]
public void CreateSampleLessonTest()
{
... |
1074fc0b-ab00-433f-bc1d-d7e9050c7d0d | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using DesktopWidgets.Classes;
namespace DesktopWidgets.Widgets.Note
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Width = 160;
Height = 200;
}
[DisplayName("Saved Text")]
public string Text... | ```c#
using System.ComponentModel;
using DesktopWidgets.Classes;
namespace DesktopWidgets.Widgets.Note
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Width = 160;
Height = 132;
}
[DisplayName("Saved Text")]
public string Text... |
b58952cd-4457-4240-855d-8975bd5096c9 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KataPotter
{
public class KataPotterPriceCalculator
{
private static readonly double BOOK_UNIT_PRICE = 8;
public double Calculate(Dictionary<string, int> booksTo... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KataPotter
{
public class KataPotterPriceCalculator
{
private static readonly double BOOK_UNIT_PRICE = 8;
private static readonly double TWO_BOOKS_DISCOUNT_RATE ... |
eef61457-6717-46f7-af4d-b4f72d89e1d4 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.SignalR;
using SO115App.Models.Servizi.CQRS.Commands.GestioneUtenti.DeleteRuoliUtente;
using SO115App.Models.Servizi.Infrastruttura.GestioneUtenti.GetUtenti;
using SO115App.Models.Servizi.Infrastruttura.Notification.GestioneUtenti.GestioneRuoli;
using System.Threading.Tasks;
namespace... | ```c#
using Microsoft.AspNetCore.SignalR;
using SO115App.Models.Servizi.CQRS.Commands.GestioneUtenti.DeleteRuoliUtente;
using SO115App.Models.Servizi.Infrastruttura.GestioneUtenti.GetUtenti;
using SO115App.Models.Servizi.Infrastruttura.Notification.GestioneUtenti.GestioneRuoli;
using System.Threading.Tasks;
namespace... |
c61b2d8f-9de7-48f0-ab6c-2db0d8ba7a2e | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using Autofac;
using Autofac.Integration.Mvc;
using Oogstplanner.Models;
using Oogstplanner.Data;
using Oogstplanner.Services;
namespace Oogstplanner.Web
{
public static class IocConfig
{
public static void RegisterDependencies()
{
var builder = new Co... | ```c#
using System.Web.Mvc;
using Autofac;
using Autofac.Integration.Mvc;
using Oogstplanner.Models;
using Oogstplanner.Data;
using Oogstplanner.Services;
namespace Oogstplanner.Web
{
public static class IocConfig
{
public static void RegisterDependencies()
{
var builder = new Co... |
5c2c8d11-462d-4cde-9a85-2c90d2d4259c | {
"language": "C#"
} | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.ComponentModel.Composition;
using Microsoft.CodeAnalysis.Diagnostics;
using Micros... | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.ComponentModel.Composition;
using Microsoft.CodeAnalysis.Diagnostics;
using Micros... |
a70539f6-9d37-45b9-91d9-b1c8e026a8aa | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.Threading;
namespace StreamDeckSharp.Internals
{
internal class Throttle
{
private readonly Stopwatch stopwatch = Stopwatch.StartNew();
private long sumBytesInWindow = 0;
public double BytesPerSecondLimit { get; set; } = doubl... | ```c#
using System;
using System.Diagnostics;
using System.Threading;
namespace StreamDeckSharp.Internals
{
internal class Throttle
{
private readonly Stopwatch stopwatch = Stopwatch.StartNew();
private long sumBytesInWindow = 0;
private int sleepCount = 0;
public double Bytes... |
57cae0c8-3fa3-4c24-9ca0-460dce5ec6bb | {
"language": "C#"
} | ```c#
using System;
using Symbooglix.Solver;
namespace Symbooglix
{
namespace Solver
{
public class CVC4SMTLIBSolver : SimpleSMTLIBSolver
{
SMTLIBQueryPrinter.Logic LogicToUse = SMTLIBQueryPrinter.Logic.ALL_SUPPORTED; // Non standard
public CVC4SMTLIBSolver(bool useName... | ```c#
using System;
using Symbooglix.Solver;
namespace Symbooglix
{
namespace Solver
{
public class CVC4SMTLIBSolver : SimpleSMTLIBSolver
{
SMTLIBQueryPrinter.Logic LogicToUse = SMTLIBQueryPrinter.Logic.ALL_SUPPORTED; // Non standard
public CVC4SMTLIBSolver(bool useName... |
425ed006-74a9-4d33-a7a4-5fc8a1feba3f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Cipher {
class Utility {
public static string directory = @"c:\code\cypher_files";
/// <summary>
/// Allows user to choose to... | ```c#
using System;
using System.IO;
namespace Cipher {
class Utility {
public static string directory = "/Users/emiranda/Documents/code/c#/cipher_files/";
/// <summary>
/// Allows user to choose to display the password on the screen as is being typed.
/// </summary>
... |
262f854a-5468-4553-9127-d904d2e8e31f | {
"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.Security.Claims;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Authentication
{
/// <summary>
/// Used by the... | ```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.Security.Claims;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Authentication
{
/// <summary>
/// Used by the... |
5c0d9850-050e-4bb5-a3ec-6b5216373fe5 | {
"language": "C#"
} | ```c#
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading.Tasks;
using Semver;
using Umbraco.Core.Models;
namespace Umbraco.Core.Persistence.Repositories.Implement
{
internal class UpgradeCheckRepository : IUpgradeCheckRepository
{
private static HttpClient _httpClient;
... | ```c#
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading.Tasks;
using Semver;
using Umbraco.Core.Models;
namespace Umbraco.Core.Persistence.Repositories.Implement
{
internal class UpgradeCheckRepository : IUpgradeCheckRepository
{
private static HttpClient _httpClient;
... |
8a777091-f319-4c56-a801-3c6e56fc604b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace Hello_MultiScreen_iPhone
{
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
//---- declarations
UIWindow window;
UINavigationController roo... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace Hello_MultiScreen_iPhone
{
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
//---- declarations
UIWindow window;
// This method is invok... |
cd7a5939-57e8-4893-8f4e-a9b538b39147 | {
"language": "C#"
} | ```c#
using LogicalShift.Reason.Api;
using LogicalShift.Reason.Unification;
using System;
using System.Collections.Generic;
namespace LogicalShift.Reason
{
/// <summary>
/// Helper methods for performing unification
/// </summary>
public static class BasicUnification
{
/// <summary>
... | ```c#
using LogicalShift.Reason.Api;
using LogicalShift.Reason.Unification;
using System;
using System.Collections.Generic;
namespace LogicalShift.Reason
{
/// <summary>
/// Helper methods for performing unification
/// </summary>
public static class BasicUnification
{
/// <summary>
... |
60c0963c-58ff-45fb-97e1-f6e0f2e37294 | {
"language": "C#"
} | ```c#
using RGiesecke.DllExport;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using TGS.Interface;
using TGS.Interface.Components;
namespace TGS.Interface.Bridge
{
/// <summary>
/// Holds the proc that DD calls to access <see cref="ITGInterop"/>
/// </summary>
public static... | ```c#
using RGiesecke.DllExport;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace TGS.Interface.Bridge
{
/// <summary>
/// Holds the proc that DD calls to access <see cref="ITGInterop"/>
/// </summary>
public static class DreamDaemonBridge
{
/// <summary>
/// The... |
7ca50778-f8f0-405a-821e-a8b82506591e | {
"language": "C#"
} | ```c#
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using OdeToFood.Entities;
using OdeToFood.Services;
using OdeToFood.ViewModels;
namespace OdeToFood.Controllers
{
public class HomeController : Controller
{
private IRestaurantData _restaurantData;
private IGreeter _greeter;
pub... | ```c#
using Microsoft.AspNetCore.Mvc;
using OdeToFood.Entities;
using OdeToFood.Services;
using OdeToFood.ViewModels;
namespace OdeToFood.Controllers
{
public class HomeController : Controller
{
private IRestaurantData _restaurantData;
private IGreeter _greeter;
public HomeController(... |
7c311dc6-7c58-46de-8b0b-7e17cdd57671 | {
"language": "C#"
} | ```c#
#region Copyright and license information
// Copyright 2001-2009 Stephen Colebourne
// Copyright 2009-2011 Jon Skeet
//
// 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
//
//... | ```c#
#region Copyright and license information
// Copyright 2001-2009 Stephen Colebourne
// Copyright 2009-2011 Jon Skeet
//
// 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
//
//... |
d71a4119-2453-4659-9294-19910e0d1111 | {
"language": "C#"
} | ```c#
var configuration = Argument("configuration", "Debug");
Task("Clean")
.Does(() =>
{
CleanDirectory("./artifacts/");
});
Task("Restore")
.Does(() =>
{
DotNetCoreRestore();
});
Task("Build")
.Does(() =>
{
DotNetCoreBuild("./src/**/project.json", new DotNetCoreBuildSettings
{
Configuratio... | ```c#
var configuration = Argument("configuration", "Debug");
Task("Clean")
.Does(() =>
{
CleanDirectory("./artifacts/");
});
Task("Restore")
.Does(() =>
{
DotNetCoreRestore();
});
Task("Build")
.Does(() =>
{
DotNetCoreBuild("./src/**/*.csproj", new DotNetCoreBuildSettings
{
Configuration = ... |
d202cf96-d467-463c-8248-84ea8163fbcb | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Outercurve Foundation")]
[assembly: AssemblyProduct("NuGet Package Explorer")]
[assembly: AssemblyCopyright("\x00a9 Outercurve Foundation. All rights reserved.")]
[assembly: AssemblyTitle("NuGetPackageExplorer.Types... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Outercurve Foundation")]
[assembly: AssemblyProduct("NuGet Package Explorer")]
[assembly: AssemblyCopyright("\x00a9 Outercurve Foundation. All rights reserved.")]
[assembly: AssemblyTitle("NuGetPackageExplorer.Types... |
f178ca9c-7d96-442c-8abf-68f337cfa521 | {
"language": "C#"
} | ```c#
using System.IO;
using System.Text;
using CSF.Screenplay.Reporting.Tests;
using CSF.Screenplay.Reporting.Tests.Autofixture;
using CSF.Screenplay.ReportModel;
using NUnit.Framework;
namespace CSF.Screenplay.Reporting.Tests
{
[TestFixture]
public class JsonReportRendererTests
{
[Test,AutoMoqData]
pu... | ```c#
using System.IO;
using System.Text;
using CSF.Screenplay.Reporting.Tests;
using CSF.Screenplay.Reporting.Tests.Autofixture;
using CSF.Screenplay.ReportModel;
using NUnit.Framework;
namespace CSF.Screenplay.Reporting.Tests
{
[TestFixture]
public class JsonReportRendererTests
{
[Test,AutoMoqData]
pu... |
9146663c-34bd-471f-ab16-7eb21ce21b42 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using RabbitMQ.Client.Exceptions;
namespace EasyNetQ.Hosepipe
{
public interface IQueueRetreival {
IEnumerable<HosepipeMessage> GetMessagesFromQueue(QueueParameters parameters);
}
public class QueueRetreival : IQueueRetreiva... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using RabbitMQ.Client.Exceptions;
namespace EasyNetQ.Hosepipe
{
public interface IQueueRetreival {
IEnumerable<HosepipeMessage> GetMessagesFromQueue(QueueParameters parameters);
}
public class QueueRetreival : IQueueRetreiva... |
cd6580a0-e5cb-4a4c-a79b-e67a242ab30a | {
"language": "C#"
} | ```c#
using System;
using System.Linq.Expressions;
using Abp.Timing;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Abp.EntityFrameworkCore.ValueConverters
{
public class AbpDateTimeValueConverter : ValueConverter<DateTime?, DateTime?>
{
public AbpD... | ```c#
using System;
using System.Linq.Expressions;
using Abp.Timing;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Abp.EntityFrameworkCore.ValueConverters
{
public class AbpDateTimeValueConverter : ValueConverter<DateTime?, DateTime?>
{
public AbpD... |
ef1699bd-a21f-47c8-b3a1-04c495952494 | {
"language": "C#"
} | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated... | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated... |
d48eb551-dbd8-477b-8330-912b21ff3a97 | {
"language": "C#"
} | ```c#
@model IList<User>
@{
ViewData["Title"] = "List Non Admin Users";
}
<div class="col">
<table id="table">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Email</th>
<th>Client Id</th>
<th>Phone</th>
</tr>
</thead>
<tbody>
@foreach (var user in Model)
... | ```c#
@model IList<User>
@{
ViewData["Title"] = "List Non Admin Users";
}
<div class="col">
<table id="table">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Email</th>
<th>Client Id</th>
<th>Phone</th>
</tr>
</thead>
<tbody>
@foreach (var user in Model)
... |
8d210e6e-d88d-4a2e-8d53-e18b77736e4b | {
"language": "C#"
} | ```c#
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/themes/base/css", "~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
@RenderBody()
@Scr... | ```c#
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/themes/base/css", "~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
@RenderBody()
@Scrip... |
4bb6d987-7eac-4457-a78e-40ea738d57b3 | {
"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.Runtime.InteropServices;
namespace osu.Framework.Platform.Linux.Sdl
{
public class SdlClipboard : Clipboard
{
... | ```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.Runtime.InteropServices;
namespace osu.Framework.Platform.Linux.Sdl
{
public class SdlClipboard : Clipboard
{
... |
017fc72f-eeb2-4b3d-a214-88fd4c30b114 | {
"language": "C#"
} | ```c#
using Hangfire.Mongo.Database;
using MongoDB.Driver;
using System;
using Hangfire.Mongo.Helpers;
using MongoDB.Bson;
namespace Hangfire.Mongo.MongoUtils
{
/// <summary>
/// Helper utilities to work with Mongo database
/// </summary>
public static class MongoExtensions
{
... | ```c#
using Hangfire.Mongo.Database;
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using Hangfire.Mongo.Helpers;
using MongoDB.Bson;
namespace Hangfire.Mongo.MongoUtils
{
/// <summary>
/// Helper utilities to work with Mongo database
/// </summary>
public static cla... |
333811f4-2aa3-4831-a0aa-a51f6ccebb62 | {
"language": "C#"
} | ```c#
namespace Nilgiri.Examples
{
using Xunit;
using Nilgiri.Tests.Common;
using static Nilgiri.ExpectStyle;
public partial class ExampleOf_Should
{
public class Not_Be_Ok
{
[Fact]
public void Int32()
{
_(0).Should.Not.Be.Ok();
_(() => 0).Should.Not.Be.Ok();
}... | ```c#
namespace Nilgiri.Examples
{
using Xunit;
using Nilgiri.Tests.Common;
using static Nilgiri.ShouldStyle;
public partial class ExampleOf_Should
{
public class Not_Be_Ok
{
[Fact]
public void Int32()
{
_(0).Should.Not.Be.Ok();
_(() => 0).Should.Not.Be.Ok();
}... |
412ce05e-8fad-424c-9ba1-012e0851928a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
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.Imaging;
using System.Windows.Navigation;... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
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.Imaging;
using System.Windows.Navigation;... |
5ab6ef83-62a2-41a6-a4c8-2057cad0c67c | {
"language": "C#"
} | ```c#
namespace nuserv.Utility
{
using System.Net.Http;
using System.Web;
using System.Web.Http.Routing;
public class HttpRouteDataResolver : IHttpRouteDataResolver
{
#region Public Methods and Operators
public IHttpRouteData Resolve()
{
if (HttpContext.Current... | ```c#
namespace nuserv.Utility
{
#region Usings
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http.Routing;
#endregion
public class HttpRouteDataResolver : IHttpRouteDataResolver
{
#region P... |
ed1e39ac-8377-4959-b1e7-27ae02dac6de | {
"language": "C#"
} | ```c#
namespace NServiceBus
{
using Settings;
using Features;
using Persistence;
using Persistence.Sql;
/// <summary>
/// The <see cref="PersistenceDefinition"/> for the SQL Persistence.
/// </summary>
public class SqlPersistence : PersistenceDefinition
{
/// <summary>
... | ```c#
namespace NServiceBus
{
using Settings;
using Features;
using Persistence;
using Persistence.Sql;
/// <summary>
/// The <see cref="PersistenceDefinition"/> for the SQL Persistence.
/// </summary>
public class SqlPersistence : PersistenceDefinition
{
/// <summary>
... |
3c839bfb-9873-46b8-8c93-87c6f9580d0d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Caliburn.Micro;
using ExpressRunner.Api;
namespace ExpressRunner
{
public class TestItem : PropertyChangedBase, IRunnableTest
{
public string Name
{
get {... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Caliburn.Micro;
using ExpressRunner.Api;
namespace ExpressRunner
{
public class TestItem : PropertyChangedBase, IRunnableTest
{
public string Name
{
get {... |
52d6c540-bc24-468a-8be8-d72ca1ba5a46 | {
"language": "C#"
} | ```c#
namespace Fixie.Execution
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
class MethodDiscoverer
{
readonly Filter filter;
readonly IReadOnlyList<Func<MethodInfo, bool>> testMethodConditions;
public MethodDiscoverer(F... | ```c#
namespace Fixie.Execution
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
class MethodDiscoverer
{
readonly Filter filter;
readonly IReadOnlyList<Func<MethodInfo, bool>> testMethodConditions;
public MethodDiscoverer(F... |
ddaed703-d32a-428f-8bd7-9da4c368d4d6 | {
"language": "C#"
} | ```c#
//-----------------------------------------------------------------------
// <copyright file="Program.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace AlertSample
{
usin... | ```c#
//-----------------------------------------------------------------------
// <copyright file="Program.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace AlertSample
{
usin... |
c3da5651-c208-430a-be62-ddb89e26297f | {
"language": "C#"
} | ```c#
using System.ServiceModel;
namespace TfsHipChat
{
class Program
{
static void Main()
{
using (var host = new ServiceHost(typeof(CheckinEventService)))
{
host.Open();
}
}
}
}
```
Add blocking statement to ensu... | ```c#
using System;
using System.ServiceModel;
namespace TfsHipChat
{
class Program
{
static void Main()
{
using (var host = new ServiceHost(typeof(CheckinEventService)))
{
host.Open();
Console.WriteLine("TfsHipChat started!")... |
cfa99ea4-c68e-4129-ad3b-ce07b8f27df2 | {
"language": "C#"
} | ```c#
using System.Diagnostics;
namespace Cake.Core.Polyfill
{
internal static class ProcessHelper
{
public static void SetEnvironmentVariable(ProcessStartInfo info, string key, string value)
{
#if NETCORE
info.Environment[key] = value;
#else
info.EnvironmentVariables[k... | ```c#
using System;
using System.Diagnostics;
using System.Linq;
namespace Cake.Core.Polyfill
{
internal static class ProcessHelper
{
public static void SetEnvironmentVariable(ProcessStartInfo info, string key, string value)
{
#if NETCORE
var envKey = info.Environment.Keys.FirstOrD... |
d887b9de-fe3c-4881-bcc3-b9158fa9cd18 | {
"language": "C#"
} | ```c#
using BlueMonkey.ExpenceServices;
using BlueMonkey.ExpenceServices.Local;
using BlueMonkey.Model;
using Prism.Unity;
using BlueMonkey.Views;
using Xamarin.Forms;
using Microsoft.Practices.Unity;
namespace BlueMonkey
{
public partial class App : PrismApplication
{
public App(IPlatformInitializer ... | ```c#
using BlueMonkey.ExpenceServices;
using BlueMonkey.ExpenceServices.Local;
using BlueMonkey.Model;
using Prism.Unity;
using BlueMonkey.Views;
using Xamarin.Forms;
using Microsoft.Practices.Unity;
namespace BlueMonkey
{
public partial class App : PrismApplication
{
public App(IPlatformInitializer ... |
38324e25-ad02-4c6f-8396-c7eea58d4104 | {
"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... |
b90c1071-f1d3-4208-b0ce-301eeb1c80fd | {
"language": "C#"
} | ```c#
using Atlassian.Jira;
using TicketTimer.Core.Infrastructure;
using TicketTimer.Jira.Extensions;
namespace TicketTimer.Jira.Services
{
public class DefaultJiraService : JiraService
{
private readonly WorkItemStore _workItemStore;
// TODO Insert correct parameters
public Atlassian... | ```c#
using Atlassian.Jira;
using TicketTimer.Core.Infrastructure;
using TicketTimer.Jira.Extensions;
namespace TicketTimer.Jira.Services
{
public class DefaultJiraService : JiraService
{
private readonly WorkItemStore _workItemStore;
// TODO Insert correct parameters
public Atlassian... |
3e0fde15-78d3-4895-97de-5f2218252c6e | {
"language": "C#"
} | ```c#
namespace ScriptNET {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
internal class TypeCoercion {
// Handle type coercion to bool for Javascript-style if(foo) statements.
static public object CoerceToBool(object obj) {
if (obj is bool) {
// Do nothing, we're fine.
... | ```c#
namespace ScriptNET {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
internal class TypeCoercion {
// Handle type coercion to bool for Javascript-style if(foo) statements.
static public object CoerceToBool(object obj) {
if (obj is bool) {
// Do nothing, we're fine.
... |
c67d81a3-875d-4486-ba2e-791933215dcf | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using osu.Game.Database;
namespace osu.Game.Beatmaps
{
... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using osu.Game.Database;
namespace osu.Game.Beatmaps
{
... |
dd04a28c-26aa-40ef-94c4-f514cd763e8c | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Sdl.Community.GroupShareKit.Clients;
using Sdl.Community.GroupShareKit.Http;
namespace Sdl.Community.GroupShareKit.Tests.Integration
{
public static class Helper
{
public static async Task<GroupShareClient> GetGroupShareClient()
{
... | ```c#
using System;
using System.Threading.Tasks;
using Sdl.Community.GroupShareKit.Clients;
using Sdl.Community.GroupShareKit.Http;
namespace Sdl.Community.GroupShareKit.Tests.Integration
{
public static class Helper
{
public static string GetVariable(string key)
{
// by default ... |
4a650fe5-814b-4e7b-9c28-8f93a75c94ea | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AnlabMvc.Extensions
{
public static class StringExtensions
{
public static string PaymentMethodDescription(this string value)
{
if (string.Equals(value, "uc", ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace AnlabMvc.Extensions
{
public static class StringExtensions
{
const string emailRegex = @"^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-z... |
8a2039cf-0cde-44a2-b752-36ef38654f23 | {
"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 System.IO;
using Microsoft.CodeAnalysis.Host.Mef;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Serializati... | ```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 System.IO;
using Microsoft.CodeAnalysis.Host.Mef;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Serializati... |
3fcb79b2-a5ad-41d0-92bd-c1b585e0a133 | {
"language": "C#"
} | ```c#
using Cimbalino.Toolkit.Services;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using Kliva.Models;
using Kliva.Views;
using Windows.UI.Xaml.Controls;
namespace Kliva.ViewModels
{
public class SidePaneViewModel : KlivaBaseViewModel
{
private bool _isPaneOpen = true;
public ... | ```c#
using Cimbalino.Toolkit.Services;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using Kliva.Models;
using Kliva.Views;
using Windows.UI.Xaml.Controls;
namespace Kliva.ViewModels
{
public class SidePaneViewModel : KlivaBaseViewModel
{
private bool _isPaneOpen = false;
public... |
9737ca2b-e33d-4a0f-893c-6a1faef99a7e | {
"language": "C#"
} | ```c#
using DotNetNuke.Entities.Portals;
using System;
using System.Linq;
namespace Dnn.PersonaBar.Library.Helper
{
public class PortalHelper
{
private static readonly IContentVerifier _contentVerifier = new ContentVerifier(PortalController.Instance, PortalGroupController.Instance);
[Obsolete... | ```c#
using DotNetNuke.Entities.Portals;
using System;
namespace Dnn.PersonaBar.Library.Helper
{
public class PortalHelper
{
private static readonly IContentVerifier _contentVerifier = new ContentVerifier();
[Obsolete("Deprecated in 9.2.1. Use IContentVerifier.IsContentExistsForRequestedPorta... |
efec4a73-95c7-4063-a773-0727bf433b28 | {
"language": "C#"
} | ```c#
namespace TestableFileSystem.Fakes.Tests.Specs.FakeWatcher
{
public abstract class WatcherSpecs
{
protected const int NotifyWaitTimeoutMilliseconds = 500;
protected const int SleepTimeToEnsureOperationHasArrivedAtWatcherConsumerLoop = 250;
// TODO: Add specs for File.Encrypt/Decr... | ```c#
namespace TestableFileSystem.Fakes.Tests.Specs.FakeWatcher
{
public abstract class WatcherSpecs
{
protected const int NotifyWaitTimeoutMilliseconds = 1000;
protected const int SleepTimeToEnsureOperationHasArrivedAtWatcherConsumerLoop = 250;
// TODO: Add specs for File.Encrypt/Dec... |
c14ba06c-7128-4232-96db-51dd7384c766 | {
"language": "C#"
} | ```c#
@{
ViewBag.Title = "ComboLoad";
}
<div class="row">
<div class="col-md-12">
<h2>Example page for testing waits</h2>
<p>The following combo starts with a placeholder option and after 3 seconds updates with a new item.</p>
<select id="combo" >
<option>Placeholder</opt... | ```c#
@{
ViewBag.Title = "ComboLoad";
}
<div class="row">
<div class="col-md-12">
<h2>Example page for testing waits</h2>
<p class="alert alert-danger" id="message" style="display:none"></p>
<div>
<div class="form-group">
<label for="username">Username</la... |
b17e40cd-6453-4fb7-96ea-4f0ef4b3c73a | {
"language": "C#"
} | ```c#
using Nito.AsyncEx;
using Octokit;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Alteridem.GetChanges
{
class Program
{
static int Main(string[] args)
{
var options = new Options();
if (!CommandLine.Parser.Default.ParseArguments(args... | ```c#
using Nito.AsyncEx;
using Octokit;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Alteridem.GetChanges
{
class Program
{
static int Main(string[] args)
{
var options = new Options();
if (!CommandLine.Parser.Default.ParseArguments(args... |
2bb4379f-cc5b-4366-a88b-35cee1261b69 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace BatteryCommander.Web.Models
{
public class RequestAccessModel
{
public String Name { get; set; }
public String Email { get; set; }
[D... | ```c#
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace BatteryCommander.Web.Models
{
public class RequestAccessModel
{
public String Name { get; set; }
public String Email { get; set; }
[D... |
5bf6e0ee-5ce4-4404-b3ef-6b97e5f79eb9 | {
"language": "C#"
} | ```c#
@using SFA.DAS.EAS.Web
@using SFA.DAS.EAS.Web.Models
@model dynamic
@{
var viewModel = Model as OrchestratorResponse;
}
@if (!string.IsNullOrEmpty(viewModel?.FlashMessage?.Message) || !string.IsNullOrEmpty(viewModel?.FlashMessage?.SubMessage))
{
<div class="grid-row">
<div class="column-full"... | ```c#
@using SFA.DAS.EAS.Web
@using SFA.DAS.EAS.Web.Models
@model dynamic
@{
var viewModel = Model as OrchestratorResponse;
}
@if (!string.IsNullOrEmpty(viewModel?.FlashMessage?.Message) || !string.IsNullOrEmpty(viewModel?.FlashMessage?.SubMessage))
{
<div class="grid-row">
<div class="column-full"... |
38046d2f-81f2-4bfa-86a8-d6a09d411b83 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections; using FastCollections;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Lockstep
{
public static class LSFSettingsManager
{
public const string DEFAULT_SETTINGS_NAME = "DefaultLockstepFrameworkSettings";
public const string SETTINGS_NAME =... | ```c#
using UnityEngine;
using System.Collections; using FastCollections;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Lockstep
{
public static class LSFSettingsManager
{
public const string DEFAULT_SETTINGS_NAME = "DefaultLockstepFrameworkSettings";
public const string SETTINGS_NAME =... |
3e9b4a2e-fc22-41f8-a134-87fd739ae106 | {
"language": "C#"
} | ```c#
namespace Gu.Roslyn.Asserts.Tests.Net472WithAttributes
{
using Gu.Roslyn.Asserts.Tests.Net472WithAttributes.AnalyzersAndFixes;
using NUnit.Framework;
public partial class RoslynAssertTests
{
[Test]
public void ResetMetadataReferences()
{
CollectionAssert.IsNotE... | ```c#
namespace Gu.Roslyn.Asserts.Tests.Net472WithAttributes
{
using Gu.Roslyn.Asserts.Tests.Net472WithAttributes.AnalyzersAndFixes;
using NUnit.Framework;
public partial class RoslynAssertTests
{
[Test]
public void ResetMetadataReferences()
{
CollectionAssert.IsNotE... |
fb256eb3-3774-48ba-ac0d-d4067b54f89c | {
"language": "C#"
} | ```c#
using LmpClient.Localization;
using LmpClient.Systems.Chat;
using UnityEngine;
namespace LmpClient.Windows.Chat
{
public partial class ChatWindow
{
private static string _chatInputText = string.Empty;
protected override void DrawWindowContent(int windowId)
{
var pres... | ```c#
using LmpClient.Localization;
using LmpClient.Systems.Chat;
using UnityEngine;
namespace LmpClient.Windows.Chat
{
public partial class ChatWindow
{
private static string _chatInputText = string.Empty;
protected override void DrawWindowContent(int windowId)
{
var pres... |
21147e2e-b18d-4b7a-9f26-e379301bb9fd | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
using UnityEditor;
using OneDayGame;
namespace DisableAfterTimeEx {
[CustomEditor(typeof (DisableAfterTime))]
public class DisableAfterTimeEditor : Editor {
private SerializedProperty targetGO;
private SerializedProperty delay;
priv... | ```c#
using UnityEngine;
using System.Collections;
using UnityEditor;
using OneDayGame;
namespace DisableAfterTimeEx {
[CustomEditor(typeof (DisableAfterTime))]
public class DisableAfterTimeEditor : Editor {
private SerializedProperty targetGO;
private SerializedProperty delay;
priv... |
e29bd313-8640-413d-b734-c86498ac15a6 | {
"language": "C#"
} | ```c#
using NLog;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System;
namespace SyncTrayzor.Syncthing.ApiClient
{
public class SyncthingHttpClientHandler : WebRequestHandler
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
pu... | ```c#
using NLog;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System;
namespace SyncTrayzor.Syncthing.ApiClient
{
public class SyncthingHttpClientHandler : WebRequestHandler
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
pu... |
3a77327e-6e4c-42f1-9d3c-aa3b4f18f2c4 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using EasyHook;
namespace LxRunOffline
{
class Program
{
static void Main(string[] args)
{
int pId = 0;
try
{
RemoteHooking.CreateAndInject(@"C:\Windows\System32\LxRun.exe", string.Join(" ", args), 0, "LxRunHook.dll", "LxRunHook.dll", out pId);
}
... | ```c#
using System;
using System.Diagnostics;
using EasyHook;
namespace LxRunOffline
{
class Program
{
static void Main(string[] args)
{
int pId = 0;
try
{
RemoteHooking.CreateAndInject(@"C:\Windows\System32\LxRun.exe", string.Join(" ", args), 0, "LxRunHook.dll", "LxRunHook.dll", out pId);
}
... |
1df29875-c351-4234-b967-183e1741a1bf | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace QuickFont {
public sealed class QFontGlyph {
/// <summary>
/// Which texture page the glyph is on
/// </summary>
public int Page {
get;
private set;
... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace QuickFont {
public sealed class QFontGlyph {
/// <summary>
/// Which texture page the glyph is on
/// </summary>
public int Page {
get;
private set;
... |
a4979984-41de-4dab-9ebc-e83cb3887582 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using Rhino.ServiceBus.Config;
using Rhino.ServiceBus.Impl;
namespace Rhino.ServiceBus.Hosting
{
public abstract class AbstractBootStrapper : IDisposable
{
private AbstractRhinoServiceBusConfiguration config;
public virtual Assembly Assem... | ```c#
using System;
using System.Reflection;
using Rhino.ServiceBus.Config;
using Rhino.ServiceBus.Impl;
namespace Rhino.ServiceBus.Hosting
{
public abstract class AbstractBootStrapper : IDisposable
{
private AbstractRhinoServiceBusConfiguration config;
public virtual Assembly Assem... |
23387d80-b87a-4d0f-a36c-8119ad375bdc | {
"language": "C#"
} | ```c#
using Bloom.Api;
using Bloom.Book;
using Bloom.Collection;
using NUnit.Framework;
namespace BloomTests.web
{
[TestFixture]
public class ReadersApiTests
{
private EnhancedImageServer _server;
[SetUp]
public void Setup()
{
var bookSelection = new BookSelection();
bookSelection.SelectBook(new Bloo... | ```c#
using Bloom.Api;
using Bloom.Book;
using Bloom.Collection;
using NUnit.Framework;
namespace BloomTests.web
{
[TestFixture]
public class ReadersApiTests
{
private EnhancedImageServer _server;
[SetUp]
public void Setup()
{
var bookSelection = new BookSelection();
bookSelection.SelectBook(new Bloo... |
0f5c0d29-53f8-47bb-ade4-b477276312ec | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Game.Rulesets.Catch.Objects;
using osuTK;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
public class PlacementEditable... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Game.Rulesets.Catch.Objects;
using osuTK;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
public class PlacementEditable... |
34309e40-c850-492c-afc2-69f595d2d3bf | {
"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.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API;
namespace osu.Game.Online.Rooms
{
public class JoinRoomRequest : APIRequest
... | ```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.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API;
namespace osu.Game.Online.Rooms
{
public class JoinRoomRequest : APIRequest
... |
68b86d84-16d1-40a7-9aae-f454cc6155da | {
"language": "C#"
} | ```c#
using System.ComponentModel.Composition;
namespace Flood.Editor.Controls
{
class ToolClose : EditorTool, BarTool
{
[Import]
DocumentManager docManager;
public void OnSelect()
{
if (docManager.Current != null)
docManager.Close(docManager.Curren... | ```c#
using System.ComponentModel.Composition;
namespace Flood.Editor.Controls
{
class ToolClose : EditorTool, BarTool
{
[Import]
DocumentManager docManager;
public void OnSelect()
{
//if (docManager.Current != null)
// docManager.Close(docManager.Cu... |
19db1a13-959c-443a-ada1-95a4c8c0f89f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using GitDataExplorer.Results.Commits;
namespace GitDataExplorer.Results
{
class ListSimpleCommitsResult : IResult
{
public ExecutionResult ExecutionResult { get; private set; }
public IList<SimpleCommitResult... | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using GitDataExplorer.Results.Commits;
namespace GitDataExplorer.Results
{
class ListSimpleCommitsResult : IResult
{
private char[] statusLetters = { 'M', 'A', 'R', 'C', 'D' };
public ExecutionResult Execution... |
6c80fcb2-8eb3-4773-a6b1-ddc0749138f3 | {
"language": "C#"
} | ```c#
namespace Nilgiri.Examples
{
using Xunit;
using Nilgiri.Tests.Common;
using static Nilgiri.ShouldStyle;
public partial class ExampleOf_Should
{
public class Not_Be_Ok
{
[Fact]
public void Int32()
{
_(0).Should.Not.Be.Ok();
_(() => 0).Should.Not.Be.Ok();
}... | ```c#
namespace Nilgiri.Examples
{
using Xunit;
using Nilgiri.Tests.Common;
using static Nilgiri.ShouldStyle;
public partial class ExampleOf_Should
{
public class Not_Be_Ok
{
[Fact]
public void Int32()
{
_(0).Should.Not.Be.Ok();
_(() => 0).Should.Not.Be.Ok();
}... |
c50edfb8-2117-4805-a055-5b8e4d7579a7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Nop.Plugin.Api.Constants
{
public static class WebHookNames
{
public const string FiltersGetAction = "FiltersGetAction";
public const string GetWebhookByIdAction... | ```c#
namespace Nop.Plugin.Api.Constants
{
public static class WebHookNames
{
public const string FiltersGetAction = "FiltersGetAction";
public const string GetWebhookByIdAction = "GetWebHookByIdAction";
public const string CustomerCreated = "customers/created";
public const s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.