doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
51d5a1b8-eda7-4ea1-a42f-2cebf8daf8f2 | {
"language": "C#"
} | ```c#
```
Add mania sample conversion test | ```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 NUnit.Framework;
using osu.Framework.Utils;
using osu.Game.Audio;
using osu.Game.Rulesets.M... |
c0ebc589-645e-475c-9f5c-508c3a94a8a0 | {
"language": "C#"
} | ```c#
```
Add AutoSave on run feature - toggle | ```c#
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
[InitializeOnLoad]
public class AutoSaveOnRunMenuItem
{
public const string MenuName = "Tools/Autosave On Run";
private static bool isToggled;
static AutoSaveOnRunMenuItem()
{
EditorApplication.delayCall += () =>
... |
d1e18aea-f044-4d4f-b934-98424f7f9ef5 | {
"language": "C#"
} | ```c#
```
Add vehicleType into Command Parameter Types. | ```c#
// SampSharp
// Copyright 2017 Tim Potze
//
// 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 ... |
3e05d6d6-135a-4c80-b535-a3e6017196fe | {
"language": "C#"
} | ```c#
```
Create server side API for single multiple answer question | ```c#
using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepos... |
e3974ce3-0a38-4986-8c16-a5400828781b | {
"language": "C#"
} | ```c#
```
Add useful extensions for tree operations | ```c#
using System.Linq;
namespace slang.Lexing.Trees
{
public static class TreeExtensions
{
public static Tree AttachChild(this Tree parent, Tree child)
{
var parentLeaves = parent.Leaves.ToList ();
var childTransitions = child.Root.Transitions.ToList ();
p... |
4c755047-d4fb-4a0b-a9c2-4a829e4030cf | {
"language": "C#"
} | ```c#
//-----------------------------------------------------------------------
// <copyright file="AssemblyInfo.Shared.cs" company="SonarSource SA and Microsoft Corporation">
// Copyright (c) SonarSource SA and Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the ... | ```c#
//-----------------------------------------------------------------------
// <copyright file="AssemblyInfo.Shared.cs" company="SonarSource SA and Microsoft Corporation">
// Copyright (c) SonarSource SA and Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the ... |
e1c85493-5079-4a4e-9da4-ee3393ac4c55 | {
"language": "C#"
} | ```c#
```
Add extension method to prepend content to a TagHelperContent | ```c#
namespace BootstrapTagHelpers {
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
public static class TagHelperContentExtensions {
public static void Prepend(this TagHelperContent content, string value) {
if (content.IsEmpty)
content.SetContent(value);
else... |
295249d7-f1d5-4b4d-ac69-d9f8a5cb12b5 | {
"language": "C#"
} | ```c#
```
Fix hang in host tests due to test parallelization | ```c#
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Xunit;
// Disable test parallelization to avoid port reuse issues
[assembly: CollectionBehavior(DisableTestParallelization = true)]
``` |
96d28c46-fc5b-4709-8058-3c6a9901abe5 | {
"language": "C#"
} | ```c#
```
Validate Tag Helper registration system functionality. | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Linq;
using Microsoft.AspNet.Razor.TagHelpers;
using Xunit;
namespace Microsoft.AspNet.Razor.Test.TagHelpers
{
... |
729b7f00-b38c-41c3-9dae-18615d9b6669 | {
"language": "C#"
} | ```c#
```
Add test for catch hidden mod | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
us... |
7d2f3f05-fe5d-47e8-b6e2-eebeec97573d | {
"language": "C#"
} | ```c#
```
Add a new interface for the JobService. | ```c#
// ***********************************************************************
// Copyright (c) 2017 Dominik Lachance
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restrict... |
92cdfc5f-6747-4af5-a10f-289c9bda5879 | {
"language": "C#"
} | ```c#
```
Add simple user state class | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Online.RealtimeMultiplayer
{
public class MultiplayerClientState
{
public MultiplayerClientState(in long roomId)
{
... |
1c14b6f7-f6b2-4798-9ccb-62dfa271a172 | {
"language": "C#"
} | ```c#
```
Create abstract report to simplify creating reports | ```c#
using KenticoInspector.Core.Models;
using System;
using System.Collections.Generic;
namespace KenticoInspector.Core
{
public abstract class AbstractReport : IReport
{
public string Codename => GetCodename(this.GetType());
public static string GetCodename(Type reportType) {
r... |
09b3f363-dc6a-4f51-97fd-92164940110c | {
"language": "C#"
} | ```c#
```
Add new document extensions file | ```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.Editor.Shared.Utilities;
namespace Microsoft.CodeAnalysis.Editor.Shared.Extensi... |
fc98e952-7cd1-4973-8f09-93bd740a3b15 | {
"language": "C#"
} | ```c#
```
Add metadata class for the compilation root. | ```c#
namespace slang.Compilation
{
public class CompilationMetadata
{
public CompilationMetadata(string projectName)
{
ProjectName = projectName;
}
public string ProjectName { get; set; }
}
}
``` |
f38d842a-1ecb-403e-bb8a-125c2b4dcb02 | {
"language": "C#"
} | ```c#
```
Revert "moving error view to Shared from Home" | ```c#
@model System.Exception
@{
ViewBag.Title = "Error :)";
}
<section class="container">
<div class="row area">
<div class="col-xs-12">
<h1>@ViewBag.Title</h1>
<p>
Rats, something unfortunate happened. Below you can find some additional, technical information ... |
bed88f37-f747-4194-9ec5-28bc87e2caa3 | {
"language": "C#"
} | ```c#
```
Fix missing TranslationExtension file (wasn't being added to repo for some reason) | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Markup;
using System.Windows.Data;
namespace SierraLib.Translation
{
public class TranslateExtension : System.Windows.Markup.MarkupExtension
{
private string _key;
private string _default;
pu... |
b9b204bb-62b3-4637-96ca-0a8bd294c3f3 | {
"language": "C#"
} | ```c#
```
Add default LSP initialize handler (for diagnostics). | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.LiveShare.LanguageServices;
using Micr... |
41ec509f-6d83-47c3-b782-cf0bb870b2b7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Umbraco.Core.ObjectResolution;
namespace Umbraco.Web.Mvc
{
/// <summary>
/// A resolver for storing IFilteredControllerFactories
/// </summary>
internal sealed class FilteredControllerFactoriesResolver : ManyObjectsResolverBase<FilteredController... | ```c#
using System;
using System.Collections.Generic;
using Umbraco.Core.ObjectResolution;
namespace Umbraco.Web.Mvc
{
/// <summary>
/// A resolver for storing IFilteredControllerFactories
/// </summary>
public sealed class FilteredControllerFactoriesResolver : ManyObjectsResolverBase<FilteredControllerFa... |
c0b3e50a-e172-4eae-9e9d-9e348b7d598c | {
"language": "C#"
} | ```c#
```
Add a unit test for the LedgerQueriesExtensions class | ```c#
// Copyright 2015 Coinprism, Inc.
//
// 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... |
092b117c-4581-4767-8e1b-33540e3a3d93 | {
"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 SubtitleRenamer
{
public partial class ZipFilesForm : Form
{
private Lis... | ```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 SubtitleRenamer
{
public partial class ZipFilesForm : Form
{
private Lis... |
ae566446-619c-4dcd-a6d4-a04e288ec5ef | {
"language": "C#"
} | ```c#
```
Add a very basic data adapter for building the grid cell views to show those SimpleItem objects. | ```c#
using Android.Content;
using Android.Views;
using Android.Widget;
namespace GridViewInfiniteScroll
{
public class MyGridViewAdapter : BaseAdapter<SimpleItem>
{
private readonly SimpleItemLoader _simpleItemLoader;
private readonly Context _context;
public MyGridViewAdapter(Context con... |
34eb86e6-b828-4aa5-8c21-bcd3206db263 | {
"language": "C#"
} | ```c#
using System.Diagnostics.CodeAnalysis;
using System.IO;
using FluentAssertions;
using Microsoft.R.Editor.Application.Test.TestShell;
using Microsoft.R.Editor.ContentType;
using Microsoft.R.Support.RD.ContentTypes;
using Microsoft.UnitTests.Core.XUnit;
using Xunit;
namespace Microsoft.R.Editor.Application.Test.T... | ```c#
using System.Diagnostics.CodeAnalysis;
using FluentAssertions;
using Microsoft.R.Editor.Application.Test.TestShell;
using Microsoft.R.Editor.ContentType;
using Microsoft.R.Support.RD.ContentTypes;
using Microsoft.UnitTests.Core.XUnit;
using Xunit;
namespace Microsoft.R.Editor.Application.Test.Typing {
[Excl... |
a2a52b02-396c-4fff-8a3b-5be6406099b5 | {
"language": "C#"
} | ```c#
```
Add models for user profile. | ```c#
using CompetitionPlatform.Data.AzureRepositories.Project;
using CompetitionPlatform.Models.ProjectViewModels;
using System;
using System.Collections.Generic;
namespace CompetitionPlatform.Models.UserProfile
{
public class UserProfile
{
public string Id { get; set; }
public string UserId ... |
684e1f70-4020-4ea1-833d-7f8b76ea635d | {
"language": "C#"
} | ```c#
```
Add integration test for entity deletion. | ```c#
using System.Threading.Tasks;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Items.Clothing;
using NUnit.Framework;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using static Content.... |
91accd9a-a288-433a-9411-7920d1f5a35d | {
"language": "C#"
} | ```c#
```
Introduce generic base movement command handler | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common.Logging;
using GladNet;
using SceneJect.Common;
using UnityEngine;
namespace Booma.Proxy
{
/// <summary>
/// Base <see cref="BaseSubCommand60"/> handler for default movement generat... |
7e91d0db-6a7a-4a1c-aaf9-146d813187e0 | {
"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.
namespace System.Runtime.CompilerServices
{
// When applied to a type this custom attribute will cause it's cctor to be executed during startup
// rathe... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace System.Runtime.CompilerServices
{
// When applied to a type this custom attribute will cause it's cctor to be executed during startup
// rathe... |
811717b1-b7a8-4f63-9a47-416d657f402a | {
"language": "C#"
} | ```c#
```
Add policy for local only requests | ```c#
using System;
using Glimpse.Server.Options;
using Glimpse.Web;
namespace Glimpse.Server.Framework
{
public class AllowRemoteSecureRequestPolicy : ISecureRequestPolicy
{
private readonly IAllowRemoteProvider _allowRemoteProvider;
public AllowRemoteSecureRequestPolicy(IAllowRemoteProvider... |
67ff7105-8dfb-47d5-9797-8689606d086f | {
"language": "C#"
} | ```c#
```
Add tests for multiple calls | ```c#
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using RawRabbit.Client;
using RawRabbit.IntegrationTests.TestMessages;
using Xunit;
namespace RawRabbit.IntegrationTests.SimpleUse
{
public class MultipleRequestsTests
{
[Fact]
... |
b5b6951d-7bff-44ab-9bce-b187c6fdc128 | {
"language": "C#"
} | ```c#
using System.Runtime.Serialization;
namespace Nest
{
public enum NumericFielddataFormat
{
[EnumMember(Value = "array")]
Array,
[EnumMember(Value = "doc_values")]
DocValues,
[EnumMember(Value = "disabled")]
Disabled
}
}
```
Remove DocValues numeric fielddata format | ```c#
using System.Runtime.Serialization;
namespace Nest
{
public enum NumericFielddataFormat
{
[EnumMember(Value = "array")]
Array,
[EnumMember(Value = "disabled")]
Disabled
}
}
``` |
14d2a2cf-1098-4518-9e00-cc303402468c | {
"language": "C#"
} | ```c#
```
Add beatmap availability tracker component for multiplayer | ```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.Framework.Bindables;
using osu.Game.Beatmaps;
namespace osu.Game.Online.Rooms
{
public class MultiplayerBeatmapTrack... |
c7c7f1fe-57d5-4558-bdf7-a2379b303ff1 | {
"language": "C#"
} | ```c#
```
Add initial test for checking that specifying a parameter in LSL state_entry() generates a syntax error. | ```c#
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code ... |
457ac722-1cd5-47a5-bb46-34f62c0f7151 | {
"language": "C#"
} | ```c#
```
Add base class for path elements that has a good default implementation for Apply on Selection | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Pather.CSharp.PathElements
{
public abstract class PathElementBase : IPathElement
{
public Selection Apply(Selection target)
{
var results = new List<object>();
... |
be9bd907-75f2-41b4-9aad-47827ff009b6 | {
"language": "C#"
} | ```c#
```
Add AutoQueryable extension on top of Iqueryable<T> | ```c#
using System;
using System.Linq;
using AutoQueryable.Helpers;
using AutoQueryable.Models;
namespace AutoQueryable.Extensions
{
public static class QueryableExtension
{
public static dynamic AutoQueryable(this IQueryable<object> query, string queryString, AutoQueryableProfile profile)
{
... |
49cb1dc8-a712-45c8-885e-dfe802d1e2dd | {
"language": "C#"
} | ```c#
```
Create Client Message Context Factory | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lidgren.Network;
using GladNet.Lidgren.Engine.Common;
using GladNet.Serializer;
namespace GladNet.Lidgren.Client
{
public class LidgrenClientMessageContextFactory : ILidgrenMessageContextFactory
{
private IDeserializ... |
1811dc48-3a61-4746-ae73-f0a1b7df0fbc | {
"language": "C#"
} | ```c#
```
Add the prim count interfaces | ```c#
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code ... |
fe603c5a-7c19-4095-9395-dd4a09261b61 | {
"language": "C#"
} | ```c#
```
Add tests directory for Mango.Server | ```c#
using System;
using NUnit.Framework;
using Mango;
using Mango.Server;
namespace Mango.Tests
{
[TestFixture()]
public class HttpRequestTest
{
[Test()]
public void TestNoNullQueryData ()
{
// var r = new HttpRequest (new MockHttpTransaction (), .... );
// Assert.NotNull (r.QueryData);
}
... |
47cd7f0a-c21b-4928-8248-10bd9e5175ac | {
"language": "C#"
} | ```c#
```
Add a passive check server with a store | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Net;
namespace Itg.ZabbixAgent
{
public class PassiveCheckServerWithStore : PassiveCheckServerBase
{
private struct CounterId
{
public string Key { ge... |
126b63c9-e719-48fe-9883-b3caa9de96be | {
"language": "C#"
} | ```c#
```
Add basic unit test for SecurityProtocolManager | ```c#
using Htc.Vita.Core.Net;
using Xunit;
using Xunit.Abstractions;
namespace Htc.Vita.Core.Tests
{
public class SecurityProtocolManagerTest
{
private readonly ITestOutputHelper _output;
public SecurityProtocolManagerTest(ITestOutputHelper output)
{
_output = output;
... |
ae320d99-45cd-4225-83cf-cff8909f1ae6 | {
"language": "C#"
} | ```c#
```
Add test case covering regression | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Mods... |
eb4d7e94-91d1-43da-a624-0aeda1b23f3f | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System.Diagnostics.CodeAnalysis;
using System.Windows;
using System.Windows.Media;
namespace Microsoft.Common.Wpf.Extensions {
[ExcludeFromCodeCover... | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System.Diagnostics.CodeAnalysis;
using System.Windows;
using System.Windows.Media;
namespace Microsoft.Common.Wpf.Extensions {
public static class V... |
791385d3-7700-4e7d-ae9b-e4648e081e13 | {
"language": "C#"
} | ```c#
@using Orchard.Mvc.Html;
@{
Layout.Title = T("New Blog");
}
<div class="edit-item">
<div class="edit-item-primary">
@if (Model.Content != null) {
<div class="edit-item-content">
@Display(Model.Content)
</div>
}
</div>
<div class="edit-item-se... | ```c#
@using Orchard.Mvc.Html;
<div class="edit-item">
<div class="edit-item-primary">
@if (Model.Content != null) {
<div class="edit-item-content">
@Display(Model.Content)
</div>
}
</div>
<div class="edit-item-secondary group">
@if (Model.Acti... |
fb99f555-5907-4905-bead-2dc95e4f7172 | {
"language": "C#"
} | ```c#
```
Create Message Context Factory interface | ```c#
using Lidgren.Network;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GladNet.Lidgren.Engine.Common
{
/// <summary>
/// Factory that generates <see cref="LidgrenMessageContext"/>s.
/// </summary>
public interface ILidgrenMessageContextFactory
{
/// <summar... |
4493c5a7-f09c-492a-bfd0-54a3820c2bde | {
"language": "C#"
} | ```c#
```
Update server side API for single multiple answer question | ```c#
using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepos... |
5cbd73e2-ae40-4c27-acba-41bc1f6164fa | {
"language": "C#"
} | ```c#
```
Add base class for auth tests. | ```c#
using System;
using System.Text;
namespace Rnwood.SmtpServer.Tests.Extensions.Auth
{
public class AuthMechanismTest
{
protected static bool VerifyBase64Response(string base64, string expectedString)
{
string decodedString = Encoding.ASCII.GetString(Convert.FromBase64String(bas... |
20502753-b33a-4777-b0bf-60be9b88e17c | {
"language": "C#"
} | ```c#
```
Add failing test for issue GH-837 | ```c#
using System;
using System.Linq;
using Marten.Schema;
using Marten.Testing.Documents;
using Xunit;
namespace Marten.Testing.Bugs
{
public class Bug_837_missing_func_mt_immutable_timestamp_when_initializing_with_new_Schema : IntegratedFixture
{
[Fact]
public void missing_func_mt_immutable... |
eaacf99b-77c0-40a9-8932-37cc3693fee9 | {
"language": "C#"
} | ```c#
```
Add test coverage of EF to Realm migration process | ```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.IO;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Game.Beatmaps;
using osu.Game.Database;
using osu.Game.Models;
... |
7ecf0526-fb5d-4262-a90c-eec8a0ddce1b | {
"language": "C#"
} | ```c#
```
Add missing unit test file | ```c#
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using compiler.middleend.ir;
namespace NUnit.Tests.Middle_End
{
[TestFixture]
public class InstructionTests
{
[Test]
public void ToStringTest()
... |
61493620-92c3-461d-9fa1-0e606cca2334 | {
"language": "C#"
} | ```c#
```
Add Extension Methods for WebSocket->IGuild | ```c#
using System.Collections.Generic;
using System.Linq;
namespace Discord.WebSocket.Extensions
{
// TODO: Docstrings
public static class GuildExtensions
{
// Channels
public static IGuildChannel GetChannel(this IGuild guild, ulong id) =>
(guild as SocketGuild).GetChannel(id... |
0ad1486e-fa31-4ee4-8ac4-5cb1b18da1f4 | {
"language": "C#"
} | ```c#
```
Add extension method for null-forgiving operator | ```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.Diagnostics;
#nullable enable
namespace osu.Framework.Extensions.ObjectExtensions
{
/// <summary>
/// Extensions that apply to all objects.
... |
03a70946-cdf3-4302-ae00-f6d1a5e04104 | {
"language": "C#"
} | ```c#
```
Revert "Pack nuget on build" | ```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... |
9b2696bf-5e37-446e-ab78-963a9756c8d0 | {
"language": "C#"
} | ```c#
```
Add test for persisting cached value under different culture. | ```c#
using ClosedXML.Excel;
using NUnit.Framework;
using System.IO;
using System.Threading;
namespace ClosedXML_Tests.Excel.Globalization
{
[TestFixture]
public class GlobalizationTests
{
[Test]
[TestCase("A1*10", "1230")]
[TestCase("A1/10", "12.3")]
[TestCase("A1&\" cells... |
9d504d44-90df-454e-bb79-31d668dfaf4a | {
"language": "C#"
} | ```c#
```
Add integration test for sitemap.xml | ```c#
// Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.LondonTravel.Site.Integration
{
using System;
using System.Globalization;
using System.Net;
using... |
bc0be0c6-4384-41ae-8ff0-bb63edb7eb93 | {
"language": "C#"
} | ```c#
```
Read file from osz archive. | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
namespace Meowtrix.osuAMT.Training.DataGenerator
{
class OszArchive : Archive, IDisposable
{
public ZipArchive archive;
public OszArchive(Stream stream)
{
... |
7254cbde-a793-4701-a65c-8abb7d822a97 | {
"language": "C#"
} | ```c#
```
Add foundation of integration test runner | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace SimplifiedProtocolTestWpfCore
{
internal static class IntegrationTest
{
public static Task<IntegrationTestResult[]> RunAsync(CancellationToken ct)
{
return Tas... |
89bc0b1f-aa82-453f-ac2a-ce41dd8ae558 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace Csla.Test.EditableRootList
{
public class ERitem : BusinessBase<ERitem>
{
string _data = string.Empty;
public string Data
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOpti... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace Csla.Test.EditableRootList
{
[Serializable]
public class ERitem : BusinessBase<ERitem>
{
string _data = string.Empty;
public string Data
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServic... |
daa3f3c4-ea51-40cf-8314-91ad5361741c | {
"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.Diagnostics.Tracing;
using System.Diagnostics;
using Xunit;
using System;
namespace BasicEventSo... | ```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.Diagnostics.Tracing;
using System.Diagnostics;
using Xunit;
using System;
namespace BasicEventSo... |
f3dcaefb-c17f-4206-aaad-cee5ff7d9c3f | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using osu.Framework.Desktop;
using osu.Framework.OS;
namespace SampleGame
{
public static class Program
{
[STA... | ```c#
// Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using osu.Framework.Desktop;
using osu.Framework.OS;
using osu.Framework;
namespace SampleGame
{
public static class Progra... |
ae736b61-00b3-468f-9a33-7a451cbbac8f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonoGame.Extended.BitmapFonts;
namespace Ci... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonoGame.Extended.BitmapFonts;
namespace Ci... |
68963872-740c-45c6-aa12-07172cbdbb50 | {
"language": "C#"
} | ```c#
using System.Web;
using MvcMusicStore.Data.Context.Interfaces;
namespace MvcMusicStore.Data.Context
{
public class ContextManager<TContext> : IContextManager<TContext>
where TContext : IDbContext, new()
{
private string ContextKey = "ContextManager.Context";
public Conte... | ```c#
using System.Web;
using MvcMusicStore.Data.Context.Interfaces;
namespace MvcMusicStore.Data.Context
{
public class ContextManager<TContext> : IContextManager<TContext>
where TContext : IDbContext, new()
{
private readonly string ContextKey;
public ContextManager()
... |
107f19b5-423d-4737-aabb-232ac9bd0bc7 | {
"language": "C#"
} | ```c#
using EarTrumpet.UI.ViewModels;
using System.Windows;
using System.Windows.Controls;
namespace EarTrumpet.UI.Views
{
public partial class AppItemView : UserControl
{
private AppItemViewModel App => (AppItemViewModel)DataContext;
public AppItemView()
{
InitializeCompo... | ```c#
using EarTrumpet.UI.ViewModels;
using System.Windows;
using System.Windows.Controls;
namespace EarTrumpet.UI.Views
{
public partial class AppItemView : UserControl
{
private IAppItemViewModel App => (IAppItemViewModel)DataContext;
public AppItemView()
{
InitializeCom... |
57838312-5169-4329-81e0-1d86b4ebb254 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
namespace Anabi.DataAccess.Ef.DbModels
{
public class AssetDb : BaseEntity
{
public string Name { get; set; }
public int? AddressId { get; set; }
public virtual Addr... | ```c#
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
namespace Anabi.DataAccess.Ef.DbModels
{
public class AssetDb : BaseEntity
{
public string Name { get; set; }
public int? AddressId { get; set; }
public virtual Addr... |
76dcee33-cbb6-40d7-af80-92b9393616c1 | {
"language": "C#"
} | ```c#
namespace Winium.Mobile.Connectivity
{
#region
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Phone.Tools.Deploy.Patched;
#endregion
public class Devices
{
#region Static Fields
private static readonly Lazy<Devices> LazyInst... | ```c#
namespace Winium.Mobile.Connectivity
{
#region
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Phone.Tools.Deploy.Patched;
#endregion
public class Devices
{
#region Static Fields
private static readonly Lazy<Devices> LazyInst... |
7c2580be-305c-4b4b-ac23-657151d872f9 | {
"language": "C#"
} | ```c#
using System;
namespace IntegrationEngine.Model
{
public class CronTrigger : IHasStringId, IIntegrationJobTrigger
{
public string Id { get; set; }
public string JobType { get; set; }
public string CronExpressionString { get; set; }
public TimeZoneInfo TimeZone { get; set;... | ```c#
using System;
namespace IntegrationEngine.Model
{
public class CronTrigger : IHasStringId, IIntegrationJobTrigger
{
public string Id { get; set; }
public string JobType { get; set; }
public string CronExpressionString { get; set; }
TimeZoneInfo _timeZone { get; set; }
... |
82f9e6ed-dea0-4822-b184-35009a3fe351 | {
"language": "C#"
} | ```c#
#if !CORE
namespace Nancy.Helpers
{
using System;
using System.Reflection;
using Nancy.Extensions;
internal class ProxyNancyReferenceProber : MarshalByRefObject
{
public bool HasReference(AssemblyName assemblyNameForProbing, AssemblyName referenceAssemblyName)
{
... | ```c#
#if !CORE
namespace Nancy.Helpers
{
using System;
using System.Reflection;
using Nancy.Extensions;
internal class ProxyNancyReferenceProber : MarshalByRefObject
{
public bool HasReference(AssemblyName assemblyNameForProbing, AssemblyName referenceAssemblyName)
{
... |
3359ff77-b363-4880-8a5b-6301f6a0ab99 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using BulkWriter.Pipeline.Internal;
using BulkWriter.Pipeline.Steps;
namespace BulkWriter.Pipeline
{
public class EtlPipeline : IEtlPipeline
{
private readonly Stack<IEtlPipelineStep> _pipelineSteps = new Sta... | ```c#
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using BulkWriter.Pipeline.Internal;
using BulkWriter.Pipeline.Steps;
namespace BulkWriter.Pipeline
{
public sealed class EtlPipeline : IEtlPipeline
{
private readonly Stack<IEtlPipelineStep> _pipelineSteps = ... |
e71b0031-ab1d-4698-aa46-572da8752a27 | {
"language": "C#"
} | ```c#
using Moegirlpedia.MediaWikiInterop.Primitives.Action.Models;
using Moegirlpedia.MediaWikiInterop.Primitives.Foundation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace Moegirlpedia.MediaWikiInterop.Primiti... | ```c#
using Moegirlpedia.MediaWikiInterop.Primitives.Action.Models;
using Moegirlpedia.MediaWikiInterop.Primitives.Foundation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Reflection;
using Moegirlpedia.Medi... |
a56d1ff9-4ac1-4c32-8b5a-3c1dcfa62e24 | {
"language": "C#"
} | ```c#
using System.Configuration;
namespace Cassette
{
public sealed class CassetteConfigurationSection : ConfigurationSection
{
[ConfigurationProperty("debug", DefaultValue = null)]
public bool? Debug
{
get { return (bool?)this["debug"]; }
set { this[... | ```c#
using System.Configuration;
namespace Cassette
{
public sealed class CassetteConfigurationSection : ConfigurationSection
{
[ConfigurationProperty("debug", DefaultValue = null)]
public bool? Debug
{
get { return (bool?)this["debug"]; }
set { this[... |
de97e363-fced-48b4-b884-13866565958a | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc.Formatters;
namespace FubarDev.WebDavServer.AspNetCore.Formatters
{
public class WebDavXmlSerializerInputFormatter : XmlSerializerInputFormatter
{
public override bool CanRead(InputFormatterContext context)
{
var request = context.HttpContext.Re... | ```c#
using Microsoft.AspNetCore.Mvc.Formatters;
namespace FubarDev.WebDavServer.AspNetCore.Formatters
{
public class WebDavXmlSerializerInputFormatter : XmlSerializerInputFormatter
{
public override bool CanRead(InputFormatterContext context)
{
var request = context.HttpContext.Re... |
298fcf4c-5e10-40c9-afa3-77a25161747d | {
"language": "C#"
} | ```c#
@using ASPWiki.Model
@model WikiPage
<article style="margin:15px;word-break:break-all;">
<a href="/Wiki/View/@Model.GetPathString()"><h3>@Model.Title</h3></a>
@Html.Raw(@Model.GetContentSummary())
@Html.Partial("~/Views/Wiki/Label.cshtml", Model.label)
<span>Written by: Unknown - Size:... | ```c#
@using ASPWiki.Model
@model WikiPage
<article class="row" style="margin:15px;word-break:break-all;">
<div class="col-sm-12">
<a href="/Wiki/View/@Model.GetPathString()"><h3>@Model.Title</h3></a>
</div>
<div class="col-sm-12">
@Html.Raw(@Model.GetContentSummary())
</div>
<di... |
9c475c9b-0b17-47d3-a2f0-7b3fdfa053fe | {
"language": "C#"
} | ```c#
using ApiApp.Models;
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Configuration;
namespace ApiApp.MongoAccess
{
static class MongoUtil
{
#region Fields
private static IMongoClie... | ```c#
using ApiApp.Models;
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Configuration;
namespace ApiApp.MongoAccess
{
static class MongoUtil
{
#region Fields
private static IMongoClie... |
6572a97c-ca10-425a-be55-f75fc220c299 | {
"language": "C#"
} | ```c#
<div ng-controller="UnregisteredDashboardController">
<div>
<h2>Regular Poller?</h2>
Register for more config choices. It's free!
</div>
<form name="quickPollForm" ng-submit="createPoll(pollQuestion)">
<div id="question-block">
Your Question <br />
<in... | ```c#
<div ng-controller="UnregisteredDashboardController">
<form name="quickPollForm" ng-submit="createPoll(pollQuestion)">
<div id="question-block">
Your Question <br />
<input id="question" placeholder="E.g. Where should we go for lunch?" ng-model="pollQuestion" required />
... |
fa23b593-8cd6-40d4-b84f-d407c24df058 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using System.Text.RegularExpressions;
using InfluxData.Net.Common;
using System.Linq;
namespace InfluxData.Net.InfluxDb.Helpers
{
public static class QueryHelpers
{
public static string BuildParameterizedQuery(string query, object param)
{
... | ```c#
using System;
using System.Reflection;
using System.Text.RegularExpressions;
using InfluxData.Net.Common;
using System.Linq;
namespace InfluxData.Net.InfluxDb.Helpers
{
public static class QueryHelpers
{
public static string BuildParameterizedQuery(string query, object param)
{
... |
d163174c-dda3-4efc-bc57-e08a511bdf7a | {
"language": "C#"
} | ```c#
namespace FunWithNinject.Initialization
{
using Ninject;
using NUnit.Framework;
[TestFixture]
public class Tests
{
[Test]
public void OnActivation_CanCallMethodOnImplementation()
{
// Assemble
var k = new StandardKernel();
k.Bind<II... | ```c#
namespace FunWithNinject.Initialization
{
using Ninject;
using NUnit.Framework;
using System.Threading;
[TestFixture]
public class Tests
{
[Test]
public void OnActivation_CanCallMethodOnImplementation()
{
// Assemble
var k = new StandardKer... |
aae688cb-300f-4931-b643-e620741f044c | {
"language": "C#"
} | ```c#
//-----------------------------------------------------------------------
// <copyright file="EventWindowTest.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace TraceAnalysisSam... | ```c#
//-----------------------------------------------------------------------
// <copyright file="EventWindowTest.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace TraceAnalysisSam... |
62d82164-061a-460e-b24a-cb275dc385c6 | {
"language": "C#"
} | ```c#
@{ViewBag.Title = "Search for your organisation"; }
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-xlarge">Search for your organisation</h1>
<p>Use the companies house number for an organisation that your apprentices will be employed through.</p>
<form m... | ```c#
@{ViewBag.Title = "Search for your organisation"; }
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-xlarge">Enter Companies House number</h1>
<p>Use the Companies House number for an organisation that your apprentices will be employed through.</p>
<p><a href=... |
97a90f4e-72ca-46d4-b08e-1e41290d1033 | {
"language": "C#"
} | ```c#
using ChartJS.NET.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChartJS.NET.Charts.Bar
{
public class BarChart : BaseChart<BarDataSet, BarChartOptions>
{
private readonly BarChartOptions _barChartOpti... | ```c#
using ChartJS.NET.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChartJS.NET.Charts.Bar
{
public class BarChart : BaseChart<BarDataSet, BarChartOptions>
{
private readonly BarChartOptions _barChartOpti... |
defea799-c092-4725-a151-b15ce83ca2a8 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MonJobs")]
[assembly: AssemblyDescr... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MonJobs")]
[assembly: AssemblyDescr... |
cf362470-c677-49ab-97ad-5a453e759931 | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace Curse.NET
{
internal class MillisecondEpochConverter : DateTimeConverterBase
{
private static readonly DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public override void WriteJson(JsonWriter writer, o... | ```c#
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace Curse.NET
{
internal class MillisecondEpochConverter : DateTimeConverterBase
{
private static readonly DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public override void WriteJson(JsonWriter writer, o... |
b08c1f7b-91b1-4900-9bce-5e03c0735a38 | {
"language": "C#"
} | ```c#
using System;
using Pixie.Terminal;
using Pixie.Loyc;
using Pixie;
using Pixie.Transforms;
using Loyc.Syntax;
using Loyc;
using Loyc.Ecs;
using Loyc.Collections;
using Pixie.Markup;
namespace LoycInterop
{
public static class Program
{
public static void Main(string[] args)
{
... | ```c#
using System;
using Pixie.Terminal;
using Pixie.Loyc;
using Pixie;
using Pixie.Transforms;
using Loyc.Syntax;
using Loyc;
using Loyc.Ecs;
using Loyc.Collections;
using Pixie.Markup;
namespace LoycInterop
{
public static class Program
{
public static void Main(string[] args)
{
... |
35d6fa0c-9c96-48ca-89b4-73cc289356ad | {
"language": "C#"
} | ```c#
/*
** Project ShiftDrive
** (C) Mika Molenkamp, 2016.
*/
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
namespace ShiftDrive {
/// <summary>
/// A simple static container, for holding game assets like textures and meshes.
/// </summar... | ```c#
/*
** Project ShiftDrive
** (C) Mika Molenkamp, 2016.
*/
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
namespace ShiftDrive {
/// <summary>
/// A simple static container, for holding game assets like textures and meshes.
/// </summar... |
95df452a-0104-43c5-ad90-d8aabdb1f80d | {
"language": "C#"
} | ```c#
namespace Game
{
using UnityEngine;
[RequireComponent(typeof(Collider))]
public class Tank : MonoBehaviour
{
public PlayerController player;
[Range(10f, 1000f)]
public float max = 100f;
[Range(0.1f, 20f)]
public float leakRatePerSecond = 2f;
[Re... | ```c#
namespace Game
{
using UnityEngine;
[RequireComponent(typeof(Collider))]
public class Tank : MonoBehaviour
{
public PlayerController player;
[Range(10f, 1000f)]
public float max = 100f;
[Range(0.1f, 20f)]
public float leakRatePerSecond = 2f;
[Re... |
13f2785c-72fa-4d4c-a178-0c856e0c33fd | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using YnabApi.Files;
using YnabApi.Helpers;
namespace YnabApi
{
public class YnabApi
{
private readonly IFileSystem _fileSystem;
public Yn... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using YnabApi.Files;
using YnabApi.Helpers;
namespace YnabApi
{
public class YnabApi
{
private readonly IFileSystem _fileSystem;
... |
b617dda2-fd7f-4390-9a98-925436e97ccf | {
"language": "C#"
} | ```c#
using GeoIP.Models;
using MaxMind.GeoIP2;
using MaxMind.GeoIP2.Exceptions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace GeoIP.Executers
{
public class MaxMindQuery : IQuery
{
public async Task<object> Query(stri... | ```c#
using GeoIP.Models;
using MaxMind.GeoIP2;
using MaxMind.GeoIP2.Exceptions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace GeoIP.Executers
{
public class MaxMindQuery : IQuery
{
public async Task<object> Query(stri... |
c503d2b1-2db6-4c02-84a0-3b33bb1cf4d5 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Common
{
using Base.Get;
using Objects.Basic;
using Objects.Get.Shows;
internal class TraktShowsPopularRequest : TraktGetRequest<TraktPaginationListResult<TraktShow>, TraktShow>
{
internal TraktShowsPopularRequest(TraktClient client... | ```c#
namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Common
{
using Base;
using Base.Get;
using Objects.Basic;
using Objects.Get.Shows;
internal class TraktShowsPopularRequest : TraktGetRequest<TraktPaginationListResult<TraktShow>, TraktShow>
{
internal TraktShowsPopularRequest(Tr... |
3560e413-6792-489b-a3af-fbbd76095143 | {
"language": "C#"
} | ```c#
using Waf.NewsReader.Applications.Services;
using Xamarin.Essentials;
namespace Waf.NewsReader.Presentation.Services
{
public class AppInfoService : IAppInfoService
{
public AppInfoService()
{
AppName = AppInfo.Name;
VersionString = AppInfo.VersionString + "." + A... | ```c#
using Waf.NewsReader.Applications.Services;
using Xamarin.Essentials;
namespace Waf.NewsReader.Presentation.Services
{
public class AppInfoService : IAppInfoService
{
public AppInfoService()
{
AppName = AppInfo.Name;
VersionString = AppInfo.VersionString;
... |
a2579e61-3246-43b2-883a-a3f05d7104cc | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using Rant.Resources;
namespace Rant.Tests
{
[TestFixture]
public class PackageVersions
{
[TestCase("1.2.5", "1.2.4", true)]
[TestCase("0.2.5", "0.2.4", true)]
[TestCase("0.0.3", "0.0.4", false)]
[TestCase("0.3.1", "0.4.0", false)]
public void VersionGreaterThan(string v1, s... | ```c#
using NUnit.Framework;
using Rant.Resources;
namespace Rant.Tests
{
[TestFixture]
public class PackageVersions
{
[TestCase("1.2.5", "1.2.4", true)]
[TestCase("0.2.5", "0.2.4", true)]
[TestCase("0.0.3", "0.0.4", false)]
[TestCase("0.3.1", "0.4.0", false)]
public void VersionGreaterThan(string v1, s... |
321a4118-c3bb-49a2-9de6-058c05754fd8 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Management.Automation.Runspaces;
using Aggregator.Core.Interfaces;
using Aggregator.Core.Monitoring;
namespace Aggregator.Core
{
/// <summary>
/// Invokes Powershell scripting engine
/// </summary>
public class PsScriptEngine : ScriptEngine
{
... | ```c#
using System.Collections.Generic;
using System.Management.Automation.Runspaces;
using Aggregator.Core.Interfaces;
using Aggregator.Core.Monitoring;
namespace Aggregator.Core
{
/// <summary>
/// Invokes Powershell scripting engine
/// </summary>
public class PsScriptEngine : ScriptEngine
{
... |
b724a0c2-c621-4caf-a1ba-47915ee97745 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace FreecraftCore.Serializer
{
public class RootSerializationMethodBlockEmitter<TSerializableType> : IMethodBlockEmittable, INestedClassesEmittable
where TSerializable... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace FreecraftCore.Serializer
{
public class RootSerializationMethodBlockEmitter<TSerializableType> : IMethodBlockEmittable, INestedClassesEmittable
... |
7b5f6071-02ca-4060-af8c-767cfd9e9de7 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Windows.Forms;
using Microsoft.Win32;
namespace KryBot
{
internal static class Program
{
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
private static void Main()
{
... | ```c#
using System;
using System.IO;
using System.Windows.Forms;
using Microsoft.Win32;
namespace KryBot
{
internal static class Program
{
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
private static void Main()
{
... |
79a85ab7-1751-4dfb-979d-c4db17016094 | {
"language": "C#"
} | ```c#
@model AnlabMvc.Models.Analysis.AnalysisMethodViewModel
@{
ViewBag.Title = @Model.AnalysisMethod.Title;
}
<div class="col-md-8">
<h2>@Model.AnalysisMethod.Id</h2>
<h5>@Model.AnalysisMethod.Title</h5>
@Html.Raw(Model.HtmlContent)
</div>
<div class="col-md-4">
<ul>
@foreach (var... | ```c#
@model AnlabMvc.Models.Analysis.AnalysisMethodViewModel
@{
ViewBag.Title = @Model.AnalysisMethod.Title;
}
<div class="col-md-8">
<h2>@Model.AnalysisMethod.Id</h2>
<h5>@Model.AnalysisMethod.Title</h5>
@Html.Raw(Model.HtmlContent)
</div>
<div class="col-md-4">
<ul>
@foreach (var ... |
745df31e-d80a-42ba-9378-cddafa29e18b | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Office.Interop.Excel;
namespace XtabFileOpener.TableContainer.SpreadsheetTableContainer.ExcelTableContainer
{
/// <summary>
/// Implementation of Table, that manages an Excel table
/// </summary>
in... | ```c#
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Office.Interop.Excel;
namespace XtabFileOpener.TableContainer.SpreadsheetTableContainer.ExcelTableContainer
{
/// <summary>
/// Implementation of Table, that manages an Excel table
/// </summary>
in... |
a87c5e87-592e-4bfe-8d8b-36a1e81c1dd4 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class PlanetSpawner : MonoBehaviour {
public GameObject camera;
public GameObject planetPrefab;
public GravityAttractor blackHole;
// public GravityAttractor blackHole1;
// public GravityAttractor blackHole2;
public float force = 100f;
void Start()
{
... | ```c#
using UnityEngine;
using System.Collections;
public class PlanetSpawner : MonoBehaviour {
public GameObject camera;
public GameObject planetPrefab;
public GravityAttractor blackHole;
// public GravityAttractor blackHole1;
// public GravityAttractor blackHole2;
public float thrust = 100f;
public float torq... |
d57bf778-e31f-4d8d-8a76-3041e6d634f4 | {
"language": "C#"
} | ```c#
using System;
using System.Runtime.InteropServices;
namespace Mamesaver.Windows
{
// This class contains the GDI32 APIs used...
public class PlatformInvokeGdi32
{
public const int SRCOPY = 13369376;
[DllImport("gdi32.dll", EntryPoint = "DeleteDC")]
public static extern IntPt... | ```c#
using System;
using System.Runtime.InteropServices;
namespace Mamesaver.Windows
{
// This class contains the GDI32 APIs used...
public class PlatformInvokeGdi32
{
public const int SRCOPY = 13369376;
[DllImport("gdi32.dll", EntryPoint = "DeleteDC")]
public static extern IntPt... |
04a6adc2-05f8-4392-8c1a-486deb55395e | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
namespace AppHarbor
{
public class CommandDispatcher
{
private readonly IEnumerable<ICommand> _commands;
public CommandDispatcher(IEnumerable<ICommand> commands)
{
_commands = commands;
}
public void Dispatch(string[] args)
{
... | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
namespace AppHarbor
{
public class CommandDispatcher
{
private readonly IEnumerable<ICommand> _commands;
public CommandDispatcher(IEnumerable<ICommand> commands)
{
_commands = commands;
}
public void Dispatch(string[] args)
{
... |
0650442d-81b9-4bae-9954-3abad7ebce6a | {
"language": "C#"
} | ```c#
using System;
using System.Runtime.WootzJs;
using WootzJs.Web;
namespace WootzJs.Mvc.Views
{
public class TextBox : Control
{
public event Action Changed;
public new InputElement Node
{
get { return base.Node.As<InputElement>(); }
}
public TextBoxTyp... | ```c#
using System;
using System.Runtime.WootzJs;
using WootzJs.Web;
namespace WootzJs.Mvc.Views
{
public class TextBox : Control
{
public event Action Changed;
public new InputElement Node
{
get { return base.Node.As<InputElement>(); }
}
public TextBoxTyp... |
657464e0-ab5a-471f-9b21-1a66a4e46427 | {
"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.Input.Bindings;
using osu.Framework.Platform.SDL2;
using SDL2;
namespace osu.Framework.Platform.MacOS
{
public class MacOSReadableKeyCombin... | ```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.Input.Bindings;
using osu.Framework.Platform.SDL2;
using SDL2;
namespace osu.Framework.Platform.MacOS
{
public class MacOSReadableKeyCombin... |
82cefba3-614d-4922-b8d2-1a43615c3d9c | {
"language": "C#"
} | ```c#
@{
ViewBag.Title = "About";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<p>Use this area to provide additional information.</p>
```
Expand p tag on about screen. | ```c#
@{
ViewBag.Title = "About";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<p>Use this area to provide additional information. Here is more groovy info.</p>
``` |
99a1597d-126c-4bb0-97da-5bff737290c7 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Common
{
using Base.Get;
using Enums;
using Objects.Basic;
using Objects.Get.Shows.Common;
using System.Collections.Generic;
internal class TraktShowsMostWatchedRequest : TraktGetRequest<TraktPaginationListResult<TraktMostWatchedShow>, ... | ```c#
namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Common
{
using Base;
using Base.Get;
using Enums;
using Objects.Basic;
using Objects.Get.Shows.Common;
using System.Collections.Generic;
internal class TraktShowsMostWatchedRequest : TraktGetRequest<TraktPaginationListResult<TraktMo... |
b747d214-cefb-4709-abfe-4bb5a0b87536 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Queue;
using Microsoft.Extensions.Configuration;
using System.Diagnostics;
namespace QueueGettingStarted
{
public class Program
{
public static void Main(string[] args)
{
// configuration
... | ```c#
using System;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Queue;
using Microsoft.Extensions.Configuration;
using System.Diagnostics;
using System.Threading.Tasks;
namespace QueueGettingStarted
{
public class Program
{
public static void Main(string[] args)
{... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.