doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
969e3db2-8dbd-4c8e-822c-654b604c33b1 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public struct CategoryItem
{
public string name;
public SoundItem[] soundItems;
public GameObject audioObjectPrefab;
}
```
Use default AudioObject prefab if none is assigned. | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public struct CategoryItem
{
public string name;
public SoundItem[] soundItems;
public GameObject audioObjectPrefab = null;
public bool usingDefaultPrefab = true;
}
``` |
889b1cf4-cd5f-4e47-a6aa-7f7922f43fc5 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Validation;
using System.ComponentModel;
namespace BTCPayServer.Models.InvoicingModels
{
public class Cre... | ```c#
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Validation;
using System.ComponentModel;
namespace BTCPayServer.Models.InvoicingModels
{
public class Cre... |
38c76421-bd33-4892-9cec-84264de481ec | {
"language": "C#"
} | ```c#
using Quibill.Web.Contexts;
using System;
using System.Collections.Generic;
using Quibill.Domain.Models;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.AspNet.Identity;
using Quibill.Domain;
namespace Quibill.Web.Controllers
{
[Au... | ```c#
using Quibill.Web.Contexts;
using System;
using System.Collections.Generic;
using Quibill.Domain.Models;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.AspNet.Identity;
using Quibill.Domain;
namespace Quibill.Web.Controllers
{
[Au... |
9827d212-a83f-4000-b19f-9cbc0d716b52 | {
"language": "C#"
} | ```c#
// Copyright 2014 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using NUnit.Framework;
using System.Collections.Generic;
using System.Linq;
using System.Security;
namespace NodaTime.Test.Annotations
{
[Test... | ```c#
// Copyright 2014 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using NUnit.Framework;
using System.Collections.Generic;
using System.Linq;
using System.Security;
namespace NodaTime.Test.Annotations
{
[Test... |
4a95a3bd-660d-463d-933b-e96ccf6c0823 | {
"language": "C#"
} | ```c#
// Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using SmugMug.Shared.Descriptors;
using System.Collections.Generic;
using System.Text;
namespace SmugMugCodeGen
{
public partial class CodeGen
{
... | ```c#
// Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using SmugMug.Shared.Descriptors;
using System.Collections.Generic;
using System.Text;
namespace SmugMugCodeGen
{
public partial class CodeGen
{
... |
2d11a3a9-8ed5-4fec-897a-eb8577540ca6 | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel.DataAnnotations;
namespace Cash_Flow_Projection.Models
{
public class RepeatingEntry
{
[DataType(DataType.Date)]
public DateTime FirstDate { get; set; } = DateTime.Today;
public String Description { get; set; }
public Decimal Am... | ```c#
using System;
using System.ComponentModel.DataAnnotations;
namespace Cash_Flow_Projection.Models
{
public class RepeatingEntry
{
[DataType(DataType.Date)]
public DateTime FirstDate { get; set; } = DateTime.Today;
public String Description { get; set; }
public Decimal Am... |
29e4a160-e88c-4c25-b46f-b89e31247d7f | {
"language": "C#"
} | ```c#
using Halforbit.DataStores.FileStores.Serialization.Json.Implementation;
using Newtonsoft.Json.Linq;
using System.Dynamic;
using System.Text;
using System.Threading.Tasks;
using YamlDotNet.Serialization;
using ISerializer = Halforbit.DataStores.FileStores.Interface.ISerializer;
namespace Halforbit.DataS... | ```c#
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
using System.Dynamic;
using System.Text;
using System.Threading.Tasks;
using YamlDotNet.Serialization;
using ISerializer = Halforbit.DataStores.FileStores.Interface.ISerializer;
na... |
0d07f0b2-8cf2-4275-8b7b-e4b71e8dd9bd | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Bumpy
{
internal sealed class Template
{
private static readonly Dictionary<string, Template> Templates = new Dictionary<string, Template>()
{
{ ".csproj", new Template(@"<(?<marke... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Bumpy
{
internal sealed class Template
{
private static readonly Dictionary<string, Template> Templates = new Dictionary<string, Template>()
{
{ ".csproj", new Template(@"<(?<marke... |
38ea3752-cf74-4ba5-9771-caa9c8d934d2 | {
"language": "C#"
} | ```c#
using Xunit;
using System.IO;
using Xunit.Sdk;
namespace Mammoth.Tests {
public class DocumentConverterTests {
[Fact]
public void DocxContainingOneParagraphIsConvertedToSingleParagraphElement() {
assertSuccessfulConversion(
ConvertToHtml("single-paragraph.docx"),
"<p>Walking on imported air</p>"... | ```c#
using Xunit;
using System.IO;
using Xunit.Sdk;
using System;
namespace Mammoth.Tests {
public class DocumentConverterTests {
[Fact]
public void DocxContainingOneParagraphIsConvertedToSingleParagraphElement() {
assertSuccessfulConversion(
ConvertToHtml("single-paragraph.docx"),
"<p>Walking on imp... |
7c97aa2a-3dac-461d-9661-d10ccaa0b10b | {
"language": "C#"
} | ```c#
// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System.Reflection;
using System.Runtime.CompilerServices;
//[assembly: AssemblyVersion("0.0.0.*")]
[assembly: AssemblyTitle ("NDesk.DBus")]
[assembly: AssemblyDescription ("D-Bu... | ```c#
// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System.Reflection;
using System.Runtime.CompilerServices;
//[assembly: AssemblyVersion("0.0.0.*")]
[assembly: AssemblyTitle ("NDesk.DBus")]
[assembly: AssemblyDescription ("D-Bu... |
19446c89-f3bb-4367-8cc1-f840e790a852 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Mios.Localization.Localizers {
public class DictionaryLocalizer {
private readonly IDictionary<string, string> source;
public DictionaryLocalizer(IDictionary<string,string> source) {
this.source = source;
}
public LocalizedString Loc... | ```c#
using System;
using System.Collections.Generic;
namespace Mios.Localization.Localizers {
public class DictionaryLocalizer {
private readonly IDictionary<string, string> source;
private readonly Localizer defaultLocalizer;
public DictionaryLocalizer(IDictionary<string, string> source) : this(so... |
f3de7c88-fcef-4fe8-8b64-77e3a0f54f10 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("Directory Watcher Settings")]
public class DirectoryWatcherSettings
{
[DisplayName("Watch Fold... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("Directory Watcher Settings")]
public class DirectoryWatcherSettings
{
[DisplayName("Watch Fold... |
48dc2964-1237-44c7-b7cf-88a68de491d4 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using Mindscape.Raygun4Net;
using MarkerMetro.Unity.WinIntegration.Logging;
using MarkerMetro.Unity.WinIntegration;
namespace UnityProject.Logging
{
/// <summary>
/// Implementation of IExceptionLogger for Raygun Exception Logger.
/// </summary>
public s... | ```c#
using System;
using System.Diagnostics;
using Mindscape.Raygun4Net;
using MarkerMetro.Unity.WinIntegration.Logging;
using MarkerMetro.Unity.WinIntegration;
namespace UnityProject.Logging
{
/// <summary>
/// Implementation of IExceptionLogger for Raygun Exception Logger.
/// </summary>
public s... |
cb1eabfe-16ea-4272-a8a6-94758bb02012 | {
"language": "C#"
} | ```c#
namespace StarsReloaded.Client.ViewModel.Fragments
{
using System.Windows;
using GalaSoft.MvvmLight.Command;
using StarsReloaded.Client.ViewModel.Attributes;
public class CollapsiblePanelViewModel : BaseViewModel
{
private bool isExpanded;
private string header;
p... | ```c#
namespace StarsReloaded.Client.ViewModel.Fragments
{
using System.Windows;
using GalaSoft.MvvmLight.Command;
using StarsReloaded.Client.ViewModel.Attributes;
public class CollapsiblePanelViewModel : BaseViewModel
{
private bool isExpanded;
private string header;
p... |
e80bccf0-6320-456e-870a-fee01652eb8c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dragon.Mail.Interfaces;
namespace Dragon.Mail.Impl
{
public class DefaultReceiverMapper : IReceiverMapper
{
public void Map(dynamic receiver, Models.Mai... | ```c#
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dragon.Mail.Interfaces;
namespace Dragon.Mail.Impl
{
public class DefaultReceiverMapper : IReceiverMapper
{
public void Map(dynamic receiver, Models.Mai... |
8e236e09-5640-4e73-ae9e-b4021a2ca20f | {
"language": "C#"
} | ```c#
using System;
namespace Glimpse.Web
{
public static class HttpRequestExtension
{
public static string Uri(this IHttpRequest request)
{
return $"{request.Scheme}://{request.Host}{request.PathBase}{request.Path}{request.QueryString}";
}
}
}```
Add extra extension ... | ```c#
using System;
namespace Glimpse.Web
{
public static class HttpRequestExtension
{
public static string Uri(this IHttpRequest request)
{
return $"{request.Scheme}://{request.Host}{request.PathBase}{request.Path}{request.QueryString}";
}
public static string Uri... |
e264f31c-152b-442a-a534-b1bc96490344 | {
"language": "C#"
} | ```c#
namespace AngleSharp.DOM.Html
{
using AngleSharp.Attributes;
using System;
/// <summary>
/// Represents the HTML marquee element.
/// </summary>
[DomHistorical]
sealed class HTMLMarqueeElement : HTMLElement
{
#region ctor
internal HTMLMarqueeElement()
... | ```c#
namespace AngleSharp.DOM.Html
{
using AngleSharp.Attributes;
using System;
/// <summary>
/// Represents the HTML marquee element.
/// </summary>
[DomHistorical]
sealed class HTMLMarqueeElement : HTMLElement
{
#region ctor
internal HTMLMarqueeElement()
... |
f397e142-8874-4119-b759-da8f72bf17b1 | {
"language": "C#"
} | ```c#
using System;
using System.Windows.Forms;
namespace FreenetTray
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
FNLog.Initialize();
Application.En... | ```c#
using System;
using System.Windows.Forms;
namespace FreenetTray
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// migrate settings from older config files fo... |
69f67441-1863-4780-9a51-bcd17ccea0e5 | {
"language": "C#"
} | ```c#
using System;
namespace UpVer
{
class Program
{
static void Main(string[] args)
{
try
{
var settings = new Settings(args);
var updater = new VersionUpdater(settings);
var changes = updater.Process();
... | ```c#
using System;
namespace UpVer
{
class Program
{
static void Main(string[] args)
{
try
{
var settings = new Settings(args);
var updater = new VersionUpdater(settings);
var changes = updater.Process();
... |
1592367e-385f-4c56-89f1-d2456e086f1f | {
"language": "C#"
} | ```c#
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
<link rel="stylesheet" type="text/css" href="~/css/styles.css" />
</head>
<body>
<div>
@RenderBody()
</div>
</body>
</html>
```
Add bootstrap and jquery us... | ```c#
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewBag.Title</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/styles.css" />
</hea... |
d25bec0b-fc1a-4806-8dbd-c8be8c320bcf | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Osu.Judgements;
usin... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Osu.Judgements;
usin... |
40b23ead-053f-40b1-a989-cc986c4c6fb0 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Threading.Tasks;
using Kudu.Contracts.Tracing;
using Kudu.Core.Infrastructure;
namespace Kudu.Core.Deployment
{
public abstract class MsBuildSiteBuilder : ISiteBuilder
{
private const string NuGetCachePathKey = "NuGetCachePath";
private read... | ```c#
using System;
using System.Linq;
using System.Threading.Tasks;
using Kudu.Contracts.Tracing;
using Kudu.Core.Infrastructure;
namespace Kudu.Core.Deployment
{
public abstract class MsBuildSiteBuilder : ISiteBuilder
{
private const string NuGetCachePathKey = "NuGetCachePath";
private const... |
ac5d5fd6-3fdb-4e7b-901e-f9ee22e65197 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace symbooglix
{
public interface ISolver
{
void SetConstraints(ConstraintManager cm);
// This can be used as a hint to the solver to destroy Constraints created internally in the solver
void DropConstraints();
// Giv... | ```c#
using System;
using System.Collections.Generic;
namespace symbooglix
{
public interface ISolver
{
void SetConstraints(ConstraintManager cm);
void SetFunctions(IEnumerable<Microsoft.Boogie.Function> functions);
// Given the constraints is the query expression satisfiable
... |
3c12afdc-e2d7-441d-baa3-b7259e1535b0 | {
"language": "C#"
} | ```c#
using MultipleStartNodes.Models;
using MultipleStartNodes.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using umbraco.cms.businesslogic.packager.standardPackageActions;
using umbraco.interfaces;
using Umbraco.Core.... | ```c#
using MultipleStartNodes.Models;
using MultipleStartNodes.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using umbraco.cms.businesslogic.packager.standardPackageActions;
using umbraco.interfaces;
using Umbraco.Core.... |
ca4400cd-41e8-42d4-b088-555bf3264678 | {
"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 Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
namespace SampleApp
{
public class Startup
{
public v... | ```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 Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
namespace SampleApp
{
public class Startup
{
public v... |
c8d0c63c-6ee0-4e16-aa8a-e86c0adef663 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using MvcContrib.TestHelper;
using Snittlistan.Infrastructure.Indexes;
using Snittlistan.Models;
using Xunit;
namespace Snittlistan.Test
{
public class PlayerStat_Test : DbTest
{
[Fact]
public void VerifyIndex()
{
// Arrange
IndexCreator.CreateIndexe... | ```c#
using System;
using System.Linq;
using MvcContrib.TestHelper;
using Snittlistan.Infrastructure.Indexes;
using Snittlistan.Models;
using Xunit;
namespace Snittlistan.Test
{
public class PlayerStat_Test : DbTest
{
[Fact]
public void VerifyIndex()
{
// Arrange
IndexCreator.CreateIndexe... |
b2450c1f-fa68-43b1-8310-b3b1a6040450 | {
"language": "C#"
} | ```c#
public class MikeKanakos : IAmACommunityMember
{
public string FirstName => "Mike";
public string LastName => "Kanakos";
public string ShortBioOrTagLine => "Windows IT pro located in the RTP area of North Carolina. Active Directory, Azure AD, Group Policy, and automation.";
pub... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class MikeKanakos : IAmACommunityMember
{
public string FirstName => "Mike";
public string... |
d8ca026f-8fd3-4fec-827c-2b3b72704d6a | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
namespace Nest
{
[JsonObject]
public class CatIndicesRecord : ICatRecord
{
[JsonProperty("docs.count")]
public string DocsCount { get; set; }
[JsonProperty("docs.deleted")]
public string DocsDeleted { get; set; }
[JsonProperty("health")]
public string Health { get; set; }... | ```c#
using Newtonsoft.Json;
namespace Nest
{
[JsonObject]
public class CatIndicesRecord : ICatRecord
{
[JsonProperty("docs.count")]
public string DocsCount { get; set; }
[JsonProperty("docs.deleted")]
public string DocsDeleted { get; set; }
[JsonProperty("health")]
public string Health { get; set; }... |
da20d441-6208-4475-943f-e47ce679c118 | {
"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.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing;
... | ```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.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing;... |
7a0109e8-60fd-448c-a392-ca8e79e9f555 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Osu.Skinning
{
public enum OsuSkinColour
{
SliderTrackOverride,
SliderBorder,
SliderBall
}
}
```
Ad... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Osu.Skinning
{
public enum OsuSkinColour
{
SliderTrackOverride,
SliderBorder,
SliderBall,
Spinne... |
b4989b05-3d50-4c7d-ae6a-fc50ba06250b | {
"language": "C#"
} | ```c#
namespace RestfulRouting
{
public abstract class Mapper
{
}
}
```
Add new method stub for generating routes | ```c#
using System;
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
protected Route GenerateRoute(string path, string controller, string action, string[] httpMethods)
{
throw new NotImplementedException();
}
}
}
``` |
d5a60ee5-d056-496e-b182-d8500fb365a4 | {
"language": "C#"
} | ```c#
using SyntaxTree.VisualStudio.Unity.Bridge;
using UnityEditor;
[InitializeOnLoad]
public class NCrunchAdapterForUnity
{
public const string NUnitUnityReference = @"<Reference Include=""nunit.framework"">
<HintPath>Library\UnityAssemblies\nunit.framework.dll</HintPath>
</Reference>";
... | ```c#
using System.Text.RegularExpressions;
using SyntaxTree.VisualStudio.Unity.Bridge;
using UnityEditor;
[InitializeOnLoad]
public class NCrunchAdapterForUnity
{
public const string NUnitUnityReference = @"<Reference Include=""nunit.framework"">
<HintPath>.*nunit.framework.dll</HintPath>
</Re... |
673b8310-b3f8-4c7b-bdce-7167410fa1bf | {
"language": "C#"
} | ```c#
using System;
using TrueCraft.API.Logic;
using TrueCraft.Core.Logic.Items;
using TrueCraft.API;
namespace TrueCraft.Core.Logic.Blocks
{
public class TallGrassBlock : BlockProvider
{
public static readonly byte BlockID = 0x1F;
public override byte ID { get { return 0x1F; } }
... | ```c#
using System;
using TrueCraft.API.Logic;
using TrueCraft.Core.Logic.Items;
using TrueCraft.API;
namespace TrueCraft.Core.Logic.Blocks
{
public class TallGrassBlock : BlockProvider
{
public static readonly byte BlockID = 0x1F;
public override byte ID { get { return 0x1F; } }
... |
fccc89b5-c7f8-4c77-832e-3a75d8420a4a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Anlab.Core.Domain
{
public class TestItem
{
[Key]
public int Id { get; set; }
[Required]
[StringLength(7)]
public string FeeSchedule { get; s... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Anlab.Core.Domain
{
public class TestItem
{
[Key]
public int Id { get; set; }
[Required]
[StringLength(7)]
public string FeeSchedule { get; s... |
06ab987c-b040-4106-84c6-4bfe5b7959b3 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using Parsley;
using Rook.Compiling.Types;
namespace Rook.Compiling.Syntax
{
public class Class : TypedSyntaxTree, Binding
{
public Position Position { get; private set; }
public Name Name { get; private set; }
public IEnumerabl... | ```c#
using System.Collections.Generic;
using System.Linq;
using Parsley;
using Rook.Compiling.Types;
namespace Rook.Compiling.Syntax
{
public class Class : TypedSyntaxTree, Binding
{
public Position Position { get; private set; }
public Name Name { get; private set; }
public IEnumerabl... |
9f84c968-6c39-48f2-b294-dc4e8713ea15 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Security;
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyCopyright("Copyright 2008-2009 James Gregory and contributors (Paul Batum, Andrew Stewart, Chad Myers et al). All rights reserved.")]
[assembly: AssemblyProduct("Fluent NHibernate")]
[assembly: Assembl... | ```c#
using System.Reflection;
using System.Security;
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyCopyright("Copyright 2008-2009 James Gregory and contributors (Paul Batum, Andrew Stewart, Chad Myers, Hudson Akridge et al). All rights reserved.")]
[assembly: AssemblyProduct("Fluent NHibernate")]
[a... |
dab72f41-112b-4ac3-9efc-4df4b859ccf5 | {
"language": "C#"
} | ```c#
namespace FsxWebApi.Services
{
using System.Web.Http.Cors;
using Infrastructure;
using Model;
using System.Web.Http;
[EnableCors(origins: "http://localhost:26759", headers: "*", methods: "*")]
public class PlaneController : ApiController
{
private readonly FsxManager _fsxMana... | ```c#
namespace FsxWebApi.Services
{
using System.Web.Http.Cors;
using Infrastructure;
using Model;
using System.Web.Http;
[EnableCors(origins: "*", headers: "*", methods: "*")]
public class PlaneController : ApiController
{
private readonly FsxManager _fsxManager = new FsxManager(... |
727cdbf7-bb92-48db-b039-cde369a26726 | {
"language": "C#"
} | ```c#
@model OpenOrderFramework.Models.Order
@{
ViewBag.Title = "P4MCheckout";
}
<link rel="import" href="/Scripts/widgets/p4m-checkout/p4m-checkout.html">
<link rel="import" href="/Scripts/widgets/p4m-login/p4m-login.html">
<h2>Parcel For Me</h2>
<p4m-login></p4m-login>
<p4m-checkout></p4m-checkout>```
Remove r... | ```c#
@model OpenOrderFramework.Models.Order
@{
ViewBag.Title = "P4MCheckout";
}
<link rel="import" href="/Scripts/widgets/p4m-checkout/p4m-checkout.html">
<link rel="import" href="/Scripts/widgets/p4m-login/p4m-login.html">
<h2>Parcel For Me</h2>
<p4m-checkout></p4m-checkout>``` |
9d926875-b56f-4dc9-9e01-45bb1f41f0d3 | {
"language": "C#"
} | ```c#
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace NutEngine
{
public class Sprite : Node, IDrawable
{
public Texture2D Atlas { get; }
public Rectangle? Frame { get; set; }
public Color Color { get; set; }
public Vector2 Origin { get; set; }... | ```c#
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace NutEngine
{
public class Sprite : Node, IDrawable
{
public Texture2D Atlas { get; }
public Rectangle? Frame { get; set; }
public Color Color { get; set; }
public Vector2 Origin { get; set; }... |
a58419c1-9ad7-49d4-a74e-44a66dcc717e | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly... | ```c#
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly... |
18cc09d2-2c84-4afc-acea-b20c070c134c | {
"language": "C#"
} | ```c#
using System.Runtime.Serialization;
namespace CefSharp
{
[DataContract]
[KnownType(typeof(object[]))]
public class JavascriptResponse
{
[DataMember]
public string Message { get; set; }
[DataMember]
public bool Success { get; set; }
[DataMember]
public object Result { get; set; }
}
}
```
Add ... | ```c#
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace CefSharp
{
[DataContract]
[KnownType(typeof(object[]))]
[KnownType(typeof(Dictionary<string,object>))]
public class JavascriptResponse
{
[DataMember]
public string Message { get; set; }
[DataMember]
public bool Success... |
8a233c3d-a242-4dbe-b4f9-b404c4db512f | {
"language": "C#"
} | ```c#
using Swigged.LLVM;
using Mono.Cecil;
using Mono.Cecil.Cil;
using CSharpLLVM.Compilation;
using CSharpLLVM.Stack;
namespace CSharpLLVM.Generator.Instructions.FlowControl
{
[InstructionHandler(Code.Ret)]
class EmitRet : ICodeEmitter
{
/// <summary>
/// Emits a ret instruction.
... | ```c#
using Swigged.LLVM;
using Mono.Cecil;
using Mono.Cecil.Cil;
using CSharpLLVM.Compilation;
using CSharpLLVM.Stack;
using CSharpLLVM.Helpers;
namespace CSharpLLVM.Generator.Instructions.FlowControl
{
[InstructionHandler(Code.Ret)]
class EmitRet : ICodeEmitter
{
/// <summary>
/// Emits ... |
4b17beef-4311-4fb6-8dee-a29ca03b818b | {
"language": "C#"
} | ```c#
using MagicalCryptoWallet.KeyManagement;
using MagicalCryptoWallet.Services;
using NBitcoin;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace MagicalCryptoWallet.Tests
{
public class WalletTests : IClassFixture<SharedFix... | ```c#
using MagicalCryptoWallet.KeyManagement;
using MagicalCryptoWallet.Logging;
using MagicalCryptoWallet.Services;
using NBitcoin;
using NBitcoin.Protocol;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespac... |
f8fd5775-097c-4741-872a-99a4bbb7346b | {
"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.Sprites;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Beatmaps.Drawables.Cards.Buttons
{
public class Favourit... | ```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.Sprites;
using osu.Game.Online.API.Requests.Responses;
using osu.Framework.Logging;
using osu.Game.Onli... |
2e3233a1-9fe9-4ecc-9d91-9f6d0fe17ecd | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Autofac.Extras.Tests.EnterpriseLibraryConfigurator")]
[assembly: AssemblyDescription("Tests for the Autofac container configurator for Enterprise Library.")]
```
Build script now writes the package name and version into the AssemblyDescription attibute. Th... | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Autofac.Extras.Tests.EnterpriseLibraryConfigurator")]
``` |
38652d70-86db-4000-bd69-212a50f1877e | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel;
using System.Diagnostics;
namespace WOptiPng
{
public static class OptiPngWrapper
{
public static bool OptiPngExists()
{
var process = new Process
{
StartInfo = new ProcessStartInfo("optipng")
... | ```c#
using System;
using System.ComponentModel;
using System.Diagnostics;
namespace WOptiPng
{
public static class OptiPngWrapper
{
public static bool OptiPngExists()
{
var process = new Process
{
StartInfo = new ProcessStartInfo("optipng")
... |
9259629d-6d23-4dd3-a917-f739adce29bc | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.Azure.Devices.Client
{
/// <summary>
/// Transport types supported by DeviceClient
/// </summary>
public enum TransportType
{
/// <summary>
/// Advanced Message Queuing Protocol transport.
... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.Azure.Devices.Client
{
/// <summary>
/// Transport types supported by DeviceClient - AMQP/TCP, HTTP 1.1, MQTT/TCP, AMQP/WS, MQTT/WS
... |
48606cea-ad0e-4241-9008-a679943189f2 | {
"language": "C#"
} | ```c#
using JetBrains.Annotations;
using JetBrains.ReSharper.Daemon.Stages.Dispatcher;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.Plugins.Unity.ProjectModel;
using JetBrains.ReSharper.Psi.Tree;
namespace JetBrains.ReSharper.Plugins.Unity.CSharp.Daemon.Stages.Dispatcher
{
public ab... | ```c#
using JetBrains.Annotations;
using JetBrains.ReSharper.Daemon.Stages.Dispatcher;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.Plugins.Unity.ProjectModel;
using JetBrains.ReSharper.Psi.Tree;
namespace JetBrains.ReSharper.Plugins.Unity.CSharp.Daemon.Stages.Dispatcher
{
public ab... |
2b230235-5f2e-420b-a5ec-f08802a00741 | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Collections.Generic;
namespace Microsoft.Azure.WebJobs.Script.WebHost.Models
{
public class MSIContext
{
public string MSISecret { ... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Collections.Generic;
namespace Microsoft.Azure.WebJobs.Script.WebHost.Models
{
public class MSIContext
{
public string SiteName { g... |
ab3b593d-e218-41d3-9f7f-8672dae3e8b8 | {
"language": "C#"
} | ```c#
namespace AppHarbor.Tests
{
public class CommandDispatcherTest
{
public class FooCommand : ICommand
{
public virtual void Execute(string[] arguments)
{
}
}
}
}
```
Verify that executing single argument command works as expected | ```c#
using System.Linq;
using Castle.MicroKernel;
using Moq;
using Ploeh.AutoFixture.Xunit;
using Xunit.Extensions;
namespace AppHarbor.Tests
{
public class CommandDispatcherTest
{
public class FooCommand : ICommand
{
public virtual void Execute(string[] arguments)
{
}
}
[Theory]
[InlineAutoCom... |
60485e03-1ff3-4416-9454-07a9af116273 | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Autofac.Extras.Tests.Multitenant")]
[assembly: AssemblyDescription("Tests for the Autofac multitenancy feature.")]
```
Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be see... | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Autofac.Extras.Tests.Multitenant")]
``` |
31574740-614c-4c24-94de-6870b8d1ac93 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class mainMenuHandler : MonoBehaviour {
// private Texture2D startButton;
void OnGUI () {
GUI.backgroundColor = Color.clear;
if (GUI.Button (new Rect (260,300, 300, 300), "")) {
// print ("Start Game");
//start game
Application.LoadLevel(2);... | ```c#
using UnityEngine;
using System.Collections;
public class mainMenuHandler : MonoBehaviour {
public Texture2D startButton;
void OnGUI () {
GUI.backgroundColor = Color.clear;
if (GUI.Button (new Rect (Screen.width/20*3,Screen.height/10*4, 250, 250), startButton)) {
// print ("Start Game");
//star... |
5b737688-08f2-4ac2-8145-c3312a6eb6df | {
"language": "C#"
} | ```c#
namespace EntityFramework.Filters
{
using System.Data.Entity.Core.Common.CommandTrees;
using System.Data.Entity.Core.Metadata.Edm;
using System.Data.Entity.Infrastructure.Interception;
using System.Linq;
public class FilterInterceptor : IDbCommandTreeInterceptor
{
public void Tre... | ```c#
namespace EntityFramework.Filters
{
using System.Data.Entity.Core.Common.CommandTrees;
using System.Data.Entity.Core.Metadata.Edm;
using System.Data.Entity.Infrastructure.Interception;
using System.Linq;
public class FilterInterceptor : IDbCommandTreeInterceptor
{
public void Tree... |
6c07d3cc-63c0-4074-892b-2a7619437d32 | {
"language": "C#"
} | ```c#
using Glimpse.Core.Extensibility;
namespace Glimpse.Core.Resource
{
/// <summary>
/// The <see cref="IResource"/> implementation responsible for providing the Glimpse JavaScript client to the browser.
/// </summary>
public class InsightResource : FileResource, IKey
{
internal const s... | ```c#
using Glimpse.Core.Extensibility;
namespace Glimpse.Core.Resource
{
/// <summary>
/// The <see cref="IResource"/> implementation responsible for providing the Glimpse JavaScript client to the browser.
/// </summary>
public class InsightResource : FileResource, IKey
{
internal const s... |
239d4681-b9d8-4603-b8e9-66215c23484b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace TweetDck.Plugins{
[Flags]
enum PluginEnvironment{
None = 0,
Browser = 1,
Notification = 2
}
static class PluginEnvironmentExtensions{
public static IEnumerable<PluginEnvironment> Values{
get{
... | ```c#
using System;
using System.Collections.Generic;
namespace TweetDck.Plugins{
[Flags]
enum PluginEnvironment{
None = 0,
Browser = 1,
Notification = 2
}
static class PluginEnvironmentExtensions{
public static IEnumerable<PluginEnvironment> Values{
get{
... |
c3750fbc-32fd-4749-b34f-f7b3094513b7 | {
"language": "C#"
} | ```c#
using System;
using Abp.Collections.Extensions;
using AutoMapper;
namespace Abp.AutoMapper
{
public class AutoMapFromAttribute : AutoMapAttributeBase
{
public MemberList MemberList { get; set; } = MemberList.Destination;
public AutoMapFromAttribute(params Type[] targetTypes)
... | ```c#
using System;
using Abp.Collections.Extensions;
using AutoMapper;
namespace Abp.AutoMapper
{
public class AutoMapFromAttribute : AutoMapAttributeBase
{
public MemberList MemberList { get; set; } = MemberList.Destination;
public AutoMapFromAttribute(params Type[] targetTypes)
... |
83383994-f826-4c86-8bdd-63dcedb90192 | {
"language": "C#"
} | ```c#
using UnityEngine;
public abstract class Curve : ICurve {
protected abstract Vector3 GetPositionImpl(float u);
protected abstract float LengthImpl { get; }
public static readonly Vector3 DefaultUpVector = Vector3.up;
protected bool Invalid { get; private set; }
public float Length { get; private set; }... | ```c#
using UnityEngine;
public abstract class Curve : ICurve {
protected abstract Vector3 GetPositionImpl(float u);
protected abstract float LengthImpl { get; }
public static readonly Vector3 DefaultUpVector = Vector3.up;
protected bool Invalid { get; private set; }
private float _length;
public float Len... |
49fa1daf-3c21-40fa-9740-0e7d17e415fd | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using SupportManager.DAL;
namespace SupportManager.Web.Areas.Teams
{
[Area("Teams")]
[Authorize]
public abstract class BaseController : Controller
{
... | ```c#
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using SupportManager.DAL;
namespace SupportManager.Web.Areas.Teams
{
[Area("Teams")]
[Authorize]
public abstract class BaseController : Controller
{
... |
89855275-eaa2-43b8-8c32-95850c861131 | {
"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.Collections.Immutable;
using System.IO;
using System.Threading.Tasks;
using Microsoft.CodeAnalys... | ```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.Collections.Immutable;
using System.IO;
using System.Threading.Tasks;
using Microsoft.CodeAnalys... |
53e7342f-fdc4-4799-9e01-0eb45cfbd875 | {
"language": "C#"
} | ```c#
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Quadruped WebInterface</title>
<link rel="stylesheet" href="~/css/site.css" />
<script src="~/js/site.min.js"></script>
</head>
<body>
@R... | ```c#
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Quadruped WebInterface</title>
<link rel="stylesheet" href="~/css/site.css" />
@*<script src="~/js/site.min.js"></script>*@
</head>
<body... |
498fd87d-3b03-4340-aea6-6104393b4124 | {
"language": "C#"
} | ```c#
using Microsoft.Extensions.Configuration;
using System;
using System.Linq;
namespace Tgstation.Server.Host.Core
{
/// <inheritdoc />
sealed class ServerPortProivder : IServerPortProvider
{
/// <inheritdoc />
public ushort HttpApiPort { get; }
/// <summary>
/// Initializes a new instance of the <see ... | ```c#
using Microsoft.Extensions.Configuration;
using System;
using System.Linq;
namespace Tgstation.Server.Host.Core
{
/// <inheritdoc />
sealed class ServerPortProivder : IServerPortProvider
{
/// <inheritdoc />
public ushort HttpApiPort { get; }
/// <summary>
/// Initializes a new instance of the <see ... |
eb035ac3-3285-4f27-9af2-8bd852232c6c | {
"language": "C#"
} | ```c#
using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SFA.DAS.CommitmentsV2.Api.Types.Responses;
using SFA.DAS.CommitmentsV2.Application.Queries.GetAllLearners;
using System;
using System.Net;
using System.Threading.Tasks;
namespace SFA.DAS.Commitm... | ```c#
using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using SFA.DAS.CommitmentsV2.Api.Types.Responses;
using SFA.DAS.CommitmentsV2.Application.Queries.GetAllLearners;
using System;
using System.Net;
using System.Thread... |
db8244b9-f89c-48b3-90f4-d860c1d8e645 | {
"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;
using System.IO;
using System.Linq;
using osu.Framework;
using osu.Framework.Platform;
using osu.Game.IPC;
#if NET_FRAMEWORK
using System.Runtime;
... | ```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;
using System.IO;
using System.Linq;
using osu.Framework;
using osu.Framework.Platform;
using osu.Game.IPC;
namespace osu.Desktop
{
public stati... |
8fb12241-e22f-4979-8ed5-186a6640f604 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Net;
using NUnit.Framework;
namespace HttpMock.Integration.Tests
{
[TestFixture]
public class EndpointsReturningFilesTests
{
private const string FILE_NAME = "transcode-input.mp3";
private const string RES_TRANSCODE_INPUT_MP3 = "./res/"+FILE_NAME;
... | ```c#
using System;
using System.IO;
using System.Net;
using NUnit.Framework;
namespace HttpMock.Integration.Tests
{
[TestFixture]
public class EndpointsReturningFilesTests
{
private const string FILE_NAME = "transcode-input.mp3";
private const string RES_TRANSCODE_INPUT_MP3 = "res\\"+FILE_NAME;
... |
f03165fd-b1f5-471b-9c90-27ad1ab40ba4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace BeerCellier
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
... | ```c#
using System.Security.Claims;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace BeerCellier
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegis... |
b7d466b1-b21b-4ec2-8309-92316977673d | {
"language": "C#"
} | ```c#
using System;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using Obvs.Types;
using Obvs.ActiveMQ.Configuration;
using Obvs.Configuration;
using Obvs.Example.Messages;
using Obvs.Serialization.Json.Configuration;
namespace Obvs.Example.Client
{
internal static class Program
{
pr... | ```c#
using System;
using Obvs.Types;
using Obvs.ActiveMQ.Configuration;
using Obvs.Configuration;
using Obvs.Example.Messages;
using Obvs.Serialization.Json.Configuration;
namespace Obvs.Example.Client
{
internal static class Program
{
private static void Main(string[] args)
{
var... |
d34450bf-e1dc-4e34-b15b-43c81fc1d052 | {
"language": "C#"
} | ```c#
using System;
using System.CodeDom.Compiler;
using System.IO;
using System.Text;
using IronAHK.Scripting;
using NUnit.Framework;
namespace Tests
{
[TestFixture]
public partial class Scripting
{
[Test]
public void RunScripts()
{
string path = string.Format("..{0}..... | ```c#
using System;
using System.CodeDom.Compiler;
using System.IO;
using System.Text;
using IronAHK.Scripting;
using NUnit.Framework;
namespace Tests
{
[TestFixture]
public partial class Scripting
{
[Test]
public void RunScripts()
{
string path = string.Format("..{0}..... |
5511cbf8-baf2-4abc-9217-e34c136f2700 | {
"language": "C#"
} | ```c#
// Copyright 2017 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System.Collections.Generic;
namespace NodaTime.Web.Models
{
/// <summary>
/// Fake implementation of IReleaseRepository used in cases... | ```c#
// Copyright 2017 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System.Collections.Generic;
namespace NodaTime.Web.Models
{
/// <summary>
/// Fake implementation of IReleaseRepository used in cases... |
06f5f3a4-7281-43c0-9d15-3009412e6c9b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using CppSharp.Passes;
namespace CppSharp
{
/// <summary>
/// This class is used to build passes that will be run against the AST
/// that comes from C++.
/// </summary>
public class PassBuilder<T>
{
public List<T... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using CppSharp.Passes;
namespace CppSharp
{
/// <summary>
/// This class is used to build passes that will be run against the AST
/// that comes from C++.
/// </summary>
public class PassBuilder<T>
{
public List<T... |
f662583d-71be-4281-82f6-41158d5501b7 | {
"language": "C#"
} | ```c#
using System.Reflection;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CakeMail.RestClient")]
[assembly: AssemblyDescription("CakeMail.RestClien... | ```c#
using System.Reflection;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CakeMail.RestClient")]
[assembly: AssemblyDescription("CakeMail.RestClien... |
49b100d4-1131-4215-8e64-804289b69eb8 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
namespace Configgy.Coercion
{
/// <summary>
/// A base class for any coercer attributes.
/// </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
public abstract class ValueCoercerAttributeBase : Attribute, IVal... | ```c#
using System;
using System.Reflection;
namespace Configgy.Coercion
{
/// <summary>
/// A base class for any coercer attributes.
/// </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
public abstract class ValueCoercerAttributeBase : Attribute, IVal... |
31b2cce6-f7eb-49ed-88fd-6ccdd96ca046 | {
"language": "C#"
} | ```c#
namespace Fixie
{
using System;
using System.Reflection;
using Internal;
/// <summary>
/// The context in which a test class is running.
/// </summary>
public class TestClass
{
readonly Action<Action<Case>> runCases;
readonly bool isStatic;
internal TestCl... | ```c#
namespace Fixie
{
using System;
using System.Reflection;
using System.Runtime.ExceptionServices;
using Internal;
/// <summary>
/// The context in which a test class is running.
/// </summary>
public class TestClass
{
readonly Action<Action<Case>> runCases;
rea... |
9341495f-fcc3-4020-a55c-12eed0b67602 | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace Breeze.Core {
/**
* @author IdeaBlade
*
*/
public class AndOrPredicate : BasePredicate {
private List<BasePredicate> _predicates;
... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace Breeze.Core {
/**
* @author IdeaBlade
*
*/
public class AndOrPredicate : BasePredicate {
private List<BasePredicate> _predicates;
... |
d829bd43-6c26-4f04-a7be-4ef85d0c783a | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Rulesets;
using osu.Game.Rulesets.O... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Rulesets;
using osu.Game.Rulesets.O... |
93bf0466-d249-4461-82fd-9664958b7530 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osuTK.Graphics;
namespace osu.Game.Skinning
{
/// <summary>
/// A skin configuration pre-populated with sane defaults.
/// </summary>
public ... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osuTK.Graphics;
namespace osu.Game.Skinning
{
/// <summary>
/// A skin configuration pre-populated with sane defaults.
/// </summary>
public ... |
2366f57f-10ed-49a2-9f9b-989540a44b6b | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Web;
using Cassette.UI;
namespace Cassette.Web
{
public class PlaceholderReplacingResponseFilter : MemoryStream
{
public PlaceholderReplacingResponseFilter(HttpResponseBase response, IPlaceholderTracker placeholderTracker)
{
... | ```c#
using System;
using System.IO;
using System.Web;
using Cassette.UI;
namespace Cassette.Web
{
public class PlaceholderReplacingResponseFilter : MemoryStream
{
public PlaceholderReplacingResponseFilter(HttpResponseBase response, IPlaceholderTracker placeholderTracker)
{
... |
e032a62b-5c1c-4ceb-b894-52e9bf50d553 | {
"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.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using... | ```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.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using... |
a18014d9-06c4-40ce-b500-f3a56c2bd845 | {
"language": "C#"
} | ```c#
@model Portal.CMS.Web.Areas.PageBuilder.ViewModels.Section.CloneViewModel
@{
Layout = "";
var pageList = Model.PageList.Select(x => new SelectListItem { Value = x.PageId.ToString(), Text = x.PageName });
}
<div class="panel-inner">
@using (Html.BeginForm("Clone", "Section", FormMethod.Post))
{
... | ```c#
@model Portal.CMS.Web.Areas.PageBuilder.ViewModels.Section.CloneViewModel
@{
Layout = "";
var pageList = Model.PageList.Select(x => new SelectListItem { Value = x.PageId.ToString(), Text = x.PageName });
}
<div class="panel-inner">
@using (Html.BeginForm("Clone", "Section", FormMethod.Post))
{
... |
52955e11-c309-4135-b163-51116316a9be | {
"language": "C#"
} | ```c#
using Microsoft.AspNet.Identity.EntityFramework;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace AllReady.Models
{
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : Identi... | ```c#
using Microsoft.AspNet.Identity.EntityFramework;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace AllReady.Models
{
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : Identi... |
35053a75-4181-4dd9-aeab-68ca9993c29f | {
"language": "C#"
} | ```c#
namespace AlertRoster.Web.Models
{
public class MemberGroup
{
public int MemberId { get; private set; }
public virtual Member Member { get; private set; }
public int GroupId { get; private set; }
public virtual Group Group { get; private set; }
private MemberGr... | ```c#
namespace AlertRoster.Web.Models
{
public class MemberGroup
{
public int MemberId { get; private set; }
public virtual Member Member { get; private set; }
public int GroupId { get; private set; }
public virtual Group Group { get; private set; }
public GroupRole... |
d0bc16c3-d7c7-4c25-9cb4-8464ae2aba78 | {
"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.Collections.Generic;
using System.Linq;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Checks.Components;
using osu.Game.Rulesets.Osu.Edit.... | ```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.Collections.Generic;
using System.Linq;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Checks.Components;
using osu.Game.Rulesets.Osu.Edit.... |
7c190144-4604-49be-bcf5-c990f315361b | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Screens.Edit.Components;
using osu.Game.Tests.Beatmaps;
using OpenTK;
na... | ```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.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Screens.Edit.Components;
using osu.Game.Tests.Beatmaps;
using OpenTK;
namespace os... |
1c76a9d0-426a-42a7-bc7c-29c63bfebcd3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using ThoughtWorks.CruiseControl.Remote.Parameters;
namespace JenkinsTransport.BuildParameters
{
public abstract class BaseBuildParameter
{
public string Name { get; private set; }
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using ThoughtWorks.CruiseControl.Remote.Parameters;
namespace JenkinsTransport.BuildParameters
{
public abstract class BaseBuildParameter
{
public string Name { get; private set; }
... |
88c0f84e-a0a1-418f-a245-a108becdb400 | {
"language": "C#"
} | ```c#
using Xunit;
namespace OpenGost.Security.Cryptography
{
public abstract class CmacTest<T> : CryptoConfigRequiredTest
where T : CMAC, new()
{
protected void VerifyCmac(string dataHex, string keyHex, string digestHex)
{
var digestBytes = digestHex.HexToByteArray();
... | ```c#
using System;
using Xunit;
namespace OpenGost.Security.Cryptography
{
public abstract class CmacTest<T> : CryptoConfigRequiredTest
where T : CMAC, new()
{
protected void VerifyCmac(string dataHex, string keyHex, string digestHex)
{
var digestBytes = digestHex.HexToByt... |
bd254990-78b5-408d-9747-b621c3817d1a | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ShopifySharp
{
public class ShopifyClientDetails
{
/// <summary>
/// Shopify does not offer documentation for this field.
/// </sum... | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ShopifySharp
{
public class ShopifyClientDetails
{
/// <summary>
/// Shopify does not offer documentation for this field.
/// </sum... |
8aff38a2-1474-4b10-8f37-d713b20fc606 | {
"language": "C#"
} | ```c#
using Content.Server.Mobs;
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Mobs
{
[RegisterComponent]
public sealed class VisitingMindComponent : Component
{
public override string Name => "VisitingMind";
public Mind Mind { get; set; }
publi... | ```c#
using Content.Server.Mobs;
using Robust.Shared.GameObjects;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Mobs
{
[RegisterComponent]
public sealed class VisitingMindComponent : Component
{
public override string Name => "VisitingMind";
[ViewVaria... |
94e6d368-bedf-441e-986e-ae78f7ef0afa | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
namespace System.Diagnostics {
internal class ProcessWaitHandle : WaitHandle {
[ResourceExposure(ResourceScope.None)]
[Resour... | ```c#
using System;
using System.Threading;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
namespace System.Diagnostics {
internal class ProcessWaitHandle : WaitHandle {
[ResourceExposure(ResourceScope.None)]
[Resour... |
b41cf796-ed87-4cdc-8205-1e5be83091e9 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Hosting;
namespace MusicStore
{
public static class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
// We set the server before default args so that command line arguments can override it.
... | ```c#
using Microsoft.AspNetCore.Hosting;
namespace MusicStore
{
public static class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
// We set the server by name before default args so that command line arguments can override it.
... |
34228a8c-27af-432e-92cb-6bd694d7e321 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
using Xunit;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCulture("")]
// Setting ComV... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
using Xunit;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCulture("")]
// Setting ComV... |
278b785c-d3fd-4a96-92a2-f10207dbecb2 | {
"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 JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Platform... | ```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 System.Diagnostics;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
us... |
0fc4008f-d630-411c-b767-c198375a098e | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CollectdWinService")]
[assembly: A... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CollectdWinService")]
[ass... |
c16d9a07-6ede-4faf-b535-ecfd51d127c1 | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Threading.Tasks;
using TeamCityApi.Helpers;
using TeamCityApi.Logging;
namespace TeamCityApi.UseCases
{
public class ShowBuildChainUseCase
{
private static readonly ILog Log = LogProvider.GetLogger(typeof(ShowBuildChainUseCase));
private readonly ITeamCit... | ```c#
using System.Linq;
using System.Threading.Tasks;
using TeamCityApi.Helpers;
using TeamCityApi.Logging;
namespace TeamCityApi.UseCases
{
public class ShowBuildChainUseCase
{
private static readonly ILog Log = LogProvider.GetLogger(typeof(ShowBuildChainUseCase));
private readonly ITeamCit... |
d8576103-d6cf-4b76-88ea-30e145c7174d | {
"language": "C#"
} | ```c#
using UnityEngine;
namespace Alensia.Core.Common
{
public static class ComponentExtensions
{
public static T GetOrAddComponent<T>(this Component component) where T : Component
{
return component.GetComponent<T>() ?? component.gameObject.AddComponent<T>();
}
}
}```... | ```c#
using System.Collections.Generic;
using UnityEngine;
namespace Alensia.Core.Common
{
public static class ComponentExtensions
{
public static T GetOrAddComponent<T>(this Component component) where T : Component
{
return component.GetComponent<T>() ?? component.gameObject.AddCo... |
8147aa22-df56-4448-95b6-a74b0f73b138 | {
"language": "C#"
} | ```c#
using System.Data.Common;
using System.Data.SqlClient;
using DapperTesting.Core.Configuration;
namespace DapperTesting.Core.Data
{
public class MsSqlConnectionFactory : IConnectionFactory
{
private readonly IConfiguration _configuration;
public MsSqlConnectionFactory(IConfiguration con... | ```c#
using System.Data.Common;
using System.Data.SqlClient;
using DapperTesting.Core.Configuration;
namespace DapperTesting.Core.Data
{
public class MsSqlConnectionFactory : IConnectionFactory
{
private readonly IConfiguration _configuration;
public MsSqlConnectionFactory(IConfiguration conf... |
487cad62-ae65-496c-a687-ec5ce426a3ee | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel;
using System.Diagnostics;
namespace WOptiPng
{
public static class OptiPngWrapper
{
public static bool OptiPngExists()
{
var process = new Process
{
StartInfo = new ProcessStartInfo("optipng")
... | ```c#
using System;
using System.ComponentModel;
using System.Diagnostics;
namespace WOptiPng
{
public static class OptiPngWrapper
{
public static bool OptiPngExists()
{
var process = new Process
{
StartInfo = new ProcessStartInfo("optipng")
... |
9cf39834-b700-4b2e-b326-550f1f0c9f23 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CalDavSynchronizer.Contracts;
using CalDavSynchronizer.DataAccess;
namespace CalDavSynchronizer.IntegrationTests.Infrastructure
{
class InMemoryGeneralOptionsDataAccess : IGeneralOptionsDa... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CalDavSynchronizer.Contracts;
using CalDavSynchronizer.DataAccess;
namespace CalDavSynchronizer.IntegrationTests.Infrastructure
{
class InMemoryGeneralOptionsDataAccess : IGeneralOptionsDa... |
e30e5d49-c7d6-4fde-b365-51ede585fd52 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Events;
public class Inventory : MonoBehaviour {
public int[] inventorySlots;
public UnityEvent InventoryChangedEvent;
void Awake()
{
inventorySlots = new int[18];
}
void Start()
{
for (int i = 0; ... | ```c#
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Events;
public class Inventory : MonoBehaviour {
public int[] inventorySlots;
public UnityEvent InventoryChangedEvent;
protected bool isDirty;
void Awake()
{
inventorySlots = new int[18];
}
void Sta... |
84308874-3825-4e9b-bd73-796c4fb5ca6a | {
"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.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNet.StaticFiles.Infrastructure;
namespace Microsoft.A... | ```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.Collections.Generic;
using Microsoft.AspNet.StaticFiles.Infrastructure;
namespace Microsoft.AspNet.StaticFiles
{
/// <summary>
... |
c5dd6426-07da-4d07-b12b-bd13572fdc41 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Cosmos.TestRunner.Core
{
public static class TestKernelSets
{
public static IEnumerable<Type> GetStableKernelTypes()
{
yield return typeof(VGACompilerCrash.Kernel);
//yield return typeof(Cosmos.Compiler.Tes... | ```c#
using System;
using System.Collections.Generic;
namespace Cosmos.TestRunner.Core
{
public static class TestKernelSets
{
public static IEnumerable<Type> GetStableKernelTypes()
{
for (int i = 0; i < 5; i++)
{
yield return typeof(VGACompilerCrash.Kern... |
5eecbf4d-ebf3-472a-b9d4-75baa6444387 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using SecurityConsultantCore.Domain;
using SecurityConsultantCore.Domain.Basic;
namespace SecurityConsultantCore.Factories
{
public static class SecurityObjectFactory
{
private static SecurityObjectContainer _container;
public static SecurityObject Crea... | ```c#
using System.Collections.Generic;
using SecurityConsultantCore.Domain;
using SecurityConsultantCore.Domain.Basic;
namespace SecurityConsultantCore.Factories
{
public static class SecurityObjectFactory
{
private static SecurityObjectContainer _container;
public static SecurityObject Crea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.