doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
4f949eb7-4c02-40f9-8740-7377652b250d
{ "language": "C#" }
```c# using System.Text.RegularExpressions; using System.Collections.Generic; public class Phrase { private readonly string _phrase; public Phrase(string phrase) { if (phrase == null) throw new ArgumentNullException("phrase"); _phrase = phrase; } public IDictionary<string, int...
```c# using System; using System.Text.RegularExpressions; using System.Collections.Generic; public class Phrase { private readonly string _phrase; public Phrase(string phrase) { if (phrase == null) throw new ArgumentNullException("phrase"); _phrase = phrase; } public IDictiona...
1c59f776-fbf3-4767-a975-2252eee995c9
{ "language": "C#" }
```c# #if DEBUG using NUnit.Framework; [assembly: LevelOfParallelism(4)] [assembly: Parallelizable(ParallelScope.Fixtures)] #endif ``` Enable tests parallelization for all build configurations
```c# using NUnit.Framework; [assembly: Parallelizable(ParallelScope.Fixtures)] ```
1b3aa472-a2a0-45ff-8ab6-50b48a41c60f
{ "language": "C#" }
```c# // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using Xunit.Sdk; namespace Xunit { /// <summary> /// Apply this attribute to your test method to specify a outer-loop category. /// </s...
```c# // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using Xunit.Sdk; namespace Xunit { /// <summary> /// Apply this attribute to your test method to specify a outer-loop category. /// </s...
ffe312ad-03f8-4e6a-9103-8e5d5889b2a8
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace CheckUp2 { public partial class MainWindow : Form { public MainWindow() { ...
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace CheckUp2 { public partial class MainWindow : Form { public MainWindow() { ...
7ec4f28e-e65e-4300-8709-aac1a306a809
{ "language": "C#" }
```c# using Microsoft.AspNetCore.Http; using Mindscape.Raygun4Net.AspNetCore; namespace Mindscape.Raygun4Net.AspNetCore2.Tests { public class ExampleRaygunAspNetCoreClientProvider : DefaultRaygunAspNetCoreClientProvider { public override AspNetCore.RaygunClient GetClient(AspNetCore.RaygunSettings sett...
```c# using Microsoft.AspNetCore.Http; using Mindscape.Raygun4Net.AspNetCore; using System.Collections.Generic; namespace Mindscape.Raygun4Net.AspNetCore2.Tests { public class ExampleRaygunAspNetCoreClientProvider : DefaultRaygunAspNetCoreClientProvider { public override AspNetCore.RaygunClient GetCli...
d19a6a3e-0565-4953-9c83-81bd3df7f617
{ "language": "C#" }
```c# namespace KInspector.Core { /// <summary> /// The interface to implement to add a functionality to this application. /// Add DLL with implementation of this interface to the same folder as executing assembly to auto-load /// all of them. /// </summary> public interface IModule { ...
```c# namespace KInspector.Core { /// <summary> /// The interface to implement to add a functionality to this application. /// Add DLL with implementation of this interface to the same folder as executing assembly to auto-load /// all of them. /// </summary> public interface IModule { ...
4dc8e12a-1c14-422b-a9aa-166888b2d1aa
{ "language": "C#" }
```c# namespace Miruken.Map { using System; using Callback; using Concurrency; public class MappingHandler : Handler, IMapping { public object Map(object source, object typeOrInstance, object format = null) { if (source == null) ...
```c# namespace Miruken.Map { using System; using Callback; using Concurrency; public class MappingHandler : Handler, IMapping { public object Map(object source, object typeOrInstance, object format = null) { if (source == null) ...
6cbab0ca-cd45-46e8-80b7-26c2f27bc853
{ "language": "C#" }
```c# using System; namespace clipman.ViewModels { class SettingsPanelViewModel { public void ClearClips() { ClearRequested?.Invoke(this, EventArgs.Empty); } public event EventHandler ClearRequested; } } ``` Remove obsolete clip clear request code
```c# using System; namespace clipman.ViewModels { class SettingsPanelViewModel { } } ```
0a049661-c5d7-4527-afd0-55fff7ccdf02
{ "language": "C#" }
```c# using System.Collections.Generic; using JetBrains.Annotations; namespace HarryPotterUnity.Cards.Transfiguration.Spells { [UsedImplicitly] public class MiceToSnuffboxes : BaseSpell { public override List<BaseCard> GetValidTargets() { var validCards = Player.InPlay.GetCreatures...
```c# using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; namespace HarryPotterUnity.Cards.Transfiguration.Spells { [UsedImplicitly] public class MiceToSnuffboxes : BaseSpell { public override List<BaseCard> GetValidTargets() { var validCards = Player....
302b7fda-46f8-45fd-b099-37ce3929fcbf
{ "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. #nullable enable using System.Diagnostics.CodeAnalysis; namespace Microsoft.CodeAnalysis.CodeStyle { in...
```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. #nullable enable using System.Diagnostics.CodeAnalysis; namespace Microsoft.CodeAnalysis.CodeStyle { in...
0efdbde5-4b06-4aaa-8d2c-685b73516d75
{ "language": "C#" }
```c# // Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. // Licensed under the Apache License, Version 2.0. using System.IO; using ImageMagick; using Xunit; namespace Magick.NET.Tests { public class TheAvifCoder { [Fact] public void ShouldEncodeAndDecodeAlphaChannel() {...
```c# // Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. // Licensed under the Apache License, Version 2.0. using System.IO; using ImageMagick; using Xunit; namespace Magick.NET.Tests { public class TheAvifCoder { [Fact] public void ShouldEncodeAndDecodeAlphaChannel() {...
e53d1944-b3f0-4798-abdf-9861890ab91b
{ "language": "C#" }
```c# using System.Collections.Immutable; using LanguageExt; namespace ExRam.Gremlinq.Core { public struct GremlinqOptions { private readonly IImmutableDictionary<GremlinqOption, object> _options; public GremlinqOptions(IImmutableDictionary<GremlinqOption, object> options) { ...
```c# using System; using System.Collections.Immutable; using LanguageExt; namespace ExRam.Gremlinq.Core { public struct GremlinqOptions { private readonly IImmutableDictionary<GremlinqOption, object> _options; public GremlinqOptions(IImmutableDictionary<GremlinqOption, object> options) ...
7341b315-b1b8-4945-954c-1065f8697940
{ "language": "C#" }
```c# using System; using Csla; using Csla.Serialization; namespace Csla.Security { /// <summary> /// Criteria class for passing a /// username/password pair to a /// custom identity class. /// </summary> [Serializable] public class UsernameCriteria : CriteriaBase { /// <summary> ...
```c# using System; using Csla; using Csla.Serialization; namespace Csla.Security { /// <summary> /// Criteria class for passing a /// username/password pair to a /// custom identity class. /// </summary> [Serializable] public class UsernameCriteria : CriteriaBase { /// <summary> ...
42b374aa-2ab5-48c5-bc26-cc2ed9c14d9c
{ "language": "C#" }
```c# using AppHarbor.Commands; using Moq; using Ploeh.AutoFixture; using Ploeh.AutoFixture.AutoMoq; using Ploeh.AutoFixture.Xunit; using Xunit.Extensions; namespace AppHarbor.Tests.Commands { public class CreateCommandTest { private readonly IFixture _fixture; public CreateCommandTest() { _fixture = new ...
```c# using System.Linq; using AppHarbor.Commands; using Moq; using Ploeh.AutoFixture; using Ploeh.AutoFixture.AutoMoq; using Ploeh.AutoFixture.Xunit; using Xunit.Extensions; namespace AppHarbor.Tests.Commands { public class CreateCommandTest { private readonly IFixture _fixture; public CreateCommandTest() {...
33969296-c2f7-4d6b-a83a-64397831f265
{ "language": "C#" }
```c# using System.Threading.Tasks; using System.Collections.Generic; using System.Linq; using Version = Msg.Core.Versioning; namespace Msg.Core.Versioning { public static class VersionNegotiator { [System.Obsolete("This method is deprecated us VersionNegotiator.Select instead.")] public stati...
```c# using System.Threading.Tasks; using System.Collections.Generic; using System.Linq; using Version = Msg.Core.Versioning; namespace Msg.Core.Versioning { public static class VersionNegotiator { [System.Obsolete("This method is deprecated us VersionNegotiator.Select instead.")] public stati...
039996d7-8de0-4841-aad5-f3735948f98c
{ "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 Microsoft.CodeAnalysis.CSharp.Extensions; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.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 Microsoft.CodeAnalysis.PooledObjects; namespace Microsoft.CodeAnalysis.CSharp.Simplification { ///...
c7125534-eb89-47fe-baae-b13528b19678
{ "language": "C#" }
```c# using System; using System.Diagnostics; using JetBrains.Annotations; namespace EnsureThat { public static class Ensure { public static bool IsActive { get; private set; } = true; public static void Off() => IsActive = false; public static void On() => IsActive = true; [...
```c# using System; using System.Diagnostics; using JetBrains.Annotations; namespace EnsureThat { public static class Ensure { public static bool IsActive { get; private set; } = true; public static void Off() => IsActive = false; public static void On() => IsActive = true; [...
ba9c9df5-62cb-49a4-ab2c-7528b7e23636
{ "language": "C#" }
```c# using System.Reflection; [assembly: AssemblyTitle("Garlic")] [assembly: AssemblyDescription("Google Analytics Client for .Net")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("Dusty Burwell")] [assembly: AssemblyProduct("Garlic Google Analytics Client")] [assembly: AssemblyCopyright("C...
```c# using System.Reflection; [assembly: AssemblyTitle("Garlic")] [assembly: AssemblyDescription("Google Analytics Client for .Net")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("Dusty Burwell")] [assembly: AssemblyProduct("Garlic Google Analytics Client")] [assembly: AssemblyCopyright("C...
1328b5fe-6bc2-4032-aa30-642bff70707b
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; namespace CIV.Processes { public static class Extensions { /// <summary> /// Coaction of the specified action. /// </summary> /// <returns>The coaction: 'action if action does not start /// with ' and vice versa</returns> /// ...
```c# using System; using System.Collections.Generic; using System.Linq; namespace CIV.Processes { public static class Extensions { /// <summary> /// Coaction of the specified action. /// </summary> /// <returns>The coaction: 'action if action does not start /// with ' and vice versa</returns> /// ...
7f04145c-860a-4f48-9f7a-eca96a6a4d31
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; namespace Perf.DiffPlex { public class PerfTester { public void Run(Action action) { const double count = 5; var times = new List<double>(); var t...
```c# using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; namespace Perf.DiffPlex { public class PerfTester { public void Run(Action action) { const double count = 5; var times = new List<double>(); var t...
02e522b5-60b3-4f8d-a468-e2591368fd57
{ "language": "C#" }
```c# namespace DeepEqual.Syntax { using System; using System.Diagnostics.Contracts; using System.Text; public static class ObjectExtensions { [Pure] public static bool IsDeepEqual(this object actual, object expected, IComparison comparison = null) { comparison = comparison ?? new ComparisonBuilder().Cr...
```c# namespace DeepEqual.Syntax { using System; using System.Diagnostics.Contracts; using System.Text; public static class ObjectExtensions { [Pure] public static bool IsDeepEqual(this object actual, object expected) { return IsDeepEqual(actual, expected, null); } [Pure] public static bool IsDee...
74b0ea6c-53a5-4ac5-9ad1-50907c503a63
{ "language": "C#" }
```c# using NUnit.Framework; using QuantConnect.Logging; [SetUpFixture] public class AssemblyInitialize { [SetUp] public void SetLogHandler() { // save output to file as well Log.LogHandler = new CompositeLogHandler(); } } ``` Make tests use console log handler
```c# using NUnit.Framework; using QuantConnect.Logging; [SetUpFixture] public class AssemblyInitialize { [SetUp] public void SetLogHandler() { // save output to file as well Log.LogHandler = new ConsoleLogHandler(); } } ```
696742a6-5f89-44cf-a2ab-b99606936568
{ "language": "C#" }
```c# namespace Hiperion.Infrastructure.Ioc { #region References using System.Configuration; using System.Web.Http; using AutoMapper; using Automapper; using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Configuration; using Castle.Windsor; using E...
```c# namespace Hiperion.Infrastructure.Ioc { #region References using System.Configuration; using System.Web.Http; using AutoMapper; using Automapper; using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Configuration; using Castle.Windsor; using E...
3d19391a-d4d5-45ef-b6d2-6ccbe4081e5c
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; namespace SoapCore { /// <summary> /// This tuner truncates the incoming http request to the last path-part. ie. /DynamicPath/Service.svc becomes /Service.svc //...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; namespace SoapCore { /// <summary> /// This tuner truncates the incoming http request to the last path-part. ie. /DynamicPath/Service.svc becomes /Service.svc //...
06c51e1c-e383-4e60-b712-39b6fa093f7b
{ "language": "C#" }
```c# namespace GiveCRM.ImportExport { public class ExcelImport { } }``` Revert "Revert "Modified the Import class""
```c# using NPOI; namespace GiveCRM.ImportExport { public class ExcelImport { } }```
eb3d1daf-0cd1-40da-affc-8ae6fed977c2
{ "language": "C#" }
```c# // // IRegisterablePhotoSource.cs // // Author: // Ruben Vermeersch <ruben@savanne.be> // // Copyright (c) 2010 Ruben Vermeersch <ruben@savanne.be> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to d...
```c# // // ICacheablePhotoSource.cs // // Author: // Ruben Vermeersch <ruben@savanne.be> // // Copyright (c) 2010 Ruben Vermeersch <ruben@savanne.be> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal...
c75d743b-3515-4e3b-972e-b0a24d696aa1
{ "language": "C#" }
```c# using System; using DSL; namespace Revenj.Http { static class Program { static void Main(string[] args) { var server = Platform.Start<HttpServer>(); Console.WriteLine("Starting server"); server.Run(); } } } ``` Allow settings custom command line params.
```c# using System; using System.Configuration; using DSL; namespace Revenj.Http { static class Program { static void Main(string[] args) { foreach (var arg in args) { var i = arg.IndexOf('='); if (i != -1) { var name = arg.Substring(0, i); var value = arg.Substring(i...
f7755795-f077-4c10-888f-76220d3056d6
{ "language": "C#" }
```c# // <copyright file="ValSimpleTest.cs" company="Microsoft">Copyright Microsoft 2010</copyright> using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace LINQToTTreeLib.Variables { /// <summary>This class contains parameterized unit tests for ValSimple</summary> [TestClass] ...
```c# // <copyright file="ValSimpleTest.cs" company="Microsoft">Copyright Microsoft 2010</copyright> using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace LINQToTTreeLib.Variables { /// <summary>This class contains parameterized unit tests for ValSimple</summary> [TestClass] ...
c888d06a-e3dd-4312-816c-1bb60fcd0c96
{ "language": "C#" }
```c# using System; namespace MySql.Data { internal static class Utility { public static void Dispose<T>(ref T disposable) where T : class, IDisposable { if (disposable != null) { disposable.Dispose(); disposable = null; } } } } ``` Add extension to decode a string from an Array...
```c# using System; using System.Text; namespace MySql.Data { internal static class Utility { public static void Dispose<T>(ref T disposable) where T : class, IDisposable { if (disposable != null) { disposable.Dispose(); disposable = null; } } public static string GetString(this Encodin...
c36ee9db-9cc1-424b-8b19-aac8722de1d0
{ "language": "C#" }
```c# using System; using System.Collections; /// <summary>Commands for the IRC Connection Holdable.</summary> public static class IRCConnectionManagerCommands { [Command(@"disconnect")] public static IEnumerator Disconnect(IRCConnectionManagerHoldable holdable) { bool allowed = false; yield return null; yie...
```c# using System; using System.Collections; /// <summary>Commands for the IRC Connection Holdable.</summary> public static class IRCConnectionManagerCommands { [Command(@"disconnect")] public static IEnumerator Disconnect(TwitchHoldable holdable, string user, bool isWhisper) => holdable.RespondToCommand(user, ...
a5437024-c8d4-47ab-be2b-d46009f81c2b
{ "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.Text.Encodings.Web; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.Internal; using Microsoft.Extensions...
```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.Text.Encodings.Web; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.Internal; using Microsoft.Extensions...
a69e5ae7-4966-40fd-84e0-4eb716a40e68
{ "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.Game.Screens.Edit.Compose.Components; using osu.Game.Screens.Edit.Com...
```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.Game.Screens.Edit.Compose.Components; using osuTK; namespace osu.Gam...
cab85543-32fd-4587-8792-1ec0a7f7c928
{ "language": "C#" }
```c# using System.Linq; using UnityEngine; using UnityEditor; namespace EasyButtons { /// <summary> /// Base class for making EasyButtons work /// </summary> public abstract class ButtonEditorBase : Editor { public override void OnInspectorGUI() { // Loop through all m...
```c# using System.Linq; using UnityEngine; using UnityEditor; namespace EasyButtons { /// <summary> /// Custom inspector for Object including derived classes. /// </summary> [CustomEditor(typeof(Object), true)] public class ObjectEditor : Editor { public override void OnInspectorGUI()...
c4b680df-9e59-4051-8225-1b26faba904a
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // [assembly: AssemblyVersion("0.2.0....
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // [assembly: AssemblyVersion("1.0.0....
5ffda4bf-c611-4501-b345-4e58c6cfb29f
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; namespace SFA.DAS.EmployerUsers.Application { public class InvalidRequestException : Exception { public Dictionary<string,string> ErrorMessages { get; private set; } public InvalidRequestException(Dictionary<string,stri...
```c# using System; using System.Collections.Generic; using System.Linq; namespace SFA.DAS.EmployerUsers.Application { public class InvalidRequestException : Exception { public Dictionary<string, string> ErrorMessages { get; private set; } public InvalidRequestException(Dictionary<string, str...
70291410-1162-4291-a4d0-90922ffc4119
{ "language": "C#" }
```c# using System.Text; namespace SnippetsToMarkdown.Commands { class WriteHeaderHtmlCommand : ICommand { private string directory; public WriteHeaderHtmlCommand(string directory) { this.directory = directory; } public void WriteToOutput(Strin...
```c# using System.Text; namespace SnippetsToMarkdown.Commands { class WriteHeaderHtmlCommand : ICommand { private string directory; public WriteHeaderHtmlCommand(string directory) { this.directory = directory; } public void WriteToOutput(Strin...
40a5210d-039f-48fa-9959-7279cdf31a31
{ "language": "C#" }
```c# using System.Linq; using Kudu.Core.Deployment; using Kudu.FunctionalTests.Infrastructure; using Kudu.TestHarness; using Xunit; namespace Kudu.FunctionalTests { public class GitStabilityTests { [Fact] public void NSimpleDeployments() { string repositoryName = "HelloKud...
```c# using System.Linq; using Kudu.Core.Deployment; using Kudu.FunctionalTests.Infrastructure; using Kudu.TestHarness; using Xunit; namespace Kudu.FunctionalTests { public class GitStabilityTests { [Fact] public void NSimpleDeployments() { string repositoryName = "HelloKud...
77dbed29-3773-44ef-88fc-6f36cf955dbd
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.Framework.Logging; namespace OmniSharp.Utilities { public class DirectoryEnumerator { private ILogger _logger; public DirectoryEnumerator(ILoggerFactory loggerFactory) { ...
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.Framework.Logging; namespace OmniSharp.Utilities { public class DirectoryEnumerator { private ILogger _logger; public DirectoryEnumerator(ILoggerFactory loggerFactory) { ...
2288138c-9936-4de9-a749-ef83fa8b9d74
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using Autofac; using NRules.Fluent; using NRules.Fluent.Dsl; namespace NRules.Integration.Autofac { /// <summary> /// Rule activator that uses Autofac DI container. /// </summary> public class AutofacRuleActivator : IRuleActivator { pri...
```c# using System; using System.Collections.Generic; using Autofac; using NRules.Fluent; using NRules.Fluent.Dsl; namespace NRules.Integration.Autofac { /// <summary> /// Rule activator that uses Autofac DI container. /// </summary> public class AutofacRuleActivator : IRuleActivator { pri...
6517f553-03be-48cb-ae43-42804bbc417d
{ "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. /...
a744d66a-7e84-43cc-a00a-8c2b7a7934d8
{ "language": "C#" }
```c# namespace Nett.Extensions { using System; internal static class GenericExtensions { public static T CheckNotNull<T>(this T toCheck, string argName) where T : class { if (toCheck == null) { throw new ArgumentNullException(nameof(argName)); } return...
```c# namespace Nett.Extensions { using System; internal static class GenericExtensions { public static T CheckNotNull<T>(this T toCheck, string argName) where T : class { if (toCheck == null) { throw new ArgumentNullException(argName); } return toCheck...
9bd32c15-cdc3-4504-b348-39ffd7347717
{ "language": "C#" }
```c# using ImageResizer.Plugins; using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ImageResizer.Sitecore.Plugin { public class SitecoreVirtualImageProviderPlugin : IPlugin, IVirtualImageProvider ...
```c# using ImageResizer.Plugins; using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ImageResizer.Sitecore.Plugin { public class SitecoreVirtualImageProviderPlugin : IPlugin, IVirtualImageProvider ...
24771728-4496-4cdf-9eca-482c8ff5bb73
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; public class MemberProperty : MonoBehaviour { public float E, I, length; public int number; } ``` Use type to find E I
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; public class MemberProperty : MonoBehaviour { public float length; public int number,type; float[] E = { 1 }; float[] I = { 1 }; public float GetI() { return I[type]; } public float GetE() ...
b8728524-f25d-4bed-aa3f-160ded7e4803
{ "language": "C#" }
```c# using System; using Simpler; using Schedules.API.Models; using Dapper; using System.Linq; namespace Schedules.API.Tasks { public class CreateReminder: InOutTask<CreateReminder.Input, CreateReminder.Output> { public FetchReminderType FetchReminderType { get; set; } public class Input { pub...
```c# using System; using Simpler; using Schedules.API.Models; using Dapper; using System.Linq; namespace Schedules.API.Tasks { public class CreateReminder: InOutTask<CreateReminder.Input, CreateReminder.Output> { public FetchReminderType FetchReminderType { get; set; } public class Input { pub...
7cb7a982-a21c-4baf-a2d7-197c4a0bd1dd
{ "language": "C#" }
```c# // Copyright (c) Alexandre Mutel. All rights reserved. // Licensed under the BSD-Clause 2 license. // See license.txt file in the project root for full license information. using System.Collections.Generic; using Scriban.Parsing; using Scriban.Syntax; namespace Scriban.Runtime { /// <summary> /// The em...
```c# // Copyright (c) Alexandre Mutel. All rights reserved. // Licensed under the BSD-Clause 2 license. // See license.txt file in the project root for full license information. using System.Collections.Generic; using System.Diagnostics; using Scriban.Parsing; using Scriban.Syntax; namespace Scriban.Runtime { //...
c76bf87a-e2b6-490a-93b1-d32c94a4f0ee
{ "language": "C#" }
```c# using System; namespace THNETII.Common { public static class ArgumentExtensions { public static T ThrowIfNull<T>(this T instance, string name) where T : class => instance ?? throw new ArgumentNullException(name); } } ``` Add String Argument Extension method
```c# using System; namespace THNETII.Common { public static class ArgumentExtensions { public static T ThrowIfNull<T>(this T instance, string name) where T : class => instance ?? throw new ArgumentNullException(name); /// <exception cref="ArgumentException" /> /// <except...
b250f635-7bc4-4ba5-9f4e-81781f74116c
{ "language": "C#" }
```c# using System; public static class ExtensionMethods { public static string Str(this TimeSpan duration) { var hours = Math.Abs((int)duration.TotalHours); var minutes = Math.Abs(duration.Minutes); int seconds = Math.Abs(duration.Seconds); if (Math.Abs(duration.Milliseconds)...
```c# using System; public static class ExtensionMethods { public static string Str(this TimeSpan duration) { var hours = Math.Abs((int)duration.TotalHours); var minutes = Math.Abs(duration.Minutes); int seconds = Math.Abs(duration.Seconds); if (duration >= TimeSpan.Zero) ...
0455ffb2-7f0f-444e-9c64-d235d20ac578
{ "language": "C#" }
```c# using System.Collections.Generic; namespace Octokit { public class OauthToken { public string TokenType { get; set; } public string AccessToken { get; set; } public IReadOnlyCollection<string> Scope { get; set; } } } ``` Add comments and debugger display
```c# using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; namespace Octokit { [DebuggerDisplay("{DebuggerDisplay,nq}")] public class OauthToken { /// <summary> /// The type of OAuth token /// </summary> public string TokenTy...
a58a069a-abcd-442f-9e7b-81d2ed389e28
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Spreadsheet; namespace ClosedXML.Excel { internal class XLCFDataBarConverter:IXLCFConverter { public ConditionalFormattingRule Convert(IXLConditionalFor...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Spreadsheet; namespace ClosedXML.Excel { internal class XLCFDataBarConverter : IXLCFConverter { public ConditionalFormattingRule Convert(IXLConditionalF...
7fd300cb-7f74-4f28-b561-115983fd39b5
{ "language": "C#" }
```c# @using Csla.Web.Mvc @using ProjectTracker.Library @model IEnumerable<ProjectTracker.Library.ProjectInfo> @{ ViewBag.Title = "Project list"; } <h2>@ViewBag.Message</h2> <p> @Html.HasPermission(Csla.Rules.AuthorizationActions.CreateObject, typeof(ProjectEdit), Html.ActionLink("Create ...
```c# @using Csla.Web.Mvc @using ProjectTracker.Library @model IEnumerable<ProjectTracker.Library.ProjectInfo> @{ ViewBag.Title = "Project list"; } <h2>@ViewBag.Message</h2> <p> @Html.HasPermission(Csla.Rules.AuthorizationActions.CreateObject, typeof(ProjectEdit), Html.ActionLink("Create ...
a0cf722a-4cff-4afe-af50-c63bfe0f9dbc
{ "language": "C#" }
```c# using System; using System.Windows; namespace CupCake.Client { public static class Dispatch { public static void Invoke(Action callback) { Application.Current.Dispatcher.BeginInvoke(callback); } } }``` Fix newConnection window is sometimes not displayed
```c# using System; using System.Windows; namespace CupCake.Client { public static class Dispatch { public static void Invoke(Action callback) { Application.Current.Dispatcher.Invoke(callback); } } }```
ea574298-d46d-43c9-96d0-9a61110de1cb
{ "language": "C#" }
```c# using System.Linq; using PicklesDoc.Pickles.ObjectModel; namespace PicklesDoc.Pickles.TestFrameworks.XUnit { public abstract class XUnitResultsBase<TSingleResult> : MultipleTestResults where TSingleResult : XUnitSingleResultsBase { public XUnitResultsBase(IConfiguration configuration, IS...
```c# using System.Linq; using PicklesDoc.Pickles.ObjectModel; namespace PicklesDoc.Pickles.TestFrameworks.XUnit { public abstract class XUnitResultsBase<TSingleResult> : MultipleTestResults where TSingleResult : XUnitSingleResultsBase { protected XUnitResultsBase(IConfiguration configuration,...
091ae420-cd4a-432f-b4fa-a2e80b47426c
{ "language": "C#" }
```c# //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE namespace osu.Game.Overlays.Options.Sections.Audio { public class AudioDevicesOptions : OptionsSubsection { protected override string Header => "Dev...
```c# //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Graphics; using System.Collections.Generic; using System.Linq; namespace osu.G...
0c6b587c-c3fd-42dc-b06a-b645f3d19f40
{ "language": "C#" }
```c# using UnityEngine; using System.Collections; public class FollowCamera : MonoBehaviour { public GameObject global; public GameObject objectToFollow; // Use this for initialization void Start () { if (global == null) { return; } Global g = global.GetComponent<Global>(); ...
```c# using UnityEngine; using System.Collections; public class FollowCamera : MonoBehaviour { public GameObject global; public GameObject objectToFollow; // Use this for initialization void Start () { if (global == null) { return; } Global g = global.GetComponent<Global>(); ...
f4f7bc55-bd9c-4e32-aa7b-2bc9c6274f97
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Graphics.Sprites; using osu.Game.Input.Bindings; namespace osu.Game.Overlays.Toolbar { public class Toolba...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Game.Input.Bindings; namespace osu.Game.Overlays.Too...
a0039077-9c3d-495c-963a-8e3769db4dd8
{ "language": "C#" }
```c# namespace Miruken.Callback { using System; public class Resolving : Inquiry, IResolveCallback { private bool _handled; public Resolving(object key, object callback) : base(key, true) { if (callback == null) throw new ArgumentNullExcept...
```c# namespace Miruken.Callback { using System; public class Resolving : Inquiry, IResolveCallback { private bool _handled; public Resolving(object key, object callback) : base(key, true) { if (callback == null) throw new ArgumentNullExcept...
bfec1db3-1ca1-4450-9691-3698fae1e763
{ "language": "C#" }
```c# using System; using System.Linq; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Diploms.Core; using System.Collections.Generic; namespace Diploms.DataLayer { public static class DiplomContentSystemExtensions { public static void EnsureSee...
```c# using System; using System.Linq; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Diploms.Core; using System.Collections.Generic; namespace Diploms.DataLayer { public static class DiplomContentSystemExtensions { public static void EnsureSee...
ea73c8e7-9ab9-482d-a484-1993f7f2d7bd
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BmpListener.Bmp { public enum MessageType : byte { RouteMonitoring, StatisticsReport, PeerDown, PeerUp, Initiation, Termination, ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BmpListener.Bmp { public enum MessageType { RouteMonitoring, StatisticsReport, PeerDown, PeerUp, Initiation, Termination, ...
36e3882e-860f-4c83-aa27-e52c2d011896
{ "language": "C#" }
```c# #region (c) 2010-2011 Lokad CQRS - New BSD License // Copyright (c) Lokad SAS 2010-2011 (http://www.lokad.com) // This code is released as Open Source under the terms of the New BSD Licence // Homepage: http://lokad.github.com/lokad-cqrs/ #endregion using System; using System.Collections.Generic; using Proto...
```c# #region (c) 2010-2011 Lokad CQRS - New BSD License // Copyright (c) Lokad SAS 2010-2011 (http://www.lokad.com) // This code is released as Open Source under the terms of the New BSD Licence // Homepage: http://lokad.github.com/lokad-cqrs/ #endregion using System; using System.Collections.Generic; using Proto...
65c3252c-fe71-4be9-aa42-4df9a5e147dd
{ "language": "C#" }
```c# using NuGet; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace Squirrel { public static class VersionExtensions { private static readonly Regex _suffixRegex = new Regex(@"(-full|-delta)?\.nupkg$"...
```c# using NuGet; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace Squirrel { public static class VersionExtensions { static readonly Regex _suffixRegex = new Regex(@"(-full|-delta)?\.nupkg$", RegexO...
1b5fbdbe-7cf0-455d-9de1-d9fd0d8d8e14
{ "language": "C#" }
```c# using System; using System.Diagnostics.CodeAnalysis; using System.Reflection; using Microsoft.Win32; namespace EasySnippets.Utils { [SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "Windows only app")] public class StartUpManager { public static ...
```c# using System; using System.Diagnostics.CodeAnalysis; using System.Reflection; using Microsoft.Win32; namespace EasySnippets.Utils { [SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "Windows only app")] public class StartUpManager { public static ...
2d7faae9-f2c8-48db-a754-85d033b270d8
{ "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.Framework.Graphics.Containers; using osu.Game.Audio; using osu.Game.Configuration; using os...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics.Containers; using osu.Game.Audio; using osu.Game.Configuration; using os...
5ac47851-4aeb-4a29-be77-52d922e61160
{ "language": "C#" }
```c# using System; using Abp; using Abp.Collections.Extensions; using Abp.Dependency; using Castle.Facilities.Logging; using Abp.Castle.Logging.Log4Net; namespace AbpCompanyName.AbpProjectName.Migrator { public class Program { private static bool _skipConnVerification = false; public static ...
```c# using System; using Abp; using Abp.Collections.Extensions; using Abp.Dependency; using Castle.Facilities.Logging; using Abp.Castle.Logging.Log4Net; namespace AbpCompanyName.AbpProjectName.Migrator { public class Program { private static bool _skipConnVerification = false; public static ...
6eef822d-b96e-4ce7-bf85-aa316e46e1a6
{ "language": "C#" }
```c# using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork; using System; using System.Collections.Generic; namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate { public class Address : ValueObject { public String Street { get; } public S...
```c# using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork; using System; using System.Collections.Generic; namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate { public class Address : ValueObject { public String Street { get; private set; } ...
12babed1-4648-403b-bbaa-6e5feb0fae81
{ "language": "C#" }
```c# using System; namespace Xamarin.Forms.GoogleMaps.Internals { internal class ProductInformation { public const string Author = "amay077"; public const string Name = "Xamarin.Forms.GoogleMaps"; public const string Copyright = "Copyright © amay077. 2016 - 2019"; public const ...
```c# using System; namespace Xamarin.Forms.GoogleMaps.Internals { internal class ProductInformation { public const string Author = "amay077"; public const string Name = "Xamarin.Forms.GoogleMaps"; public const string Copyright = "Copyright © amay077. 2016 - 2019"; public const ...
822d3823-7683-4e25-907f-80b7750ea538
{ "language": "C#" }
```c# using System; using System.ComponentModel; namespace PcscDotNet { public delegate void PcscExceptionHandler(PcscException error); public sealed class PcscException : Win32Exception { public SCardError Error => (SCardError)NativeErrorCode; public bool ThrowIt { get; set; } = true; ...
```c# using System; using System.ComponentModel; namespace PcscDotNet { public delegate void PcscExceptionHandler(PcscException error); public sealed class PcscException : Win32Exception { public SCardError Error { get; private set; } public bool ThrowIt { get; set; } = true; pub...
af77e15a-9daa-4b80-b019-8edffa10031c
{ "language": "C#" }
```c# namespace StraightSql { using Npgsql; using System; public class CommandPreparer : ICommandPreparer { public void Prepare(NpgsqlCommand npgsqlCommand, IQuery query) { if (npgsqlCommand == null) throw new ArgumentNullException(nameof(npgsqlCommand)); if (query == null) thro...
```c# namespace StraightSql { using Npgsql; using System; using System.Linq; public class CommandPreparer : ICommandPreparer { public void Prepare(NpgsqlCommand npgsqlCommand, IQuery query) { if (npgsqlCommand == null) throw new ArgumentNullException(nameof(npgsqlCommand)); ...
279124fc-2f9f-40f5-b721-ac0b00f6e9fc
{ "language": "C#" }
```c# [assembly: Microsoft.Owin.OwinStartup(typeof(BatteryCommander.Web.Startup))] namespace BatteryCommander.Web { using Microsoft.AspNet.Identity; using Microsoft.Owin; using Microsoft.Owin.Security.Cookies; using Owin; using System; public partial class Startup { public void Co...
```c# [assembly: Microsoft.Owin.OwinStartup(typeof(BatteryCommander.Web.Startup))] namespace BatteryCommander.Web { using Microsoft.AspNet.Identity; using Microsoft.Owin; using Microsoft.Owin.Security.Cookies; using Owin; using System; public partial class Startup { public void Co...
8cf26f54-b17e-48e3-bda4-50fbb9834a2b
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Threading.Tasks; using Cloud.Storage.Queues; namespace Cloud.Storage.AWS.Queues { public class Queue : IQueue { public Task AddMessage(IMessage message) { throw new NotImplementedException(); } public IMessage CreateMessage(byte[] messag...
```c# using System; using System.Collections.Generic; using System.Threading.Tasks; using Cloud.Storage.Queues; namespace Cloud.Storage.AWS.Queues { public class Queue : IQueue { public Task AddMessage(IMessage message) { throw new NotImplementedException(); } public Task Clear() { throw new NotImp...
4c21c5b0-120b-45b9-800d-9c3dc3fff1ac
{ "language": "C#" }
```c# namespace Microsoft.ApplicationInsights.AspNetCore.Common { /// <summary> /// These values are listed to guard against malicious injections by limiting the max size allowed in an HTTP Response. /// These max limits are intentionally exaggerated to allow for unexpected responses, while still guarding ...
```c# namespace Microsoft.ApplicationInsights.AspNetCore.Common { /// <summary> /// These values are listed to guard against malicious injections by limiting the max size allowed in an HTTP Response. /// These max limits are intentionally exaggerated to allow for unexpected responses, while still guarding ...
b1adbc41-2c13-4a1b-a619-eb19b6a766fa
{ "language": "C#" }
```c# using System; using System.Collections.Concurrent; using System.Linq; using ARSoft.Tools.Net.Dns; namespace DNSAgent { internal class DnsCacheMessageEntry { public DnsCacheMessageEntry(DnsMessage message, int timeToLive) { Message = message; timeToLive = ...
```c# using System; using System.Collections.Concurrent; using System.Linq; using ARSoft.Tools.Net.Dns; namespace DNSAgent { internal class DnsCacheMessageEntry { public DnsCacheMessageEntry(DnsMessage message, int timeToLive) { Message = message; var records = message....
f8dcdf09-4fe5-4096-bebe-76639c868f35
{ "language": "C#" }
```c# /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * d...
```c# /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * d...
c525f865-7279-43a2-84cb-6a6a5b077a4c
{ "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 enable using System; namespace osu.Framework.Utils { public static class ThrowHelper { public static void ThrowInvalidOperationException...
```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 enable using System; namespace osu.Framework.Utils { /// <summary> /// Helper class for throwing exceptions in isolated methods, for cases where...
86600d09-33db-4e89-b612-eba099943480
{ "language": "C#" }
```c# using System; namespace Avalonia.Metadata { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] public sealed class XmlnsPrefixAttribute : Attribute { /// <summary> /// Constructor /// </summary> /// <param name="xmlNamespace">XML namespce</param> ...
```c# using System; namespace Avalonia.Metadata { /// <summary> /// Use to predefine the prefix associated to an xml namespace in a xaml file /// </summary> /// <remarks> /// example: /// [assembly: XmlnsPrefix("https://github.com/avaloniaui", "av")] /// xaml: /// xmlns:av="https://git...
68d88181-e475-4373-9db6-fc1648614033
{ "language": "C#" }
```c# using System.Reflection; using System.Resources; [assembly: AssemblyCompany( "Carl Zeiss Innovationszentrum für Messtechnik GmbH" )] [assembly: AssemblyProduct( "ZEISS PiWeb Api" )] [assembly: AssemblyCopyright( "Copyright © 2019 Carl Zeiss Innovationszentrum für Messtechnik GmbH" )] [assembly: AssemblyTra...
```c# using System.Reflection; using System.Resources; [assembly: AssemblyCompany( "Carl Zeiss Innovationszentrum für Messtechnik GmbH" )] [assembly: AssemblyProduct( "ZEISS PiWeb Api" )] [assembly: AssemblyCopyright( "Copyright © 2019 Carl Zeiss Innovationszentrum für Messtechnik GmbH" )] [assembly: AssemblyTra...
0efed87b-3794-4dda-a6c7-14d630d5ede1
{ "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 Xunit.Sdk; namespace Xunit { /// <summary> /// Apply this attribute to your test...
```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 Xunit.Sdk; namespace Xunit { /// <summary> /// Apply this attribute to your test...
6b93184b-fd40-43bb-bca6-cf610244426f
{ "language": "C#" }
```c# using UnityEngine; public class LinkButton : MonoBehaviour { public void OpenUrl (string url) { Application.OpenURL(url); } } ``` Fix link open in browsers
```c# using UnityEngine; public class LinkButton : MonoBehaviour { public void OpenUrl (string url) { if(Application.platform == RuntimePlatform.WebGLPlayer) { Application.ExternalEval("window.open(\"" + url + "\",\"_blank\")"); } else { Application.OpenURL(url); } } } ```
e8e49f07-d2f3-4347-b885-5643bd836bfe
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading; using Python.Runtime; using Wox.Plugin; namespace Wox.PluginLoader { public class PythonPluginLoader : BasePluginLoader { public override List<PluginPair> LoadPlugin() { List<PluginPair...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading; using Python.Runtime; using Wox.Plugin; using Wox.Helper; namespace Wox.PluginLoader { public class PythonPluginLoader : BasePluginLoader { public override List<PluginPair> LoadPlugin() { ...
c572328b-13da-4b9e-a6ae-3230511fe263
{ "language": "C#" }
```c# using System.Linq; using NUnit.Framework; using SevenDigital.Api.Schema; using SevenDigital.Api.Schema.Tags; namespace SevenDigital.Api.Wrapper.Integration.Tests.EndpointTests.TagsEndpoint { [TestFixture] public class ArtistByTagTopTests { [Test] public void Can_hit_endpoint() { ArtistByTagTop tags...
```c# using System.Linq; using NUnit.Framework; using SevenDigital.Api.Schema; using SevenDigital.Api.Schema.Tags; namespace SevenDigital.Api.Wrapper.Integration.Tests.EndpointTests.TagsEndpoint { [TestFixture] public class ArtistByTagTopTests { private const string Tags = "rock,pop"; [Test] pu...
46c1d240-0a1a-42fd-933d-d4304ae7dba6
{ "language": "C#" }
```c# namespace TraktApiSharp.Requests.WithoutOAuth.Movies.Common { using Base.Get; using Objects.Basic; using Objects.Get.Movies.Common; internal class TraktMoviesMostAnticipatedRequest : TraktGetRequest<TraktPaginationListResult<TraktMostAnticipatedMovie>, TraktMostAnticipatedMovie> { in...
```c# namespace TraktApiSharp.Requests.WithoutOAuth.Movies.Common { using Base; using Base.Get; using Objects.Basic; using Objects.Get.Movies.Common; internal class TraktMoviesMostAnticipatedRequest : TraktGetRequest<TraktPaginationListResult<TraktMostAnticipatedMovie>, TraktMostAnticipatedMovie> ...
2f075734-1fd5-4ca6-a4ec-dd8704e09c30
{ "language": "C#" }
```c# using System; namespace DiscogsClient.Data.Result { public class DiscogsRelease : DiscogsReleaseBase { public DiscogsReleaseArtist[] extraartists { get; set; } public DiscogsReleaseLabel[] labels { get; set; } public DiscogsReleaseLabel[] companies { get; set; } public Di...
```c# using System; namespace DiscogsClient.Data.Result { public class DiscogsRelease : DiscogsReleaseBase { public DiscogsReleaseArtist[] extraartists { get; set; } public DiscogsReleaseLabel[] labels { get; set; } public DiscogsReleaseLabel[] companies { get; set; } public Di...
dfb3b16b-ec08-4d5f-813b-4aa07d1276e2
{ "language": "C#" }
```c# using System.Reflection; [assembly: AssemblyTitle("Logo en español para Xamarin Workbooks")] [assembly: AssemblyDescription("Aprende a programar con Xamarin Workbooks, C# y la legendaria Tortuga!")] [assembly: AssemblyCulture("es")] // NuGet package metadata [assembly: AssemblyMetadata("id", "Logo.es")] [assem...
```c# using System.Reflection; [assembly: AssemblyTitle("Logo en español para Xamarin Workbooks")] [assembly: AssemblyDescription("Aprende a programar con Xamarin Workbooks, C# y la legendaria Tortuga!")] // NuGet package metadata [assembly: AssemblyMetadata("id", "Logo.es")] [assembly: AssemblyMetadata("authors", "...
67100f78-8d2a-43e0-b05a-9643f110016f
{ "language": "C#" }
```c# using System.Reflection; using System.Resources; using System.Runtime.InteropServices; [assembly: AssemblyCompany("Outercurve Foundation")] [assembly: AssemblyProduct("NuGet")] [assembly: AssemblyCopyright("\x00a9 Outercurve Foundation. All rights reserved.")] [assembly: AssemblyConfiguration("")] [assem...
```c# using System.Reflection; using System.Resources; using System.Runtime.InteropServices; [assembly: AssemblyCompany("Outercurve Foundation")] [assembly: AssemblyProduct("NuGet")] [assembly: AssemblyCopyright("\x00a9 Outercurve Foundation. All rights reserved.")] [assembly: AssemblyConfiguration("")] [assem...
7bf2a409-260b-4eda-b2cd-87725d2dc210
{ "language": "C#" }
```c# using NUnit.Framework; namespace InterFAX.Api.Test.Integration { [TestFixture] public class AccountTests { [Test] public void can_get_balance() { var interfax = new FaxClient(); var actual = interfax.Account.GetBalance().Result; Assert.IsTru...
```c# using NUnit.Framework; namespace InterFAX.Api.Test.Integration { [TestFixture] public class AccountTests { [Test] public void can_get_balance() { var interfax = new FaxClient(); var actual = interfax.Account.GetBalance().Result; //Assert.IsT...
8dc64e3f-6659-454a-bf62-ee5566e862a1
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using IntelliTect.Coalesce; using IntelliTect.Coalesce.DataAnnotations; using IntelliTect.Coalesce.Tests.TargetClasses.TestDbContext; #nullable enable namespace IntelliTect.Coalesce.Tests...
```c# using System.Collections; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using IntelliTect.Coalesce; using IntelliTect.Coalesce.DataAnnotations; using IntelliTect.Coalesce.Tests.TargetClasses.TestDbContext; #nullable enable namespace IntelliTect.Coalesce.Tests...
70624c05-cd9b-44f8-a156-602be2e7d50b
{ "language": "C#" }
```c# using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; namespace HardwareSensorSystem.SensorTechnology.Controllers { public class OwServerEnet2LogCont...
```c# using HardwareSensorSystem.SensorTechnology.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; namespace ...
7f2b0ba9-c606-42cc-a60a-57c604b17b17
{ "language": "C#" }
```c# /* * Copyright 2012-2015 Aerospike, Inc. * * Portions may be licensed to Aerospike, Inc. under one or more contributor * license agreements. * * 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 * th...
```c# /* * Copyright 2012-2015 Aerospike, Inc. * * Portions may be licensed to Aerospike, Inc. under one or more contributor * license agreements. * * 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 * th...
605f36a9-ad35-4ad8-a1fd-ab5c64363269
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Reflection.Emit; using System.Text; using Xamarin.Forms; namespace XF_TabbedPage { public class Page3 : ContentPage { public Page3() { NavigationPage.SetHasNavigationBar(this, false); ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Reflection.Emit; using System.Text; using Xamarin.Forms; namespace XF_TabbedPage { public class Page3 : ContentPage { public Page3() { NavigationPage.SetHasNavigationBar(this, false); ...
d0ea42df-ea22-4b1c-ade6-75ed92e94bb2
{ "language": "C#" }
```c# using System.Collections.Generic; using Newtonsoft.Json; namespace TMDbLib.Objects.General { public class ConfigImageTypes { [JsonProperty("base_url")] public string BaseUrl { get; set; } [JsonProperty("secure_base_url")] public string SecureBaseUrl { get; set; } ...
```c# using System.Collections.Generic; using Newtonsoft.Json; namespace TMDbLib.Objects.General { public class ConfigImageTypes { [JsonProperty("base_url")] public string BaseUrl { get; set; } [JsonProperty("secure_base_url")] public string SecureBaseUrl { get; set; } ...
ba3f37b1-1191-494c-a356-c5f57fea973e
{ "language": "C#" }
```c# using System; using System.Collections.Generic; namespace MonsterClicker { using Interfaces; using System.Numerics; using System.Windows.Forms; public class Monster : IMonster { private BigInteger health; private static BigInteger startHealth = 10; private...
```c# using System; using System.Collections.Generic; namespace MonsterClicker { using Interfaces; using System.Numerics; using System.Windows.Forms; public class Monster : IMonster { private BigInteger health; private static BigInteger startHealth = 10; private...
9e9352c4-6d62-4bcd-af5c-5e96074d53a7
{ "language": "C#" }
```c# #tool "nuget:?package=GitVersion.CommandLine" #addin "Cake.Yaml" public class ContextInfo { public string NugetVersion { get; set; } public string AssemblyVersion { get; set; } public GitVersion Git { get; set; } public string BuildVersion { get { return NugetVersion + "-" + Git.Sha;...
```c# #tool "nuget:?package=GitVersion.CommandLine" #addin "Cake.Yaml" public class ContextInfo { public string NugetVersion { get; set; } public string AssemblyVersion { get; set; } public GitVersion Git { get; set; } public string BuildVersion { get { return NugetVersion + "-" + Git.Sha;...
620193e4-0ba1-4a81-be0c-aa53582f7301
{ "language": "C#" }
```c# using System.Diagnostics; using System.IO; internal class Mono50Compiler : Compiler { public Mono50Compiler(Logger logger, string compilerPath) : base(logger, compilerPath, null) { } public override string Name => "Mono C# 5.0"; protected override Process CreateCompilerProcess(Platform platform, string mono...
```c# using System.Diagnostics; using System.IO; using System.Linq; internal class Mono50Compiler : Compiler { public Mono50Compiler(Logger logger, string compilerPath) : base(logger, compilerPath, null) { } public override string Name => "Mono C# 5.0"; protected override Process CreateCompilerProcess(Platform pl...
217c2273-eb54-43b2-ad1c-48b640697a13
{ "language": "C#" }
```c# @model ElmahDashboardHostingApp.Areas.MvcElmahDashboard.Models.Logs.ItemsModel @{ Layout = null; var dateFormat = System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern.Replace("yyyy", "yy").ToUpperInvariant(); } @foreach (var item in Model.Items) { <a id="i@(item.Sequen...
```c# @model ElmahDashboardHostingApp.Areas.MvcElmahDashboard.Models.Logs.ItemsModel @{ Layout = null; var dateFormat = System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern.Replace("yyyy", "yy").ToUpperInvariant(); } @* Disable Email obfuscation by Cloudflare (which is not compa...
982d0ef3-cf21-4ef7-85b7-04c901e9e71c
{ "language": "C#" }
```c# using System.Collections.Generic; using System.IO; using System.Linq; using System.Xml.Linq; namespace PackageDiscovery.Finders { public sealed class NuGetPackageFinder : IPackageFinder { public const string Moniker = "NuGet"; public IReadOnlyCollection<Package> FindPackages(DirectoryIn...
```c# using System.Collections.Generic; using System.IO; using System.Linq; using System.Xml.Linq; namespace PackageDiscovery.Finders { public sealed class NuGetPackageFinder : IPackageFinder { public const string Moniker = "NuGet"; public IReadOnlyCollection<Package> FindPackages(DirectoryIn...
78a2ef6a-c307-4ab6-a253-aaaf37b570d9
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using Raven.Client.Contrib.MVC.Auth.Interfaces; namespace Raven.Client.Contrib.MVC.Auth.Default { internal class BCryptSecurityEncoder : ISecurityEncoder { /// <summary> /// Generates a unique token. ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using Raven.Client.Contrib.MVC.Auth.Interfaces; namespace Raven.Client.Contrib.MVC.Auth.Default { internal class BCryptSecurityEncoder : ISecurityEncoder { /// <summary> /// Generates a unique token. ...
837cb345-4ce4-4acb-b69b-81b718b76473
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace Manatee.Json.Serialization.Internal.AutoRegistration { internal class ListSerializationDelegateProvider : SerializationDelegateProviderBase { public override bool CanHandle(Type type) { retur...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace Manatee.Json.Serialization.Internal.AutoRegistration { internal class ListSerializationDelegateProvider : SerializationDelegateProviderBase { public override bool CanHandle(Type type) { retur...
dc00fa53-1299-41b2-8b86-5c3f90770d8c
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Autofac.Extras.Moq")] [assembly: AssemblyDescription("Autofac Moq Integration")] [assembly: ComVisible(false)]``` Build script now writes the package name and version into the AssemblyDescription attibute. This allows ...
```c# using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Autofac.Extras.Moq")] [assembly: ComVisible(false)]```
0f6a60b0-627e-42e8-8e8b-e8e47fac27da
{ "language": "C#" }
```c# namespace MyStudio.ViewModels { using Catel; using Catel.MVVM; using MyStudio.Models; using MyStudio.Services; public class RibbonViewModel : ViewModelBase { private StudioStateModel model; private ICommandsService commandsService; public RibbonViewModel(Studio...
```c# namespace MyStudio.ViewModels { using System.Collections.Generic; using Catel; using Catel.MVVM; using MyStudio.Models; using MyStudio.Services; using Orchestra.Models; using Orchestra.Services; public class RibbonViewModel : ViewModelBase { private StudioStateMode...
207036b7-43de-4981-844d-9895850e881c
{ "language": "C#" }
```c# using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using Spectre.Console; namespace Spectre.Cli.Internal { [Description("Displays the CLI library version")] [SuppressMessage("Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Injected")] internal sealed class...
```c# using System; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Reflection; using Spectre.Console; namespace Spectre.Cli.Internal { [Description("Displays the CLI library version")] [SuppressMessage("Performance", "CA1812:AvoidUninstantiatedInterna...
bff22912-3342-471a-942b-83bed12b6450
{ "language": "C#" }
```c# using System.Reflection; // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: ...
```c# using System.Reflection; // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: ...