Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Simplify view engine wrapping for MVC Core | using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System.Linq;
namespace StackExchange.Profiling.Mvc
{
/// <summary>
/// Extension methods for configuring MiniProfiler for MVC
/// </summary>
public static class MvcExtensions
{... | using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System.Linq;
namespace StackExchange.Profiling.Mvc
{
/// <summary>
/// Extension methods for configuring MiniProfiler for MVC
/// </summary>
public static class MvcExtensions
{... |
Add some tests for string extension. | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Flue... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Flue... |
Add handling for non breaking spaces | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="StrikeMarkdownProvider.cs" company="PicklesDoc">
// Copyright 2011 Jeffrey Cameron
// Copyright 2012-present PicklesDoc team and community contributors
//
//
// Licensed unde... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="StrikeMarkdownProvider.cs" company="PicklesDoc">
// Copyright 2011 Jeffrey Cameron
// Copyright 2012-present PicklesDoc team and community contributors
//
//
// Licensed unde... |
Fix bug spotted with Gendarme. Assign the value of 'successful'. | using System;
using System.Collections.Generic;
using MonoTorrent.BEncoding;
namespace MonoTorrent.Client.Tracker
{
public abstract class TrackerResponseEventArgs : EventArgs
{
private bool successful;
private Tracker tracker;
/// <summary>
/// True if the request completed suc... | using System;
using System.Collections.Generic;
using MonoTorrent.BEncoding;
namespace MonoTorrent.Client.Tracker
{
public abstract class TrackerResponseEventArgs : EventArgs
{
private bool successful;
private Tracker tracker;
/// <summary>
/// True if the request completed suc... |
Add constrained and tail call methods, and remove virtual from method names, as constrained implies virtual | using System;
using System.Reflection;
using System.Reflection.Emit;
namespace ILGeneratorExtensions
{
public static class MethodFlow
{
public static void JumpTo(this ILGenerator generator, MethodInfo method) => generator.Emit(OpCodes.Jmp, method);
public static void Call(this ILGenerator gen... | using System;
using System.Reflection;
using System.Reflection.Emit;
namespace ILGeneratorExtensions
{
public static class MethodFlow
{
public static void JumpTo(this ILGenerator generator, MethodInfo method) => generator.Emit(OpCodes.Jmp, method);
public static void Call(this ILGenerator gen... |
Add method to create client optimised for write | using System;
using Cake.Core;
using Microsoft.Azure.Documents.Client;
using Microsoft.Azure.Documents.Client.TransientFaultHandling;
using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling;
namespace Cake.DocumentDb.Factories
{
public class ClientFactory
{
private readonly ConnectionSettin... | using System;
using Cake.Core;
using Microsoft.Azure.Documents;
using Microsoft.Azure.Documents.Client;
using Microsoft.Azure.Documents.Client.TransientFaultHandling;
using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling;
namespace Cake.DocumentDb.Factories
{
public class ClientFactory
{
... |
Make LINQ in playlist function fancier (because why not) | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows... |
Set AssemblyVersion and AssemblyFileVersion to 1.0.0.0 | 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: AssemblyTitle("Tr... | 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: AssemblyTitle("Tr... |
Change derived symbols type name to an internal const | using Microsoft.TemplateEngine.Abstractions;
using Newtonsoft.Json.Linq;
namespace Microsoft.TemplateEngine.Orchestrator.RunnableProjects
{
public class DerivedSymbol : BaseValueSymbol
{
public const string TypeName = "derived";
public string ValueTransform { get; set; }
public string... | using Microsoft.TemplateEngine.Abstractions;
using Newtonsoft.Json.Linq;
namespace Microsoft.TemplateEngine.Orchestrator.RunnableProjects
{
public class DerivedSymbol : BaseValueSymbol
{
internal const string TypeName = "derived";
public string ValueTransform { get; set; }
public stri... |
Add uploading of coverage reports to Coveralls | Task("DevBuild")
.IsDependentOn("Build")
.IsDependentOn("Octopus-Packaging")
.IsDependentOn("Octopus-Deployment");
Task("PrBuild")
.IsDependentOn("Build")
.IsDependentOn("Test-NUnit");
Task("KpiBuild")
.IsDependentOn("Build")
.IsDependentOn("Test-NUnit")
.IsDependentOn("Octopus-Packagi... | Task("DevBuild")
.IsDependentOn("Build")
.IsDependentOn("Octopus-Packaging")
.IsDependentOn("Octopus-Deployment");
Task("KpiBuild")
.IsDependentOn("Build")
.IsDependentOn("Test-NUnit")
.IsDependentOn("Upload-Coverage-Report")
.IsDependentOn("Octopus-Packaging")
.IsDependentOn("Octopus-D... |
Clarify error throw when Command has no name string provided | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace EntryPoint {
/// <summary>
/// Used to mark a method as a Command, in a CliCommands class
/// </summary>
[AttributeUsage(
AttributeTargets.Method,
AllowMultiple = false,
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace EntryPoint {
/// <summary>
/// Used to mark a method as a Command, in a CliCommands class
/// </summary>
[AttributeUsage(
AttributeTargets.Method,
AllowMultiple = false,
... |
Fix assembly load for plugins | using System;
using System.IO;
using System.Reflection;
namespace AIMP.SDK
{
internal static class CustomAssemblyResolver
{
private static string curPath;
private static bool isInited;
/// <summary>
/// Initializes the specified path.
/// </summary>
/// <param... | using System;
using System.IO;
using System.Linq;
using System.Reflection;
namespace AIMP.SDK
{
internal static class CustomAssemblyResolver
{
private static string curPath;
private static bool isInited;
/// <summary>
/// Initializes the specified path.
/// </summary>... |
Move the speech_quickstart doc tag so that users can copy and paste all the code. | /*
* Copyright (c) 2017 Google 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 ... | /*
* Copyright (c) 2017 Google 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 ... |
Add tags to playlist location | using System;
using System.Collections.Generic;
using System.Xml.Serialization;
namespace SevenDigital.Api.Schema.Playlists.Response
{
[Serializable]
public class PlaylistLocation : UserBasedUpdatableItem
{
[XmlAttribute("id")]
public string Id { get; set; }
[XmlElement("name")]
public string... | using System;
using System.Collections.Generic;
using System.Xml.Serialization;
namespace SevenDigital.Api.Schema.Playlists.Response
{
[Serializable]
public class PlaylistLocation : UserBasedUpdatableItem
{
[XmlAttribute("id")]
public string Id { get; set; }
[XmlElement("name")]
public string... |
Fix wildcard path in bootstrap js bundle | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="BundleConfig.cs" company="KriaSoft LLC">
// Copyright © 2013 Konstantin Tarkus, KriaSoft LLC. See LICENSE.txt
// </copyright>
// ------------------------------------------------... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="BundleConfig.cs" company="KriaSoft LLC">
// Copyright © 2013 Konstantin Tarkus, KriaSoft LLC. See LICENSE.txt
// </copyright>
// ------------------------------------------------... |
Write value separators when serializing dynamic body | using System.Collections.Generic;
namespace Elasticsearch.Net
{
internal class DynamicBodyFormatter : IJsonFormatter<DynamicBody>
{
private static readonly DictionaryFormatter<string, object> DictionaryFormatter =
new DictionaryFormatter<string, object>();
public void Serialize(ref JsonWriter writer, Dynamic... | using System.Collections.Generic;
namespace Elasticsearch.Net
{
internal class DynamicBodyFormatter : IJsonFormatter<DynamicBody>
{
private static readonly DictionaryFormatter<string, object> DictionaryFormatter =
new DictionaryFormatter<string, object>();
public void Serialize(ref JsonWriter writer, Dynamic... |
Reduce unnecessary logging of missing optional methods | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Harmony
{
internal static class PatchTools
{
static readonly Dictionary<object, object> objectReferences = new Dictionary<object, object>();
internal static void RememberObject(object key, object value)
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Harmony
{
internal static class PatchTools
{
static readonly Dictionary<object, object> objectReferences = new Dictionary<object, object>();
internal static void RememberObject(object key, object value)
{
... |
Fix bug with logic for if the token is valid | using System;
using Newtonsoft.Json;
namespace Stranne.VasttrafikNET.Models
{
internal class Token
{
private DateTimeOffset _createDate = DateTimeOffset.Now;
[JsonProperty("Expires_In")]
public int ExpiresIn { get; set; }
[JsonProperty("Access_Token")]
public string A... | using System;
using Newtonsoft.Json;
namespace Stranne.VasttrafikNET.Models
{
internal class Token
{
private DateTimeOffset _createDate = DateTimeOffset.Now;
[JsonProperty("Expires_In")]
public int ExpiresIn { get; set; }
[JsonProperty("Access_Token")]
public string A... |
Raise rating of gif search | namespace awesome_bot.Giphy
{
public static partial class GiphyEndPoints
{
public class RandomEndPoint
{
private const string RandomPath = "/v1/gifs/random";
public string Build(string searchText, Rating rating = null)
=> string.Join(string.Empty, Root, R... | namespace awesome_bot.Giphy
{
public static partial class GiphyEndPoints
{
public class RandomEndPoint
{
private const string RandomPath = "/v1/gifs/random";
public string Build(string searchText, Rating rating = null)
=> string.Join(string.Empty, Root, R... |
Add JsonProperty attribute on each property | namespace Aliencube.ReCaptcha.Wrapper.Mvc.Parameters
{
/// <summary>
/// This represents the parameters entity to render api.js.
/// </summary>
/// <remarks>More details: https://developers.google.com/recaptcha/docs/display#js_param</remarks>
public partial class ResourceParameters
{
///... | using Newtonsoft.Json;
namespace Aliencube.ReCaptcha.Wrapper.Mvc.Parameters
{
/// <summary>
/// This represents the parameters entity to render api.js.
/// </summary>
/// <remarks>More details: https://developers.google.com/recaptcha/docs/display#js_param</remarks>
public partial class ResourcePara... |
Add more supported image extensions | using System;
using System.Collections.Generic;
using System.Windows.Media.Imaging;
namespace DesktopWidgets.Helpers
{
public static class ImageHelper
{
public static readonly List<string> SupportedExtensions = new List<string>
{
".bmp",
".gif",
".ico",
... | using System;
using System.Collections.Generic;
using System.Windows.Media.Imaging;
namespace DesktopWidgets.Helpers
{
public static class ImageHelper
{
// https://msdn.microsoft.com/en-us/library/ee719654(v=VS.85).aspx#wpfc_codecs.
public static readonly List<string> SupportedExtensions = new... |
Include all parameters in visibleRaycast | using UnityEngine;
using System.Collections;
public class PhysicsHelper2D
{
/// <summary>
/// Ignores collision for every single GameObject with a particular tag
/// </summary>
/// <param name="object1"></param>
/// <param name="tag"></param>
/// <param name="ignore"></param>
public static void ignoreCollision... | using UnityEngine;
using System.Collections;
public class PhysicsHelper2D
{
/// <summary>
/// Ignores collision for every single GameObject with a particular tag
/// </summary>
/// <param name="object1"></param>
/// <param name="tag"></param>
/// <param name="ignore"></param>
public static void ignoreCollision... |
Comment test harness unit test with lame check | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="HarnessTests.cs" company="LunchBox corp">
// Copyright 2014 The Lunch-Box mob:
// Ozgur DEVELIOGLU (@Zgurrr)
// Cyrille DUPUYDAUBY (@Cyrdup)
// ... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="HarnessTests.cs" company="LunchBox corp">
// Copyright 2014 The Lunch-Box mob:
// Ozgur DEVELIOGLU (@Zgurrr)
// Cyrille DUPUYDAUBY (@Cyrdup)
// ... |
Resolve full for specified .deployment project file. | using System;
using System.IO;
using Kudu.Core.Infrastructure;
namespace Kudu.Core.Deployment
{
public class DeploymentConfiguration
{
internal const string DeployConfigFile = ".deployment";
private readonly IniFile _iniFile;
private readonly string _path;
public DeploymentCon... | using System;
using System.IO;
using Kudu.Core.Infrastructure;
namespace Kudu.Core.Deployment
{
public class DeploymentConfiguration
{
internal const string DeployConfigFile = ".deployment";
private readonly IniFile _iniFile;
private readonly string _path;
public DeploymentCon... |
Work around bug in FormsAuthMiddleware | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Owin;
namespace JabbR.Middleware
{
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.DataHandler;
using AppFunc = Func<IDictionary<string, object>, Task>;
public class FixCookieHandler
{
... | using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Owin;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.DataHandler;
namespace JabbR.Middleware
{
using AppFunc = Func<IDictionary<string, object>, Task>;
public class FixCookieHandler
... |
Remove an useless namespace usage | using BlackFox.Roslyn.TestDiagnostics.NoNewGuid;
using BlackFox.Roslyn.TestDiagnostics.NoStringEmpty;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NFluent;
using TestDiagnosticsUnitTests.Helpers.DiagnosticTestHelpers;
namespace TestDiagnosticsUnitTests
{
[TestClass]
public class NoNewGuidAnalyzer... | using BlackFox.Roslyn.TestDiagnostics.NoNewGuid;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NFluent;
using TestDiagnosticsUnitTests.Helpers.DiagnosticTestHelpers;
namespace TestDiagnosticsUnitTests
{
[TestClass]
public class NoNewGuidAnalyzerTests
{
[TestMethod]
public void ... |
Add null check for request. | using System.Web;
namespace FeatureSwitcher.DebugConsole.Behaviours
{
public class DebugConsoleBehaviour
{
private readonly bool _isForced = false;
private DebugConsoleBehaviour(bool isForced)
{
this._isForced = isForced;
}
internal static FeatureSwitcher.... | using System.Web;
namespace FeatureSwitcher.DebugConsole.Behaviours
{
public class DebugConsoleBehaviour
{
private readonly bool _isForced = false;
private DebugConsoleBehaviour(bool isForced)
{
this._isForced = isForced;
}
internal static FeatureSwitcher.... |
Update SystemClock test to account for time passing. | // Copyright 2011 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
using NUnit.Framework;
namespace NodaTime.Test
{
public class SystemClockTest
{
[Test]
public void InstanceNow()
... | // Copyright 2011 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
using NUnit.Framework;
namespace NodaTime.Test
{
public class SystemClockTest
{
[Test]
public void InstanceNow()
... |
Make usage of UrlBuilder and fix namespace | using SsrsDeploy;
using SsrsDeploy.ReportingService;
using SsrsDeploy.Execution;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SsrDeploy.Factory
{
class ServiceFactory
{
private readonly ReportingService2010 rs;
p... | using SsrsDeploy;
using SsrsDeploy.ReportingService;
using SsrsDeploy.Execution;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SsrsDeploy.Factory
{
class ServiceFactory
{
private readonly ReportingService2010 rs;
... |
Allow for grouping to null | using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
namespace Verdeler
{
internal class ConcurrencyLimiter<TSubject>
{
private readonly Func<TSubject, object> _subjectReductionMap;
private readonly int _concurrencyLimit;
private re... | using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
namespace Verdeler
{
internal class ConcurrencyLimiter<TSubject>
{
private readonly Func<TSubject, object> _subjectReductionMap;
private readonly int _concurrencyLimit;
private re... |
Add access token to project. | using System.Collections.Generic;
namespace Bibliotheca.Server.Depository.FileSystem.Core.DataTransferObjects
{
public class ProjectDto
{
public ProjectDto()
{
Tags = new List<string>();
VisibleBranches = new List<string>();
EditLinks = new List<EditLinkDto>(... | using System.Collections.Generic;
namespace Bibliotheca.Server.Depository.FileSystem.Core.DataTransferObjects
{
public class ProjectDto
{
public ProjectDto()
{
Tags = new List<string>();
VisibleBranches = new List<string>();
EditLinks = new List<EditLinkDto>(... |
Add sample script when a script is created | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using Duality;
using Duality.Editor;
namespace RockyTV.Duality.Plugins.IronPython.Resources
{
[EditorHintCategory(Properties.ResNames.CategoryScripts)]
[EditorHintImage(Properti... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using Duality;
using Duality.Editor;
namespace RockyTV.Duality.Plugins.IronPython.Resources
{
[EditorHintCategory(Properties.ResNames.CategoryScripts)]
[EditorHintImage(Properti... |
Rename ENVVAR in line with previous one (`OSU_TESTS_NO_TIMEOUT`) | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System;
using NUnit.Framework;
namespace osu.Game.Tests
{
/// <summary>
/// An attribute to mark any flaky tests.
/// Will add a retr... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System;
using NUnit.Framework;
namespace osu.Game.Tests
{
/// <summary>
/// An attribute to mark any flaky tests.
/// Will add a retr... |
Make sure blue alien is visible next time you visit Sprites Room. | using UnityEngine;
using System.Collections;
using Fungus;
public class SpritesRoom : Room
{
public Room menuRoom;
public Animator blueAlienAnim;
public SpriteController blueAlienSprite;
void OnEnter()
{
Say("Pink Alien says to Blue Alien...");
Say("...'Show me your funky moves!'");
SetAnimatorTrigger... | using UnityEngine;
using System.Collections;
using Fungus;
public class SpritesRoom : Room
{
public Room menuRoom;
public Animator blueAlienAnim;
public SpriteController blueAlienSprite;
void OnEnter()
{
ShowSprite(blueAlienSprite);
Say("Pink Alien says to Blue Alien...");
Say("...'Show me your funky ... |
Add a comment explaining why we're using QuadVertexBuffer | // 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.OpenGL.Buffers;
using osu.Framework.Graphics.OpenGL.Textures;
using osu.Framework.Graphics.OpenGL.Vertices;
using osuTK.Graphic... | // 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.OpenGL.Buffers;
using osu.Framework.Graphics.OpenGL.Textures;
using osu.Framework.Graphics.OpenGL.Vertices;
using osuTK.Graphic... |
Bump número de versión a 0.8.4.0 | /*
AssemblyInfo.cs
This file is part of Morgan's CLR Advanced Runtime (MCART)
Author(s):
César Andrés Morgan <xds_xps_ivx@hotmail.com>
Copyright (c) 2011 - 2018 César Andrés Morgan
Morgan's CLR Advanced Runtime (MCART) is free software: you can redistribute it
and/or modify it under the terms of the GNU Gener... | /*
AssemblyInfo.cs
This file is part of Morgan's CLR Advanced Runtime (MCART)
Author(s):
César Andrés Morgan <xds_xps_ivx@hotmail.com>
Copyright (c) 2011 - 2018 César Andrés Morgan
Morgan's CLR Advanced Runtime (MCART) is free software: you can redistribute it
and/or modify it under the terms of the GNU Gener... |
Correct misspelled word in the interface summary | // 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.Framework.Timing
{
/// <summary>
/// A clock which will only update its current time when a frame proces is triggered.
/// Useful for keeping a... | // 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.Framework.Timing
{
/// <summary>
/// A clock which will only update its current time when a frame process is triggered.
/// Useful for keeping ... |
Add new contructors to Index.cs | using System.Xml.Serialization;
namespace Gigobyte.Daterpillar
{
/// <summary>
/// Represents a database indexed column.
/// </summary>
public struct IndexColumn
{
/// <summary>
/// Gets or sets the column's name.
/// </summary>
/// <value>The name.</value>
... | using System.Xml.Serialization;
namespace Gigobyte.Daterpillar
{
/// <summary>
/// Represents a database indexed column.
/// </summary>
public struct IndexColumn
{
/// <summary>
/// Initializes a new instance of the <see cref="IndexColumn"/> struct.
/// </summary>
/... |
Clear comments list on navigation | using CodeHub.Helpers;
using CodeHub.ViewModels;
using Octokit;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;... | using CodeHub.Helpers;
using CodeHub.ViewModels;
using Octokit;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;... |
Use `ScheduleAfterChildren` to better match comment | // 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 Newtonsoft.Json;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Skinning
{
/// <summary>
/// A con... | // 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 Newtonsoft.Json;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Skinning
{
/// <summary>
/// A con... |
Improve performance of puzzle 5 | // Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing the sol... | // Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing the sol... |
Change version number to 0.8.7 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("AngleSharp")]
[assembly: AssemblyDescription("AngleSharp is the ultimate angle brackets parser library. It parses HTML5, MathML, SVG, XML and CSS to construct a DOM based on the official W3C... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("AngleSharp")]
[assembly: AssemblyDescription("AngleSharp is the ultimate angle brackets parser library. It parses HTML5, MathML, SVG, XML and CSS to construct a DOM based on the official W3C... |
Remove comment, null check unnecessary. | using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
namespace Mvc.Mailer {
/// <summary>
/// This class is a utility class for instantiating LinkedResource objects
/// </summary>
public class LinkedResourceProvider : ILinkedResourceProvider {
publ... | using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
namespace Mvc.Mailer {
/// <summary>
/// This class is a utility class for instantiating LinkedResource objects
/// </summary>
public class LinkedResourceProvider : ILinkedResourceProvider {
publ... |
Replace InitOnLoad with MRTK > Utils > WMR > Check Config | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.Utilities.Editor;
using System.IO;
using UnityEditor;
namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality
{
/// <summary>
/// Class to perform checks for configuration checks for the Wind... | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.Utilities.Editor;
using System.IO;
using UnityEditor;
namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality
{
/// <summary>
/// Class to perform checks for configuration checks for the Wind... |
Fix webview reload on rotation | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Webkit;
using Android.Widget;
namespace webscripthook_android
{
[Activity(Label = "GT... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Webkit;
using Android.Widget;
namespace webscripthook_android
{
[Activity(Label = "GT... |
Call Insights.Save when reporting a crash | using System;
using System.Collections.Generic;
using Xamarin;
namespace Espera.Core.Analytics
{
internal class XamarinAnalyticsEndpoint : IAnalyticsEndpoint
{
private Guid id;
public void Dispose()
{
// Xamarin Insights can only be terminated if it has been started before... | using System;
using System.Collections.Generic;
using Xamarin;
namespace Espera.Core.Analytics
{
internal class XamarinAnalyticsEndpoint : IAnalyticsEndpoint
{
private Guid id;
public void Dispose()
{
// Xamarin Insights can only be terminated if it has been started before... |
Create VM in MVVM app template. | using System;
using Avalonia;
using Avalonia.Logging.Serilog;
using $safeprojectname$.ViewModels;
using $safeprojectname$.Views;
namespace $safeprojectname$
{
class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before A... | using System;
using Avalonia;
using Avalonia.Logging.Serilog;
using $safeprojectname$.ViewModels;
using $safeprojectname$.Views;
namespace $safeprojectname$
{
class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before A... |
Exclude compiler generated types by default | namespace TestStack.ConventionTests.ConventionData
{
using System;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// This is where we set what our convention is all about.
/// </summary>
public class Types : IConventionData
{
public Types(str... | namespace TestStack.ConventionTests.ConventionData
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
/// <summary>
/// This is where we set what our convention is all about.
/// </summary>
public class Types : ICon... |
Fix : Null ttl value | using StackExchange.Redis;
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
namespace Redists.Core
{
internal class TimeSeriesWriter : ITimeSeriesWriter
{
private readonly IDatabaseAsync dbAsync;
private TimeSpan? ttl;
private IDataPointParser parser;
... | using StackExchange.Redis;
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
namespace Redists.Core
{
internal class TimeSeriesWriter : ITimeSeriesWriter
{
private readonly IDatabaseAsync dbAsync;
private TimeSpan? ttl;
private IDataPointParser parser;
... |
Revert "Removing the assembly version attribute since appveyor doesn't seem to respect custom version format" | 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: AssemblyTitle("Ut... | 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: AssemblyTitle("Ut... |
Make sure AcrValues is not null | /*
* Copyright 2014 Dominick Baier, Brock Allen
*
* 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 la... | /*
* Copyright 2014 Dominick Baier, Brock Allen
*
* 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 la... |
Update file ver to 3.0.3.0 | using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2018";
public const string... | using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2018";
public const string... |
Change how we find a local port. Connecting to a local port and releasing it is flaky and slow. use network info to find what port is available | using System.Linq;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Security;
namespace HttpMock.Integration.Tests
{
internal static class PortHelper
{
internal static int FindLocalAvailablePortForTesting ()
{
for (var i = 1025; i <= 65000; i++)
{
if (!ConnectTo... | using System;
using System.Linq;
using System.Net.NetworkInformation;
using System.Security;
namespace HttpMock.Integration.Tests
{
internal static class PortHelper
{
internal static int FindLocalAvailablePortForTesting ()
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties(... |
Change sniper rifle projectile explosion sound. | //------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright (C) 2008, mEthLab Interactive
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
... | //------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright (C) 2008, mEthLab Interactive
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
... |
Add compile-time constant to switch to no-op pool | // Copyright 2015 Renaud Paquay All Rights Reserved.
//
// 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... | // Copyright 2015 Renaud Paquay All Rights Reserved.
//
// 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... |
Set M:M relationsheep beetween Users and Roles | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Diploms.Core;
namespace Diploms.DataLayer
{
public class DiplomContext : DbContext
{
public DbSet<Department> Departments { get; set; }
public DbSet<User>... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Diploms.Core;
namespace Diploms.DataLayer
{
public class DiplomContext : DbContext
{
public DbSet<Department> Departments { get; set; }
public DbSet<User>... |
Fix look at speaker to follow Performative/Head | using UnityEngine;
public class LookAtSpeaker : MonoBehaviour {
public bool active = false;
public float speed;
public float jitterFreq;
public float jitterLerp;
public float jitterScale;
public float blankGazeDistance;
public Transform trackedTransform;
public float lerp;
private... | using UnityEngine;
public class LookAtSpeaker : MonoBehaviour {
public bool active = false;
public float speed;
public float jitterFreq;
public float jitterLerp;
public float jitterScale;
public float blankGazeDistance;
public Transform trackedTransform;
public float lerp;
private... |
Fix Linux hanging bug due to USB drive enumeration | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NDesk.DBus;
namespace Palaso.UsbDrive.Linux
{
public class UDisks
{
private readonly IUDisks _udisks;
public UDisks()
{
_udisks = Bus.System.GetObject<IUDisks>("org.freedesktop.UDisks", new ObjectPath("/org/freedes... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NDesk.DBus;
namespace Palaso.UsbDrive.Linux
{
public class UDisks
{
private readonly IUDisks _udisks;
public UDisks()
{
_udisks = Bus.System.GetObject<IUDisks>("org.freedesktop.UDisks", new ObjectPath("/org/freedes... |
Use SelectMany in demo application | using System.Threading.Tasks;
using ToDoList.Automation.Api.ApiActions;
using Tranquire;
namespace ToDoList.Automation.Api
{
public static class Remove
{
public static IAction<Task> ToDoItem(string title) => Get.TheToDoItem(title)
.Selec... | using System.Threading.Tasks;
using ToDoList.Automation.Api.ApiActions;
using Tranquire;
namespace ToDoList.Automation.Api
{
public static class Remove
{
public static IAction<Task> ToDoItem(string title) => Get.TheToDoItem(title)
.Selec... |
Mark this as required since it's nullable now | using System.ComponentModel.DataAnnotations;
namespace Tgstation.Server.Api.Models
{
/// <summary>
/// Parameters for creating a <see cref="TestMerge"/>
/// </summary>
public class TestMergeParameters
{
/// <summary>
/// The number of the pull request
/// </summary>
public int? Number { get; set; }
//... | using System.ComponentModel.DataAnnotations;
namespace Tgstation.Server.Api.Models
{
/// <summary>
/// Parameters for creating a <see cref="TestMerge"/>
/// </summary>
public class TestMergeParameters
{
/// <summary>
/// The number of the pull request
/// </summary>
[Required]
public int? Number { get;... |
Add Tests for all public Api Methods | using BittrexSharp;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Tests.IntegrationTests
{
[TestClass]
public class BittrexTests
{
[TestMethod]
public vo... | using BittrexSharp;
using BittrexSharp.Domain;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Tests.IntegrationTests
{
[TestClass]
public class BittrexTests
{
#re... |
Update test to ensure page is accessible after alert | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
using Toolkit.Utils;
namespace Toolkit
{
[TestClass]
public class AlertHandlerTest
{
FirefoxDriver _driver;
[TestMeth... | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
using Toolkit.Utils;
namespace Toolkit
{
[TestClass]
public class AlertHandlerTest
{
FirefoxDriver _driver;
[TestInitia... |
Update typeforward assemblyqualifiedname for TimeZoneInfoException | // 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.Runtime.Serialization;
namespace System
{
[Serializable]
[System.Runtime.CompilerServices.Type... | // 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.Runtime.Serialization;
namespace System
{
[Serializable]
[System.Runtime.CompilerServices.Type... |
Fix issue that Builder for CatalogRunner is chosen when a builder for DtsRunner should be | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NBi.Core.Etl.IntegrationService
{
class SsisEtlRunnerFactory
{
public IEtlRunner Get(IEtl etl)
{
if (string.IsNullOrEmpty(etl.Server))
return new EtlFileRunne... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NBi.Core.Etl.IntegrationService
{
class SsisEtlRunnerFactory
{
public IEtlRunner Get(IEtl etl)
{
if (string.IsNullOrEmpty(etl.Server))
return new EtlFileRunne... |
Update docs on XR SDK IHolographicFramePtr | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.WindowsMixedReality;
using System;
#if WMR_ENABLED
using UnityEngine.XR.WindowsMR;
#endif // WMR_ENABLED
namespace Microsoft.MixedReality.Toolkit.XRSDK.WindowsMixedReality
{
/// <summary>
/// An i... | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.WindowsMixedReality;
using System;
#if WMR_ENABLED
using UnityEngine.XR.WindowsMR;
#endif // WMR_ENABLED
namespace Microsoft.MixedReality.Toolkit.XRSDK.WindowsMixedReality
{
/// <summary>
/// An i... |
Refactor route url for poiController | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Http;
using AutoMapper;
using GeoChallenger.Services.Interfaces;
using GeoChallenger.Web.Api.Models;
namespace GeoChallenger.Web.Api.Controllers
{
/// <summary>
/// Geo tags controller
/// </summary>
[Ro... | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Http;
using AutoMapper;
using GeoChallenger.Services.Interfaces;
using GeoChallenger.Web.Api.Models;
namespace GeoChallenger.Web.Api.Controllers
{
/// <summary>
/// Point of Interests controller
/// </summar... |
Raise an exception if there is an error from linode |
using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace MCloud.Linode {
internal class LinodeResponse {
public LinodeResponse ()
{
}
public string Action {
get;
set;
}
public JObject [] Data {
get;
... |
using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace MCloud.Linode {
internal class LinodeResponse {
public LinodeResponse ()
{
}
public string Action {
get;
set;
}
public JObject [] Data {
get;
... |
Bump version to 8.2. For Sitecore 8.1. | using System.Reflection;
using System.Runtime.InteropServices;
using System;
[assembly: AssemblyCompany("Connective DX")]
[assembly: AssemblyProduct("Synthesis")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("8.1.1.0")]
[assembly: AssemblyFileVersion("8.1.1.0")]
[assembly: AssemblyInformationalVersion("8.... | using System.Reflection;
using System.Runtime.InteropServices;
using System;
[assembly: AssemblyCompany("Connective DX")]
[assembly: AssemblyProduct("Synthesis")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("8.2.0.0")]
[assembly: AssemblyFileVersion("8.2.0.0")]
[assembly: AssemblyInformationalVersion("8.... |
Set active to null (true) by default | namespace Linterhub.Cli.Strategy
{
using System.IO;
using System.Linq;
using Runtime;
using Engine;
using Engine.Exceptions;
using Linterhub.Engine.Extensions;
public class ActivateStrategy : IStrategy
{
public object Run(RunContext context, LinterEngine engine, LogManager log)
... | namespace Linterhub.Cli.Strategy
{
using System.IO;
using System.Linq;
using Runtime;
using Engine;
using Engine.Exceptions;
using Linterhub.Engine.Extensions;
public class ActivateStrategy : IStrategy
{
public object Run(RunContext context, LinterEngine engine, LogManager log)
... |
Add support for `product` on the Plan Update API | using System.Collections.Generic;
using Newtonsoft.Json;
namespace Stripe
{
public class StripePlanUpdateOptions : StripeBaseOptions, ISupportMetadata
{
[JsonProperty("active")]
public bool? Active { get; set; }
[JsonProperty("metadata")]
public Dictionary<string, string> Meta... | using System.Collections.Generic;
using Newtonsoft.Json;
namespace Stripe
{
public class StripePlanUpdateOptions : StripeBaseOptions, ISupportMetadata
{
[JsonProperty("active")]
public bool? Active { get; set; }
[JsonProperty("metadata")]
public Dictionary<string, string> Meta... |
Kill subprocess if it doesn't exit after the app is closed | using System;
using CefSharp.BrowserSubprocess;
namespace TweetDuck.Browser{
static class Program{
internal const string Version = "1.4.1.0";
private static int Main(string[] args){
SubProcess.EnableHighDPISupport();
const string typePrefix = "--type=";
... | using System;
using System.Diagnostics;
using System.Threading.Tasks;
using CefSharp.BrowserSubprocess;
namespace TweetDuck.Browser{
static class Program{
internal const string Version = "1.4.1.0";
private static int Main(string[] args){
SubProcess.EnableHighDPISupport();
... |
Fix comment about the patch path. | using RimWorld;
using Verse;
namespace PrepareLanding.Defs
{
/// <summary>
/// This class is called from a definition file when clicking the "World" button on the bottom menu bar while playing
/// (see "PrepareLanding/Defs/Misc/MainButtonDefs/MainButtons.xml").
/// </summary>
public class MainBut... | using RimWorld;
using Verse;
namespace PrepareLanding.Defs
{
/// <summary>
/// This class is called from a definition file when clicking the "World" button on the bottom menu bar while playing
/// (see "\PrepareLanding\Patches\MainButtonDef_Patch.xml").
/// </summary>
public class MainButtonWorke... |
Add category service constructor validation | using System.Linq;
using ZobShop.Data.Contracts;
using ZobShop.Factories;
using ZobShop.Models;
using ZobShop.Services.Contracts;
namespace ZobShop.Services
{
public class CategoryService : ICategoryService
{
private readonly IRepository<Category> repository;
private readonly IUnitOfWork unitO... | using System;
using System.Linq;
using ZobShop.Data.Contracts;
using ZobShop.Factories;
using ZobShop.Models;
using ZobShop.Services.Contracts;
namespace ZobShop.Services
{
public class CategoryService : ICategoryService
{
private readonly IRepository<Category> repository;
private readonly IUn... |
Fix typo in succeed command output | using InEngine.Core;
namespace InEngine.Commands
{
/// <summary>
/// Dummy command for testing and sample code.
/// </summary>
public class AlwaysSucceed : AbstractCommand
{
public override void Run()
{
Info("Ths command always succeeds.");
}
}
}
| using InEngine.Core;
namespace InEngine.Commands
{
/// <summary>
/// Dummy command for testing and sample code.
/// </summary>
public class AlwaysSucceed : AbstractCommand
{
public override void Run()
{
Info("This command always succeeds.");
}
}
}
|
Fix integration test due to breaking change in latest Octokit.net release | var octokit = Require<OctokitPack>();
var client = octokit.Create("ScriptCs.Octokit");
var userTask = client.User.Get("alfhenrik");
var user = userTask.Result;
Console.WriteLine(user.Name);
var repoTask = client.Repository.GetAllBranches("alfhenrik", "octokit.net");
var branches = repoTask.Result;
Console.WriteLine(br... | var octokit = Require<OctokitPack>();
var client = octokit.Create("ScriptCs.Octokit");
var userTask = client.User.Get("alfhenrik");
var user = userTask.Result;
Console.WriteLine(user.Name);
var repoTask = client.Repository.Branch.GetAll("alfhenrik", "octokit.net");
var branches = repoTask.Result;
Console.WriteLine(bra... |
Add Target Language, Compiler Interface | using System;
namespace Mocca {
public class MoccaCompiler {
public MoccaCompiler() {
}
}
}
| using System;
using System.Collections.Generic;
using System.Text;
using Mocca.DataType;
namespace Mocca {
public enum TargetLanguage {
Python, // Now available
Java, // NOT available
Javascript, // NOT available
C_sharp, // NOT available
Swift // NOT Available
}
public interface Compiler {
string ... |
Hide already deleted variants if not set | using System;
using System.Collections.Generic;
using System.Linq;
using JoinRpg.DataModel;
namespace JoinRpg.Domain
{
public static class FieldExtensions
{
public static bool HasValueList(this ProjectField field)
{
return field.FieldType == ProjectFieldType.Dropdown || field.FieldType == ProjectFie... | using System;
using System.Collections.Generic;
using System.Linq;
using JoinRpg.DataModel;
namespace JoinRpg.Domain
{
public static class FieldExtensions
{
public static bool HasValueList(this ProjectField field)
{
return field.FieldType == ProjectFieldType.Dropdown || field.FieldType == ProjectFie... |
Use getter only auto property for player resources. |
namespace SettlersOfCatan.Mutable
{
public class Player
{
public Resources Hand { get; private set; }
public Player()
{
Hand = new Resources();
}
public void Trade(Player other, Resources give, Resources take)
{
Hand.RequireAtLeast(give... |
namespace SettlersOfCatan.Mutable
{
public class Player
{
public Resources Hand { get; }
public Player()
{
Hand = new Resources();
}
public void Trade(Player other, Resources give, Resources take)
{
Hand.RequireAtLeast(give);
... |
Use default routes from package. | using System.Data.Services;
using System.ServiceModel.Activation;
using System.Web.Routing;
using NuGet.Server;
using NuGet.Server.DataServices;
using NuGet.Server.Publishing;
using RouteMagic;
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(MyGet.NuGetRoutes), "Start")]
namespace MyGet
{
public static... | using System.Data.Services;
using System.ServiceModel.Activation;
using System.Web.Routing;
using NuGet.Server;
using NuGet.Server.DataServices;
using NuGet.Server.Publishing;
using RouteMagic;
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(MyGet.NuGetRoutes), "Start")]
namespace MyGet {
public static... |
Fix regression in Script serialization | using System;
namespace VGPrompter {
public class Logger {
public bool Enabled { get; set; }
public string Name { get; private set; }
Action<object> _logger;
public Logger(bool enabled = true) : this("Default", enabled: enabled) { }
public Logger(string name, Action<obj... | using System;
namespace VGPrompter {
[Serializable]
public class Logger {
public bool Enabled { get; set; }
public string Name { get; private set; }
Action<object> _logger;
public Logger(bool enabled = true) : this("Default", enabled: enabled) { }
public Logger(stri... |
Fix error in hash key selector would return -1 | using System;
using System.Collections.Concurrent;
using System.Linq;
using KafkaNet.Model;
using KafkaNet.Protocol;
namespace KafkaNet
{
public class DefaultPartitionSelector : IPartitionSelector
{
private readonly ConcurrentDictionary<string, Partition> _roundRobinTracker = new ConcurrentDictionary<... | using System;
using System.Collections.Concurrent;
using System.Linq;
using KafkaNet.Model;
using KafkaNet.Protocol;
namespace KafkaNet
{
public class DefaultPartitionSelector : IPartitionSelector
{
private readonly ConcurrentDictionary<string, Partition> _roundRobinTracker = new ConcurrentDictionary<... |
Include manager leave request functions and update to version 1.1.0.15-rc2 | using KeyPay.DomainModels.V2.Business;
using KeyPay.DomainModels.V2.Manager;
using System.Collections.Generic;
namespace KeyPay.ApiFunctions.V2
{
public class ManagerFunction : BaseFunction
{
public ManagerFunction(ApiRequestExecutor api) : base(api)
{
LeaveRequests = new ManagerLea... | using KeyPay.DomainModels.V2.Business;
using KeyPay.DomainModels.V2.Manager;
using System.Collections.Generic;
namespace KeyPay.ApiFunctions.V2
{
public class ManagerFunction : BaseFunction
{
public ManagerFunction(ApiRequestExecutor api) : base(api)
{
LeaveRequests = new ManagerLea... |
Update prefabs resources.load flow, fix dual load. | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabsPool : GameObjectBehavior {
public Dictionary<string, GameObject> prefabs;
// Only one ObjectPoolManager can exist. We use a singleton pattern to enforce this.
private static PrefabsPo... | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabsPool : GameObjectBehavior {
public Dictionary<string, GameObject> prefabs;
// Only one ObjectPoolManager can exist. We use a singleton pattern to enforce this.
private static PrefabsPo... |
Change default behaviour to listen on all IP addresses | using System;
using System.Net;
using BmpListener.Bmp;
using BmpListener.JSON;
using Newtonsoft.Json;
namespace BmpListener
{
internal class Program
{
private static void Main()
{
JsonConvert.DefaultSettings = () =>
{
var settings = new JsonSerializerSet... | using System;
using System.Net;
using BmpListener.Bmp;
using BmpListener.JSON;
using Newtonsoft.Json;
namespace BmpListener
{
internal class Program
{
private static void Main()
{
JsonConvert.DefaultSettings = () =>
{
var settings = new JsonSerializerSet... |
Fix "Random Skin" text not showing up correctly | // 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 Realms;
#nullable enable
namespace osu.Game.Database
{
/// <summary>
/// Provides a method of working with unmanaged realm objects.
/// ... | // 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 Realms;
#nullable enable
namespace osu.Game.Database
{
/// <summary>
/// Provides a method of working with unmanaged realm objects.
/// ... |
Change CTRL to Ctrl in commands description. | using System;
namespace GitIStage
{
internal sealed class ConsoleCommand
{
private readonly Action _handler;
private readonly ConsoleKey _key;
public readonly string Description;
private readonly ConsoleModifiers _modifiers;
public ConsoleCommand(Action handler, Console... | using System;
namespace GitIStage
{
internal sealed class ConsoleCommand
{
private readonly Action _handler;
private readonly ConsoleKey _key;
public readonly string Description;
private readonly ConsoleModifiers _modifiers;
public ConsoleCommand(Action handler, Console... |
Change default backup service plan enum value. | namespace DD.CBU.Compute.Api.Contracts.Backup
{
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://oec.api.opsource.net/schemas/backup")]
public enum ServicePlan {
... | namespace DD.CBU.Compute.Api.Contracts.Backup
{
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://oec.api.opsource.net/schemas/backup")]
public enum ServicePlan {
... |
Add SessionStateTests to AssemblyLoadContext collection | using Xunit;
using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Internal;
using System.Management.Automation.Internal.Host;
using System.Management.Autom... | using Xunit;
using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Internal;
using System.Management.Automation.Internal.Host;
using System.Management.Autom... |
Send Ack emails even if the system is in Simulation Mode. | using System.Text;
using log4net;
using Mail2Bug.Email.EWS;
namespace Mail2Bug.Email
{
class AckEmailHandler
{
private readonly Config.InstanceConfig _config;
public AckEmailHandler(Config.InstanceConfig config)
{
_config = config;
}
/// <summary>
... | using System.Text;
using log4net;
using Mail2Bug.Email.EWS;
namespace Mail2Bug.Email
{
class AckEmailHandler
{
private readonly Config.InstanceConfig _config;
public AckEmailHandler(Config.InstanceConfig config)
{
_config = config;
}
/// <summary>
... |
Add support for invites without attached users | using System;
using Model = Discord.API.InviteMetadata;
namespace Discord.Rest
{
public class RestInviteMetadata : RestInvite, IInviteMetadata
{
private long _createdAtTicks;
public bool IsRevoked { get; private set; }
public bool IsTemporary { get; private set; }
public int? ... | using System;
using Model = Discord.API.InviteMetadata;
namespace Discord.Rest
{
public class RestInviteMetadata : RestInvite, IInviteMetadata
{
private long _createdAtTicks;
public bool IsRevoked { get; private set; }
public bool IsTemporary { get; private set; }
public int? ... |
Update exception handling for physical file manifest reader | using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Webpack.AspNetCore.Internal;
namespace Webpack.AspNetCore.Static
{
internal class PhysicalFileManifestReader : IManifestReader
{
private readonly WebpackContext context;
public Physic... | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Webpack.AspNetCore.Internal;
namespace Webpack.AspNetCore.Static
{
internal class PhysicalFileManifestReader : IManifestReader
{
private readonly WebpackContext context;
... |
Add debug log for latency on server | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class TableNetworking : NetworkBehaviour
{
[SyncVar]
public string variant;
[SyncVar]
public string table;
[SyncVar]
public bool selected;
[ServerCallback]
void Start ()
{
selected = fal... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class TableNetworking : NetworkBehaviour
{
[SyncVar]
public string variant;
[SyncVar]
public string table;
[SyncVar]
public bool selected;
public float logPingFrequency = 5.0f;
[ServerCallb... |
Remove conditional Oracle connection builder compilation | #if NETFRAMEWORK
using System;
using Oracle.ManagedDataAccess.Client;
public static class OracleConnectionBuilder
{
public static OracleConnection Build()
{
return Build(false);
}
public static OracleConnection Build(bool disableMetadataPooling)
{
var connection = Environment.GetEn... | using System;
using Oracle.ManagedDataAccess.Client;
public static class OracleConnectionBuilder
{
public static OracleConnection Build()
{
return Build(false);
}
public static OracleConnection Build(bool disableMetadataPooling)
{
var connection = Environment.GetEnvironmentVariable... |
Remove ifdef for net45 in sample |
#if NET45
using Microsoft.AspNet.Abstractions;
using Microsoft.AspNet.DependencyInjection;
using Microsoft.AspNet.DependencyInjection.Fallback;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Routing;
namespace MvcSample.Web
{
public class Startup
{
public void Configuration(IBuilder builder)
... | using Microsoft.AspNet.Abstractions;
using Microsoft.AspNet.DependencyInjection;
using Microsoft.AspNet.DependencyInjection.Fallback;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Routing;
namespace MvcSample.Web
{
public class Startup
{
public void Configuration(IBuilder builder)
{
... |
Add basic test for pushups and run | using BatteryCommander.Web.Models.Data;
using System;
using Xunit;
namespace BatteryCommander.Tests
{
public class ACFTTests
{
[Theory]
[InlineData(15, 54, 84)]
public void Calculate_Run_Score(int minutes, int seconds, int expected)
{
Assert.Equal(expected, ACFTScor... | using BatteryCommander.Web.Models.Data;
using System;
using Xunit;
namespace BatteryCommander.Tests
{
public class ACFTTests
{
[Theory]
[InlineData(15, 54, 84)]
[InlineData(13, 29, 100)]
[InlineData(23, 01, 0)]
[InlineData(19, 05, 64)]
[InlineData(17, 42, 72)]
... |
Make sure BodyText can take a large string. | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using FluentNHibernate.Mapping;
using UCDArch.Core.DomainModel;
namespace Commencement.Core.Domain
{
public class Template : DomainObject
{
public Template(string bodyText, TemplateType templateType, Ceremony cerem... | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using FluentNHibernate.Mapping;
using UCDArch.Core.DomainModel;
namespace Commencement.Core.Domain
{
public class Template : DomainObject
{
public Template(string bodyText, TemplateType templateType, Ceremony cerem... |
Update tests to match new equality not including online ID checks | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Game.Beatmaps;
namespace osu.Game.Tests.NonVisual
{
[TestFixture]
public class BeatmapSetInfoEqualityTest
{
[Test]
... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Extensions;
namespace osu.Game.Tests.NonVisual
{
[TestFixture]
public class BeatmapSetInfoEquality... |
Throw exception for crazy input | using System.IO;
using System.Runtime.CompilerServices;
using Assent;
namespace ExpressionToCodeTest
{
static class ApprovalTest
{
public static void Verify(string text, [CallerFilePath] string filepath = null, [CallerMemberName] string membername = null)
{
var filename = ... | using System.IO;
using System.Runtime.CompilerServices;
using Assent;
namespace ExpressionToCodeTest
{
static class ApprovalTest
{
public static void Verify(string text, [CallerFilePath] string filepath = null, [CallerMemberName] string membername = null)
{
var filename = ... |
Fix name on test console write out | using System;
using System.Linq;
using NUnit.Framework;
namespace Faker.Tests
{
[TestFixture]
public class RandomNumberFixture
{
[TestCase(1, "Coin flip")] // 0 ... 1 Coin flip
[TestCase(6, "6 sided die")] // 0 .. 6
[TestCase(9, "Random single digit")] // 0 ... 9
[TestCase(... | using System;
using System.Linq;
using NUnit.Framework;
namespace Faker.Tests
{
[TestFixture]
public class RandomNumberFixture
{
[TestCase(1, "Coin flip")] // 0 ... 1 Coin flip
[TestCase(6, "6 sided die")] // 0 .. 6
[TestCase(9, "Random single digit")] // 0 ... 9
[TestCase(... |
Make settings object bit cleaner | using System;
namespace Rooijakkers.MeditationTimer.Data
{
/// <summary>
/// Stores settings data in local settings storage
/// </summary>
public class Settings
{
private const string TIME_TO_GET_READY_IN_SECONDS_STORAGE = "TimeToGetReadyStorage";
public TimeSpan TimeToGetReady
... | using System;
namespace Rooijakkers.MeditationTimer.Data
{
/// <summary>
/// Stores settings data in local settings storage
/// </summary>
public class Settings
{
private const string TIME_TO_GET_READY_IN_SECONDS_STORAGE = "TimeToGetReadyStorage";
public TimeSpan TimeToGetReady
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.