doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
2ede4652-f061-4b26-ab9f-7df752244086 | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.Search
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Style.Width = 150;
}
[Category("General")]
[DisplayName("URL Prefix")]
... | ```c#
using System.ComponentModel;
using System.Windows;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.Search
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Style.Width = 150;
Style.FramePadding = new Thickness(0);
... |
ba545d19-0d2d-4fc1-9f6d-5939499c1611 | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using System.Threading.Tasks;
namespace wslib.Protocol.Writer
{
public class WsMessageWriter : IDisposable
{
private readonly MessageType messageType;
private readonly Action onDispose;
private readonly IWsMessageWriteStream stream;
p... | ```c#
using System;
using System.Threading;
using System.Threading.Tasks;
namespace wslib.Protocol.Writer
{
public class WsMessageWriter : IDisposable
{
private readonly MessageType messageType;
private readonly Action onDispose;
private readonly IWsMessageWriteStream stream;
pr... |
a2c50274-bab0-4877-aaca-826b5fd2b154 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
namespace DupImage
{
/// <summary>
/// Structure for containing image information and hash values.
/// </summary>
public class ImageStruct
{
/// <summary>
/// Construct a new ImageStruct from FileInfo.
/... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
namespace DupImage
{
/// <summary>
/// Structure for containing image information and hash values.
/// </summary>
public class ImageStruct
{
/// <summary>
/// Construct a new ImageStruct from FileInfo.
/... |
44a85305-5f06-4088-b474-36c3902b4c8f | {
"language": "C#"
} | ```c#
#region License
// Copyright (c) 2007-2018, FluentMigrator Project
//
// 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 requ... | ```c#
#region License
// Copyright (c) 2007-2018, FluentMigrator Project
//
// 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 requ... |
2427d961-3127-4410-b5ab-c30bad846479 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace RestImageResize.Security
{
public class HashGenerator
{
public string ComputeHash(string privateKey, int width, int height, ImageTransform transform)
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace RestImageResize.Security
{
public class HashGenerator
{
public string ComputeHash(string privateKey, int width, int height, ImageTransform transform)
{
... |
aa37a272-8be3-4827-9e9a-f24db2e12a4b | {
"language": "C#"
} | ```c#
using Client.Base;
using Core.Comm;
using Core.Interfaces.ServiceContracts;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
usi... | ```c#
using Client.Base;
using Core.Comm;
using Core.Interfaces.ServiceContracts;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
usi... |
92ab72f0-8ab8-47e6-9bc5-22fb6a35c036 | {
"language": "C#"
} | ```c#
using System.Text.RegularExpressions;
namespace FormEditor
{
public static class FieldHelper
{
private static readonly Regex FormSafeNameRegex = new Regex("[ -]", RegexOptions.Compiled);
public static string FormSafeName(string name)
{
return FormSafeNameRegex.Replace(name ?? string.Empty, "_");
}
... | ```c#
using System.Text.RegularExpressions;
namespace FormEditor
{
public static class FieldHelper
{
private static readonly Regex FormSafeNameRegex = new Regex("[^a-zA-Z0-9_]", RegexOptions.Compiled);
public static string FormSafeName(string name)
{
return FormSafeNameRegex.Replace(name ?? string.Empty, "... |
c9e8a35c-3016-4497-9057-b8d20068c32c | {
"language": "C#"
} | ```c#
// Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing t... | ```c#
// Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing t... |
a8375ae7-b530-496f-a933-0c75750ff7f6 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Net;
using System.Text;
using Wox.Plugin;
namespace Wox.Infrastructure.Http
{
public class HttpRequest
{
public static string Get(string url, string encoding = "UTF8")
{
return Get(url, encoding, HttpProxy.Instance);
}
... | ```c#
using System;
using System.IO;
using System.Net;
using System.Text;
using Wox.Plugin;
namespace Wox.Infrastructure.Http
{
public class HttpRequest
{
public static string Get(string url, string encoding = "UTF-8")
{
return Get(url, encoding, HttpProxy.Instance);
}
... |
fa7175ff-8bc5-4e85-a0ef-753433b61f04 | {
"language": "C#"
} | ```c#
@model OrderModifyModel
@{
var submitMap = new Dictionary<string, string> {{"Request", "Create"}, {"Edit", "Save"}, {"Copy", "Save"}};
var submitText = submitMap[ViewBag.Title];
var submitTitle = ViewBag.Title == "Copy" ? "Save this order which was duplicated from an existing order" : st... | ```c#
@model OrderModifyModel
@{
var submitMap = new Dictionary<string, string> {{"Request", "Create"}, {"Edit", "Save"}, {"Copy", "Save"}};
var submitText = submitMap[ViewBag.Title];
var submitTitle = ViewBag.Title == "Copy" ? "Save this order which was duplicated from an existing order" : st... |
8671a75b-0742-4264-9656-f4da33c000a7 | {
"language": "C#"
} | ```c#
using System;
using System.Web.Mvc;
namespace Website.Security
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class EnforceHttpsAttribute : RequireHttpsAttribute
{
public override void OnAuthorization(AuthorizationContext filterContext)
{
if(filterContext == null)
{
... | ```c#
using System;
using System.Web.Mvc;
namespace Website.Security
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class EnforceHttpsAttribute : RequireHttpsAttribute
{
public override void OnAuthorization(AuthorizationContext filterContext)
{
if(filterContext == null)
{
... |
6547b740-b70f-4916-84a4-2839452912a9 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using CacheSleeve.Tests.TestObjects;
namespace CacheSleeve.Tests
{
public static class TestSettings
{
public static string RedisHost = "localhost";
public static int RedisPort = 6379;
public static string RedisPassword = null;
public stat... | ```c#
using System.Collections.Generic;
using CacheSleeve.Tests.TestObjects;
namespace CacheSleeve.Tests
{
public static class TestSettings
{
public static string RedisHost = "localhost";
public static int RedisPort = 6379;
public static string RedisPassword = null;
public stat... |
c2b7f01c-fe36-4195-a2bc-184a71af4858 | {
"language": "C#"
} | ```c#
namespace SFA.DAS.EAS.Domain.Configuration
{
public class HmrcConfiguration
{
public string BaseUrl { get; set; }
public string ClientId { get; set; }
public string Scope { get; set; }
public string ClientSecret { get; set; }
public string ServerToken { get; set; }... | ```c#
namespace SFA.DAS.EAS.Domain.Configuration
{
public class HmrcConfiguration
{
public string BaseUrl { get; set; }
public string ClientId { get; set; }
public string Scope { get; set; }
public string ClientSecret { get; set; }
public string ServerToken { get; set; }... |
e2e27680-d453-4001-a083-7bf8d73decb8 | {
"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 Microsoft.CodeAnalysis.CodeActions;
namespace Microsoft.CodeAnalysis.CodeFixes
{
/// <summary>
/// Contains well known implementations o... | ```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 Microsoft.CodeAnalysis.CodeActions;
namespace Microsoft.CodeAnalysis.CodeFixes
{
/// <summary>
/// Contains well known implementations o... |
bfdcd81f-5836-45ac-9a7e-3b0c8be9ff6e | {
"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 System.Collections.Generic;
using System.Linq;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Screens.Ranking.Statistics
{
/// <summar... | ```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.Collections.Generic;
using System.Linq;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Screens.Ranking.Statistics
{
/// <summar... |
4dcca59b-1696-40c9-87b8-0005fc2dfab2 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Rocket.Unturned.Player;
using RocketRegions.Util;
using SDG.Unturned;
using UnityEngine;
namespace RocketRegions.Model.Flag.Impl
{
public class NoVehiclesUsageFlag : BoolFlag
{
public override string Description => "Allow/Disallow usage of vehicles in regi... | ```c#
using System.Collections.Generic;
using Rocket.Unturned.Player;
using RocketRegions.Util;
using SDG.Unturned;
using UnityEngine;
namespace RocketRegions.Model.Flag.Impl
{
public class NoVehiclesUsageFlag : BoolFlag
{
public override string Description => "Allow/Disallow usage of vehicles in regi... |
8310c7eb-cabb-450a-922d-9364fe27df15 | {
"language": "C#"
} | ```c#
using Microsoft.AspNet.SignalR.Client;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent.Connection.Stream.Connection
{
public class StreamInvokerProxy : IStreamInvokerProxy
{
private readonly IHubProxy _hubProxy;
internal StreamInvokerProxy(IHubProxy hubProxy)
... | ```c#
using Microsoft.AspNet.SignalR.Client;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent.Connection.Stream.Connection
{
internal class StreamInvokerProxy : IStreamInvokerProxy
{
private readonly IHubProxy _hubProxy;
internal StreamInvokerProxy(IHubProxy hubProxy)
... |
b82ef9b7-7ddb-48bd-ad72-d47c8961fab3 | {
"language": "C#"
} | ```c#
using System;
using osu.Game.Beatmaps;
using SQLite;
namespace osu.Game.Database
{
public class BeatmapMetadata
{
[PrimaryKey]
public int ID { get; set; }
public string Title { get; set; }
public string TitleUnicode { get; set; }
public string Artist { get; set... | ```c#
using System;
using osu.Game.GameModes.Play;
using SQLite;
namespace osu.Game.Database
{
public class BeatmapMetadata
{
[PrimaryKey]
public int ID { get; set; }
public string Title { get; set; }
public string TitleUnicode { get; set; }
public string Artist { ge... |
41cb795d-2b80-4e57-854e-b1d3972201ca | {
"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 Microsoft.CodeAnalysis.Options;
namespace Microsoft.CodeAnalysis.Editing
{
internal class GenerationOptions
{
public static read... | ```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 Microsoft.CodeAnalysis.Options;
namespace Microsoft.CodeAnalysis.Editing
{
internal class GenerationOptions
{
public static read... |
872732e8-2cc0-4e34-abb2-5fd145f2aae1 | {
"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 osu.Framework.Graphics.OpenGL;
using System;
namespace osu.Framework.Graphics.Shaders
{
public class Uniform<T> : IUni... | ```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.OpenGL;
using System;
namespace osu.Framework.Graphics.Shaders
{
public class Uniform<T> : IUniformWithValue<T>
where T :... |
40a5ebd1-1fac-4edd-837f-a1ebe46eb151 | {
"language": "C#"
} | ```c#
using System.Windows;
using System.Windows.Controls;
using FlaUInspect.ViewModels;
namespace FlaUInspect.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly MainViewModel _vm;
... | ```c#
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using FlaUInspect.ViewModels;
namespace FlaUInspect.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly Mai... |
e05bf85f-cafd-4109-a96f-95330741555d | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Screens.Edit.Timing
{
internal class D... | ```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.Bindables;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Screens.Edit.Timing
{
internal class D... |
7cb29c05-9c37-40cb-8421-5c32ea2fa4e1 | {
"language": "C#"
} | ```c#
using System.IO;
using System.IO.Compression;
namespace Ensconce.Console
{
internal static class Backup
{
internal static void DoBackup()
{
if (File.Exists(Arguments.BackupDestination) && Arguments.BackupOverwrite)
{
File.Delete(Arguments.BackupDes... | ```c#
using System.IO;
using System.IO.Compression;
namespace Ensconce.Console
{
internal static class Backup
{
internal static void DoBackup()
{
var backupSource = Arguments.BackupSource.Render();
var backupDestination = Arguments.BackupDestination.Render();
... |
23eb3c35-ba7d-4780-980b-64d74db515ce | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata Framework")]
[assembly: AssemblyCopyright("© Yevgeniy Shunevych 2019")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVers... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata Framework")]
[assembly: AssemblyCopyright("© Yevgeniy Shunevych 2020")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVers... |
59e7553b-a957-4995-a11f-7754344b90c3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PluginTest
{
public class TestPlugin
{
}
}
```
Add a stronger dependency on UnityEngine for testing. | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace PluginTest
{
public class TestPlugin : MonoBehaviour
{
private void Start()
{
Debug.Log("Start called");
}
}
}
``` |
0a830f68-f310-45db-af4b-458619d84281 | {
"language": "C#"
} | ```c#
using TechSmith.Hyde.Common.DataAnnotations;
namespace TechSmith.Hyde.IntegrationTest
{
/// <summary>
/// Class with decorated partition and row key properties, for testing purposes.
/// </summary>
class DecoratedItem
{
[PartitionKey]
public string Id
{
get;
se... | ```c#
using System.Data.Services.Common;
using TechSmith.Hyde.Common.DataAnnotations;
namespace TechSmith.Hyde.IntegrationTest
{
/// <summary>
/// Class with decorated partition and row key properties, for testing purposes.
/// </summary>
class DecoratedItem
{
[PartitionKey]
public string I... |
3000068a-5e47-4ad6-8132-2b82f780f956 | {
"language": "C#"
} | ```c#
@{
string baseEditUrl = Context.String(DocsKeys.BaseEditUrl);
FilePath editFilePath = Model.FilePath(Wyam.Web.WebKeys.EditFilePath);
if(!string.IsNullOrWhiteSpace(baseEditUrl) && editFilePath != null)
{
string editUrl = baseEditUrl + editFilePath.FullPath;
<div><p><a href="@editUrl... | ```c#
@{
string baseEditUrl = Context.String(DocsKeys.BaseEditUrl);
FilePath editFilePath = Model.FilePath(Wyam.Web.WebKeys.EditFilePath);
if(!string.IsNullOrWhiteSpace(baseEditUrl) && editFilePath != null)
{
if (!baseEditUrl[baseEditUrl.Length - 1].equals('/'))
{
baseEditUrl... |
e9f3c14e-edfd-434f-b09a-b93274deb23b | {
"language": "C#"
} | ```c#
using System;
using System.Net;
namespace a
{
class Program
{
//Code is dirty, who cares, it's C#.
static void Main(string[] args)
{
//IPHostEntry heserver = Dns.GetHostEntry(Dns.GetHostName());
//foreach (IPAddress curAdd in heserver.AddressL... | ```c#
using System;
using System.Net;
namespace a
{
class Program
{
//Code is dirty, who cares, it's C#.
static void Main(string[] args)
{
Server server = new Server(IPAddress.Any, 5000);
server.Start();
Console.WriteLine("Press q to exit... |
ca489ac6-f9a9-4665-b8ff-7ea56ec30473 | {
"language": "C#"
} | ```c#
using Ploeh.AutoFixture.Xunit;
using Xunit;
using Xunit.Extensions;
namespace BobTheBuilder.Tests
{
public class BuildFacts
{
[Fact]
public void CreateADynamicInstanceOfTheRequestedType()
{
var sut = A.BuilderFor<SampleType>();
var result = sut.Build();
... | ```c#
using System;
using Ploeh.AutoFixture.Xunit;
using Xunit;
using Xunit.Extensions;
namespace BobTheBuilder.Tests
{
public class BuildFacts
{
[Fact]
public void CreateADynamicInstanceOfTheRequestedType()
{
var sut = A.BuilderFor<SampleType>();
var result =... |
ce303cff-e664-4e8e-85e1-d8d01efd090e | {
"language": "C#"
} | ```c#
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using SixLabors.Fonts.Unicode;
namespace SixLabors.Fonts.Tables.AdvancedTypographic.Shapers
{
internal static class ShaperFactory
{
/// <summary>
/// Creates a Shaper based on the given script language.
... | ```c#
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using SixLabors.Fonts.Unicode;
namespace SixLabors.Fonts.Tables.AdvancedTypographic.Shapers
{
internal static class ShaperFactory
{
/// <summary>
/// Creates a Shaper based on the given script language.
... |
082795c0-a818-4e47-8a60-63847d3e2101 | {
"language": "C#"
} | ```c#
using Lbookshelf.Business;
using Microsoft.Expression.Interactivity.Core;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Configuration;
using Lbookshelf.Utils;
using Lbookshelf.Models;
u... | ```c#
using Lbookshelf.Business;
using Microsoft.Expression.Interactivity.Core;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Configuration;
using Lbookshelf.Utils;
using Lbookshelf.Models;
u... |
6d55f26d-f543-4b9c-aaee-944339fd36c8 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbC... | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbC... |
1798baf2-cc7f-4e55-a56b-4c8e497583c4 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _db... | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _db... |
6f6bcc21-3dc1-4a17-9054-f404b7ef2ff1 | {
"language": "C#"
} | ```c#
namespace MailTrace.Host.Selfhost
{
using System;
using MailTrace.Data.Postgresql;
using MailTrace.Host;
using MailTrace.Host.Data;
using Microsoft.Owin.Hosting;
internal static class Program
{
private static void Main(string[] args)
{
const string baseA... | ```c#
namespace MailTrace.Host.Selfhost
{
using System;
using System.Linq;
using MailTrace.Data.Postgresql;
using MailTrace.Host.Data;
using Microsoft.Owin.Hosting;
internal static class Program
{
private static void Main(string[] args)
{
var baseAddress = arg... |
e4a97e4f-0d6b-4104-8764-feb44ee990e0 | {
"language": "C#"
} | ```c#
namespace Avalonia.Platform
{
public enum AlphaFormat
{
Premul,
Unpremul,
Opaque
}
}
```
Add documentation for alpha format. | ```c#
namespace Avalonia.Platform
{
/// <summary>
/// Describes how to interpret the alpha component of a pixel.
/// </summary>
public enum AlphaFormat
{
/// <summary>
/// All pixels have their alpha premultiplied in their color components.
/// </summary>
Premul,
... |
c54ad504-e746-461c-a70d-235ba4376ed6 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Tests.Experimental.Requests.Users.OAuth
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Users.OAuth;
using TraktApiSharp.Objects.Post.Users.CustomListItems;
using TraktApiSharp.Objects.Post.Users.C... | ```c#
namespace TraktApiSharp.Tests.Experimental.Requests.Users.OAuth
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Users.OAuth;
using TraktApiSharp.Objects.Post.Users.CustomListItems;
using TraktApiSharp.Objects.Post.Users.C... |
b6655363-9de7-4627-8b92-725b2b94e46a | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using Amry.Gst.Properties;
using WebMarkupMin.Mvc.ActionFilters;
namespace Amry.Gst.Web.Controllers
{
public class HomeController : Controller
{
const int OneWeek = 604800;
const int OneYear = 31536000;
[Route, MinifyHtml, OutputCache(Duration = OneWeek)]
... | ```c#
using System.Web.Mvc;
using Amry.Gst.Properties;
using WebMarkupMin.Mvc.ActionFilters;
namespace Amry.Gst.Web.Controllers
{
public class HomeController : Controller
{
const int OneWeek = 604800;
const int OneYear = 31536000;
[Route, MinifyHtml, OutputCache(Duration = OneWeek)]
... |
b07006d1-d707-49b5-bed9-a4ff8ef180c8 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using CefSharp;
namespace TweetDuck.Core.Handling.General{
sealed class FileDialogHandler : IDialogHandler{
public bool OnFileDialog(IWebBrowser browserControl, IBrowser browser, CefFileDialogMode mode,... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using CefSharp;
namespace TweetDuck.Core.Handling.General{
sealed class FileDialogHandler : IDialogHandler{
public bool OnFileDialog(IWebBrowser browserControl, IBrowser browser, CefFileDi... |
3f30bb74-5f57-4e45-927f-f47af7c13f55 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
namespace Bridge.Translator
{
public partial class Translator
{
protected static readonly char ps = System.IO.Path.DirectorySeparatorChar;
protected virtual string GetBuilderPath()
{
switch (Environment.OSVersion.Platform)
... | ```c#
using System;
using System.Diagnostics;
namespace Bridge.Translator
{
public partial class Translator
{
protected static readonly char ps = System.IO.Path.DirectorySeparatorChar;
protected virtual string GetBuilderPath()
{
switch (Environment.OSVersion.Platform)
... |
4d65a7c9-cdb0-4f42-b12e-0d8dd75aab10 | {
"language": "C#"
} | ```c#
namespace RedGate.AppHost.Server
{
public class ChildProcessFactory
{
public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bool is64Bit, bool monitorHostProcess)
{
IProcessStartOperation processStarter;
if (is64Bit)
{
... | ```c#
namespace RedGate.AppHost.Server
{
public class ChildProcessFactory
{
public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bool is64Bit, bool monitorHostProcess)
{
IProcessStartOperation processStarter;
if (is64Bit)
{
... |
2aad29ef-2923-4621-9605-aa4cc36e2eab | {
"language": "C#"
} | ```c#
using System.Text;
using Models = EntityCore.Initialization.Metadata.Models;
namespace EntityCore.DynamicEntity
{
internal class EntityDatabaseStructure
{
public static string GenerateCreateTableSqlQuery(Models.Entity entity)
{
var createTable = new StringBuilder();
... | ```c#
using EntityCore.Proxy.Metadata;
using System.Text;
namespace EntityCore.DynamicEntity
{
internal class EntityDatabaseStructure
{
public static string GenerateCreateTableSqlQuery(IEntity entity)
{
var createTable = new StringBuilder();
createTable.AppendFormat("CR... |
14e5b39f-dbed-4bc6-b974-1d91806ea170 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Configuration")]
[assembly: AssemblyDescription("Autofac XML Configuration Support")]
[assembly: InternalsVisibleTo("Autofac.Tests.Configuration, PublicKey... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Configuration")]
[assembly: InternalsVisibleTo("Autofac.Tests.Configuration, PublicKey=00240000048000009400000006020000002400005253413100040000010001008728425885ef385e0492... |
d2619666-5874-40a5-9498-1e21e00a0ea1 | {
"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 UIKit;
namespace osu.iOS
{
public static class Application
{
public static void Main(string[] args)
{
UIApplication.Main... | ```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.iOS;
using UIKit;
namespace osu.iOS
{
public static class Application
{
public static void Main(string[] args)
{
... |
3d53b9aa-296a-4cb7-a41b-aa9c8bca9f56 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitl... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitl... |
0360729e-44f2-453f-902f-2d3b2165f258 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.SPOT;
namespace Idiot.Net
{
class Credentials
{
}
}
```
Add credentials class for user authorization | ```c#
using System;
using Microsoft.SPOT;
using System.Text;
using GHIElectronics.NETMF.Net;
namespace Idiot.Net
{
public class Credentials
{
private string username;
private string password;
public Credentials(string username, string password)
{
this.username = us... |
3ecab2ef-8d36-4ef6-acb7-ec6c0a5d761d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace SNPPlib
{
public class PagerCollection : Collection<string>
{
public PagerCollection()
{
Pagers = new List<string>();
}
internal IList<string> Pagers { get; set; }... | ```c#
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace SNPPlib
{
public class PagerCollection : Collection<string>
{
public PagerCollection()
{
Pagers = new List<string>();
}
internal IList<string> Pagers { get; set; }... |
83bcd74b-fe50-4fc4-9447-98c080a8740e | {
"language": "C#"
} | ```c#
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class DriftUe4PluginServerTarget : TargetRules
{
public DriftUe4PluginServerTarget(TargetInfo Target)
{
Type = TargetType.Server;
}
//
// TargetRules inter... | ```c#
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class DriftUe4PluginServerTarget : TargetRules
{
public DriftUe4PluginServerTarget(TargetInfo Target)
{
Type = TargetType.Server;
}
//
// TargetRules inter... |
f39c20d9-a2ff-4986-abe7-26c7c173283c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LBD2OBJ
{
class Program
{
static void Main(string[] args)
{
}
}
}
```
Add beginnings of a method to parse TMD files | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using LBD2OBJ.Types;
namespace LBD2OBJ
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("LBD2OBJ - Made by Figglewatts 2015");
foreach (string arg... |
b137789a-02e2-4ce8-969e-6be936fe8bce | {
"language": "C#"
} | ```c#
using System;
namespace GitReleaseNotes
{
public class ArgumentVerifier
{
public static bool VerifyArguments(GitReleaseNotesArguments arguments)
{
if (arguments.IssueTracker == null)
{
Console.WriteLine("The IssueTracker argument must be provided, ... | ```c#
using System;
namespace GitReleaseNotes
{
public class ArgumentVerifier
{
public static bool VerifyArguments(GitReleaseNotesArguments arguments)
{
if (arguments.IssueTracker == null)
{
Console.WriteLine("The IssueTracker argument must be provided, ... |
ae487e6e-5821-4f94-b8c2-70e59ff6cb4e | {
"language": "C#"
} | ```c#
@model SiteOptions
<hr />
<footer>
<p>
© @Model.Metadata.Author.Name @DateTimeOffset.UtcNow.Year |
<a id="link-status" href="@Model.ExternalLinks.Status.AbsoluteUri" target="_blank" title="View site uptime information">
Site Status & Uptime
</a>
| Built fr... | ```c#
@model SiteOptions
<hr />
<footer>
<p>
© @Model.Metadata.Author.Name @DateTimeOffset.UtcNow.Year |
<a id="link-status" href="@Model.ExternalLinks.Status.AbsoluteUri" target="_blank" title="View site uptime information">
Site Status & Uptime
</a>
| Built fr... |
cbbcca01-2ea2-481e-b3e1-00243baa3187 | {
"language": "C#"
} | ```c#
namespace IronFoundry.Warden.Service
{
public static class Constants
{
public const string DisplayName = "Iron Foundry Warden Service";
public const string ServiceName = "ironfoundry.warden";
}
}
```
Fix casing of warden service. | ```c#
namespace IronFoundry.Warden.Service
{
public static class Constants
{
public const string DisplayName = "Iron Foundry Warden Service";
public const string ServiceName = "IronFoundry.Warden";
}
}
``` |
8d8efee5-81ab-4a93-9a48-50061824f621 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Text;
namespace KuduSync.NET
{
public class Logger : IDisposable
{
private const int KeepAliveLogTimeInSeconds = 20;
private int _logCounter = 0;
private StreamWriter _writer;
private int _maxLogLines;
private DateTime ... | ```c#
using System;
using System.IO;
using System.Text;
namespace KuduSync.NET
{
public class Logger : IDisposable
{
private const int KeepAliveLogTimeInSeconds = 20;
private int _logCounter = 0;
private StreamWriter _writer;
private int _maxLogLines;
private DateTime ... |
ec3ad16d-899e-483b-b313-c38c53e2072f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Pather.CSharp.PathElements
{
public class Property : IPathElement
{
public static bool IsApplicable(string pathElement)
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Pather.CSharp.PathElements
{
public class Property : IPathElement
{
private string property;
public Property(string p... |
9aef6beb-cfd7-4c82-b1df-0665119ffbb0 | {
"language": "C#"
} | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
namespace EOLib.IO.Map
{
public enum MapEffect : byte
{
None = 0,
HPDrain = 1,
TPDrain = 2,
Quake = 3
}
}```
Add more qu... | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
namespace EOLib.IO.Map
{
public enum MapEffect : byte
{
None = 0,
HPDrain = 1,
TPDrain = 2,
Quake1 = 3,
Quake2 = 4,
... |
6b765825-6093-4534-b569-3aabe230968e | {
"language": "C#"
} | ```c#
using System;
using System.Web.Mvc;
namespace Foo.Web.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
throw new NotImplementedException();
}
}
}
```
Return view from index action | ```c#
using System;
using System.Web.Mvc;
namespace Foo.Web.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}
}
``` |
a2406931-f651-43d7-ad09-d9fcf836955b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using AspNetCoreMvc.Models;
using Ooui;
using Ooui.AspNetCore;
namespace AspNetCoreMvc.Controllers
{
public class HomeController : Controll... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using AspNetCoreMvc.Models;
using Ooui;
using Ooui.AspNetCore;
namespace AspNetCoreMvc.Controllers
{
public class HomeController : Controll... |
d59c3ce3-437c-4d0d-be19-32cf9aface5f | {
"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 System.Linq;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play;
namespace 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 System.Linq;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Scre... |
ff03d681-28fe-4d96-9b47-fea6dc0919cd | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Cosmos.Kernel.LogTail
{
public class ErrorStrippingFileStream : FileStream
{
public ErrorStrippingFileStream(string file)
: base(file, FileMode.Open, FileAccess... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Cosmos.Kernel.LogTail
{
public class ErrorStrippingFileStream : FileStream
{
public ErrorStrippingFileStream(string file)
: base(file, FileMode.Open, FileAccess... |
a29f0b45-0f0c-4be1-9622-724c0f49f0d2 | {
"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.Framework.Input.Bindings;
using osu.Game.Database;
using Realms;
namespace osu.Game.Input.Bindings
{
[MapTo(nameof(KeyBinding))]
pu... | ```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.Input.Bindings;
using osu.Game.Database;
using Realms;
namespace osu.Game.Input.Bindings
{
[MapTo(nameof(KeyBinding))]
pu... |
1cd7bbf6-0f46-4d73-a82d-ecbdd3dab3a0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
namespace MsgPack.Serialization.DefaultSerializers
{
/// <summary>
/// Dictionary interface serializer.
/// </summary>
internal sealed class NonGenericDictionarySerializer : MessagePackSerializer<IDictionary>
{
private readonly System_Collections_DictionaryEntryMe... | ```c#
using System;
using System.Collections;
using System.Runtime.Serialization;
namespace MsgPack.Serialization.DefaultSerializers
{
/// <summary>
/// Dictionary interface serializer.
/// </summary>
internal sealed class NonGenericDictionarySerializer : MessagePackSerializer<IDictionary>
{
private readonly ... |
254da04e-f2c0-43aa-83f0-50f8d369fc56 | {
"language": "C#"
} | ```c#
using BackOffice.Jobs.Interfaces;
using BackOffice.Jobs.Reports;
using System;
namespace BackOffice.Worker
{
public class CProductAlwaysFailingReportWorker : IJobWorker
{
private readonly AlwaysFailingReport report;
public CProductAlwaysFailingReportWorker(AlwaysFailingReport report)
... | ```c#
using BackOffice.Jobs.Interfaces;
using BackOffice.Jobs.Reports;
using System;
using System.Threading;
namespace BackOffice.Worker
{
public class CProductAlwaysFailingReportWorker : IJobWorker
{
private readonly AlwaysFailingReport report;
public CProductAlwaysFailingReportWorker(Always... |
948aa5ad-25b3-4c41-b25a-7602e399d6a3 | {
"language": "C#"
} | ```c#
namespace NBench.VisualStudio.TestAdapter
{
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
public class NBenchTestDiscoverer : ITestDiscoverer
... | ```c#
namespace NBench.VisualStudio.TestAdapter
{
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
public class NBenchTestDiscoverer : ITestDiscoverer
... |
108cd852-2209-4169-9662-42993dc77708 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
namespace Moq.Proxy
{
public class ProxyDiscoverer
{
public async Task<IImmutableSet<ImmutableArray<ITypeSymbol>>> DiscoverProxi... | ```c#
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
namespace Moq.Proxy
{
public class ProxyDiscoverer
{
public async Task<IImmutableSet<ImmutableArray<ITypeSymbol>>> DiscoverProxi... |
987f83fc-bc3e-4dbc-9198-b1673a682cae | {
"language": "C#"
} | ```c#
using System.Linq;
using JetBrains.ActionManagement;
using JetBrains.Annotations;
using JetBrains.Application.DataContext;
using JetBrains.ReSharper.Features.Inspections.Actions;
using JetBrains.UI.ActionsRevised;
namespace Roflcopter.Plugin.TodoItems
{
[Action(nameof(TodoItemsCountDummyAction), Id = 9442089... | ```c#
using System.Linq;
using JetBrains.ActionManagement;
using JetBrains.Annotations;
using JetBrains.Application.DataContext;
using JetBrains.ReSharper.Features.Inspections.Actions;
using JetBrains.UI.ActionsRevised;
namespace Roflcopter.Plugin.TodoItems
{
[ActionGroup(nameof(TodoItemsCountDummyActionGroup), Ac... |
52e7be7a-2f56-4f8c-a4d1-25f54c3fe57c | {
"language": "C#"
} | ```c#
using System;
using System.Drawing;
using System.Linq;
using NUnit.Framework;
using Palaso.UI.WindowsForms;
namespace PalasoUIWindowsForms.Tests.FontTests
{
[TestFixture]
public class FontHelperTests
{
[SetUp]
public void SetUp()
{
// setup code goes here
}
[TearDown]
public void TearDown()
... | ```c#
using System;
using System.Drawing;
using System.Linq;
using NUnit.Framework;
using Palaso.UI.WindowsForms;
namespace PalasoUIWindowsForms.Tests.FontTests
{
[TestFixture]
public class FontHelperTests
{
[SetUp]
public void SetUp()
{
// setup code goes here
}
[TearDown]
public void TearDown()
... |
07861716-610e-4d1c-abee-7844dc2d796d | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using MvcProblemDetailsFactory = Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFa... | ```c#
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using MvcProblemDetailsFactory = Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFa... |
a1995ff8-f48f-4a0d-aa45-f50899edc349 | {
"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;
//using GLib;
//using Gtk;
using NDesk.DBus;
using NDesk.GLib;
using org.freedesktop.DBus;
namespace NDesk.DBus
{
//FIXME: this API needs review and de-unixification
p... | ```c#
// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System;
//using GLib;
//using Gtk;
using NDesk.DBus;
using NDesk.GLib;
using org.freedesktop.DBus;
namespace NDesk.DBus
{
//FIXME: this API needs review and de-unixification
p... |
f6762d70-b7bf-4b7a-8bf6-53820cae4f28 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Diagnostics;
namespace osu_database_reader.Components.HitObjects
{
public class HitObjectSlider : HitObject
{
public CurveType CurveType;
public List<Vector2> Points = new List<Vector2>(); //does not include initial point!
public in... | ```c#
using System.Collections.Generic;
using System.Diagnostics;
namespace osu_database_reader.Components.HitObjects
{
public class HitObjectSlider : HitObject
{
public CurveType CurveType;
public List<Vector2> Points = new List<Vector2>(); //does not include initial point!
public in... |
13c5cc90-0711-40be-ba6a-82067a8f3cd0 | {
"language": "C#"
} | ```c#
using Cake.Common;
using Cake.Frosting;
namespace Build
{
public sealed class Lifetime : FrostingLifetime<Context>
{
public override void Setup(Context context)
{
context.Configuration = context.Argument("configuration", "Release");
context.BaseDir = context.Envir... | ```c#
using Cake.Common;
using Cake.Frosting;
namespace Build
{
public sealed class Lifetime : FrostingLifetime<Context>
{
public override void Setup(Context context)
{
context.Configuration = context.Argument("configuration", "Release");
context.BaseDir = context.Envir... |
919537e1-d999-429a-a9d1-6d4fd0b48679 | {
"language": "C#"
} | ```c#
using System;
namespace ExternalTemplates
{
/// <summary>
/// Default generator options.
/// </summary>
public class GeneratorOptions : IGeneratorOptions
{
/// <summary>
/// Gets the path relative to the web root where the templates are stored.
/// Default is "/Content/templates".
/// </summary>
... | ```c#
using System;
namespace ExternalTemplates
{
/// <summary>
/// Default generator options.
/// </summary>
public class GeneratorOptions : IGeneratorOptions
{
/// <summary>
/// Gets the path relative to the web root where the templates are stored.
/// Default is "Content/templates".
/// </summary>
p... |
56675ef7-206a-49f0-8bf2-1c4f896dbe7b | {
"language": "C#"
} | ```c#
namespace testproj
{
using JetBrains.dotMemoryUnit;
using NUnit.Framework;
[TestFixture]
public class UnitTest1
{
[Test]
public void TestMethod1()
{
dotMemory.Check(
memory =>
{
Assert.AreEqual(10, memor... | ```c#
namespace testproj
{
using System;
using JetBrains.dotMemoryUnit;
using NUnit.Framework;
[TestFixture]
public class UnitTest1
{
[Test]
public void TestMethod1()
{
dotMemory.Check(
memory =>
{
var st... |
3e12f452-231f-4eda-bc2b-d18794b7309e | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using System.ServiceProcess;
using System.Configuration.Install;
namespace Graphite.System
{
public partial class ServiceInstaller
{
private IContainer components = null;
private global::System.ServiceProcess.ServiceInstaller serviceInstaller;
priva... | ```c#
using System.ComponentModel;
using System.ServiceProcess;
using System.Configuration.Install;
namespace Graphite.System
{
public partial class ServiceInstaller
{
private IContainer components = null;
private global::System.ServiceProcess.ServiceInstaller serviceInstaller;
priva... |
a2d2f6ea-e512-4d9d-9ae9-219f55933ab1 | {
"language": "C#"
} | ```c#
//
// Nikon3MakerNoteEntryTag.cs:
//
// Author:
// Ruben Vermeersch (ruben@savanne.be)
//
// Copyright (C) 2010 Ruben Vermeersch
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License version
// 2.1 as published by the Free Soft... | ```c#
//
// Nikon3MakerNoteEntryTag.cs:
//
// Author:
// Ruben Vermeersch (ruben@savanne.be)
//
// Copyright (C) 2010 Ruben Vermeersch
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License version
// 2.1 as published by the Free Soft... |
8610485c-75ac-47d5-b00a-f24a9cfee9ac | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTit... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTit... |
8c6dcb0f-f8be-4e6b-be9d-e9355058a2d5 | {
"language": "C#"
} | ```c#
using System.IO;
using Containerizer.Services.Interfaces;
namespace Containerizer.Services.Implementations
{
public class StreamOutService : IStreamOutService
{
private readonly IContainerPathService containerPathService;
private readonly ITarStreamService tarStreamService;
publ... | ```c#
using System.IO;
using Containerizer.Services.Interfaces;
namespace Containerizer.Services.Implementations
{
public class StreamOutService : IStreamOutService
{
private readonly IContainerPathService containerPathService;
private readonly ITarStreamService tarStreamService;
publ... |
06aafa28-df3d-49a2-878d-a4ad0c7fe5ad | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using dokas.FluentStrings;
using Mozilla.CharDet;
namespace dokas.EncodingConverter.Logic
{
internal sealed class EncodingManager
{
private readonly FileManager _fileManager;
private sta... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using dokas.FluentStrings;
using Mozilla.CharDet;
namespace dokas.EncodingConverter.Logic
{
internal sealed class EncodingManager
{
private readonly FileManager _fileManager;
... |
7296bce5-e9ca-4825-a405-7f0180b658b0 | {
"language": "C#"
} | ```c#
using FabricStore.Data;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using FabricStore.Data.Migrations;
using FabricStore.Web.Infrastructure.Mapping;
using System.Refle... | ```c#
using FabricStore.Data;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using FabricStore.Data.Migrations;
using FabricStore.Web.Infrastructure.Mapping;
using System.Refle... |
0a9057ed-36f1-4467-ad8c-048bfabe64f1 | {
"language": "C#"
} | ```c#
#region
using System;
using BinaryTree.Models;
#endregion
namespace BinaryTree
{
internal class Program
{
private static void Main()
{
var binaryTree = new BinaryTree<int> {5, 3, 9, 1, -5, 0, 2};
Console.WriteLine("{0}, count of items: {1}", binaryTree, binaryT... | ```c#
#region
using System;
using BinaryTree.Models;
#endregion
namespace BinaryTree
{
internal class Program
{
private static void Main()
{
var binaryTree = new BinaryTree<int> {5, 3, 9, 1, -5, 0, 2};
Console.WriteLine("{0}, count of items: {1}", binaryTree, binaryT... |
e61d1bac-7c7d-4311-87bc-b1d007619e8a | {
"language": "C#"
} | ```c#
using System;
namespace csnex
{
[Serializable()]
public class NeonException: ApplicationException
{
public NeonException() {
}
public NeonException(string message) : base(message) {
}
public NeonException(string message, params object[] args) : base(string.F... | ```c#
using System;
using System.Runtime.Serialization;
using System.Security.Permissions;
namespace csnex
{
[Serializable()]
public class NeonException: ApplicationException
{
public NeonException() {
}
public NeonException(string name, string info) : base(name) {
Nam... |
1cba2c52-c742-43b9-b28e-536b09249c8f | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mono.Addins;
namespace MonoDevelop.Addins.Tasks
{
public abstract class AddinTask : Task
{
[Required]
public string ConfigDir { get; set; }
[Required]
public string AddinsDir { get; set; }
[Requi... | ```c#
using System;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mono.Addins;
namespace MonoDevelop.Addins.Tasks
{
public abstract class AddinTask : Task
{
[Required]
public string ConfigDir { get; set; }
[Required]
public string AddinsDir { get; set; }
[Requi... |
9f9682f5-4427-439b-a5dd-53aa4c6ffc6d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace NElasticsearch.Models
{
/// <summary>
/// Individual hit response from ElasticSearch.
/// </summary>
[DebuggerDisplay("{_type} in {_index} id {_id}")]
public class Hit<T>
{
public string _index { ... | ```c#
using System.Collections.Generic;
using System.Diagnostics;
namespace NElasticsearch.Models
{
/// <summary>
/// Individual hit response from ElasticSearch.
/// </summary>
[DebuggerDisplay("{_type} in {_index} id {_id}")]
public class Hit<T>
{
public string _index { get; set; }
... |
cf127745-89fe-4b24-b4f4-b099e86158a1 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using wslib;
using wslib.Protocol;
namespace LocalServer
{
class Program
{
static void Main(string[] args)
{
TaskScheduler.UnobservedTaskException += LogU... | ```c#
using System;
using System.IO;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using wslib;
namespace LocalServer
{
class Program
{
static void Main(string[] args)
{
TaskScheduler.UnobservedTaskException += LogUnobservedTaskException;
var ... |
e8a5f44b-2e49-4710-aee6-dc6dbff02c8c | {
"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... |
0bf4a286-a95d-41b5-86b8-d2dc44037db7 | {
"language": "C#"
} | ```c#
namespace UnwindMC.Analysis
{
public class Function
{
public Function(ulong address)
{
Address = address;
Status = FunctionStatus.Created;
}
public ulong Address { get; }
public FunctionStatus Status { get; set; }
}
public enum Fun... | ```c#
using System;
using System.Collections.Generic;
using UnwindMC.Analysis.Flow;
using UnwindMC.Analysis.IL;
namespace UnwindMC.Analysis
{
public class Function
{
private List<IBlock> _blocks;
public Function(ulong address)
{
Address = address;
Status = Func... |
4a30122a-e6c0-4790-bda9-cbf03f37c7a9 | {
"language": "C#"
} | ```c#
using System;
using System.Text;
namespace SCPI.Display
{
public class DISPLAY_GRID : ICommand
{
public string Description => "Set or query the grid type of screen display.";
public string Grid { get; private set; }
private readonly string[] gridRange = new string[] { "FULL", "... | ```c#
using System;
using System.Text;
namespace SCPI.Display
{
public class DISPLAY_GRID : ICommand
{
public string Description => "Set or query the grid type of screen display.";
public string Grid { get; private set; }
private readonly string[] gridRange = new string[] { "FULL", "... |
44f07d0f-b338-41b2-b5e3-2079eae07466 | {
"language": "C#"
} | ```c#
using CroquetAustralia.Domain.Features.TournamentEntry.Events;
namespace CroquetAustralia.QueueProcessor.Email.EmailGenerators
{
public class U21WorldsEOIEmailGenerator : BaseEmailGenerator
{
/* todo: remove hard coding of email addresses */
private static readonly EmailAddress U21Coordi... | ```c#
using System.Linq;
using CroquetAustralia.Domain.Features.TournamentEntry.Events;
namespace CroquetAustralia.QueueProcessor.Email.EmailGenerators
{
public class U21WorldsEOIEmailGenerator : BaseEmailGenerator
{
/* todo: remove hard coding of email addresses */
private static readonly Ema... |
30338871-fb06-4bab-9c3c-bcced00dbbe8 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Tests
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class TraktConfigurationTests
{
[TestMethod]
public void TestTraktConfigurationDefaultConstructor()
{
var client = new TraktClien... | ```c#
namespace TraktApiSharp.Tests
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class TraktConfigurationTests
{
[TestMethod]
public void TestTraktConfigurationDefaultConstructor()
{
var client = new TraktClien... |
f05ed092-563b-4372-b8b9-360f87ebad79 | {
"language": "C#"
} | ```c#
using System;
using FormsToolkit;
using Xamarin.Forms;
namespace ToolkitTests
{
public class App : Application
{
public App()
{
var messagingCenter = new Button
{
Text = "Messaging Center",
Command = new Command(()=>Mai... | ```c#
using System;
using FormsToolkit;
using Xamarin.Forms;
namespace ToolkitTests
{
public class App : Application
{
public App()
{
var messagingCenter = new Button
{
Text = "Messaging Center",
Command = new Command(()=>Mai... |
3d0c375a-4892-4e22-827c-2192545ad8e5 | {
"language": "C#"
} | ```c#
using BusinessObjects.Validators;
namespace FatturaElettronicaPA.Validators
{
/// <summary>
/// Validates FatturaElettronicaBody.DatiPagamento.DettaglioPagamento.ModalitaPagamento.
/// </summary>
public class FModalitaPagamentoValidator : DomainValidator
{
private const string Broken... | ```c#
using BusinessObjects.Validators;
namespace FatturaElettronicaPA.Validators
{
/// <summary>
/// Validates FatturaElettronicaBody.DatiPagamento.DettaglioPagamento.ModalitaPagamento.
/// </summary>
public class FModalitaPagamentoValidator : DomainValidator
{
private const string Broken... |
3a05e76e-7f73-4ded-9a0f-732c2474c5d6 | {
"language": "C#"
} | ```c#
// Copyright 2013 Xamarin Inc.
using System;
using System.Reflection;
using System.Collections;
using System.Runtime.InteropServices;
using MonoMac.ObjCRuntime;
namespace MonoMac.Foundation {
public partial class NSUrlCredential {
public NSUrlCredential (IntPtr trust, bool ignored) : base (NSObjectFlag.Em... | ```c#
// Copyright 2013 Xamarin Inc.
using System;
using System.Reflection;
using System.Collections;
using System.Runtime.InteropServices;
using MonoMac.ObjCRuntime;
namespace MonoMac.Foundation {
public partial class NSUrlCredential {
public NSUrlCredential (IntPtr trust, bool ignored) : base (NSObjectFlag.Em... |
4750b8e3-0482-4fae-ac6d-58e66c20729b | {
"language": "C#"
} | ```c#
using System;
namespace DesktopWidgets.Helpers
{
public static class DateTimeSyncHelper
{
public static DateTime SyncNext(this DateTime dateTime, bool syncYear, bool syncMonth, bool syncDay,
bool syncHour, bool syncMinute, bool syncSecond)
{
var endDateTime = date... | ```c#
using System;
namespace DesktopWidgets.Helpers
{
public static class DateTimeSyncHelper
{
public static DateTime SyncNext(this DateTime dateTime, bool syncYear, bool syncMonth, bool syncDay,
bool syncHour, bool syncMinute, bool syncSecond)
{
var endDateTime = date... |
b0c76e73-5bd0-43d4-938d-45048a0a1e00 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PhotoLife.Data.Contracts;
using PhotoLife.Models;
using PhotoLife.Services.Contracts;
namespace PhotoLife.Services
{
public class PostsService: IPostService
{
private readonl... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PhotoLife.Data.Contracts;
using PhotoLife.Models;
using PhotoLife.Services.Contracts;
namespace PhotoLife.Services
{
public class PostsService : IPostService
{
private readon... |
9d0bbe55-2701-4ade-84ed-53b08c71a691 | {
"language": "C#"
} | ```c#
namespace SilentHunter
{
public static class Encoding
{
/// <summary>
/// The default encoding to use for parsing Silent Hunter game files.
/// </summary>
public static System.Text.Encoding ParseEncoding { get; } = System.Text.Encoding.GetEncoding(1252);
}
}```
Use ISO encoding, for cross platform | ```c#
namespace SilentHunter
{
public static class Encoding
{
/// <summary>
/// The default encoding to use for parsing Silent Hunter game files.
/// </summary>
public static System.Text.Encoding ParseEncoding { get; } = System.Text.Encoding.GetEncoding("ISO-8859-1");
}
}``` |
31373911-2aa7-4f82-aa9e-50c9f856cf56 | {
"language": "C#"
} | ```c#
using MQTTnet.Client.Connecting;
using MQTTnet.Exceptions;
namespace MQTTnet.Adapter
{
public class MqttConnectingFailedException : MqttCommunicationException
{
public MqttConnectingFailedException(MqttClientAuthenticateResult resultCode)
: base($"Connecting with MQTT server failed (... | ```c#
using MQTTnet.Client.Connecting;
using MQTTnet.Exceptions;
namespace MQTTnet.Adapter
{
public class MqttConnectingFailedException : MqttCommunicationException
{
public MqttConnectingFailedException(MqttClientAuthenticateResult resultCode)
: base($"Connecting with MQTT server failed (... |
1becac2c-c0c3-4847-ab6a-732a63d1c6ec | {
"language": "C#"
} | ```c#
using System;
using Xunit;
namespace CSharpInternals.ExceptionHandling
{
public class Basics
{
[Fact]
public void Test()
{
Assert.Throws<NullReferenceException>(() => ThrowsNullReferenceException());
}
// Fact - ToString allocates a lo... | ```c#
using System;
using Xunit;
namespace CSharpInternals.ExceptionHandling
{
public class Basics
{
[Fact]
public void ThrowsNull()
{
Assert.Throws<NullReferenceException>(() => ThrowsNullReferenceException());
}
// Fact - ToString allocate... |
614d1e39-bcfc-4cb2-bfe1-00b9b9776f7b | {
"language": "C#"
} | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using PELoaderLib;
namespace EOLib.Graphics
{
public sealed class PEFileCol... | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using System;
using System.Collections.Generic;
using System.IO;
using PELoaderLib;
namespace EOLib.Graphics
{
public sealed class PEFileCollection : Dictionar... |
35bf2b5c-38e6-4c2e-83af-42c9b3110ec5 | {
"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.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Gam... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings... |
1bec4ccd-387a-459b-b27b-01d39169550a | {
"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.
/*
* Currently if you have a .cshtml file in a project with <Project Sdk="Microsoft.NET.Sdk.Web">,
* Visual Studio will run design-time builds ... | ```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.
/*
* Currently if you have a .cshtml file in a project with <Project Sdk="Microsoft.NET.Sdk.Web">,
* Visual Studio will run design-time builds ... |
c81ca550-9031-4b02-99e1-a359905f210c | {
"language": "C#"
} | ```c#
using System.Windows;
namespace OpenSage.DataViewer
{
public partial class App : Application
{
}
}
```
Set thread culture to InvariantCulture on startup | ```c#
using System.Windows;
using System.Globalization;
using System.Threading;
namespace OpenSage.DataViewer
{
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
... |
bd734bc1-c0c8-4250-9cfb-66fa895d53ae | {
"language": "C#"
} | ```c#
// Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Perspex;
using Perspex.Controls;
using Perspex.Controls.Presenters;
using System;
using System.Collections.Generic;
namespace Core2D.Perspex.Presenter... | ```c#
// Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Perspex;
using Perspex.Controls;
using Perspex.Controls.Presenters;
using System;
using System.Collections.Generic;
namespace Core2D.Perspex.Presenter... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.