Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add cropping options into Generate-Tilemap directly. | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace PixelPet.Commands {
internal class GenerateTilemapCmd : CliCommand {
public GenerateTilemapCmd()
: base("Generate-Tilemap", ne... | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace PixelPet.Commands {
internal class GenerateTilemapCmd : CliCommand {
public GenerateTilemapCmd()
: base("Generate-Tilemap",
... |
Add ability to set text halo color. | using System.Drawing;
namespace TileSharp.Symbolizers
{
/// <summary>
/// https://github.com/mapnik/mapnik/wiki/TextSymbolizer
/// </summary>
public class TextSymbolizer : Symbolizer
{
public readonly string LabelAttribute;
public readonly PlacementType Placement;
public readonly ContentAlignment Alignment... | using System.Drawing;
namespace TileSharp.Symbolizers
{
/// <summary>
/// https://github.com/mapnik/mapnik/wiki/TextSymbolizer
/// </summary>
public class TextSymbolizer : Symbolizer
{
public readonly string LabelAttribute;
public readonly PlacementType Placement;
public readonly ContentAlignment Alignment... |
Fix an animation bug with Mice to Snuffboxes | using System.Collections.Generic;
using HarryPotterUnity.Cards.Generic;
using JetBrains.Annotations;
namespace HarryPotterUnity.Cards.Spells.Transfigurations
{
[UsedImplicitly]
public class MiceToSnuffboxes : GenericSpell {
public override List<GenericCard> GetValidTargets()
{
var ... | using System.Collections.Generic;
using HarryPotterUnity.Cards.Generic;
using JetBrains.Annotations;
namespace HarryPotterUnity.Cards.Spells.Transfigurations
{
[UsedImplicitly]
public class MiceToSnuffboxes : GenericSpell {
public override List<GenericCard> GetValidTargets()
{
var ... |
Save feature added for testing. | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using ProjectMarkdown.Annotations;
namespace ProjectMarkdown.ViewModels
{
public class MainWindowViewModel :... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Input;
using ProjectMarkdown.Annotations;
... |
Make sure the decimal field value converter can handle double values when converting | using System;
using System.Globalization;
using Umbraco.Core.Models.PublishedContent;
namespace Umbraco.Core.PropertyEditors.ValueConverters
{
[DefaultPropertyValueConverter]
public class DecimalValueConverter : PropertyValueConverterBase
{
public override bool IsConverter(PublishedPropertyType pr... | using System;
using System.Globalization;
using Umbraco.Core.Models.PublishedContent;
namespace Umbraco.Core.PropertyEditors.ValueConverters
{
[DefaultPropertyValueConverter]
public class DecimalValueConverter : PropertyValueConverterBase
{
public override bool IsConverter(PublishedPropertyType pr... |
Make key entry case insensitive | using System;
using System.IO;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
var game = new Game("HANG THE MAN");
while (true) {
string titleText = File.ReadAllText("title.txt");
Cell[] title = {
new Cell(titleText, Cell.CentreAlign)
... | using System;
using System.IO;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
var game = new Game("HANG THE MAN");
while (true) {
string titleText = File.ReadAllText("title.txt");
Cell[] title = {
new Cell(titleText, Cell.CentreAlign)
... |
Add a catch all route | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace CatchAllRule
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace CatchAllRule
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*... |
Rename service collection extensions to be correct | using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using System;
namespace Glimpse
{
public static class GlimpseServiceCollectionExtensions
{
public static IServiceCollection AddMvc(this IServiceCollection services)
{
return services.Add(Gl... | using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using System;
namespace Glimpse
{
public static class GlimpseServiceCollectionExtensions
{
public static IServiceCollection AddGlimpse(this IServiceCollection services)
{
return services.Ad... |
Fix element3d presenter binding issue. | using HelixToolkit.Wpf.SharpDX.Model.Scene;
using HelixToolkit.Wpf.SharpDX.Render;
using SharpDX;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Markup;
namespace HelixToolkit.Wpf.SharpDX
{
[ContentProperty("Content")]
public class Element3DPresenter : Element3D
{
///... | using HelixToolkit.Wpf.SharpDX.Model.Scene;
using HelixToolkit.Wpf.SharpDX.Render;
using SharpDX;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Markup;
namespace HelixToolkit.Wpf.SharpDX
{
[ContentProperty("Content")]
public class Element3DPresenter : Element3D
{
///... |
Fix up the test to return correct type | using System;
using System.Threading.Tasks;
using NSubstitute;
using Octokit.Tests.Helpers;
using Xunit;
namespace Octokit.Tests.Clients
{
/// <summary>
/// Client tests mostly just need to make sure they call the IApiConnection with the correct
/// relative Uri. No need to fake up the response. All *tho... | using System;
using System.Threading.Tasks;
using NSubstitute;
using Octokit.Tests.Helpers;
using Xunit;
namespace Octokit.Tests.Clients
{
/// <summary>
/// Client tests mostly just need to make sure they call the IApiConnection with the correct
/// relative Uri. No need to fake up the response. All *tho... |
Replace age with date of birth | using System.Collections.Generic;
using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
public string Middle... | using System;
using System.Collections.Generic;
using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
public... |
Use default getters and setters | // Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Core2D.Shapes.Interfaces;
namespace Core2D.UnitTests
{
public class TestPointShape : TestBaseShape, IPointShape
{
public double X { get => t... | // Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Core2D.Shapes.Interfaces;
namespace Core2D.UnitTests
{
public class TestPointShape : TestBaseShape, IPointShape
{
public double X { get; set... |
Fix path separator on Linux | // 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.IO;
using System.Runtime.InteropServices;
using Microsoft.NET.TestFramework;
using Microsoft.NET.TestFramework.Assertions;
using Mic... | // 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.IO;
using System.Runtime.InteropServices;
using Microsoft.NET.TestFramework;
using Microsoft.NET.TestFramework.Assertions;
using Mic... |
Update starting solution with correct namespaces. | @using Tracker
@using Tracker.Models
@using Tracker.ViewModels.Account
@using Tracker.ViewModels.Manage
@using Microsoft.AspNet.Identity
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
| @using ShatteredTemple.LegoDimensions.Tracker
@using ShatteredTemple.LegoDimensions.Tracker.Models
@using ShatteredTemple.LegoDimensions.Tracker.ViewModels.Account
@using ShatteredTemple.LegoDimensions.Tracker.ViewModels.Manage
@using Microsoft.AspNet.Identity
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
Update assembly version per feedback | //
// Copyright (c) Microsoft. 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 by applicable la... | //
// Copyright (c) Microsoft. 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 by applicable la... |
Fix event factory parsing of documents | using StockportWebapp.Models;
using StockportWebapp.Parsers;
using StockportWebapp.Utils;
namespace StockportWebapp.ContentFactory
{
public class EventFactory
{
private readonly ISimpleTagParserContainer _simpleTagParserContainer;
private readonly MarkdownWrapper _markdownWrapper;
priv... | using StockportWebapp.Models;
using StockportWebapp.Parsers;
using StockportWebapp.Utils;
namespace StockportWebapp.ContentFactory
{
public class EventFactory
{
private readonly ISimpleTagParserContainer _simpleTagParserContainer;
private readonly MarkdownWrapper _markdownWrapper;
priv... |
Use non-guest user ID for non-guest user | // 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.Bindables;
using osu.Game.Users;
namespace osu.Game.Online.API
{
public class DummyAPIAccess : IAPIProvider
{
public Bindable<User> ... | // 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.Bindables;
using osu.Game.Users;
namespace osu.Game.Online.API
{
public class DummyAPIAccess : IAPIProvider
{
public Bindable<User> ... |
Add overload SerializeToXml with object type | using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using JetBrains.Annotations;
namespace Diadoc.Api
{
public static class XmlSerializerExtensions
{
public static byte[] SerializeToXml<T>(this T @object)
{
var serializer = new XmlSerializer(typeof(T));
... | using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using JetBrains.Annotations;
namespace Diadoc.Api
{
public static class XmlSerializerExtensions
{
public static byte[] SerializeToXml<T>(this T @object)
{
var serializer = new XmlSerializer(typeof(T));
... |
Add assembly attribute to get rid of warnings | using System.Reflection;
[assembly: AssemblyTitle("GraphQL")]
[assembly: AssemblyProduct("GraphQL")]
[assembly: AssemblyDescription("GraphQL for .NET")]
[assembly: AssemblyCopyright("Copyright 2015-2016 Joseph T. McBride, et al. All rights reserved.")]
[assembly: AssemblyVersion("0.8.2.0")]
[assembly: AssemblyFileVer... | using System;
using System.Reflection;
[assembly: AssemblyTitle("GraphQL")]
[assembly: AssemblyProduct("GraphQL")]
[assembly: AssemblyDescription("GraphQL for .NET")]
[assembly: AssemblyCopyright("Copyright 2015-2016 Joseph T. McBride, et al. All rights reserved.")]
[assembly: AssemblyVersion("0.8.2.0")]
[assembly: A... |
Add deploy experiment function to left-click on button | using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using BetterNotes.NoteClasses;
namespace BetterNotes.NoteUIObjects
{
public class NoteExpButton : NoteUIObjectBase
{
private NotesExperiment expObject;
private bool highlight;
private void Start()
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using BetterNotes.NoteClasses;
namespace BetterNotes.NoteUIObjects
{
public class NoteExpButton : NoteUIObjectBase
{
private NotesExperiment expObject;
private bool highlight;
private void Start()
{
... |
Remove apostrophe in parse error description | using System.Collections.Generic;
namespace Esprima
{
public class ErrorHandler : IErrorHandler
{
public IList<ParserException> Errors { get; }
public bool Tolerant { get; set; }
public string Source { get; set; }
public ErrorHandler()
{
Errors = new List<... | using System.Collections.Generic;
namespace Esprima
{
public class ErrorHandler : IErrorHandler
{
public IList<ParserException> Errors { get; }
public bool Tolerant { get; set; }
public string Source { get; set; }
public ErrorHandler()
{
Errors = new List<... |
Add helper WebRequest extensions, useful when playing with REST-ful APIs | using System.IO;
using System.Net;
namespace ServiceStack.Text
{
public static class WebRequestExtensions
{
public static string GetJsonFromUrl(this string url)
{
return url.GetStringFromUrl("application/json");
}
public static string GetStringFromUrl(this string u... | using System;
using System.IO;
using System.Net;
namespace ServiceStack.Text
{
public static class WebRequestExtensions
{
public static string GetJsonFromUrl(this string url)
{
return url.GetStringFromUrl("application/json");
}
public static string GetStringFromUrl... |
Read sound until the end of file correctly | using System;
using System.IO;
using System.Text;
namespace ValveResourceFormat.ResourceTypes
{
public class Sound : Blocks.ResourceData
{
private BinaryReader Reader;
private long DataOffset;
private NTRO NTROBlock;
public override void Read(BinaryReader reader, Resource reso... | using System;
using System.IO;
using System.Text;
namespace ValveResourceFormat.ResourceTypes
{
public class Sound : Blocks.ResourceData
{
private BinaryReader Reader;
private NTRO NTROBlock;
public override void Read(BinaryReader reader, Resource resource)
{
Reade... |
Revert "Fix error when launching missing files" | #region
using System.Diagnostics;
using System.IO;
using DesktopWidgets.Classes;
#endregion
namespace DesktopWidgets.Helpers
{
internal static class ProcessHelper
{
public static void Launch(string path, string args = "", string startIn = "",
ProcessWindowStyle style = ProcessWindowStyle... | #region
using System.Diagnostics;
using System.IO;
using DesktopWidgets.Classes;
#endregion
namespace DesktopWidgets.Helpers
{
internal static class ProcessHelper
{
public static void Launch(string path, string args = "", string startIn = "",
ProcessWindowStyle style = ProcessWindowStyle... |
Add a `lib` prefix to the DllImport so it works with mono | using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Dbus
{
public partial class Connection
{
private static async Task authenticate(Stream stream)
{
using (var writer = new StreamWriter(stream, Encoding.ASC... | using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Dbus
{
public partial class Connection
{
private static async Task authenticate(Stream stream)
{
using (var writer = new StreamWriter(stream, Encoding.ASC... |
Use properties in example code | // Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System;
using System.Collections.Generic;
using NDesk.DBus;
using org.freedesktop.DBus;
public class ManagedDBusTestObjects
{
public static void Main ()
{
Bus bus = Bus.Session;
... | // Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System;
using System.Collections.Generic;
using NDesk.DBus;
using org.freedesktop.DBus;
public class ManagedDBusTestObjects
{
public static void Main ()
{
Bus bus = Bus.Session;
... |
Correct year when development started. | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Sandra")]
[assembly: AssemblyDescription("Hosted on https://github.com/PenguinF/sandra-three")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Sandra")]
[assembly: AssemblyCopyri... | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Sandra")]
[assembly: AssemblyDescription("Hosted on https://github.com/PenguinF/sandra-three")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Sandra")]
[assembly: AssemblyCopyri... |
Fix radius calculation and lower sigma. | using System;
namespace Mpdn.CustomLinearScaler
{
namespace Example
{
public class Gaussian : ICustomLinearScaler
{
public Guid Guid
{
get { return new Guid("647351FF-7FEC-4EAB-86C7-CE1BEF43EFD4"); }
}
public string ... | using System;
namespace Mpdn.CustomLinearScaler
{
namespace Example
{
public class Gaussian : ICustomLinearScaler
{
public Guid Guid
{
get { return new Guid("647351FF-7FEC-4EAB-86C7-CE1BEF43EFD4"); }
}
public string ... |
Store messages in list to future filter; Clear method; | using UnityEngine;
using UnityEngine.UI;
using System.Collections;
namespace UDBase.Components.Log {
public class Log_Visual_Behaviour : MonoBehaviour {
public Text Text;
public void Init() {
Text.text = "";
}
public void AddMessage(string msg) {
Text.text += msg + "\n";
}
}
}
| using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
namespace UDBase.Components.Log {
public class Log_Visual_Behaviour : MonoBehaviour {
public Text Text;
List<string> _messages = new List<string>();
public void Init() {
Clear();
}
public void Clear()... |
Remove hack to load correct version of Splat. | using System;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
[SetUpFixture]
public class SplatModeDetectorSetUp
{
static SplatModeDetectorSetUp()
{
// HACK: Force .NET 4.5 version of Splat to load when executing inside NCrunch
var ncrunchAsms = Environment.GetEnvironmentVar... | using System;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
[SetUpFixture]
public class SplatModeDetectorSetUp
{
[OneTimeSetUp]
public void RunBeforeAnyTests()
{
Splat.ModeDetector.Current.SetInUnitTestRunner(true);
}
} |
Clean up how IHttpContextAccessor is added | using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.NodeServices;
using Microsoft.AspNetCore.SpaServices.Prerendering;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Microsoft.Extensions.DependencyInjection
{
/// <sum... | using Microsoft.AspNetCore.SpaServices.Prerendering;
namespace Microsoft.Extensions.DependencyInjection
{
/// <summary>
/// Extension methods for setting up prerendering features in an <see cref="IServiceCollection" />.
/// </summary>
public static class PrerenderingServiceCollectionExtensions
{
... |
Update copyright year to 2018 | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("WpfAboutView")]
[assembly: AssemblyDescription("Simple About control with app name, icon, version, and credits")]
[assembly: AssemblyCompany("Daniel Chalmers")]
[assembly: AssemblyProduct("WpfAboutView")]
[assembly: AssemblyCopyr... | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("WpfAboutView")]
[assembly: AssemblyDescription("Simple About control with app name, icon, version, and credits")]
[assembly: AssemblyCompany("Daniel Chalmers")]
[assembly: AssemblyProduct("WpfAboutView")]
[assembly: AssemblyCopyr... |
Add autosize coverage to spinning boxes benchmark | // 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 BenchmarkDotNet.Attributes;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osuTK.Graphics;
namespace osu.Framework... | // 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 BenchmarkDotNet.Attributes;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using... |
Use new logo name for showcase screen | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.... |
Remove unsupported column attribute convention with no sql connection. | using EntityCore.DynamicEntity;
using EntityCore.Utils;
using System.Configuration;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
namespace EntityCore
{
public static class Context
{
public static DynamicEntityContext New(string nameOrConnectionString)
... | using EntityCore.DynamicEntity;
using EntityCore.Utils;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Data.SqlClient;
using System.Linq;
namespace EntityCore
{
public static class Context
{
... |
Support more polygon trigger types | using System.IO;
using OpenZH.Data.Utilities.Extensions;
namespace OpenZH.Data.Map
{
public sealed class PolygonTrigger
{
public string Name { get; private set; }
public string LayerName { get; private set; }
public uint UniqueId { get; private set; }
public PolygonTriggerType ... | using System;
using System.IO;
using OpenZH.Data.Utilities.Extensions;
namespace OpenZH.Data.Map
{
public sealed class PolygonTrigger
{
public string Name { get; private set; }
public string LayerName { get; private set; }
public uint UniqueId { get; private set; }
public Polyg... |
Add tests for the status flags set by iny. | using NUnit.Framework;
using Mos6510.Instructions;
namespace Mos6510.Tests.Instructions
{
[TestFixture]
public class InyTests
{
[Test]
public void IncrementsTheValueInRegisterY()
{
const int initialValue = 42;
var model = new ProgrammingModel();
model.GetRegister(RegisterName.Y).Se... | using NUnit.Framework;
using Mos6510.Instructions;
namespace Mos6510.Tests.Instructions
{
[TestFixture]
public class InyTests
{
[Test]
public void IncrementsTheValueInRegisterY()
{
const int initialValue = 42;
var model = new ProgrammingModel();
model.GetRegister(RegisterName.Y).Se... |
Rename document to shard in item edges | // 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.
namespace Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.Graph
{
/// <summary>
/// Represents a... | // 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.
namespace Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.Graph
{
/// <summary>
/// Represents a... |
Make point factory method internal. | // ReSharper disable InconsistentNaming
#pragma warning disable
namespace Gu.Wpf.UiAutomation.WindowsAPI
{
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
[DebuggerDisplay("({X}, {Y})")]
[StructLayout(LayoutKind.Sequential)]
public struct ... | // ReSharper disable InconsistentNaming
#pragma warning disable
namespace Gu.Wpf.UiAutomation.WindowsAPI
{
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
[DebuggerDisplay("({X}, {Y})")]
[StructLayout(LayoutKind.Sequential)]
public struct ... |
Add OUTPUT chain to raw, remove POSTROUTING | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IPTables.Net.Exceptions;
namespace IPTables.Net.Iptables
{
/// <summary>
/// Data to define the default IPTables tables and chains
/// </summary>
internal class IPTablesTables
{
static internal Dict... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IPTables.Net.Exceptions;
namespace IPTables.Net.Iptables
{
/// <summary>
/// Data to define the default IPTables tables and chains
/// </summary>
internal class IPTablesTables
{
static internal Dict... |
Remove redundant line from mod usage | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Mods
{
/// <summary>
/// The usage of this mod to determine whether it's playable in such context.
/// </summary>
public enum ... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Mods
{
/// <summary>
/// The usage of this mod to determine whether it's playable in such context.
/// </summary>
public enum ... |
Save as consistent filename to make other scripting easier. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
namespace MatterHackers.MatterControl.Testing
{
public class TestingDispatch
{
string errorLogFileName = null;
public TestingDispatch()
{
errorLo... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
namespace MatterHackers.MatterControl.Testing
{
public class TestingDispatch
{
string errorLogFileName = null;
public TestingDispatch()
{
errorLo... |
Use double instead of float | using System;
namespace UnhelpfulDebugger
{
class Program
{
static void Main()
{
string awkward1 = "Foo\\Bar";
string awkward2 = "FindElement";
float awkward3 = 4.9999995f;
Console.WriteLine(awkward1);
PrintString(awkward1);
... | using System;
namespace UnhelpfulDebugger
{
class Program
{
static void Main()
{
string awkward1 = "Foo\\Bar";
string awkward2 = "FindElement";
double awkward3 = 4.9999999999999995d;
Console.WriteLine(awkward1);
PrintString(awkward... |
Use empty accessor for unimplemented events. | // 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 Foundation;
using osu.Framework.Input;
namespace osu.Framework.iOS.Input
{
public class IOSTextInput : ITextInputSource
{
private re... | // 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 Foundation;
using osu.Framework.Input;
namespace osu.Framework.iOS.Input
{
public class IOSTextInput : ITextInputSource
{
private re... |
Convert vertical scroll to horizontal when shift is held | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Input.StateChanges.Events;
using osu.Framework.Input.States;
using osuTK;
namespace osu.Framework.Input.StateChanges
{
/// <summary>
/// Den... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Input.StateChanges.Events;
using osu.Framework.Input.States;
using osuTK;
namespace osu.Framework.Input.StateChanges
{
/// <summary>
/// Den... |
Hide or show button in sample application |
@{
ViewBag.Title = "Employees Overview";
}
<h2>Employees Overview</h2>
You can only see this page if you have the <strong>employee_read</strong> permissions.
| @using System.Security.Claims
@{
ViewBag.Title = "Employees Overview";
}
<h2>Employees Overview</h2>
You can only see this page if you have the <strong>employee_read</strong> permissions.
<br/>
<br/>
@if (ClaimsPrincipal.Current.HasClaim(ClaimTypes.Role, "employee_create"))
{
<a href="@Url.Action("Create"... |
Save settings.txt to same folder as the assembly | using System.Collections.Generic;
using System.Drawing;
using System.IO;
using ValveKeyValue;
namespace GUI.Utils
{
internal static class Settings
{
public class AppConfig
{
public List<string> GameSearchPaths { get; set; } = new List<string>();
public string Background... | using System.Collections.Generic;
using System.Drawing;
using System.IO;
using ValveKeyValue;
namespace GUI.Utils
{
internal static class Settings
{
public class AppConfig
{
public List<string> GameSearchPaths { get; set; } = new List<string>();
public string Background... |
Fix logic in home index to go to a slug if provided | using System;
using System.Linq;
using downr.Services;
using Microsoft.AspNetCore.Mvc;
namespace downr.Controllers
{
public class HomeController : Controller
{
IYamlIndexer _indexer;
public HomeController(IYamlIndexer indexer)
{
_indexer = indexer;
}
[Route... | using System;
using System.Linq;
using downr.Services;
using Microsoft.AspNetCore.Mvc;
namespace downr.Controllers
{
public class HomeController : Controller
{
IYamlIndexer _indexer;
public HomeController(IYamlIndexer indexer)
{
_indexer = indexer;
}
[Route... |
Change GC Handicapping sticky note | <div class="sticky-notes">
<div class="sticky-note">
<i class="pin"></i>
<div class="content green">
<h1>
GC Handicapping System
</h1>
<p>
New <a href="/disciplines/golf-croquet/resources">GC Handicapping System</a> comes into effe... | <div class="sticky-notes">
<div class="sticky-note">
<i class="pin"></i>
<div class="content green">
<h1>
GC Handicapping System
</h1>
<p>
New <a href="/disciplines/golf-croquet/resources">GC Handicapping System</a> came into effec... |
Update tests to pass new required title parameter. | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.LanguageServer.CustomProtocol;
using Newtonsoft.Json.Linq;
using Roslyn.Test.Ut... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.LanguageServer.CustomProtocol;
using Newtonsoft.Json.Linq;
using Roslyn.Test.Ut... |
Correct extension definition configuration value | using Loupe.Extensibility;
using Loupe.Extensibility.Client;
namespace Loupe.Extension.Export
{
/// <summary>
/// Top-level class for integrating with the Loupe framework
/// </summary>
[LoupeExtension(ConfigurationEditor = typeof(ExportConfigurationDialog),
MachineConfiguration = typeof(Expor... | using Loupe.Extensibility;
using Loupe.Extensibility.Client;
namespace Loupe.Extension.Export
{
/// <summary>
/// Top-level class for integrating with the Loupe framework
/// </summary>
[LoupeExtension(ConfigurationEditor = typeof(ExportConfigurationDialog),
CommonConfiguration = typeof(Export... |
Add separate log file for debugging service | using Microsoft.PowerShell.EditorServices.Session;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Event;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Message;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Response;
using Nito.AsyncEx;
using System.Threading.Tasks;
namespace Microso... | using Microsoft.PowerShell.EditorServices.Session;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Event;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Message;
using Microsoft.PowerShell.EditorServices.Transport.Stdio.Response;
using Microsoft.PowerShell.EditorServices.Utility;
using Nito.AsyncE... |
Check username for null too. | using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Cors;
namespace CORS.Controllers
{
public class ValuesController : ApiController
{
// GET api/values
public IEnumerable<string> Get()
{
return new string[] { "This is a CORS request.",... | using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Cors;
namespace CORS.Controllers
{
public class ValuesController : ApiController
{
// GET api/values
public IEnumerable<string> Get()
{
return new string[] { "This is a CORS request.",... |
Add the writer to the interface. |
using System;
using System.Text;
namespace Manos.Server {
public interface IHttpResponse {
IHttpTransaction Transaction {
get;
}
HttpHeaders Headers {
get;
}
HttpResponseStream Stream {
get;
}
Encoding Encoding {
get;
}
int StatusCode {
get;
set;
}
bool WriteStatusLine... |
using System;
using System.IO;
using System.Text;
namespace Manos.Server {
public interface IHttpResponse {
IHttpTransaction Transaction {
get;
}
HttpHeaders Headers {
get;
}
HttpResponseStream Stream {
get;
}
StreamWriter Writer {
get;
}
Encoding Encoding {
get;
}
int... |
Make sure there is a space between the -* and the filtered namespace to prevent any accidental replacements | using System;
using System.Collections.Generic;
using System.Linq;
namespace Giles.Core.Configuration
{
[Serializable]
public class Filter
{
public Filter() { }
public Filter(string convertToFilter)
{
foreach (var entry in FilterLookUp.Where(entry => convertToFilter.Con... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Giles.Core.Configuration
{
[Serializable]
public class Filter
{
public Filter() { }
public Filter(string convertToFilter)
{
foreach (var entry in FilterLookUp.Where(entry => convertToFilter.Con... |
Fix merge conflict with maitisoumyajit | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MVCLibraryManagementSystem.Controllers
{
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
return View();
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MVCLibraryManagementSystem.Controllers
{
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
return View();
}
}... |
Use dispatcher begininvoke for textbox scroll | using System;
using System.Windows;
using System.Windows.Controls;
using vmPing.Classes;
namespace vmPing.Views
{
/// <summary>
/// Interaction logic for IsolatedPingWindow.xaml
/// </summary>
public partial class IsolatedPingWindow : Window
{
private int SelStart = 0;
private int ... | using System;
using System.Windows;
using System.Windows.Controls;
using vmPing.Classes;
namespace vmPing.Views
{
/// <summary>
/// Interaction logic for IsolatedPingWindow.xaml
/// </summary>
public partial class IsolatedPingWindow : Window
{
private int SelStart = 0;
private int ... |
Initialize a WindowsContainer when program starts | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AppHarbor
{
class Program
{
static void Main(string[] args)
{
}
}
}
| using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.Windsor;
namespace AppHarbor
{
class Program
{
static void Main(string[] args)
{
var container = new WindsorContainer();
}
}
}
|
Save game settings on close. | using System.Windows;
using Dogstar.Properties;
namespace Dogstar
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App
{
void Application_Startup(object sender, StartupEventArgs e)
{
if (Settings.Default.UpgradeCheck)
{
Settings.Default.Upgrade();
Settings.... | using System.Windows;
using Dogstar.Properties;
namespace Dogstar
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App
{
void Application_Startup(object sender, StartupEventArgs e)
{
if (Settings.Default.UpgradeCheck)
{
Settings.Default.Upgrade();
Settings.... |
Fix spinner bonus ticks samples not actually playing | // 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.Rulesets.Osu.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
public class DrawableSpinnerTick : Drawa... | // 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.Rulesets.Osu.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
public class DrawableSpinnerTick : Drawa... |
Reword options item to include "screenshot" | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
publi... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
publi... |
Add worker resolve and start Start | using System;
using GAIT.Utilities.Logging;
using NLog;
using Topshelf;
using static GAIT.Utilities.GeneralBootstrapper;
namespace Rik.CodeCamp.Host
{
internal class CodeCampControl : ServiceControl
{
private Bootstrapper _bootstrapper;
private readonly ILogger _logger;
public CodeCam... | using System;
using GAIT.Utilities.Logging;
using NLog;
using Rik.CodeCamp.Core;
using Topshelf;
using static GAIT.Utilities.GeneralBootstrapper;
namespace Rik.CodeCamp.Host
{
internal class CodeCampControl : ServiceControl
{
private Bootstrapper _bootstrapper;
private readonly ILogger _logger... |
Set DialogResult to false on Options cancel | using System;
using System.Windows;
using SteamAccountSwitcher.Properties;
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for Options.xaml
/// </summary>
public partial class Options : Window
{
public Options()
{
InitializeComponent();
... | using System;
using System.Windows;
using SteamAccountSwitcher.Properties;
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for Options.xaml
/// </summary>
public partial class Options : Window
{
public Options()
{
InitializeComponent();
... |
Add more one catch block for ArgumentException | using System;
namespace FractionCalculator
{
using Class;
public class TestProgram
{
public static void Main()
{
try
{
Fraction fraction1 = new Fraction(22, 7);
Fraction fraction2 = new Fraction(40, 4);
Fraction result... | using System;
namespace FractionCalculator
{
using Class;
public class TestProgram
{
public static void Main()
{
try
{
Fraction fraction1 = new Fraction(22, 7);
Fraction fraction2 = new Fraction(40, 4);
Fraction result... |
Set result in enumerator and break completes sync | //-----------------------------------------------------------------------
// <copyright file="AsyncOperationTest.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace AsyncEnum35Sample.T... | //-----------------------------------------------------------------------
// <copyright file="AsyncOperationTest.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace AsyncEnum35Sample.T... |
Change high lighting crash to NFW | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Composition;
using System.Linq;
using System.Threading;
using Microsoft.CodeAnalysis.Host.Mef;
u... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Composition;
using System.Linq;
using System.Threading;
using Microsoft.CodeAnalysis.ErrorReport... |
Include company logo in email | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
namespace SendEmailWithLogo
{
class Program
{
static void Main(string[] args)
{
var toAddress = "somewh... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
namespace SendEmailWithLogo
{
class Program
{
static void Main(string[] args)
{
var toAddress = "somewh... |
Check Environment.UserInteractive instead of /c argument. | using System;
using System.Linq;
using System.ServiceProcess;
namespace PolymeliaDeployController
{
using System.Configuration;
using System.Data.Entity;
using Microsoft.Owin.Hosting;
using PolymeliaDeploy;
using PolymeliaDeploy.Controller;
using PolymeliaDeploy.Data;
using PolymeliaDepl... | using System;
using System.Linq;
using System.ServiceProcess;
namespace PolymeliaDeployController
{
using System.Configuration;
using System.Data.Entity;
using Microsoft.Owin.Hosting;
using PolymeliaDeploy;
using PolymeliaDeploy.Controller;
using PolymeliaDeploy.Data;
using PolymeliaDepl... |
Fix error that aborted sync when invalid XML was present in an XML formatted field (e.g. a malformed rules field in the stock master db) | using System;
using System.Xml;
using System.Xml.Linq;
using Rainbow.Model;
namespace Rainbow.Diff.Fields
{
public class XmlComparison : FieldTypeBasedComparison
{
public override bool AreEqual(IItemFieldValue field1, IItemFieldValue field2)
{
if (string.IsNullOrWhiteSpace(field1.Value) && string.IsNullOrWhi... | using System.Xml;
using System.Xml.Linq;
using Rainbow.Model;
using Sitecore.Diagnostics;
namespace Rainbow.Diff.Fields
{
public class XmlComparison : FieldTypeBasedComparison
{
public override bool AreEqual(IItemFieldValue field1, IItemFieldValue field2)
{
if (string.IsNullOrWhiteSpace(field1.Value) && stri... |
Fix increase connections to transport | using System;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Serilog.Core;
using Serilog.Debugging;
using Serilog.Events;
using Serilog.Sinks.Graylog.Core;
using Serilog.Sinks.Graylog.Core.Transport;
namespace Serilog.Sinks.Graylog
{
public class GraylogSink : ILogEventSink
{
private ... | using System;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Serilog.Core;
using Serilog.Debugging;
using Serilog.Events;
using Serilog.Sinks.Graylog.Core;
using Serilog.Sinks.Graylog.Core.Transport;
namespace Serilog.Sinks.Graylog
{
public class GraylogSink : ILogEventSink, IDisposable
{
... |
Fix exception on clipboard access contention | using System.Windows;
using System.Windows.Controls;
namespace Certify.UI.Controls.ManagedCertificate
{
public partial class TestProgress : UserControl
{
protected Certify.UI.ViewModel.ManagedCertificateViewModel ItemViewModel => UI.ViewModel.ManagedCertificateViewModel.Current;
protected Cert... | using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace Certify.UI.Controls.ManagedCertificate
{
public partial class TestProgress : UserControl
{
protected Certify.UI.ViewModel.ManagedCertificateViewModel ItemViewModel => UI.ViewModel.ManagedCertificateViewModel.C... |
Use GherkinDialectProvider instead of I18n | #region License
/*
Copyright [2011] [Jeffrey Cameron]
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 applica... | #region License
/*
Copyright [2011] [Jeffrey Cameron]
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 applica... |
Fix new expression with dot name | namespace BScript.Expressions
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BScript.Language;
public class NewExpression : IExpression
{
private IExpression expression;
private IList<IExpression> argexprs;
... | namespace BScript.Expressions
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BScript.Language;
using BScript.Utilities;
public class NewExpression : IExpression
{
private IExpression expression;
private IList<IE... |
Update view of all answers | @model System.Linq.IQueryable<ForumSystem.Web.ViewModels.Answers.AnswerViewModel>
@using ForumSystem.Web.ViewModels.Answers;
@foreach (var answer in Model)
{
<div class="panel panel-success">
<div class="panel-heading">
<h3>
@answer.Post.Title
</h3>
</div>
... | @model System.Linq.IQueryable<ForumSystem.Web.ViewModels.Answers.AnswerViewModel>
@using ForumSystem.Web.ViewModels.Answers;
<div class="panel panel-success">
<div class="panel-heading">
<h3>
@Html.ActionLink(Model.FirstOrDefault().Post.Title, "Display", "Questions", new { id = Model.FirstOrD... |
Fix incorrect skin version case | // 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.Beatmaps.Formats;
namespace osu.Game.Skinning
{
public class LegacySkinDecoder : LegacyDecoder<LegacySkinConfiguration>
{
public LegacySk... | // 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.Beatmaps.Formats;
namespace osu.Game.Skinning
{
public class LegacySkinDecoder : LegacyDecoder<LegacySkinConfiguration>
{
public LegacySk... |
Fix fake not replicating actual behaviour | using KafkaNet;
using KafkaNet.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace kafka_tests.Fakes
{
public class FakeKafkaConnection : IKafkaConnection
{
private Uri _address;
public Func<ProduceResponse> P... | using KafkaNet;
using KafkaNet.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace kafka_tests.Fakes
{
public class FakeKafkaConnection : IKafkaConnection
{
private Uri _address;
public Func<ProduceResponse> P... |
Append .json to end of filename when outputting JSON | using System;
using System.IO;
using DataTool.ToolLogic.List;
using Utf8Json;
using Utf8Json.Resolvers;
using static DataTool.Helper.IO;
using static DataTool.Helper.Logger;
namespace DataTool.JSON {
public class JSONTool {
internal void OutputJSON(object jObj, ListFlags toolFlags) {
CompositeR... | using System;
using System.IO;
using DataTool.ToolLogic.List;
using Utf8Json;
using Utf8Json.Resolvers;
using static DataTool.Helper.IO;
using static DataTool.Helper.Logger;
namespace DataTool.JSON {
public class JSONTool {
internal void OutputJSON(object jObj, ListFlags toolFlags) {
CompositeR... |
Add test for delegation in obsolete property | // Copyright 2013 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.Linq;
using NUnit.Framework;
namespace NodaTime.Test
{
/// <summary>
/// Tests for DateTimeZoneProviders.
/// </summary>
pub... | // Copyright 2013 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.Linq;
using NodaTime.Testing.TimeZones;
using NodaTime.Xml;
using NUnit.Framework;
namespace NodaTime.Test
{
/// <summary>
/// Tests... |
Support drivers without a date of birth | using System;
using Newtonsoft.Json;
namespace ErgastApi.Responses.Models
{
public class Driver
{
[JsonProperty("driverId")]
public string DriverId { get; private set; }
/// <summary>
/// Drivers who participated in the 2014 season onwards have a permanent driver number.
... | using System;
using Newtonsoft.Json;
namespace ErgastApi.Responses.Models
{
public class Driver
{
[JsonProperty("driverId")]
public string DriverId { get; private set; }
/// <summary>
/// Drivers who participated in the 2014 season onwards have a permanent driver number.
... |
Fix typo in last commit | using System.Linq.Expressions;
using Remotion.Linq.Parsing.ExpressionTreeVisitors.Transformation;
namespace NHibernate.Linq.ExpressionTransformers
{
/// <summary>
/// Remove redundant casts to the same type or to superclass (upcast) in <see cref="ExpressionType.Convert"/>, <see cref=" ExpressionType.ConvertChe... | using System.Linq.Expressions;
using Remotion.Linq.Parsing.ExpressionTreeVisitors.Transformation;
namespace NHibernate.Linq.ExpressionTransformers
{
/// <summary>
/// Remove redundant casts to the same type or to superclass (upcast) in <see cref="ExpressionType.Convert"/>, <see cref=" ExpressionType.ConvertChe... |
Support EventHub Consumer Groups in Script | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.ServiceBus;
namespace Microsoft.Azure.WebJobs.Script.Description
{
public class EventHubBindingMetadata : BindingMetad... | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.ServiceBus;
namespace Microsoft.Azure.WebJobs.Script.Description
{
public class EventHubBindingMetadata : BindingMetad... |
Fix mono support on startup. Bypass TopShelf service framework. | using Topshelf;
namespace MiNET.Service
{
public class MiNetService
{
private MiNetServer _server;
private void Start()
{
_server = new MiNetServer();
_server.StartServer();
}
private void Stop()
{
_server.StopServer();
}
private static void Main(string[] args)
{
HostFactory.Run(hos... | using System;
using Topshelf;
namespace MiNET.Service
{
public class MiNetService
{
private MiNetServer _server;
private void Start()
{
_server = new MiNetServer();
_server.StartServer();
}
private void Stop()
{
_server.StopServer();
}
private static void Main(string[] args)
{
if (I... |
Fix NRE when copying nodes when the ToString() is null | using System.Text;
namespace Microsoft.Build.Logging.StructuredLogger
{
public class StringWriter
{
public static string GetString(object rootNode)
{
var sb = new StringBuilder();
WriteNode(rootNode, sb, 0);
return sb.ToString();
}
... | using System.Text;
namespace Microsoft.Build.Logging.StructuredLogger
{
public class StringWriter
{
public static string GetString(object rootNode)
{
var sb = new StringBuilder();
WriteNode(rootNode, sb, 0);
return sb.ToString();
}
... |
Remove stray default value specification | // 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 osuTK;
using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Fram... | // 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 osuTK;
using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Fram... |
Update verbiage on user registration email | Hello @ViewData.Model.FirstName,<br /><br />
Thank you for signing up for Rambla! You have taken the first step towards expanding your rentability.<br /><br />
@{
string URL = Url.Action("activateaccount", "Account", new RouteValueDictionary(new { id = ViewData.Model.ActivationId }), Request.Url.Scheme.ToStrin... | @{
string URL = Url.Action("activateaccount", "Account", new RouteValueDictionary(new { id = ViewData.Model.ActivationId }), Request.Url.Scheme.ToString(), Request.Url.Host);
}
<p>Hi @ViewData.Model.FirstName,</p>
<p>Welcome to <strong>Rambla</strong>, a marketplace that facilitates sharing of items between y... |
Support completion of parens and indexes too. | using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Text.BraceCompletion;
using Microsoft.VisualStudio.Utilities;
namespace DanTup.DartVS
{
[Export(typeof(IBraceCompletionDefaultProvider))]
[ContentType(DartContentTypeDefinition.DartContentType)]
[BracePair('{', '}')]
class BraceCompletionProvid... | using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Text.BraceCompletion;
using Microsoft.VisualStudio.Utilities;
namespace DanTup.DartVS
{
[Export(typeof(IBraceCompletionDefaultProvider))]
[ContentType(DartContentTypeDefinition.DartContentType)]
[BracePair('{', '}')]
[BracePair('(', ')')]
[Bra... |
Fix SD not failing for the first note | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Game.Graphics;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mods
{
public abstract class ModSuddenDeath : Mod, IApp... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Game.Graphics;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mods
{
public abstract class ModSuddenDeath : Mod, IApp... |
Add help for -t switch | using System;
using System.Collections.Generic;
namespace LessMsi.Cli
{
internal class ShowHelpCommand : LessMsiCommand
{
public override void Run(List<string> args)
{
ShowHelp("");
}
public static void ShowHelp(string errorMessage)
{
string helpString =
@"Usage:
lessmsi <command> [options] <msi... | using System;
using System.Collections.Generic;
namespace LessMsi.Cli
{
internal class ShowHelpCommand : LessMsiCommand
{
public override void Run(List<string> args)
{
ShowHelp("");
}
public static void ShowHelp(string errorMessage)
{
string helpString =
@"Usage:
lessmsi <command> [options] <msi... |
Fix context menu not running any actions in notification Form | using CefSharp;
namespace TweetDck.Core.Handling{
class ContextMenuNotification : ContextMenuBase{
public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model){
model.Clear();
base.OnBeforeCon... | using CefSharp;
namespace TweetDck.Core.Handling{
class ContextMenuNotification : ContextMenuBase{
public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model){
model.Clear();
base.OnBeforeCon... |
Increment version number for new build. | using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MonoGameUtils")]
[assembly: AssemblyDescr... | using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MonoGameUtils")]
[assembly: AssemblyDescri... |
Copy interactions from the given object | using UnityEngine;
namespace Pear.InteractionEngine.Interactions
{
/// <summary>
/// Copies interactions from the current object to the supplied objects
/// </summary>
public class CopyInteractions: MonoBehaviour
{
[Tooltip("Objects that interactions will be copied to")]
public GameObject[] CopyTo;
privat... | using UnityEngine;
namespace Pear.InteractionEngine.Interactions
{
/// <summary>
/// Copies interactions from the current object to the supplied objects
/// </summary>
public class CopyInteractions: MonoBehaviour
{
[Tooltip("Objects that interactions will be copied to")]
public GameObject[] CopyTo;
[Toolt... |
Hide game type for now | @model WebEditor.Models.Create
@{
ViewBag.Title = "New Game";
}
@section scripts {
<script src="@Url.Content("~/Scripts/GameNew.js")" type="text/javascript"></script>
}
@using (Html.BeginForm()) {
@Html.ValidationSummary(true, "Unable to create game. Please correct the errors below.")
<d... | @model WebEditor.Models.Create
@{
ViewBag.Title = "New Game";
}
@section scripts {
<script src="@Url.Content("~/Scripts/GameNew.js")" type="text/javascript"></script>
}
@using (Html.BeginForm()) {
@Html.ValidationSummary(true, "Unable to create game. Please correct the errors below.")
<d... |
Allow for multiple phone numbers and email addresses | using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
public string Middle { get; set; }
public ... | using System.Collections.Generic;
using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
public string Middle... |
Allow debugging without running as a service. | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
namespace Leeroy
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = ne... | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;
namespace Leeroy
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
if (args.Firs... |
Change version number to 0.6.5 | 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("Te... | 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("Te... |
Revert change that broke tests on Windows PowerShell. | /* Copyright 2018 Jeremy Herbison
This file is part of AudioWorks.
AudioWorks is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
Audi... | /* Copyright 2018 Jeremy Herbison
This file is part of AudioWorks.
AudioWorks is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
Audi... |
Add static methods for building XML data strings | using Xunit.Abstractions;
namespace Cascara.Tests
{
public abstract class CascaraTestFramework
{
public CascaraTestFramework(ITestOutputHelper output)
{
Output = output;
}
protected ITestOutputHelper Output
{
get;
}
}
}
| using System;
using System.Xml.Linq;
using Xunit.Abstractions;
namespace Cascara.Tests
{
public abstract class CascaraTestFramework
{
protected static string BuildXmlElement(string name, params Tuple<string, string>[] attrs)
{
return BuildXmlElement(name, "", attrs);
}
... |
Fix intro settings "Hide On Finish" option name | using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("Intro Settings")]
public class IntroData
{
[DisplayName("Duration")]
public int Duration { get; set; } = -1;
[DisplayName("Reversab... | using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("Intro Settings")]
public class IntroData
{
[DisplayName("Duration")]
public int Duration { get; set; } = -1;
[DisplayName("Reversab... |
Implement Equals/GetHashCode to comply with Distinct | using IO = System.IO;
namespace dokas.EncodingConverter.Logic
{
internal sealed class FileData
{
public string Path { get; private set; }
public string Name { get; private set; }
public string Extension { get; private set; }
public FileData(string path)
{
P... | using System;
using IO = System.IO;
namespace dokas.EncodingConverter.Logic
{
internal sealed class FileData
{
public string Path { get; private set; }
public string Name { get; private set; }
public string Extension { get; private set; }
public FileData(string path)
{... |
Make available to change the rule when editing A/B page setting. | @model Kooboo.CMS.Sites.ABTest.ABPageSetting
@using Kooboo.CMS.Sites.ABTest;
@{
ViewBag.Title = "Edit A/B page setting";
Layout = "~/Views/Shared/Blank.cshtml";
}
@section Panel{
<ul class="panel">
<li>
<a data-ajaxform="">
@Html.IconImage("save") @("Save".Localize())</a... | @model Kooboo.CMS.Sites.ABTest.ABPageSetting
@using Kooboo.CMS.Sites.ABTest;
@{
ViewBag.Title = "Edit A/B page setting";
Layout = "~/Views/Shared/Blank.cshtml";
}
@section Panel{
<ul class="panel">
<li>
<a data-ajaxform="">
@Html.IconImage("save") @("Save".Localize())</a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.