Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Fix default JSON response charset | namespace Nancy.Json
{
using System.Collections.Generic;
using Converters;
/// <summary>
/// Json serializer settings
/// </summary>
public static class JsonSettings
{
/// <summary>
/// Max length of json output
/// </summary>
public static int M... | namespace Nancy.Json
{
using System.Collections.Generic;
using Converters;
/// <summary>
/// Json serializer settings
/// </summary>
public static class JsonSettings
{
/// <summary>
/// Max length of json output
/// </summary>
public static int M... |
Fix variables not being used inside target string | // 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.Online.Chat;
namespace osu.Game.Online.API.Requests
{
public class MarkChannelAsReadRequest : APIRequest
{
private readonly Channel chann... | // 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.Online.Chat;
namespace osu.Game.Online.API.Requests
{
public class MarkChannelAsReadRequest : APIRequest
{
private readonly Channel chann... |
Fix crash in Serializer on MessageCommand.End or empty getter | using System;
using System.Collections.Generic;
using System.Text;
namespace kh.kh2.Messages
{
public partial class MsgSerializer
{
public static string SerializeText(IEnumerable<MessageCommandModel> entries)
{
var sb = new StringBuilder();
foreach (var entry in entries... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
namespace kh.kh2.Messages
{
public partial class MsgSerializer
{
public static string SerializeText(IEnumerable<MessageCommandModel> entries)
{
var sb = new StringBuilder();
for... |
Add comment and add masking back. | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
namespace osu.Framework.Graphics.Containers
{
public class CircularContainer : Container
{
public override float Corne... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
namespace osu.Framework.Graphics.Containers
{
/// <summary>
/// A container which come with masking and automatic corner radius... |
Handle the exception when parsing the arguments | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
namespace KeepOn
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static v... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
namespace KeepOn
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static v... |
Set Stato Squadra - Abilitata la chiamata a OpService | using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using SO115App.ExternalAPI.Client;
using SO115App.Models.Classi.ServiziEsterni.OPService;
using SO115App.Models.Servizi.Infrastruttura.SistemiEsterni.OPService;
using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
n... | using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using SO115App.ExternalAPI.Client;
using SO115App.Models.Classi.ServiziEsterni.OPService;
using SO115App.Models.Servizi.Infrastruttura.SistemiEsterni.OPService;
using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
n... |
Add offset as optional parameter | using System;
using System.Linq;
using System.Net;
namespace BmpListener.Bgp
{
public class IPAddrPrefix
{
public IPAddrPrefix(ArraySegment<byte> data, Bgp.AddressFamily afi = Bgp.AddressFamily.IP)
{
DecodeFromBytes(data, afi);
}
public byte Length { get; private s... | using System;
using System.Linq;
using System.Net;
namespace BmpListener.Bgp
{
public class IPAddrPrefix
{
//TODO add offset to ctor
public IPAddrPrefix(ArraySegment<byte> data, int offset = 0, AddressFamily afi = AddressFamily.IP)
{
DecodeFromBytes(data, afi);
}
... |
Update Dependency Resolver to include Requisition Service | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Cats.Data.UnitWork;
using Ninject;
using Cats.Services.EarlyWarning;
namespace Cats.Infrastructure
{
public class NinjectDependencyResolver : IDependencyResolver
{
private IKernel kernel;
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Cats.Data.UnitWork;
using Ninject;
using Cats.Services.EarlyWarning;
namespace Cats.Infrastructure
{
public class NinjectDependencyResolver : IDependencyResolver
{
private IKernel kernel;
... |
Fix code vision order in not-unity projects | using System.Collections.Generic;
using JetBrains.Application.UI.Controls.GotoByName;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Host.Features.CodeInsights.Providers;
using JetBrains.Rider.Model;
namespace JetBrains.ReSharper.Plugins.Unity.Rider.CodeInsights
{
[SolutionComponent]
public class... | using System.Collections.Generic;
using JetBrains.Application.UI.Controls.GotoByName;
using JetBrains.Platform.RdFramework.Util;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Host.Features.CodeInsights.Providers;
using JetBrains.Rider.Model;
namespace JetBrains.ReSharper.Plugins.Unity.Rider.CodeInsights
{
... |
Set NUGET_PACKAGES environment variable when running MSBuild commands | // 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;
using System.IO;
using System.Linq;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.NET.TestFramework.Commands
{
public ... | // 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;
using System.IO;
using System.Linq;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.NET.TestFramework.Commands
{
public ... |
Remove ReadAsAttribute from concrete response | using System.Runtime.Serialization;
using Elasticsearch.Net;
namespace Nest
{
[ReadAs(typeof(PutWatchResponse))]
public class PutWatchResponse : ResponseBase
{
[DataMember(Name = "created")]
public bool Created { get; internal set; }
[DataMember(Name = "_id")]
public string Id { get; internal set; }
[D... | using System.Runtime.Serialization;
using Elasticsearch.Net;
namespace Nest
{
public class PutWatchResponse : ResponseBase
{
[DataMember(Name = "created")]
public bool Created { get; internal set; }
[DataMember(Name = "_id")]
public string Id { get; internal set; }
[DataMember(Name = "_version")]
publ... |
Add exchange_rate to the Balance Transaction resource | namespace Stripe
{
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class StripeBalanceTransaction : StripeEntityWithId
{
[JsonProperty("object")]
public string Object { get; set; }
[JsonProperty("amount")]
... | namespace Stripe
{
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class StripeBalanceTransaction : StripeEntityWithId
{
[JsonProperty("object")]
public string Object { get; set; }
[JsonProperty("amount")]
... |
Fix null assignment in default constructor | using System.Collections.Generic;
using StressMeasurementSystem.Models;
namespace StressMeasurementSystem.ViewModels
{
public class PatientViewModel
{
private Patient _patient;
public PatientViewModel()
{
_patient = null;
}
public PatientViewModel(Patient ... | using System.Collections.Generic;
using StressMeasurementSystem.Models;
namespace StressMeasurementSystem.ViewModels
{
public class PatientViewModel
{
private Patient _patient;
public PatientViewModel()
{
_patient = new Patient();
}
public PatientViewModel... |
Add extension method for adding bundle to bundle collection. | using System.IO;
using System.Web.Optimization;
namespace Bundlr
{
public static class BundleExtensions
{
public static TBundle IncludePath<TBundle>(this TBundle bundle, string root, params string[] files)
where TBundle : Bundle
{
foreach (string file in files)
... | using System.IO;
using System.Web.Optimization;
namespace Bundlr
{
public static class BundleExtensions
{
public static TBundle AddTo<TBundle>(this TBundle bundle, BundleCollection collection)
where TBundle : Bundle
{
collection.Add(bundle);
return bundle;
... |
Remove a bundle directive which pointed to an empty folder (which blew up Azure) | using System.Web.Optimization;
namespace Listy.Web
{
public class BundleConfig
{
public class BootstrapResourcesTransform : IItemTransform
{
public string Process(string includedVirtualPath, string input)
{
return input.Replace(@"../fonts/", @"/Content/f... | using System.Web.Optimization;
namespace Listy.Web
{
public class BundleConfig
{
public class BootstrapResourcesTransform : IItemTransform
{
public string Process(string includedVirtualPath, string input)
{
return input.Replace(@"../fonts/", @"/Content/f... |
Change namespace to match project | using System;
using System.Collections.Generic;
using System.Linq;
using Trek.BalihooApiClient;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
// https://github.com/balihoo/local-connect-client
var client = new BalihooApiClient();
//cl... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Trek.BalihooApiClient.Sample
{
class Program
{
static void Main()
{
// https://github.com/balihoo/local-connect-client
var client = new BalihooApiClient();
//client.GenerateClientA... |
Test removing new lines for compare | using Microsoft.MSBuildProjectBuilder;
using NUnit.Framework;
using Shouldly;
namespace MSBuildProjectBuilder.UnitTest
{
[TestFixture]
public class ProjectTest
{
private ProjectBuilder _project;
[OneTimeSetUp]
public void TestInitialize()
{
_project = new Proje... | using Microsoft.MSBuildProjectBuilder;
using NUnit.Framework;
using Shouldly;
namespace MSBuildProjectBuilder.UnitTest
{
[TestFixture]
public class ProjectTest
{
private ProjectBuilder _project;
[OneTimeSetUp]
public void TestInitialize()
{
_project = new Proje... |
Fix broken metadata unit test | using System;
using Autofac.Core;
using Autofac.Core.Registration;
using Autofac.Features.Metadata;
using Autofac.Test.Features.Metadata.TestTypes;
using Autofac.Util;
using Xunit;
namespace Autofac.Test.Features.Metadata
{
public class StronglyTypedMeta_WhenNoMatchingMetadataIsSupplied
{
private ICont... | using Autofac.Core;
using Autofac.Features.Metadata;
using Autofac.Test.Features.Metadata.TestTypes;
using Autofac.Util;
using Xunit;
namespace Autofac.Test.Features.Metadata
{
public class StronglyTypedMeta_WhenNoMatchingMetadataIsSupplied
{
private readonly IContainer _container;
public Stro... |
Add subscription to the subscription item class | using System;
using Newtonsoft.Json;
using System.Collections.Generic;
using Stripe.Infrastructure;
namespace Stripe
{
public class StripeSubscriptionItem : StripeEntityWithId, ISupportMetadata
{
[JsonProperty("object")]
public string Object { get; set; }
[JsonProperty("created")]
... | using System;
using Newtonsoft.Json;
using System.Collections.Generic;
using Stripe.Infrastructure;
namespace Stripe
{
public class StripeSubscriptionItem : StripeEntityWithId, ISupportMetadata
{
[JsonProperty("object")]
public string Object { get; set; }
[JsonProperty("created")]
... |
Rearrange class order so form designer works | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using SimpleScale.HeadNode;
namespace TestApp
{
public class Member {
public string Name;
}
... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using SimpleScale.HeadNode;
namespace TestApp
{
public partial class Form1 : Form
{
public F... |
Rewrite GenerateJsonPocket to complete output | using ChessDotNet;
using ChessDotNet.Variants.Crazyhouse;
using System.Collections.Generic;
namespace ChessVariantsTraining.Extensions
{
public static class ChessGameExtensions
{
public static Dictionary<string, int> GenerateJsonPocket(this ChessGame game)
{
CrazyhouseChessGame zhC... | using ChessDotNet;
using ChessDotNet.Variants.Crazyhouse;
using System.Collections.Generic;
namespace ChessVariantsTraining.Extensions
{
public static class ChessGameExtensions
{
public static Dictionary<string, int> GenerateJsonPocket(this ChessGame game)
{
CrazyhouseChessGame zhC... |
Fix linking errors when compiled for arm | using System;
using MonoTouch.ObjCRuntime;
[assembly: LinkWith ("libPayPalMobile.a",
LinkTarget.ArmV7 | LinkTarget.ArmV7s | LinkTarget.Simulator,
ForceLoad = true,
Frameworks="AVFoundation CoreMedia CoreVideo SystemConfiguration Security MessageUI OpenGLES... | using System;
using MonoTouch.ObjCRuntime;
[assembly: LinkWith ("libPayPalMobile.a",
LinkTarget.ArmV7 | LinkTarget.ArmV7s | LinkTarget.Simulator,
ForceLoad = true,
Frameworks="AVFoundation CoreMedia CoreVideo SystemConfiguration Security MessageUI OpenGLES... |
Add check for anonymous clients | using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
namespace Totem.Runtime
{
/// <summary>
/// A user or process establishing a security context with a runtime service
/// </summary>
public class Client
{
public Client()
{
Id = Id.Unassigned;
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
namespace Totem.Runtime
{
/// <summary>
/// A user or process establishing a security context with a runtime service
/// </summary>
public class Client
{
public Client()
{
Id = Id.Unassigned;
... |
Make ObservableSocket log using it's inherited type | namespace NEventSocket.Tests.Sockets
{
using System;
using System.Threading;
using System.Threading.Tasks;
using Common.Logging;
using Common.Logging.Simple;
using Xunit;
public class OutboundSocketTests
{
public OutboundSocketTests()
{
LogM... | namespace NEventSocket.Tests.Sockets
{
using System;
using System.Threading;
using System.Threading.Tasks;
using Common.Logging;
using Common.Logging.Simple;
using Xunit;
public class OutboundSocketTests
{
public OutboundSocketTests()
{
LogM... |
Add sample action to test so hover effect is visible | // 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.Overlays.Profile.Sections;
using System;
using System.Collections.Generic;
using osu.Framework.Graphics;
namespace osu.Game.Tests.Visual.Online
{
pub... | // 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.Overlays.Profile.Sections;
using System;
using System.Collections.Generic;
using osu.Framework.Graphics;
namespace osu.Game.Tests.Visual.Online
{
pub... |
Change raw file request rewriter to use AppRelativeCurrentExecutionFilePath instead of PathInfo to determine the file path. When not running in IIS PathInfo seems to be empty at the point when the rewriter is called. | using System;
using System.Text.RegularExpressions;
using System.Web;
namespace Cassette.Aspnet
{
public class RawFileRequestRewriter
{
readonly HttpContextBase context;
readonly IFileAccessAuthorization fileAccessAuthorization;
readonly HttpRequestBase request;
pu... | using System;
using System.Text.RegularExpressions;
using System.Web;
namespace Cassette.Aspnet
{
public class RawFileRequestRewriter
{
readonly HttpContextBase context;
readonly IFileAccessAuthorization fileAccessAuthorization;
readonly HttpRequestBase request;
pu... |
Remove unneed ToString (on string) | using System;
namespace Lime.Protocol.Network
{
public class EnvelopeTooLargeException : Exception
{
public EnvelopeTooLargeException()
: base()
{
}
public EnvelopeTooLargeException(string message)
: base(message)
{
}
public Env... | using System;
namespace Lime.Protocol.Network
{
public class EnvelopeTooLargeException : Exception
{
public EnvelopeTooLargeException()
: base()
{
}
public EnvelopeTooLargeException(string message)
: base(message)
{
}
public Env... |
Fix change that broke updating the setting. | @model Devworx.CodePrettify.ViewModels.CodePrettifySettingsViewModel
<fieldset>
<legend>@T("Code Prettify")</legend>
<div>
@Html.EditorFor(m => m.PrettifySettingsPart.UseAutoLoader)
<label for="@Html.FieldIdFor(m => m.PrettifySettingsPart.UseAutoLoader)" class="forcheckbox">@T("Use default asy... | @model Devworx.CodePrettify.ViewModels.CodePrettifySettingsViewModel
<fieldset>
<legend>@T("Code Prettify")</legend>
<div>
@Html.CheckBox("UseAutoLoader", Model.PrettifySettingsPart.UseAutoLoader)
<label for="CodePrettifySettings_UseAutoLoader" class="forcheckbox">@T("Use default async auto lo... |
Check for new components every one second to handle late loaders | // 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.Linq;
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Rulesets.Edit;
using osu.Game.Screens.Edit.Compose.Components;
using osu.Game... | // 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.Linq;
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Rulesets.Edit;
using osu.Game.Screens.Edit.Compose.Components;
using osu.Game... |
Remove comment, expanding the hittable area is possible | using System.Collections.Generic;
using System.Linq;
using Avalonia.VisualTree;
namespace Avalonia.Rendering
{
/// <summary>
/// An interface to allow non-templated controls to customize their hit-testing
/// when using a renderer with a simple hit-testing algorithm without a scene graph,
/// such as <... | using System.Collections.Generic;
using System.Linq;
using Avalonia.VisualTree;
namespace Avalonia.Rendering
{
/// <summary>
/// An interface to allow non-templated controls to customize their hit-testing
/// when using a renderer with a simple hit-testing algorithm without a scene graph,
/// such as <... |
Remove duplicates from sorted list - slower lol | // https://leetcode.com/submissions/detail/52724586/
//
//
// Submission Details
// 164 / 164 test cases passed.
// Status: Accepted
// Runtime: 160 ms
//
// Submitted: 0 minutes ago
//
/**
* Definition for singly-linked list.
* public class ListNode {
* public int val;
* ... | // https://leetcode.com/submissions/detail/52724586/
//
//
// Submission Details
// 164 / 164 test cases passed.
// Status: Accepted
// Runtime: 160 ms
//
// Submitted: 0 minutes ago
//
/**
* Definition for singly-linked list.
* public class ListNode {
* public int val;
* ... |
Read available data inside of while loop | using PluginContracts;
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace LAN
{
public class LANInterface : IPluginV1
{
public string Name { get; } = "LAN";
public string Description { get; } = "LAN communication interface for os... | using PluginContracts;
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace LAN
{
public class LANInterface : IPluginV1
{
public string Name { get; } = "LAN";
public string Description { get; } = "LAN communication interface for os... |
Fix error in custom action code | using System;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.Deployment.WindowsInstaller;
namespace IndexerSetup.RegisterProperties
{
public class RegisterAction
{
[CustomAction]
public static ActionResult RegisterPropDescFile(Session session)
{
sessi... | using System;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.Deployment.WindowsInstaller;
namespace IndexerSetup.RegisterProperties
{
public class RegisterAction
{
[CustomAction]
public static ActionResult RegisterPropDescFile(Session session)
{
sessi... |
Add PaymentIntent to filter lists of Disputes | namespace Stripe
{
using Newtonsoft.Json;
/// <summary>
/// The optional arguments you can pass. <a href="https://stripe.com/docs/api#list_disputes">Stripe Documentation</a>.
/// </summary>
public class DisputeListOptions : ListOptionsWithCreated
{
/// <summary>
/// Only return ... | namespace Stripe
{
using Newtonsoft.Json;
/// <summary>
/// The optional arguments you can pass. <a href="https://stripe.com/docs/api#list_disputes">Stripe Documentation</a>.
/// </summary>
public class DisputeListOptions : ListOptionsWithCreated
{
/// <summary>
/// Only return ... |
Update IPC usage to return `null` | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using osu.Framework.Platform;
using osu.Game.Database;
namespace osu.Game.IP... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using osu.Framework.Platform;
using osu.Game.Database;
namespace osu.Game.IP... |
Test Major/Minor versions - Commit 1 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace PracticeGit.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Title = "Home Page";
return View();
}... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
// ADDED FIRST LINE
namespace PracticeGit.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Title = "Home Page";
re... |
Fix Dimension in integration tests | using System;
using System.Diagnostics;
namespace Toppler.Tests.Integration.TestHelpers
{
public class TestBase
{
private static Random Generator = new Random();
protected string TestEventSource { get; private set; }
protected string TestDimension { get; private set; }
public... | using System;
using System.Diagnostics;
namespace Toppler.Tests.Integration.TestHelpers
{
public class TestBase
{
private static Random Generator = new Random();
protected string TestEventSource { get; private set; }
protected string TestDimension { get; private set; }
public... |
Implement the in memory archive | using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Xml.Linq;
using Ionic.Zip;
namespace ThreeDXMLLoader.Implementation.Model
{
/// <summary>
/// In memory archive implementation for the IThreeDArchive interface.
/// </summary>
class ThreeDRepFile... | using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using Ionic.Zip;
namespace ThreeDXMLLoader.Implementation.Model
{
/// <summary>
/// In memory archive implementation for the IThreeDArchive interface.
/... |
Change when FEZMod.Exit gets called. Either LiveSplit doesn't crash on my PC or it's fixed now. | using System;
using FezGame.Mod;
namespace FezGame {
public class patch_Fez {
public void orig_Exit() {
}
public void Exit() {
orig_Exit();
FEZMod.Exit();
}
}
}
| using System;
using FezGame.Mod;
namespace FezGame {
public class patch_Fez {
public void OnExiting(Object sender, EventArgs args) {
//It's possible that FEZ doesn't contain this method and thus orig_OnExiting won't exist.
FEZMod.Exit();
}
}
}
|
Fix crash in Spotfire 7.0, remove pre-invoke at binding beginning. | namespace SpotfireDomViewer
{
using System.Reflection;
public class MethodNode : DomNode
{
private object parentObject;
private MethodInfo method;
public MethodNode(object parentObj, MethodInfo m)
: base(null, NodeTypes.Method, m.ToString())
{
pare... | namespace SpotfireDomViewer
{
using System.Reflection;
public class MethodNode : DomNode
{
private object parentObject;
private MethodInfo method;
public MethodNode(object parentObj, MethodInfo m)
: base(null, NodeTypes.Method, m.ToString())
{
pare... |
Fix editor skin providing container not providing playable beatmap | // 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.Skinning;
#nullable enable
namespace osu.Game.Screens.Edit
{
/// <summary>
/// A <see cref="SkinProvidingContainer"/> that fires <see cref="ISkin... | // 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.Skinning;
#nullable enable
namespace osu.Game.Screens.Edit
{
/// <summary>
/// A <see cref="SkinProvidingContainer"/> that fires <see cref="ISkin... |
Revert "Enum - Add methods to verify against the user's role if the user can add, delete, or find users" | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Training.CSharpWorkshop
{
public class User
{
public int Id { get; set; }
public string Name { get; set; }
public RoleEnum Role { get; set; }
}
namespa... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Training.CSharpWorkshop
{
public class User
{
public int Id { get; set; }
public string Name { get; set; }
public RoleEnum Role { get; set; }
}
} |
Delete initialization of the IProjectTypeLookupService | using System;
using System.ComponentModel.Composition;
using System.Diagnostics;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Internal.Log;
using Microsoft.CodeAnalysis.Options;
using Microsoft.Internal.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.Visu... | using System;
using System.ComponentModel.Composition;
using System.Diagnostics;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Internal.Log;
using Microsoft.CodeAnalysis.Options;
using Microsoft.Internal.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.Visu... |
Refactor test to use modern assertions | namespace CurrencyRates.Tests.Base.Extensions
{
using System;
using CurrencyRates.Base.Extensions;
using NUnit.Framework;
[TestFixture]
public class StringUtilsTest
{
private static readonly object[] TruncateTestCases =
{
new object[] { string.Empty, ... | namespace CurrencyRates.Tests.Base.Extensions
{
using System;
using CurrencyRates.Base.Extensions;
using NUnit.Framework;
[TestFixture]
public class StringUtilsTest
{
private static readonly object[] TruncateTestCases =
{
new object[] { string.Empty, ... |
Set override Umbraco Vault context in app startup | using System;
using Microsoft.Owin;
using Owin;
using ReferenceApiWeblessUmbraco.Application;
using ReferenceApiWeblessUmbraco.App_Start;
[assembly: OwinStartup(typeof(OwinStartup))]
namespace ReferenceApiWeblessUmbraco.App_Start
{
public class OwinStartup
{
public void Configuration(IAppBuilder app)... | using System;
using Microsoft.Owin;
using Owin;
using ReferenceApiWeblessUmbraco.Application;
using ReferenceApiWeblessUmbraco.App_Start;
using UmbracoVault;
[assembly: OwinStartup(typeof(OwinStartup))]
namespace ReferenceApiWeblessUmbraco.App_Start
{
public class OwinStartup
{
public void Configurat... |
Implement constructor and dispose method to open/close device | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ScooterController
{
class HardwareController
{
public HardwareController()
{
if (UsbRelayDevice.Init() != 0)
{
Console.WriteLine... |
using System;
namespace ScooterController
{
class HardwareController
{
private readonly int deviceHandle;
public static void LogError(string message)
{
throw new Exception(message);
}
public HardwareController(string serialNumber = "FDP2R")
{
... |
Fix iOS strings processor loading | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PseudoInternationalization {
class ProcessorFactory {
private static readonly Dictionary<string, Type> _extensionMap = new Dictionary<string, Type> {
... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PseudoInternationalization {
class ProcessorFactory {
private static readonly Dictionary<string, Type> _extensionMap = new Dictionary<string, Type> {
... |
Remove redundant buffer free check. | //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Drawing;
using OpenTK.Graphics.ES20;
namespace osu.Framework.Graphics.OpenGL.Textures
{
public class TextureUpload : ID... | //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Drawing;
using OpenTK.Graphics.ES20;
namespace osu.Framework.Graphics.OpenGL.Textures
{
public class TextureUpload : ID... |
Test async fire & forget | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace WebApplicationFireAndForget.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionRes... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
namespace WebApplicationFireAndForget.Controllers
{
public class HomeController : Controller
{
public async Task<ActionResult> Index()
{
await Ta... |
Fix MAL profile regex name | /**
* This file is part of the MarkdownSharp package
* For the full copyright and license information,
* view the LICENSE file that was distributed with this source code.
*/
using System;
using System.Text.RegularExpressions;
namespace MarkdownSharp.Extensions.Mal
{
/// <summary>
/// Create short link f... | /**
* This file is part of the MarkdownSharp package
* For the full copyright and license information,
* view the LICENSE file that was distributed with this source code.
*/
using System;
using System.Text.RegularExpressions;
namespace MarkdownSharp.Extensions.Mal
{
/// <summary>
/// Create short link f... |
Add commit for auth order | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TwitchLib;
using TwitchLib.Models.Client;
using System.Speech.Synthesis;
namespace TwitchBot2002
{
class Program
{
static SpeechSynthesizer synth;
static void Main(string... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TwitchLib;
using TwitchLib.Models.Client;
using System.Speech.Synthesis;
namespace TwitchBot2002
{
class Program
{
static SpeechSynthesizer synth;
static void Main(string... |
Add TracingConfig to catch error | using Microsoft.Extensions.Configuration;
using Nancy;
using Nancy.TinyIoc;
using NancyAzureFileUpload.Services;
namespace NancyAzureFileUpload.Helpers
{
public class CustomBootstrapper : DefaultNancyBootstrapper
{
public IConfigurationRoot Configuration;
public CustomBootstrapper()
{
... | using Microsoft.Extensions.Configuration;
using Nancy;
using Nancy.TinyIoc;
using NancyAzureFileUpload.Services;
namespace NancyAzureFileUpload.Helpers
{
public class CustomBootstrapper : DefaultNancyBootstrapper
{
public IConfigurationRoot Configuration;
public CustomBootstrapper()
{
... |
Revert "Revert "LoginTest is completed"" | using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;
using NUnit.Framework;
namespace SeleniumTasksProject1._1
{
[TestFixture]
public class Chrome
{
... | using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;
using NUnit.Framework;
namespace SeleniumTasksProject1._1
{
[TestFixture]
public class Chrome
{
... |
Fix featured stream item width | // 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 Humanizer;
using osu.Game.Online.API.Requests.Responses;
using osuTK.Graphics;
namespace osu.Game.Overlays.Changelog
{
public class ChangelogUpdateStreamItem ... | // 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 Humanizer;
using osu.Game.Online.API.Requests.Responses;
using osuTK.Graphics;
namespace osu.Game.Overlays.Changelog
{
public class ChangelogUpdateStreamItem ... |
Fix UI bugs with time. | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TramlineFive.Common;
using TramlineFive.Common.Models;
using TramlineFive.Views.Dialogs;
namespace TramlineFive.ViewModels
{
public class ArrivalViewModel... | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TramlineFive.Common;
using TramlineFive.Common.Models;
using TramlineFive.Views.Dialogs;
namespace TramlineFive.ViewModels
{
public class ArrivalViewModel... |
Fix for some css not working on the server | using System.Web;
using System.Web.Optimization;
namespace ExamSystem.Backend.Web
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Ad... | using System.Web;
using System.Web.Optimization;
namespace ExamSystem.Backend.Web
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Ad... |
Add period exposed to excel | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ExcelDna.Integration;
using Qwack.Dates;
using Qwack.Excel.Services;
namespace Qwack.Excel.Dates
{
public static class BusinessDateFunctions
{
[ExcelFunction(Description = "Checks if the given date is... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ExcelDna.Integration;
using Qwack.Dates;
using Qwack.Excel.Services;
namespace Qwack.Excel.Dates
{
public static class BusinessDateFunctions
{
[ExcelFunction(Description = "Checks if the given date is... |
Use IEnumable instead of List | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.Linq;
using osu.Framework.IO.Network;
using osu.Game.Online.Chat;
namespace osu.Game.Online.API.Requests
{
... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.Linq;
using osu.Framework.IO.Network;
using osu.Game.Online.Chat;
namespace osu.Game.Online.API.Requests
{
... |
Add support for updating a coupon's name | using System.Collections.Generic;
using Newtonsoft.Json;
namespace Stripe
{
public class StripeCouponUpdateOptions : StripeBaseOptions, ISupportMetadata
{
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }
}
}
| using System.Collections.Generic;
using Newtonsoft.Json;
namespace Stripe
{
public class StripeCouponUpdateOptions : StripeBaseOptions, ISupportMetadata
{
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }
[JsonProperty("name")]
public string N... |
Use UpdateSourceTrigger.PropertyChanged for password controls | using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
namespace MaterialForms.Controls
{
/// <summary>
/// Interaction logic for SingleLineTextControl.xaml
/// </summary>
public partial class PasswordT... | using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
namespace MaterialForms.Controls
{
/// <summary>
/// Interaction logic for SingleLineTextControl.xaml
/// </summary>
public partial class PasswordT... |
Fix for GetClientIpAddress in OWIN-hosting | using System;
using System.Net.Http;
namespace WebApiContrib.Http
{
public static class HttpRequestMessageExtensions
{
private const string HttpContext = "MS_HttpContext";
private const string RemoteEndpointMessage = "System.ServiceModel.Channels.RemoteEndpointMessageProperty";
public ... | using System;
using System.Net.Http;
namespace WebApiContrib.Http
{
public static class HttpRequestMessageExtensions
{
private const string HttpContext = "MS_HttpContext";
private const string RemoteEndpointMessage = "System.ServiceModel.Channels.RemoteEndpointMessageProperty";
private ... |
Add a better message if the SimpleAssetService doesn't have an asset | // 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.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.... | // 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.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.... |
Make a whitespace change to test the TeamCity upgrade. | using System.Runtime.Serialization;
namespace Web.Models
{
[DataContract]
public class RelationshipModel
{
[DataMember]
public string Name { get; set; }
}
} | using System.Runtime.Serialization;
namespace Web.Models
{
[DataContract]
public class RelationshipModel
{
[DataMember]
public string Name { get; set; }
}
} |
Increase toleranceSeconds in SafeWait_PollingInterval_GreaterThanTimeout test | using System;
using System.Threading;
using NUnit.Framework;
namespace Atata.WebDriverExtras.Tests
{
[TestFixture]
[Parallelizable(ParallelScope.None)]
public class SafeWaitTests
{
private SafeWait<object> wait;
[SetUp]
public void SetUp()
{
wait = new Safe... | using System;
using System.Threading;
using NUnit.Framework;
namespace Atata.WebDriverExtras.Tests
{
[TestFixture]
[Parallelizable(ParallelScope.None)]
public class SafeWaitTests
{
private SafeWait<object> wait;
[SetUp]
public void SetUp()
{
wait = new Safe... |
Fix Symbolic duplication bug (I think). It seems to be a bug in Boogie that IdentifierExprs can be cloned twice | using System;
using Microsoft.Boogie;
using System.Diagnostics;
namespace symbooglix
{
/// <summary>
/// This duplicates Expr accept the identifier expr attached to symbolics
/// </summary>
public class NonSymbolicDuplicator : Duplicator
{
public NonSymbolicDuplicator()
{
}
... | using System;
using Microsoft.Boogie;
using System.Diagnostics;
namespace symbooglix
{
/// <summary>
/// This duplicates Expr accept the identifier expr attached to symbolics
/// </summary>
public class NonSymbolicDuplicator : Duplicator
{
public NonSymbolicDuplicator()
{
}
... |
Fix broken auth when POSTing/PUTing data | using OAuth;
namespace Crunch.DotNet.Authorization
{
public static class OAuthTokensExtensions
{
public static string GetAuthorisationHeader(this OAuthTokens tokens, string url, string restMethod, string realm = null)
{
var oauthClient = OAuthRequest.ForProtectedResource(restMethod,... | using OAuth;
namespace Crunch.DotNet.Authorization
{
public static class OAuthTokensExtensions
{
public static string GetAuthorisationHeader(this OAuthTokens tokens, string url, string restMethod, string realm = null)
{
var oauthClient = new OAuthRequest
{
... |
Add second layer to test scene | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics.Sprites;
namespace os... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using osu.Game.Graphi... |
Fix timing screen test crashing due to missing dependency | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Game.Rulesets.Osu.Beatmaps;
using osu.Game.Screens.Edit;
using osu.Game.Screens.Edit.Timing;
namespace o... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Osu.Beatmaps;
using osu.Game.Screens.Edit;
using osu.Game.Scr... |
Resolve an issue with the FAQ / Spoiler Component where it does not open and close as intended | @model Portal.CMS.Entities.Entities.Page
@{
ViewBag.Title = Model.PageName;
}
<div id="page-wrapper">
@Html.Partial("/Areas/PageBuilder/Views/Page/_Page.cshtml", Model)
</div> |
@model Portal.CMS.Entities.Entities.Page
@{
ViewBag.Title = Model.PageName;
}
<div id="page-wrapper" class="visitor">
@Html.Partial("/Areas/PageBuilder/Views/Page/_Page.cshtml", Model)
</div> |
Fix the 'CA1800: Do not cast unnecessarily' code analysis error | using System.Collections.Generic;
namespace Ploeh.AutoFixture.Xunit2
{
internal class CustomizeAttributeComparer : Comparer<CustomizeAttribute>
{
public override int Compare(CustomizeAttribute x, CustomizeAttribute y)
{
if (x is FrozenAttribute && !(y is FrozenAttribute))
... | using System.Collections.Generic;
namespace Ploeh.AutoFixture.Xunit2
{
internal class CustomizeAttributeComparer : Comparer<CustomizeAttribute>
{
public override int Compare(CustomizeAttribute x, CustomizeAttribute y)
{
var xfrozen = x is FrozenAttribute;
var yfrozen = ... |
Change get-only property for now | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
namespace osu.Game.Online.RealtimeMultiplayer
{
public class MultiplayerClientState
{
public long CurrentRoomID { get; set; }
p... | // 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;
#nullable enable
namespace osu.Game.Online.RealtimeMultiplayer
{
[Serializable]
public class MultiplayerClientState
{
public readonly ... |
Make test work also in environments with few cores. | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
using MbCacheTest.TestData;
using NUnit.Framework;
using SharpTestsEx;
namespace MbCacheTest.Logic.Performance
{
public class CacheMissPerformanceTest : TestCase
{
private ObjectTakes100MsToFill instance;
... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
using MbCacheTest.TestData;
using NUnit.Framework;
using SharpTestsEx;
namespace MbCacheTest.Logic.Performance
{
public class CacheMissPerformanceTest : TestCase
{
private ObjectTakes100MsToFill instance;
... |
Fix a globalization test failure | // 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.Collections.Generic;
using Xunit;
namespace System.Globalization.Tests
{
public class CultureInfoN... | // 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.Collections.Generic;
using Xunit;
namespace System.Globalization.Tests
{
public class CultureInfoN... |
Make sleep shorter in test project | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Xunit.Extensions;
namespace ExpressRunner.TestProject
{
public class ExampleTests
{
[Fact]
public void Should_fail_always()
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Xunit.Extensions;
namespace ExpressRunner.TestProject
{
public class ExampleTests
{
[Fact]
public void Should_fail_always()
{
... |
Update reasoning behind why AgentBus hack exists | using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reflection;
using System.Threading.Tasks;
namespace Glimpse.Agent
{
public class DefaultAgentBroker : IAgentBroker
{
private readonly ISubject<IMessage> _subject;
// TODO:... | using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reflection;
using System.Threading.Tasks;
namespace Glimpse.Agent
{
public class DefaultAgentBroker : IAgentBroker
{
private readonly ISubject<IMessage> _subject;
// TODO:... |
Access operator for array is now "item" | using System;
using System.Collections.Generic;
using System.Linq;
using hw.UnitTest;
namespace Reni.FeatureTest.Reference
{
[TestFixture]
[ArrayReferenceDumpSimple]
[Target(@"
repeat: /\ ^ while() then(^ body(), repeat(^));
o:
/\
{
data: ^ array_reference ;
count: ^ count;
dump_print:
... | using System;
using System.Collections.Generic;
using System.Linq;
using hw.UnitTest;
namespace Reni.FeatureTest.Reference
{
[TestFixture]
[ArrayReferenceDumpSimple]
[Target(@"
repeat: /\ ^ while() then(^ body(), repeat(^));
o:
/\
{
data: ^ array_reference ;
count: ^ count;
dump_print:
... |
Switch back to the correct url | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using Microsoft.WindowsAzure.MobileServices;
namespace MyDriving.AzureClient
{
public class AzureClient : IAzureClient
{
const string DefaultMobileServiceU... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using Microsoft.WindowsAzure.MobileServices;
namespace MyDriving.AzureClient
{
public class AzureClient : IAzureClient
{
const string DefaultMobileServiceU... |
Allow nulls and hide if missing dependencies | // 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;
using osu.Framework.Allocation;
using osu.Framework.Platform;
using osu.Game.Configuration;
using osu.Game.Updater;
namespace osu.Game.Overlays.Set... | // 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;
using osu.Framework.Allocation;
using osu.Framework.Platform;
using osu.Game.Configuration;
using osu.Game.Updater;
namespace osu.Game.Overlays.Set... |
Fix wrapper fact to show proper type | using System;
using System.Diagnostics;
namespace NRules.Rete
{
[DebuggerDisplay("Fact {Object}")]
internal class Fact
{
private readonly Type _factType;
private readonly object _object;
public Fact()
{
}
public Fact(object @object)
{
_... | using System;
using System.Diagnostics;
namespace NRules.Rete
{
[DebuggerDisplay("Fact {Object}")]
internal class Fact
{
private readonly Type _factType;
private readonly object _object;
public Fact()
{
}
public Fact(object @object)
{
_... |
Reduce logging level to ERROR | using System;
using System.IO;
using ApprovalTests;
using ApprovalTests.Reporters;
using FluentAssertions;
using Xunit;
using Grobid.NET;
using org.apache.log4j;
using org.grobid.core;
namespace Grobid.Test
{
[UseReporter(typeof(DiffReporter))]
public class GrobidTest
{
static G... | using System;
using System.IO;
using ApprovalTests;
using ApprovalTests.Reporters;
using FluentAssertions;
using Xunit;
using Grobid.NET;
using org.apache.log4j;
using org.grobid.core;
namespace Grobid.Test
{
[UseReporter(typeof(DiffReporter))]
public class GrobidTest
{
static G... |
Handle a couple more options for how to describe the limits | // Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace SmugMug.Shared.Descriptors
{
public class Limits
{
// INFINITY, NEGATIVE_INFINITY, POSITIVE_INFINITY, and numbers
... | // Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace SmugMug.Shared.Descriptors
{
public class Limits
{
// INFINITY, NEGATIVE_INFINITY, POSITIVE_INFINITY, and numbers
... |
Add advisory message in dashboard | @model dynamic
<h1>@Html.TitleForPage(T("Welcome to Orchard").ToString())</h1>
<p>@T("This is the place where you can manage your web site, its appearance and its contents. Please take a moment to explore the different menu items on the left of the screen to familiarize yourself with the features of the applicatio... | @model dynamic
<h1>@Html.TitleForPage(T("Welcome to Orchard").ToString())</h1>
<p>@T("This is the place where you can manage your web site, its appearance and its contents. Please take a moment to explore the different menu items on the left of the screen to familiarize yourself with the features of the applicatio... |
Remove indexing on TitlePart (it's performed thru ITitleAspect) | using Orchard.ContentManagement.Handlers;
using Orchard.Core.Title.Models;
using Orchard.Data;
namespace Orchard.Core.Title.Handlers {
public class TitlePartHandler : ContentHandler {
public TitlePartHandler(IRepository<TitlePartRecord> repository) {
Filters.Add(StorageFilter.For(repo... | using Orchard.ContentManagement.Handlers;
using Orchard.Core.Title.Models;
using Orchard.Data;
namespace Orchard.Core.Title.Handlers {
public class TitlePartHandler : ContentHandler {
public TitlePartHandler(IRepository<TitlePartRecord> repository) {
Filters.Add(StorageFilter.For(repo... |
Add overload to the default Host to accept any configuration | using System;
using Common.Logging;
using Noobot.Core;
using Noobot.Core.Configuration;
using Noobot.Core.DependencyResolution;
namespace Noobot.Runner
{
/// <summary>
/// NoobotHost is required due to TopShelf.
/// </summary>
public class NoobotHost
{
private readonly IConfigReader _confi... | using System;
using Common.Logging;
using Noobot.Core;
using Noobot.Core.Configuration;
using Noobot.Core.DependencyResolution;
namespace Noobot.Runner
{
/// <summary>
/// NoobotHost is required due to TopShelf.
/// </summary>
public class NoobotHost
{
private readonly IConfigReader _confi... |
Set log level to INFO | using System;
using System.IO;
using ApprovalTests;
using ApprovalTests.Reporters;
using FluentAssertions;
using Xunit;
using Grobid.NET;
using org.apache.log4j;
using org.grobid.core;
namespace Grobid.Test
{
[UseReporter(typeof(DiffReporter))]
public class GrobidTest
{
static G... | using System;
using System.IO;
using ApprovalTests;
using ApprovalTests.Reporters;
using FluentAssertions;
using Xunit;
using Grobid.NET;
using org.apache.log4j;
using org.grobid.core;
namespace Grobid.Test
{
[UseReporter(typeof(DiffReporter))]
public class GrobidTest
{
static G... |
Make class generatng code clearer (?) | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace ConsoleApp
{
public class Table
{
private readonly string tableName;
private readonly IEnumerable<Column> columns;
public Table(string tableName, IEnumerable<Column> columns)
{
... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace ConsoleApp
{
public class Table
{
private readonly string tableName;
private readonly IEnumerable<Column> columns;
public Table(string tableName, IEnumerable<Column> columns)
{
... |
Add methods to buy stuff | using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetMouseButtonDown(0)) {
// TODO: place tower
}
}
}
| using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour {
private int money = 500;
public int GetMoney () {
return money;
}
public bool Buy (int price) {
if (price > money) {
return false;
}
money -= price;
return true;
}
// Update is called once per frame
void Updat... |
Add method to get path segment representing parent element | using System;
using System.Collections.Generic;
using System.Linq;
namespace Arkivverket.Arkade.Core.Noark5
{
public class ReadElementEventArgs : EventArgs
{
public string Name { get; set; }
public string Value { get; set; }
public ElementPath Path { get; set; }
public ReadElem... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Arkivverket.Arkade.Core.Noark5
{
public class ReadElementEventArgs : EventArgs
{
public string Name { get; set; }
public string Value { get; set; }
public ElementPath Path { get; set; }
public ReadElem... |
Fix 'overriding view manager' sample | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Windows;
namespace Stylet.Samples.OverridingViewManager
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
sealed class ViewModelAttribute : Attribute
{
readon... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Windows;
namespace Stylet.Samples.OverridingViewManager
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
sealed class ViewModelAttribute : Attribute
{
readon... |
Revert LowLatencyTaskFactory to the default. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Crevice.GestureMachine
{
using System.Threading;
using System.Drawing;
using Crevice.Core.FSM;
using Crevice.Core.Events;
using Crevice.Threading;
public class NullGes... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Crevice.GestureMachine
{
using System.Threading;
using System.Drawing;
using Crevice.Core.FSM;
using Crevice.Core.Events;
using Crevice.Threading;
public class NullGes... |
Add instantiation of context on app start. | using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Presentation.Web
{
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801
... | using System.Data.Entity;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Infrastructure.DataAccess;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Presentation.Web
{
// Note: For instructions on enabling IIS6 or IIS7 classic mode,... |
Allow .map files as default browsable file extensions from the App_Plugins static file handler. | // Copyright (c) Umbraco.
// See LICENSE for more details.
using System.Collections.Generic;
namespace Umbraco.Cms.Core.Configuration.Models
{
/// <summary>
/// Typed configuration options for the plugins.
/// </summary>
[UmbracoOptions(Constants.Configuration.ConfigPlugins)]
public class UmbracoP... | // Copyright (c) Umbraco.
// See LICENSE for more details.
using System.Collections.Generic;
namespace Umbraco.Cms.Core.Configuration.Models
{
/// <summary>
/// Typed configuration options for the plugins.
/// </summary>
[UmbracoOptions(Constants.Configuration.ConfigPlugins)]
public class UmbracoP... |
Use https for Sparkle updates and change log access | // *****************************************************
// CIXReader
// Constants_Windows.cs
//
// Author: Steve Palmer (spalmer@cix)
//
// Created: 21/06/2015 11:02
//
// Copyright (C) 2013-2015 CIX Online Ltd. All Rights Reserved.
// *****************************************************
namespace CIXReader.Uti... | // *****************************************************
// CIXReader
// Constants_Windows.cs
//
// Author: Steve Palmer (spalmer@cix)
//
// Created: 21/06/2015 11:02
//
// Copyright (C) 2013-2015 CIX Online Ltd. All Rights Reserved.
// *****************************************************
namespace CIXReader.Uti... |
Create Contact method added to Contact Controller | using DEX.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace DEX.Controllers
{
public class ContactController : Controller
{
private ApplicationDbContext db = new ApplicationDbContext();
}
} | using DEX.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace DEX.Controllers
{
public class ContactController : Controller
{
private ApplicationDbContext db = new ApplicationDbContext();
... |
Rename "Final PP" to "Achieved PP" | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using Newtonsoft.Json;
namespace osu.Game.Rulesets.Difficulty
{
public class PerformanceAttributes
{
/// <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.
using System.Collections.Generic;
using Newtonsoft.Json;
namespace osu.Game.Rulesets.Difficulty
{
public class PerformanceAttributes
{
/// <summary>
... |
Revert the addition of SQL code for deleting DuplicateCuratedPackages. This will move over to a SQL script in NuGetOperations. | namespace NuGetGallery.Migrations
{
using System.Data.Entity.Migrations;
public partial class CuratedFeedPackageUniqueness : DbMigration
{
public override void Up()
{
// DELETE duplicate CuratedPackages from the database
// Trying to prefer keeping duplicated ent... | namespace NuGetGallery.Migrations
{
using System.Data.Entity.Migrations;
public partial class CuratedFeedPackageUniqueness : DbMigration
{
public override void Up()
{
// ADD uniqueness constraint - as an Index, since it seems reasonable to look up curated package entries by ... |
Add comments to the notification interface | using System;
using System.Collections.Generic;
namespace CertiPay.Common.Notifications
{
public class Notification
{
public String Content { get; set; }
public ICollection<String> Recipients { get; set; }
public Notification()
{
this.Recipients = new List<String>... | using System;
using System.Collections.Generic;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Describes the base notification content required to send
/// </summary>
public class Notification
{
/// <summary>
/// The content of the message
/// </summary>
... |
Remove unused positional constructor arg | using HOLMS.Types.Booking.Indicators;
using HOLMS.Types.Extensions;
using HOLMS.Types.Primitive;
namespace HOLMS.Types.Booking {
public partial class CancellationPolicy : EntityDTO<CancellationPolicyIndicator> {
public CancellationPolicy(CancellationPolicyIndicator id, string description,
int ... | using HOLMS.Types.Booking.Indicators;
using HOLMS.Types.Extensions;
using HOLMS.Types.Primitive;
namespace HOLMS.Types.Booking {
public partial class CancellationPolicy : EntityDTO<CancellationPolicyIndicator> {
public CancellationPolicy(CancellationPolicyIndicator id, string description,
int ... |
Adjust default mania speed to match stable | // 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.Configuration.Tracking;
using osu.Game.Configuration;
using osu.Game.Rulesets.Configuration;
using osu.Game.Rulesets.Mania.UI;
namespace osu.Game.R... | // 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.Configuration.Tracking;
using osu.Game.Configuration;
using osu.Game.Rulesets.Configuration;
using osu.Game.Rulesets.Mania.UI;
namespace osu.Game.R... |
Fix tests failing due to base logic firing | // 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.Online.API.Requests.Responses;
namespace osu.Game.Overlays.Changelog
{
public class ChangelogUpdateStreamControl : OverlayStreamControl<APIUpdateStre... | // 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.Online.API.Requests.Responses;
namespace osu.Game.Overlays.Changelog
{
public class ChangelogUpdateStreamControl : OverlayStreamControl<APIUpdateStre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.