doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
48e5e6a0-ce02-439d-b629-6e119440c850 | {
"language": "C#"
} | ```c#
#region
using System.Net;
using Tabster.Core.Data.Processing;
using Tabster.Core.Types;
#endregion
namespace Tabster.Core.Searching
{
/// <summary>
/// Tab service which enables searching.
/// </summary>
public interface ISearchService
{
/// <summary>
/// ... | ```c#
#region
using System.Net;
using Tabster.Core.Data.Processing;
using Tabster.Core.Types;
#endregion
namespace Tabster.Core.Searching
{
/// <summary>
/// Tab service which enables searching.
/// </summary>
public interface ISearchService
{
/// <summary>
/// ... |
4a48ff30-50e4-42cd-bc7c-b18a22f60be4 | {
"language": "C#"
} | ```c#
using System.Net.Sockets;
using System.Threading.Tasks;
using RapidCore.Network;
using Xunit;
namespace RapidCore.UnitTests.Network
{
public class HostnameToIpResolverTest
{
[Fact]
public async Task HostnameToIpResolver_can_resolveAsync()
{
var resolver = new Hostname... | ```c#
using System.Net.Sockets;
using System.Threading.Tasks;
using RapidCore.Network;
using Xunit;
namespace RapidCore.UnitTests.Network
{
public class HostnameToIpResolverTest
{
[Fact]
public async Task HostnameToIpResolver_can_resolveAsync()
{
var resolver = new Hostname... |
ba9d5424-3634-4452-a213-e869897d7c9b | {
"language": "C#"
} | ```c#
using System.Web;
using System.Web.Optimization;
namespace Borderlands2GoldendKeys
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bun... | ```c#
using System.Web;
using System.Web.Optimization;
namespace Borderlands2GoldendKeys
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bun... |
94f2e8ac-f77f-42fb-aaff-b88a2a5dd7ab | {
"language": "C#"
} | ```c#
using System;
namespace JoinRpg.DataModel
{
// ReSharper disable once ClassWithVirtualMembersNeverInherited.Global (required by LINQ)
public class ProjectAcl
{
public int ProjectAclId { get; set; }
public int ProjectId { get; set; }
public virtual Project Project { get; set; }
public in... | ```c#
using System;
namespace JoinRpg.DataModel
{
// ReSharper disable once ClassWithVirtualMembersNeverInherited.Global (required by LINQ)
public class ProjectAcl
{
public int ProjectAclId { get; set; }
public int ProjectId { get; set; }
public virtual Project Project { get; set; }
public in... |
9d94a79f-91b4-4651-acc6-cbe5eb044bea | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
#if !WINDOWS_UWP
using Microsoft.MixedReality.Toolkit.Input;
using Microsoft.MixedReality.Toolkit.Physics;
using NUnit.Framework;
using System.Collections;
usi... | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
#if !WINDOWS_UWP
using Microsoft.MixedReality.Toolkit.Input;
using Microsoft.MixedReality.Toolkit.Physics;
using NUnit.Framework;
using System.Collections;
usi... |
8dc860c4-9a1a-4174-9c4c-5478c2f0fbdf | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using NSaga;
namespace Benchmarking
{
/// <summary>
/// Saga repository only for benchmarking.
/// Does not really store anything
/// </summary>
internal class FastSagaRepository : ISagaRepository
{
private readonly ISagaFactory sa... | ```c#
using System;
using System.Collections.Generic;
using NSaga;
namespace Benchmarking
{
/// <summary>
/// Saga repository only for benchmarking.
/// Does not really store anything
/// </summary>
internal class FastSagaRepository : ISagaRepository
{
private readonly ISagaFactory sa... |
74f98941-fb2e-46b3-9d1e-8cefaeee2b6b | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel;
using System.Windows;
using DesktopWidgets.Classes;
namespace DesktopWidgets.Actions
{
public abstract class ActionBase
{
[DisplayName("Delay")]
public TimeSpan Delay { get; set; } = TimeSpan.FromSeconds(0);
public void Execute()
... | ```c#
using System;
using System.ComponentModel;
using System.Windows;
using DesktopWidgets.Classes;
namespace DesktopWidgets.Actions
{
public abstract class ActionBase
{
[DisplayName("Delay")]
public TimeSpan Delay { get; set; } = TimeSpan.FromSeconds(0);
[DisplayName("Show Errors")]... |
d1b97949-4cdd-4080-b74a-6179627304eb | {
"language": "C#"
} | ```c#
using ApprovalTests.Reporters;
using Gibberish.AST._1_Bare;
using Gibberish.Parsing;
using Gibberish.Tests.ZzTestHelpers;
using NUnit.Framework;
namespace Gibberish.Tests.RecognizeBlockSyntax
{
[TestFixture]
public class InterpretWholeFile
{
[Test, UseReporter(typeof(QuietReporter))]
public void should_a... | ```c#
using ApprovalTests.Reporters;
using Gibberish.AST._1_Bare;
using Gibberish.Parsing;
using Gibberish.Tests.ZzTestHelpers;
using NUnit.Framework;
namespace Gibberish.Tests.RecognizeBlockSyntax
{
[TestFixture]
public class InterpretWholeFile
{
[Test]
public void should_accept_multiple_language_constructs()... |
f15c659c-7f9c-4403-b1ca-fdedca8acab1 | {
"language": "C#"
} | ```c#
namespace MultiMiner.MobileMiner.Api
{
public class RemoteCommand
{
public int Id { get; set; }
public string CommandText { get; set; }
}
}
```
Add CommandDate so it is deserialized from the JSON response | ```c#
using System;
namespace MultiMiner.MobileMiner.Api
{
public class RemoteCommand
{
public int Id { get; set; }
public string CommandText { get; set; }
public DateTime CommandDate { get; set; }
}
}
``` |
856d13e0-02ec-4aa8-88c8-9e24d08d3d18 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace PCLTesting.Infrastructure
{
public class TestDiscoverer
{
public IEnumerable<Test> DiscoverTests(Assembly assembly)
{
List<Test> ret = new List<Test>();
foreach (Type type in as... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace PCLTesting.Infrastructure
{
public class TestDiscoverer
{
public IEnumerable<Test> DiscoverTests(Assembly assembly)
{
List<Test> ret = new List<Test>();
foreach (Type type in as... |
da3d228d-bd34-4d18-bb0e-6fd2364379ad | {
"language": "C#"
} | ```c#
using RocketGPS.GPSMath;
using RocketGPS.Model;
using RocketGPSMath.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RocketGPSMath.GPSMath
{
public class RegionTriangulator
{
public List<GPSCoordinateBearing> rep... | ```c#
using RocketGPS.GPSMath;
using RocketGPS.Model;
using RocketGPSMath.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RocketGPSMath.GPSMath
{
public class RegionTriangulator
{
public List<GPSCoordinateBearing> rep... |
1647985b-e4aa-45ab-9cf3-c2ba874d9ae3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using LearnositySDK.Request;
using LearnositySDK.Utils;
// static LearnositySDK.Credentials;
namespace LearnosityDemo.Pages
{
public cla... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using LearnositySDK.Request;
using LearnositySDK.Utils;
// static LearnositySDK.Credentials;
namespace LearnosityDemo.Pages
{
public cla... |
66c80c0e-03c1-44a7-9bbd-1a0fd3bc1c12 | {
"language": "C#"
} | ```c#
using osu_StreamCompanion.Code.Core.DataTypes;
using osu_StreamCompanion.Code.Interfaces;
namespace osu_StreamCompanion.Code.Modules.MapDataGetters.FileMap
{
public class FileMapDataGetter : IModule, IMapDataGetter
{
public bool Started { get; set; }
private readonly FileMapManager _file... | ```c#
using osu_StreamCompanion.Code.Core.DataTypes;
using osu_StreamCompanion.Code.Interfaces;
namespace osu_StreamCompanion.Code.Modules.MapDataGetters.FileMap
{
public class FileMapDataGetter : IModule, IMapDataGetter
{
public bool Started { get; set; }
private readonly FileMapManager _file... |
f7f2e7c1-b80b-4af3-a29a-c7cb7c6cd6fe | {
"language": "C#"
} | ```c#
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Swashbuckle.AspNetCore.Filters
{
public static class SwaggerGenOptionsExtensions
{
public static void ExampleFilters(this SwaggerGenOptions swaggerGenOptions)
{
swaggerGenOptions.OperationFilter<ExamplesOperationFilter>();
... | ```c#
using Microsoft.Extensions.DependencyInjection;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Swashbuckle.AspNetCore.Filters
{
public static class SwaggerGenOptionsExtensions
{
public static void ExampleFilters(this SwaggerGenOptions swaggerGenOptions)
{
swaggerGenOptions... |
76e98f8d-72ea-4c03-b89a-66169d50db6b | {
"language": "C#"
} | ```c#
using Hops.Repositories;
using Microsoft.AspNet.Mvc;
using System.Collections.Generic;
using System.Linq;
namespace Hops.Controllers
{
[Route("[controller]")]
public class SearchController : Controller
{
private ISqliteRepository sqliteRepository;
public SearchController(ISqliteRepo... | ```c#
using Hops.Repositories;
using Microsoft.AspNet.Mvc;
using System.Collections.Generic;
using System.Linq;
namespace Hops.Controllers
{
[Route("[controller]")]
public class SearchController : Controller
{
private ISqliteRepository sqliteRepository;
public SearchController(ISqliteRepo... |
530de927-0ff4-4cf3-a04b-06f2a682c42d | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace Parser
{
// Assigns each locale an ID from 0 to n - 1
internal static class LocaleIdAllocator
{
public static void Run(ParserContext parser, IList<CompilationScope> scopes)
{
foreach (CompilationScope scope in scopes)
... | ```c#
using System.Collections.Generic;
namespace Parser
{
// Assigns each locale an ID from 0 to n - 1
internal static class LocaleIdAllocator
{
// TODO: merge this with the current ID allocator in ParserContext.
public static void Run(ParserContext parser, IList<CompilationScope>... |
b2c0029f-4ab9-425f-a03a-af6e2ff15ded | {
"language": "C#"
} | ```c#
using System;
using System.Runtime.CompilerServices;
using System.Threading;
namespace GUtils.Testing
{
/// <summary>
/// A class that tracks the amount of times its <see cref="WrappedDelegate" /> was invoked.
/// </summary>
/// <typeparam name="T"></typeparam>
public class DelegateInvocatio... | ```c#
using System;
using System.Runtime.CompilerServices;
using System.Threading;
namespace GUtils.Testing
{
/// <summary>
/// A class that tracks the amount of times its <see cref="WrappedDelegate" /> was invoked.
/// </summary>
/// <typeparam name="T"></typeparam>
public class DelegateInvocatio... |
14a0691b-1ebd-4834-a946-daa4c8cfc501 | {
"language": "C#"
} | ```c#
using Foundation;
using System;
using UIKit;
namespace MyDriving.iOS
{
public partial class GettingStartedContentViewController : UIViewController
{
public UIImage Image { get; set; }
public int PageIndex { get; set; }
public GettingStartedContentViewController (IntPtr handle) : base (handle)
... | ```c#
using Foundation;
using System;
using UIKit;
namespace MyDriving.iOS
{
public partial class GettingStartedContentViewController : UIViewController
{
public UIImage Image { get; set; }
public int PageIndex { get; set; }
public GettingStartedContentViewController (IntPtr handle) : base (handle)
... |
61be808e-830e-427a-b1e5-fd1b9316fb9d | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
using Wukong.Models;
namespace Wukong.Services
{
public sealed class Storage
{
static readonly Lazy<Storage> instance =
new Lazy<Storage>(() => new Storage());
IDictionary<string, User> userMap = new Dictiona... | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
using Wukong.Models;
namespace Wukong.Services
{
public sealed class Storage
{
static readonly Lazy<Storage> instance =
new Lazy<Storage>(() => new Storage());
volatile IDictionary<string, User> userMap = new... |
7f680803-f2c2-419d-9a1b-d9150ee4bf2f | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using Android.Content;
using Android.Runtime;
using Android.Util;
using osuTK.Graphics;
namespace osu.Framework.Android
{
public clas... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using Android.Content;
using Android.Runtime;
using Android.Util;
using osuTK.Graphics;
namespace osu.Framework.Android
{
public clas... |
0cb367e1-1c12-4462-904f-66d0d2f8ab27 | {
"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.IO.Network;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Online.API.Requests;
namespace osu.Game.Extensions
{
publ... | ```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.Globalization;
using Newtonsoft.Json.Linq;
using osu.Framework.IO.Network;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Online... |
070072e4-16f4-4434-bf4a-af1abd4915da | {
"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.IO;
using System.Security.Cryptography;
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
{
public clas... | ```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.IO;
using System.Security.Cryptography;
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
{
public clas... |
a782fedb-8d7d-4156-96e3-4f35418d3824 | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using Microsoft.Extensions.Options;
namespace AllReady.Hangfire.Jobs
{
public class SendRequestStatusToGetASmokeAlarm : ISendRequestStatusToGetASmokeAlarm
{
private readonly IOptions<GetASmokeAlarmApiSettings> getASmoke... | ```c#
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using Microsoft.Extensions.Options;
namespace AllReady.Hangfire.Jobs
{
public class SendRequestStatusToGetASmokeAlarm : ISendRequestStatusToGetASmokeAlarm
{
private static HttpClient httpClient;
public SendRe... |
0a6aac6c-c96a-4c88-95ea-02179c384354 | {
"language": "C#"
} | ```c#
using System.IO;
using JetBrains.Annotations;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Wox.Plugin.WebSearch
{
public class WebSearch
{
public const string DefaultIcon = "web_search.png";
public string Title { get; set; }
public string ActionKeyword { ... | ```c#
using System.IO;
using JetBrains.Annotations;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Wox.Plugin.WebSearch
{
public class WebSearch
{
public const string DefaultIcon = "web_search.png";
public string Title { get; set; }
public string ActionKeyword { ... |
31fdb81a-caad-4eda-a9b9-2dbecc204834 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OfficeDevPnP.Core.Utilities;
using System.Collections.Generic;
namespace OfficeDevPnP.Core.Tests.AppModelExtensions
{
[TestClass]
public class UrlUtilityTests
{
[TestMethod]
public void ContainsInvalidCharsReturn... | ```c#
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OfficeDevPnP.Core.Utilities;
using System.Collections.Generic;
namespace OfficeDevPnP.Core.Tests.AppModelExtensions
{
[TestClass]
public class UrlUtilityTests
{
[TestMethod]
public void ContainsInvalidCharsReturn... |
14bef9d7-2f1d-4746-9f15-04e530adc02e | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace Okanshi.Dashboard
{
public interface IConfiguration
{
void Add(OkanshiServer server);
IEnumerable<OkanshiServer> GetAll();
}
}```
Add support for removing okanshi instances | ```c#
using System.Collections.Generic;
namespace Okanshi.Dashboard
{
public interface IConfiguration
{
void Add(OkanshiServer server);
IEnumerable<OkanshiServer> GetAll();
void Remove(string name);
}
}``` |
966f8154-8266-46c1-9e12-7f26d5e4ce95 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
namespace Mond.Tests
{
[TestFixture]
public class MondStateTests
{
[Test]
public void MultiplePrograms()
{
const string source1 = @"
hello = fun (x) {
return 'hi ' + x;
};
... | ```c#
using NUnit.Framework;
namespace Mond.Tests
{
[TestFixture]
public class MondStateTests
{
[Test]
public void MultiplePrograms()
{
const string source1 = @"
global.hello = fun (x) {
return 'hi ' + x;
};
... |
9d01e086-ffc7-4a4e-bded-65fbef1c9388 | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using System.Web.Routing;
namespace Navigation.Mvc
{
public class RouteConfig
{
public static void AddStateRoutes()
{
if (StateInfoConfig.Dialogs == null)
return;
ValueProviderFactories.Factories.Insert(0, new NavigationDataValueProviderFactory());
string con... | ```c#
using System.Web.Mvc;
using System.Web.Routing;
namespace Navigation.Mvc
{
public class RouteConfig
{
public static void AddStateRoutes()
{
if (StateInfoConfig.Dialogs == null)
return;
ValueProviderFactories.Factories.Insert(0, new NavigationDataValueProviderFactory());
string con... |
2a54eda6-cb3c-4984-b6aa-e66702eae527 | {
"language": "C#"
} | ```c#
using System.Linq;
using Assets.Scripts.Helpers;
using UnityEngine;
public class SelfLevelingController : MonoBehaviour
{
public float MaxRotateAngle = 0.25f;
void Start()
{
}
void Update()
{
var body = GetComponent<Rigidbody2D>();
var force = Environment.GetAverageGra... | ```c#
using Assets.Scripts.Helpers;
using UnityEngine;
public class SelfLevelingController : MonoBehaviour
{
private Rigidbody2D body;
void Start()
{
body = GetComponent<Rigidbody2D>();
}
void Update()
{
var force = Environment.GetAverageGravitationalForce(body);
tran... |
558417d9-5c07-4935-8d72-928487a8f0f1 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Services
{
using Authentication;
/// <summary>Provides helper methods for serializing and deserializing Trakt objects.</summary>
public static class TraktSerializationService
{
public static string Serialize(TraktAuthorization authorization)
{
... | ```c#
namespace TraktApiSharp.Services
{
using Authentication;
using System;
/// <summary>Provides helper methods for serializing and deserializing Trakt objects.</summary>
public static class TraktSerializationService
{
public static string Serialize(TraktAuthorization authorization)
... |
c8f5b44d-57fd-484c-9e8c-9810041e64cd | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using System.Web.Mvc.Html;
using CourtesyFlush;
namespace System.Web.WebPages
{
public static class HtmlHelperExtension
{
public static MvcHtmlString FlushHead(this HtmlHelper html)
{
return FlushHead(html, null);
}
public static MvcHtml... | ```c#
using System.Web.Mvc;
using System.Web.Mvc.Html;
using CourtesyFlush;
namespace System.Web.WebPages
{
public static class HtmlHelperExtension
{
public static MvcHtmlString FlushHead(this HtmlHelper html)
{
return FlushHead(html, null);
}
public static MvcHtml... |
055c98d4-65c2-493a-abc6-16198c16b2f9 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Hangfire.MemoryStorage.Database;
using Hangfire.Server;
using Hangfire.Storage;
namespace Hangfire.MemoryStorage
{
public class MemoryStorage : JobStorage
{
private readonly MemoryStorageOptions _options;
private readonly Data _data;
publi... | ```c#
using System.Collections.Generic;
using Hangfire.MemoryStorage.Database;
using Hangfire.Server;
using Hangfire.Storage;
namespace Hangfire.MemoryStorage
{
public class MemoryStorage : JobStorage
{
private readonly MemoryStorageOptions _options;
public Data Data { get; }
public ... |
187e2318-d205-430e-8531-694bf7422304 | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Linq;
using Microsoft.DotNet.Cli.CommandLine;
namespace Microsoft.DotNet.Cli
{
internal static class InternalReportinstal... | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Linq;
using Microsoft.DotNet.Cli.CommandLine;
namespace Microsoft.DotNet.Cli
{
internal static class InternalReportinstal... |
1b578eec-70c3-4cfc-99b3-a4c4373fccb6 | {
"language": "C#"
} | ```c#
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Orleans.Providers.MongoDB.Configuration;
using Orleans.Runtime;
using Orleans.Serialization;
namespace Orleans.Providers.MongoDB.StorageProviders.Serializers
{
public class JsonGrainStateSerializer : IGrainStateSeri... | ```c#
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Orleans.Providers.MongoDB.Configuration;
using Orleans.Runtime;
using Orleans.Serialization;
namespace Orleans.Providers.MongoDB.StorageProviders.Serializers
{
public class JsonGrainStateSerializer : IGrainStateSeri... |
d766bc74-7453-451f-9d87-8e02aff4c882 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Ploeh.AutoFixture;
using Xunit;
namespace Ploeh.AutoFixtureUnitTest.DataAnnotations
{
public class StringLengthArgumentSupportTests
{
[Fact]
public voi... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Ploeh.AutoFixture;
using Xunit;
namespace Ploeh.AutoFixtureUnitTest.DataAnnotations
{
public class StringLengthArgumentSupportTests
{
[Fact]
public voi... |
c5d58b54-4389-4fea-a18a-1eca135f90e4 | {
"language": "C#"
} | ```c#
namespace Siftables
{
public partial class MainWindowView
{
public MainWindowView()
{
InitializeComponent();
DoSomething();
}
}
}
```
Break build again for TeamCity email notify test. | ```c#
namespace Siftables
{
public partial class MainWindowView
{
public MainWindowView()
{
InitializeComponent();
DoAllOfTheThings();
}
}
}
``` |
d8d9b3fb-52f4-4d2d-8b12-62d7af65bf9f | {
"language": "C#"
} | ```c#
// Copyright 2019 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Linq;
using Nuke.Common.Utilities;
namespace Nuke.Common.CI.GitHubActions.Configuration
{
public class GitHubActionsScheduledTrigger : GitHubActio... | ```c#
// Copyright 2019 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Linq;
using Nuke.Common.Utilities;
namespace Nuke.Common.CI.GitHubActions.Configuration
{
public class GitHubActionsScheduledTrigger : GitHubActio... |
8efd27d1-a355-4c0b-87e9-a9861035698e | {
"language": "C#"
} | ```c#
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace KerbalPackageManager
{
internal class dotVersion
{
public dotVersion(string toFilename)
{
var jObj = JObject.Parse(File.ReadAllText(toF... | ```c#
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace KerbalPackageManager
{
internal class dotVersion
{
public dotVersion(string toFilename)
{
var jObj = JObject.Parse(File.ReadAllText(toF... |
8bf166b9-eacf-4def-87a0-0e6f0e763db6 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
namespace IntUITive.Selenium.Tests
{
[TestFixture]
public class IntuitivelyTests
{
[Test]
public void Find_WithNoTerm_Fails()
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
namespace IntUITive.Selenium.Tests
{
[TestFixture]
public class EdgeCaseTests
{
[Test]
public void Find_WithNoTerm_Fails()
... |
42e26127-94e3-4725-8f14-1b393974afdd | {
"language": "C#"
} | ```c#
using UnityEngine;
using UniRx;
using UniRx.Triggers;
using System.Collections;
using System.Linq;
using System;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class MyEventClass
{
public event Action<int> Hoge;
public void Push(int x)
{
Hog... | ```c#
using UnityEngine;
using UniRx;
using UniRx.Triggers;
using System.Collections;
using System.Linq;
using System;
using System.Collections.Generic;
using UnityEngine.UI;
// using UnityEngine.SceneManagement;
public class MyEventClass
{
public event Action<int> Hoge;
public void Push(int x)
{
... |
00bc6a22-a1da-49a0-b5e7-da00b6c07439 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
namespace Rant.Tests.Expressions
{
[TestFixture]
public class Loops
{
private readonly RantEngine rant = new RantEngine();
[Test]
public void StringBuildingWhileLoop()
{
var output = rant.Do(@"
[@
var parts = (""this"", ""is"", ... | ```c#
using NUnit.Framework;
namespace Rant.Tests.Expressions
{
[TestFixture]
public class Loops
{
private readonly RantEngine rant = new RantEngine();
[Test]
public void StringBuildingWhileLoop()
{
var output = rant.Do(@"
[@
(function()
{
var ... |
c9132eda-37d0-47c3-b6ad-147e681f71fb | {
"language": "C#"
} | ```c#
using Discord;
using Discord.Commands;
using Discord.WebSocket;
public class ModuleA : ModuleBase
{
private readonly DatabaseService _database;
// Dependencies can be injected via the constructor
public ModuleA(DatabaseService database)
{
_database = database;
}
public async Tas... | ```c#
using Discord;
using Discord.Commands;
using Discord.WebSocket;
public class ModuleA : ModuleBase
{
private readonly DatabaseService _database;
// Dependencies can be injected via the constructor
public ModuleA(DatabaseService database)
{
_database = database;
}
public async Tas... |
c8086568-692e-40d7-a09d-9311fef1fa92 | {
"language": "C#"
} | ```c#
using Chromium;
using Chromium.Event;
using Neutronium.Core;
using Neutronium.WPF;
namespace Neutronium.WebBrowserEngine.ChromiumFx
{
public abstract class ChromiumFxWebBrowserApp : HTMLApp
{
protected virtual bool DisableWebSecurity => true;
protected override IWPFWebWindowFactory GetW... | ```c#
using Chromium;
using Chromium.Event;
using Neutronium.Core;
using Neutronium.WPF;
namespace Neutronium.WebBrowserEngine.ChromiumFx
{
public abstract class ChromiumFxWebBrowserApp : HTMLApp
{
protected virtual bool DisableWebSecurity => false;
protected override IWPFWebWindowFactory Get... |
ad309145-7d0e-44f7-ae6d-13ff2bb0155d | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using JabbR.ContentProviders.Core;
namespace JabbR.ContentProviders
{
public class AudioContentProvider : IContentProvider
{
public bool IsValidContent(Uri uri)
{
return uri.AbsolutePath.EndsWith(".mp3", StringComparison.OrdinalIgno... | ```c#
using System;
using System.Threading.Tasks;
using JabbR.ContentProviders.Core;
using Microsoft.Security.Application;
namespace JabbR.ContentProviders
{
public class AudioContentProvider : IContentProvider
{
public bool IsValidContent(Uri uri)
{
return uri.AbsolutePath.EndsWit... |
18437b0d-24b9-47d1-be4f-f9436c87ee24 | {
"language": "C#"
} | ```c#
using Auth0.Core;
using Newtonsoft.Json;
namespace Auth0.ManagementApi.Models
{
/// <summary>
///
/// </summary>
public class DeviceCredentialCreateRequest : DeviceCredentialBase
{
/// <summary>
/// Gets or sets the ID of the client for which the credential will be created.... | ```c#
using System;
using Auth0.Core;
using Newtonsoft.Json;
namespace Auth0.ManagementApi.Models
{
/// <summary>
///
/// </summary>
public class DeviceCredentialCreateRequest : DeviceCredentialBase
{
/// <summary>
/// Gets or sets the ID of the client for which the credential wi... |
7170ac0a-0fb3-4cf2-b2a6-81173090802d | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class GameManager : MonoBehaviour
{
public static GameManager Instance;
public Mode CurrentMode = Mode.TopDown;
CameraController cameraController;
void Awake()
{
if (Instance == null)
{
Instance = this;
... | ```c#
using UnityEngine;
using System.Collections;
public class GameManager : MonoBehaviour
{
public static GameManager Instance;
public Mode CurrentMode = Mode.TopDown;
public bool AllowTwisting = true;
CameraController cameraController;
void Awake()
{
if (Instance == null)
... |
dda4ca6e-22d4-485d-a02d-b3a02e225c35 | {
"language": "C#"
} | ```c#
using System.Linq;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_8_16_0
{
public class AddPropertyTypeGroupColumns : MigrationBase
{
public AddPropertyTypeGroupColumns(IMigrationContext context)
: base(context)
{ }
public override v... | ```c#
using System.Linq;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_8_16_0
{
public class AddPropertyTypeGroupColumns : MigrationBase
{
public AddPropertyTypeGroupColumns(IMigrationContext context)
: base(context)
{ ... |
4714da5b-d7e0-4d1c-b5f8-c01ca9b29807 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
namespace MySql.Data
{
internal static class ValueTaskExtensions
{
public static ValueTask<TResult> ContinueWith<T, TResult>(this ValueTask<T> valueTask, Func<T, ValueTask<TResult>> continuation)
{
return valueTask.IsCompleted ? continuation(valueTask.Result)... | ```c#
using System;
using System.Threading.Tasks;
namespace MySql.Data
{
internal static class ValueTaskExtensions
{
public static async ValueTask<TResult> ContinueWith<T, TResult>(this ValueTask<T> valueTask, Func<T, ValueTask<TResult>> continuation) => await continuation(await valueTask);
public static ValueT... |
f41e260c-a6b6-47ec-929a-a4de8e54cefb | {
"language": "C#"
} | ```c#
@using JoinRpg.Web.App_Code
@using JoinRpg.Web.Models.Plot
@model PlotElementViewModel
@if (!Model.Visible)
{
return;
}
@{
var hideClass = Model.Status == PlotStatus.InWork ? "world-object-hidden" : "";
}
@if (Model.HasEditAccess)
{
<div>
@Html.DisplayFor(model => model.Status)
@Html.Actio... | ```c#
@using JoinRpg.Web.App_Code
@using JoinRpg.Web.Models.Plot
@model PlotElementViewModel
@if (!Model.Visible)
{
return;
}
@{
var hideClass = Model.Status == PlotStatus.InWork ? "world-object-hidden" : "";
}
@if (Model.HasEditAccess)
{
<div>
@Html.DisplayFor(model => model.Status)
@Html.Actio... |
e3878798-46cf-4ff0-986c-5694f678729a | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace LiteNetLibHighLevel
{
[RequireComponent(typeof(LiteNetLibAssets))]
public class LiteNetLibGameManager : LiteNetLibManager
{
private LiteNetLibAssets assets;
public LiteNetLibAssets Assets
... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace LiteNetLibHighLevel
{
[RequireComponent(typeof(LiteNetLibAssets))]
public class LiteNetLibGameManager : LiteNetLibManager
{
private LiteNetLibAssets assets;
public LiteNetLibAssets Assets
... |
e0d042b8-b7ed-40c3-943b-38768006bf0a | {
"language": "C#"
} | ```c#
@using JabbR;
<form class="form-horizontal" action="@Url.Content("~/account/login")" method="post">
@Html.ValidationSummary()
<div class="control-group">
<div class="controls">
<div class="input-prepend">
<span class="add-on"><i class="icon-user... | ```c#
@using JabbR;
<form class="form-horizontal" action="@Url.Content("~/account/login")" method="post">
@Html.ValidationSummary()
<div class="control-group">
<div class="controls">
<div class="input-prepend">
<span class="add-on"><i class="icon-user... |
cb3f358e-9a5b-448e-bc72-d79e4c1eb685 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Audio;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Osu.... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Audio;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Osu.... |
4d4e6a78-5dc0-4193-ba1a-8fe852314dec | {
"language": "C#"
} | ```c#
using System;
using ATL.AudioReaders;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Text;
namespace ATL.test
{
[TestClass]
public class FactoryTest
{
[TestMethod]
public void TestGetPlaylistFormats()
{
StringBuilder filter = new StringBuilder(""... | ```c#
using System;
using ATL.AudioReaders;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Text;
namespace ATL.test
{
[TestClass]
public class FactoryTest
{
[TestMethod]
public void TestGetPlaylistFormats()
{
StringBuilder filter = new StringBuilder(""... |
b4277255-1eec-49f7-a347-2949ecef85ff | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace Amica.vNext
{
public class SqliteObjectCache : SqliteObjectCacheBase
{
protected override string GetDatabasePath()
{
const string sqliteFilename = "cache.db3";
var cacheFolder = Path.Combine(ApplicationName, "SimpleCache");... | ```c#
using System;
using System.IO;
using Amica.vNext;
[assembly: Xamarin.Forms.Dependency(typeof(SqliteObjectCache))]
namespace Amica.vNext
{
public class SqliteObjectCache : SqliteObjectCacheBase
{
protected override string GetDatabasePath()
{
const string sqliteFilename = "cac... |
128a918e-e737-41f8-b6e7-8c07cc359b00 | {
"language": "C#"
} | ```c#
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.ObjectBuilder;
namespace UnityAutoMoq
{
public class UnityAutoMoqExtension : UnityContainerExtension
{
private readonly UnityAutoMoqContainer autoMoqContainer;
public UnityAutoMoqExtension(UnityAutoMoqContainer aut... | ```c#
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.ObjectBuilder;
namespace UnityAutoMoq
{
/// <summary>
/// Provide extensions for Unity Auto Moq
/// </summary>
public class UnityAutoMoqExtension : UnityContainerExtension
{
private readonly UnityAutoMoqContain... |
3af07aa2-9730-46d0-9bf4-94433634b6af | {
"language": "C#"
} | ```c#
#if NETSTANDARD1_6
using System;
using Microsoft.Extensions.Configuration;
namespace RapidCore.Configuration
{
/// <summary>
/// Base class for strongly typed configuration classes.
///
/// The idea is to allow you to define a config class specific
/// for your project, but gain easy access ... | ```c#
#if NETSTANDARD1_6
using System;
using Microsoft.Extensions.Configuration;
namespace RapidCore.Configuration
{
/// <summary>
/// Base class for strongly typed configuration classes.
///
/// The idea is to allow you to define a config class specific
/// for your project, but gain easy access ... |
ce5ccd43-8473-4fdc-8ee4-51e7556db95a | {
"language": "C#"
} | ```c#
@{
ViewBag.Title = "Contact";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@exam... | ```c#
@{
ViewBag.Title = "Contact";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@exam... |
ca595bed-528f-4e07-adfd-9c2513ec3fed | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Flirper1.0")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[as... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Flirper1.1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[as... |
3670e3c2-eb1c-498c-ace9-6034da122841 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
using Rocket.Unturned.Player;
namespace Safezone.Model
{
[XmlInclude(typeof(RectangleType))]
public abstract class SafeZoneType
{
private static readonly Dictionary<String, T... | ```c#
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
using Rocket.Unturned.Player;
namespace Safezone.Model
{
[XmlInclude(typeof(RectangleType))]
[XmlInclude(typeof(CircleType))]
public abstract class SafeZoneType
{
private... |
4e0e32db-3787-4fe4-a434-0e04ea467685 | {
"language": "C#"
} | ```c#
using AzureStorage.Queue;
using Core;
using Core.Notifiers;
using Lykke.JobTriggers.Abstractions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace AzureRepositories.Notifiers
{
public class SlackNotifier : ISlackNotifier, IPois... | ```c#
using AzureStorage.Queue;
using Core;
using Core.Notifiers;
using Lykke.JobTriggers.Abstractions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace AzureRepositories.Notifiers
{
public class SlackNotifier : ISlackNotifier, IPois... |
130ab757-3906-4eb2-9ada-631ac5541194 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PixelPet.Commands {
internal class DeserializeTilemapCmd : CliCommand {
public DeserializeTilemapCmd()
: base("Deserialize-Tilemap") { }
public override void Run(Workbench workbench, Cli cli) {
cli.Log("D... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PixelPet.Commands {
internal class DeserializeTilemapCmd : CliCommand {
public DeserializeTilemapCmd()
: base("Deserialize-Tilemap", new Parameter[] {
new Parameter("base-tile", "bt", false, new ParameterVa... |
7d420672-50f2-4995-ba2d-ae851edd4fef | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace StorybrewCommon.Storyboarding
{
public class OsbAnimation : OsbSprite
{
public int FrameCount;
public double FrameDelay;
public OsbLoopType LoopType;
public override string GetTexturePathAt(double time)
{
var d... | ```c#
using System;
using System.IO;
namespace StorybrewCommon.Storyboarding
{
public class OsbAnimation : OsbSprite
{
public int FrameCount;
public double FrameDelay;
public OsbLoopType LoopType;
public override string GetTexturePathAt(double time)
{
var d... |
ce315fea-6c19-4dd0-9796-2c6a40365b0c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using BugsnagUnity.Payload;
using UnityEngine;
namespace BugsnagUnity
{
static class DictionaryExtensions
{
private static IntPtr Arrays { get; } = AndroidJNI.FindClass("java/util/Arrays");
private static IntPtr ToStringMethod { get; } = AndroidJNIHelp... | ```c#
using System;
using System.Collections.Generic;
using BugsnagUnity.Payload;
using UnityEngine;
namespace BugsnagUnity
{
static class DictionaryExtensions
{
internal static void PopulateDictionaryFromAndroidData(this IDictionary<string, object> dictionary, AndroidJavaObject source)
{
using (var ... |
caa22c43-a718-4a73-9928-b3946ada2736 | {
"language": "C#"
} | ```c#
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
namespace MaintainableSelenium.MvcPages.Utils
{
public static class ImageExtensions
{
public static Bitmap ToBitmap(this byte[] screenshot)
{
using (MemoryStream memoryStream = new MemoryStream(screenshot))
... | ```c#
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
namespace MaintainableSelenium.MvcPages.Utils
{
public static class ImageExtensions
{
public static Bitmap ToBitmap(this byte[] screenshot)
{
using (MemoryStream memoryStream = new MemoryStream(screenshot))
... |
c1ff3395-a728-465a-89d5-ba6a1c415a8a | {
"language": "C#"
} | ```c#
using System;
using Xablu.WebApiClient.Exceptions;
namespace Xablu.WebApiClient
{
public class CrossRestApiClient
{
private static Action<RestApiClientOptions> _configureRestApiClient;
private static Lazy<IRestApiClient> _restApiClientImplementation = new Lazy<IRestApiClient>(() => Create... | ```c#
using System;
using Xablu.WebApiClient.Exceptions;
namespace Xablu.WebApiClient
{
public class CrossRestApiClient
{
private static Action<RestApiClientOptions> _configureRestApiClient;
private static Lazy<IRestApiClient> _restApiClientImplementation = new Lazy<IRestApiClient>(() => Create... |
17d27048-5cf2-4936-8807-1ccaaee48af1 | {
"language": "C#"
} | ```c#
namespace Stripe
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class PaymentIntentPaymentMethodOptionsCard : StripeEntity<PaymentIntentPaymentMethodOptionsCard>
{
/// <summary>
/// Installment details for this payment (Mexico only).
/// </s... | ```c#
namespace Stripe
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class PaymentIntentPaymentMethodOptionsCard : StripeEntity<PaymentIntentPaymentMethodOptionsCard>
{
/// <summary>
/// Installment details for this payment (Mexico only).
/// </s... |
8e7d44b5-2295-4613-ad54-567e2cef31ce | {
"language": "C#"
} | ```c#
@using System.Linq;
@using Nwazet.Commerce.Models;
@{
var priceTiers = new List<PriceTier>(Model.PriceTiers);
var discountedPriceTiers = new List<PriceTier>(Model.DiscountedPriceTiers);
}
@if (Model.PriceTiers != null && Enumerable.Count(Model.PriceTiers) > 0) {
<table class="tiered-prices">
... | ```c#
@using System.Linq;
@using Nwazet.Commerce.Models;
@{
var priceTiers = new List<PriceTier>(Model.PriceTiers);
var discountedPriceTiers = new List<PriceTier>(Model.DiscountedPriceTiers);
}
@if (Model.PriceTiers != null && Enumerable.Count(Model.PriceTiers) > 0) {
<table class="tiered-prices">
... |
1e370cf4-7b28-4d90-886e-27c7f736e9e9 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class GameController : MonoBehaviour {
public GameObject towerBase;
public GameObject gameField;
void Start () {
Debug.Log ("GameController: Game Started");
this.initGamePlatform ();
}
void Update () {
}
void initGamePlatform() {
for (int x = ... | ```c#
using UnityEngine;
using System.Collections;
public class GameController : MonoBehaviour {
public GameObject towerBase;
public GameObject gameField;
private GameObject[,] towerBases;
private int gameFieldWidth = 0;
private int gameFieldHeight = 0;
void Start () {
this.gameFieldWidth = (int)(gameField... |
a2f3ca7d-640f-49df-bda8-c7802de45fd9 | {
"language": "C#"
} | ```c#
using Android.Content;
using Android.Hardware;
namespace Plugin.Media
{
internal static class IntentExtraExtensions
{
private const string extraFrontPre25 = "android.intent.extras.CAMERA_FACING";
private const string extraFrontPost25 = "android.intent.extras.LENS_FACING_FRONT";
private const string extr... | ```c#
using Android.Content;
using Android.Hardware;
namespace Plugin.Media
{
internal static class IntentExtraExtensions
{
private const string extraFrontPre25 = "android.intent.extras.CAMERA_FACING";
private const string extraFrontPost25 = "android.intent.extras.LENS_FACING_FRONT";
private const string extr... |
ed6d394b-982b-4f64-b3ba-8359e471e257 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.ComponentModel;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Screens.Select.Filter
{
public en... | ```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.ComponentModel;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Screens.Select.Filter
{
public en... |
f2723f23-944e-40c1-88b0-d57153c464c5 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
namespace NuGetConsole.Implementation.PowerConsole {
/// <summary>
/// Represents a host with extra info.
/// </summary>
class HostInfo : ObjectWithFactory<PowerConsoleWindow> {
Lazy<IHostProvider, IHostMetadata> HostProvider { get; set; }
... | ```c#
using System;
using System.Diagnostics;
namespace NuGetConsole.Implementation.PowerConsole {
/// <summary>
/// Represents a host with extra info.
/// </summary>
class HostInfo : ObjectWithFactory<PowerConsoleWindow> {
Lazy<IHostProvider, IHostMetadata> HostProvider { get; set; }
... |
d1ecd31d-14f1-4050-ad3b-5d03aca7a74f | {
"language": "C#"
} | ```c#
// (Note: This precondition is obsolete, it is recommended to use the RequireOwnerAttribute that is bundled with Discord.Commands)
using Discord.Commands;
using Discord.WebSocket;
using System.Threading.Tasks;
// Inherit from PreconditionAttribute
public class RequireOwnerAttribute : PreconditionAttribute
{
... | ```c#
// (Note: This precondition is obsolete, it is recommended to use the RequireOwnerAttribute that is bundled with Discord.Commands)
using Discord.Commands;
using Discord.WebSocket;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;
// Inherit from PreconditionAttribute
pu... |
36846ec6-b0cc-4fd1-99bb-c0e4b9b8e08e | {
"language": "C#"
} | ```c#
using System;
using umbraco.DataLayer;
namespace umbraco.editorControls
{
/// <summary>
/// Summary description for cms.businesslogic.datatype.DefaultDataKeyValue.
/// </summary>
public class DefaultDataKeyValue : cms.businesslogic.datatype.DefaultData
{
public DefaultDataKeyValue(cms.busines... | ```c#
using System;
using umbraco.DataLayer;
namespace umbraco.editorControls
{
/// <summary>
/// Summary description for cms.businesslogic.datatype.DefaultDataKeyValue.
/// </summary>
public class DefaultDataKeyValue : cms.businesslogic.datatype.DefaultData
{
public DefaultDataKeyValue(cms.busines... |
6a20b671-0208-4af5-af0f-9cf01fa5468d | {
"language": "C#"
} | ```c#
using System;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Windows;
namespace RxExamplesWPF
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow
{
public MainWindow()
{
InitializeCom... | ```c#
using System;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Windows;
namespace RxExamplesWPF
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow
{
public MainWindow()
{
InitializeCom... |
a7628bbc-96b3-4814-8cc3-9d627626c62d | {
"language": "C#"
} | ```c#
using Csla.Configuration;
using ProjectTracker.Library;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace ProjectTracker.Ui.Xamarin
{
public partial class App : Application
{
public static Page RootPage { get;... | ```c#
using Csla.Configuration;
using ProjectTracker.Library;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace ProjectTracker.Ui.Xamarin
{
public partial class App : Application
{
public static Page RootPage { get;... |
762db281-a7df-4684-9133-bcb110858913 | {
"language": "C#"
} | ```c#
namespace Akeneo.Model
{
public class AttributeType
{
public const string Date = "pim_catalog_date";
public const string Metric = "pim_catalog_metric";
public const string Price = "pim_catalog_price_collection";
public const string Number = "pim_catalog_number";
public const string Text = "pim_catalo... | ```c#
namespace Akeneo.Model
{
public class AttributeType
{
/// <summary>
/// It is the unique product’s identifier. The catalog can contain only one.
/// </summary>
public const string Identifier = "pim_catalog_identifier";
/// <summary>
/// Text
/// </summary>
public const string Text = "pim_catal... |
7d30e9b9-47ab-4247-b7ad-9b4be6ffeb4b | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
namespace MCloud {
public class MultiStepDeployment : Deployment, IEnumerable {
public MultiStepDeployment ()
{
Steps = new List<Deployment> ();
}
public List<Deployment> Steps {
get;
private set;
}
public void ... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
namespace MCloud {
public class MultiStepDeployment : Deployment, IEnumerable {
public MultiStepDeployment ()
{
Steps = new List<Deployment> ();
}
public List<Deployment> Steps {
get;
private set;
}
public void ... |
a422a7a5-3d42-45c5-a1ba-d7dd8a112581 | {
"language": "C#"
} | ```c#
// Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace SmugMug.v2.Types
{
public class SmugMugEntity
{
protected void NotifyPropertyValueChanged(string name, object value)
{
... | ```c#
// Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.Diagnostics;
namespace SmugMug.v2.Types
{
public class SmugMugEntity
{
private Dictionary<stri... |
a654ce61-d747-4958-83ad-c88e8af6883e | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Package.cs" company="Naos">
// Copyright 2015 Naos
// </copyright>
// -----------------------------------------------------------------------------------------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Package.cs" company="Naos">
// Copyright 2015 Naos
// </copyright>
// -----------------------------------------------------------------------------------------------------... |
17fc771c-e2b5-4f4a-a7ba-32ebc46ee090 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
namespace Tiesmaster.Dcc
{
public class Startup
{
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.... | ```c#
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace Tiesmaster.Dcc
{
public class Startup
{
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IL... |
acc2aa3d-3695-4332-af87-1f773a116ab2 | {
"language": "C#"
} | ```c#
using Microsoft.AspNet.Builder;
using Glimpse.Host.Web.AspNet;
using Microsoft.Framework.DependencyInjection;
namespace Glimpse.Agent.AspNet.Sample
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGlimpse()
.Run... | ```c#
using Glimpse.Agent.Web;
using Microsoft.AspNet.Builder;
using Glimpse.Host.Web.AspNet;
using Microsoft.Framework.DependencyInjection;
namespace Glimpse.Agent.AspNet.Sample
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGlimp... |
2af18ce7-d8a8-4e19-a6e6-dc35fac8daa9 | {
"language": "C#"
} | ```c#
/* Copyright 2016 Daro Cutillas Carrillo
*
* 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 ... | ```c#
/* Copyright 2016 Daro Cutillas Carrillo
*
* 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 ... |
cd8d2820-486a-4993-ad12-5bbbe23ca45a | {
"language": "C#"
} | ```c#
using HiddenWallet.Models;
using System;
using System.Collections.Generic;
using System.Text;
namespace NBitcoin
{
public static class NBitcoinExtensions
{
public static ChainedBlock GetBlock(this ConcurrentChain me, Height height)
=> me.GetBlock(height.Value);
public static strin... | ```c#
using HiddenWallet.Models;
using System;
using System.Collections.Generic;
using System.Text;
namespace NBitcoin
{
public static class NBitcoinExtensions
{
public static ChainedBlock GetBlock(this ConcurrentChain me, Height height)
=> me.GetBlock(height.Value);
public static strin... |
138ad0bb-28f2-44f9-8a30-de98d4658ff2 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Xunit;
namespace Nocto.Tests.Integration
{
public class UsersEndpointTests
{
public class TheGetUserAsyncMethod
{
[Fact]
public async Task ReturnsSpecifiedUser()
{
var github = new GitHu... | ```c#
using System;
using System.Threading.Tasks;
using Xunit;
namespace Nocto.Tests.Integration
{
public class UsersEndpointTests
{
public class TheGetMethod
{
[Fact]
public async Task ReturnsSpecifiedUser()
{
var github = new GitHubClient {... |
c06f73e5-e3a8-478b-80d1-40706a113504 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
namespace AttachToolbar
{
public enum EngineType
{
[EngineName("Native")]
Native = 1,
[EngineName("Managed")]
Managed = 2,
[EngineName("Managed/Native")]
Both = 3
}
public static class AttachEngineTypeConve... | ```c#
using System;
using System.Reflection;
namespace AttachToolbar
{
public enum EngineType
{
[EngineName("Native")]
Native = 1,
[EngineName("Managed")]
Managed = 2,
[EngineName("Managed/Native")]
Both = 3
}
public static class AttachEngineTypeConve... |
30f7eb29-43cc-4b87-93ef-e65f40d3b107 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
namespace FilterLists.SharedKernel.Logging
{
public static class HostRunner
{
public static async Task TryRunWi... | ```c#
using System;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
namespace FilterLists.SharedKernel.Logging
{
public static class HostRunner
... |
29af3d2a-8dcc-45db-9efe-2940ef8ea269 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using SourceBrowser.Generator;
namespace SourceBrowser.Samples
{
class Program
{
static void Main(string[] args)
{
// Combined with, or replaced by, provided paths to create absolute paths
string userProfilePath = Environment.GetFold... | ```c#
using System;
using System.IO;
using SourceBrowser.Generator;
namespace SourceBrowser.Samples
{
class Program
{
static void Main(string[] args)
{
// Combined with, or replaced by, provided paths to create absolute paths
string userProfilePath = Environment.GetFold... |
18a614a7-ed6b-490a-afa9-88854e4b6381 | {
"language": "C#"
} | ```c#
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFourteenZero
{
/// <summary>
/// Migrates member group picker properties from NVarchar to NText. See https://github.com/umbraco/Umbraco-CMS/issues/3268.
/// ... | ```c#
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFourteenZero
{
/// <summary>
/// Migrates member group picker properties from NVarchar to NText. See https://github.com/umbraco/Umbraco-CMS/issues/3268.
/// ... |
c12ec390-dffe-4fa8-86b5-a240af2efa7c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
#if (NETFX || WINDOWS_PHONE)
using System.Windows.Data;
using System.Windows.Markup;
#elif (NETFX_CORE)
using Windows.UI.Xaml;
using Windows.UI.Xaml.Markup;
#elif (XAMARIN)
using Xamarin.Forms;
#endif
namespace Value... | ```c#
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
#if (NETFX || WINDOWS_PHONE)
using System.Windows;
using System.Windows.Data;
using System.Windows.Markup;
#elif (NETFX_CORE)
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
#elif (XAMARIN)
using Xamarin.Forms;
#en... |
37c22bbe-3a41-49f1-84b2-2fc33d18e06c | {
"language": "C#"
} | ```c#
using SmugMug.v2.Authentication;
using SmugMug.v2.Authentication.Tokens;
using System.Diagnostics;
namespace SmugMugTest
{
class Program
{
private static OAuthToken s_oauthToken;
static void Main(string[] args)
{
s_oauthToken = ConsoleAuthentication.GetOAuthTokenFrom... | ```c#
using SmugMug.v2.Authentication;
using SmugMug.v2.Authentication.Tokens;
using SmugMug.v2.Types;
using System.Diagnostics;
namespace SmugMugTest
{
class Program
{
private static OAuthToken s_oauthToken;
static void Main(string[] args)
{
s_oauthToken = ConsoleAuthenti... |
ec736e67-2624-465d-9f43-bf35b51bf118 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConComp
{
class Program
{
static void Main(string[] args)
{
var fname1 = args[0];
var fname2 = args[1];
var ta... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace ConComp
{
internal class Program
{
private static void Main(string[] args)
{
var tasks = new Dictionary<string, Task<long>>();
foreach (var ... |
5f7a83a8-8a95-433b-b90e-9cd581a590a0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Reflection;
using Pather.CSharp.PathElements;
namespace Pather.CSharp
{
public class Resolver
{
private IList<Type> pathElementTypes;
public Resolver()
{
pat... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Reflection;
using Pather.CSharp.PathElements;
namespace Pather.CSharp
{
public class Resolver
{
private IList<Type> pathElementTypes;
public Resolver()
{
pat... |
10732bbe-b281-4598-9775-e0d703102531 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Net.Mail;
using SparkPost.Utilities;
namespace SparkPost
{
public class Transmission
{
public Transmission()
{
Recipients = new List<Recipient>();
Metadata = new Dictionary<string, object>();
SubstitutionD... | ```c#
using System.Collections.Generic;
using System.Net.Mail;
using SparkPost.Utilities;
namespace SparkPost
{
public class Transmission
{
public Transmission()
{
Recipients = new List<Recipient>();
Metadata = new Dictionary<string, object>();
SubstitutionD... |
fcd9bf31-16e4-4cb6-a43a-ebcbcf57fb47 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace ApiPorter.Patterns
{
internal sealed class ArgumentMatcher : Matcher
{
private readonly ArgumentVariable _variable;
private readonly int _following;
... | ```c#
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace ApiPorter.Patterns
{
internal sealed class ArgumentMatcher : Matcher
{
private readonly ArgumentVariable _variable;
private readonly int _following;
... |
1434b18e-7c9b-46e0-946a-a49dd3b6bd19 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
namespace osu.Game.Rulesets.Mods
{
public abstract class ModNoFail : Mod, IApplica... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Screens.Play;
namespace osu.Game.Rulesets.Mods
{
public abstract cl... |
0398fb14-7dfb-4f45-b69f-b37c27e087e3 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Dialect;
using NHibernate.Driver;
namespace PPWCode.Vernacular.NHibernate.I.Test
{
public static class NhConfigurator
{
private const string ConnectionString = "Data Source=:memory:;Version=3;N... | ```c#
using System.Collections.Generic;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Dialect;
using NHibernate.Driver;
namespace PPWCode.Vernacular.NHibernate.I.Test
{
public static class NhConfigurator
{
private const string ConnectionString = "Data Source=:memory:;Version=3;N... |
890eec7c-3acd-472a-8633-4d3480be9b7e | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Umbraco.Core.Models;
namespace Umbraco.Core.PropertyEditors
{
/// <summary>
/// A validator that validates an email address
/// </summary>
[ValueValidator("Email")]
internal sealed class EmailValid... | ```c#
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Umbraco.Core.Models;
namespace Umbraco.Core.PropertyEditors
{
/// <summary>
/// A validator that validates an email address
/// </summary>
[ValueValidator("Email")]
internal sealed class EmailValid... |
ddb678a6-344e-4a4c-9101-57f3634bc35a | {
"language": "C#"
} | ```c#
/////////////////////////////////////////////////////////////////
// Created by : Caesar Moussalli //
// TimeStamp : 31-1-2016 //
// Content : Associate Repositories to the Unit of Work //
// Notes : Send DB context to repositories t... | ```c#
/////////////////////////////////////////////////////////////////
// Created by : Caesar Moussalli //
// TimeStamp : 31-1-2016 //
// Content : Associate Repositories to the Unit of Work //
// Notes : Send DB context to repositories t... |
16e5b72c-aa3d-4617-863d-5fc8307b5138 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MyCoolLib;
namespace Mvc52Application.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
... | ```c#
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MyCoolLib;
namespace Mvc52Application.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
... |
2c6d6fe5-8694-49ae-95c2-697c1840369d | {
"language": "C#"
} | ```c#
#if !NET452
namespace Fixie.Cli
{
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
class Dotnet
{
public static readonly string Path = FindDotnet();
static string FindDotnet()
{
var fileName = RuntimeInfor... | ```c#
#if !NET452
namespace Fixie.Cli
{
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
class Dotnet
{
public static readonly string Path = FindDotnet();
static string FindDotnet()
{
var fileName = RuntimeInfor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.