Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Fix that the flag prevents serialization. | #region -- License Terms --
//
// MessagePack for CLI
//
// Copyright (C) 2010 FUJIWARA, Yusuke
//
// 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... | #region -- License Terms --
//
// MessagePack for CLI
//
// Copyright (C) 2010 FUJIWARA, Yusuke
//
// 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... |
Cover ALL forward/back navigation cases | #region Copyright © 2014 Ricardo Amaral
/*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
*/
#endregion
using CefSharp;
namespace SlackUI {
internal class BrowserRequestHandler : IRequestHandler {
#region Public Methods
public bool GetA... | #region Copyright © 2014 Ricardo Amaral
/*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
*/
#endregion
using CefSharp;
namespace SlackUI {
internal class BrowserRequestHandler : IRequestHandler {
#region Public Methods
public bool GetA... |
Rename Email struct as EmailAddress; refactor as appropriate | 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... | 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... |
Make internals visible to Newtonsoft.Json | using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("StripeTests")]
| using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Newtonsoft.Json")]
[assembly: InternalsVisibleTo("StripeTests")]
|
Use default error messages in demo app. | using Dolstagis.Web;
using Dolstagis.Web.Sessions;
namespace WebApp
{
public class HomeModule : Module
{
public HomeModule()
{
Services.For<ISessionStore>().Singleton().Use<InMemorySessionStore>();
AddStaticFiles("~/content");
AddViews("~/views"... | using Dolstagis.Web;
using Dolstagis.Web.Sessions;
namespace WebApp
{
public class HomeModule : Module
{
public HomeModule()
{
Services.For<ISessionStore>().Singleton().Use<InMemorySessionStore>();
AddStaticFiles("~/content");
AddViews("~/views"... |
Add more tests for enums | using System;
using System.Linq.Expressions;
using Xunit;
namespace DelegateDecompiler.Tests
{
public class EnumTests : DecompilerTestsBase
{
public enum TestEnum
{
Foo,
Bar
}
[Fact]
public void TestEnumParameterEqualsEnumConstant()
{
... | using System;
using System.Linq.Expressions;
using Xunit;
namespace DelegateDecompiler.Tests
{
public class EnumTests : DecompilerTestsBase
{
public enum TestEnum
{
Foo,
Bar
}
[Fact]
public void TestEnumParameterEqualsEnumConstant()... |
Improve tests with theory test cases | using Ardalis.GuardClauses;
using System;
using Xunit;
namespace GuardClauses.UnitTests
{
public class GuardAgainsOutOfRange
{
[Fact]
public void DoesNothingGivenInRangeValueUsingShortcutMethod()
{
Guard.AgainsOutOfRange(2, "index", 1, 5);
}
[Fact]
... | using Ardalis.GuardClauses;
using System;
using Xunit;
namespace GuardClauses.UnitTests
{
public class GuardAgainsOutOfRange
{
[Theory]
[InlineData(1, 1, 5)]
[InlineData(2, 1, 5)]
[InlineData(3, 1, 5)]
public void DoesNothingGivenInRangeValueUsingShortcutMethod(int inpu... |
Exclude AppBuilder test from running on Mono. | namespace Nancy.Owin.Tests
{
using System;
using global::Owin;
using Microsoft.Owin.Testing;
using Nancy.Testing;
using Xunit;
public class AppBuilderExtensionsFixture
{
/*[Fact]
public void When_host_Nancy_via_IAppBuilder_then_should_handle_requests()
... | namespace Nancy.Owin.Tests
{
using System;
using global::Owin;
using Microsoft.Owin.Testing;
using Nancy.Testing;
using Xunit;
public class AppBuilderExtensionsFixture
{
#if !__MonoCS__
[Fact]
public void When_host_Nancy_via_IAppBuilder_then_should_handl... |
Validate Username and ApiKey from appSettings. | using System;
using System.Configuration;
namespace librato4net
{
public class AppSettingsLibratoSettings : ILibratoSettings
{
// ReSharper disable once InconsistentNaming
private static readonly AppSettingsLibratoSettings settings = new AppSettingsLibratoSettings();
private const str... | using System;
using System.Configuration;
namespace librato4net
{
public class AppSettingsLibratoSettings : ILibratoSettings
{
// ReSharper disable once InconsistentNaming
private static readonly AppSettingsLibratoSettings settings = new AppSettingsLibratoSettings();
private const str... |
Fix issue where ratio was always returning "1" | using System;
namespace Satrabel.OpenContent.Components.TemplateHelpers
{
public class Ratio
{
private readonly float _ratio;
public int Width { get; private set; }
public int Height { get; private set; }
public float AsFloat
{
get { return Width / Height; ... | using System;
namespace Satrabel.OpenContent.Components.TemplateHelpers
{
public class Ratio
{
private readonly float _ratio;
public int Width { get; private set; }
public int Height { get; private set; }
public float AsFloat
{
get { return (float)Width / (... |
Change InitializeStackTrace helper to store trace in Data | // 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 System.Diagnostics
{
/// <summary>Provides a set of static methods for working with Exceptions.</summa... | // 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 System.Diagnostics
{
/// <summary>Provides a set of static methods for working with Exceptions.</summa... |
Fix imports on admin logs | using BatteryCommander.Web.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
namespace BatteryCommander.Web.Controllers
{
[Authorize, ApiExplorerSettings(IgnoreApi = true)]
public class AdminController : Controller
{
// Admin Tasks:
// Add/Rem... | using BatteryCommander.Web.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.IO;
namespace BatteryCommander.Web.Controllers
{
[Authorize, ApiExplorerSettings(IgnoreApi = true)]
public class AdminController : Controller
{
// Admin Tasks:
... |
Use CRLF instead of LF. | // 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.Collections.Generic;
namespace osu.Game.Audio
{
public class SampleInfoList : List<SampleInfo>
{
public SampleInfoList()
{
... | // 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.Collections.Generic;
namespace osu.Game.Audio
{
public class SampleInfoList : List<SampleInfo>
{
public SampleInfoList()
... |
Update Error Layout to Standardise Against Standard Layout | @model Portal.CMS.Web.Areas.Builder.ViewModels.Build.CustomViewModel
@{
ViewBag.Title = "Error";
Layout = "";
}
<!DOCTYPE html>
<html lang="en-gb">
<head>
<title>Portal CMS: @ViewBag.Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />... | @model Portal.CMS.Web.Areas.Builder.ViewModels.Build.CustomViewModel
@{
ViewBag.Title = "Error";
Layout = "";
}
<!DOCTYPE html>
<html lang="en-gb">
<head>
<title>Portal CMS: @ViewBag.Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />... |
Destroy NetworkController when going back to menu | using UnityEngine;
using System.Collections;
public class BackToMenu : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.Escape)){
Application.LoadLevel(0);
GameObject GUI;
GUI = GameObject.Find("GUISYS... | using UnityEngine;
using System.Collections;
public class BackToMenu : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.Escape)){
Application.LoadLevel(0);
GameObject guiSys;
guiSys = GameObject.Find("... |
Fix NUGET_PACKAGES folder when running tests. | // 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 ... |
Split the commit message into the subject line and the body | using System;
using System.Threading;
namespace GitHub.Unity
{
class GitCommitTask : ProcessTask<string>
{
private const string TaskName = "git commit";
private readonly string arguments;
public GitCommitTask(string message, string body,
CancellationToken token, IOutputPro... | using System;
using System.Threading;
namespace GitHub.Unity
{
class GitCommitTask : ProcessTask<string>
{
private const string TaskName = "git commit";
private readonly string arguments;
public GitCommitTask(string message, string body,
CancellationToken token, IOutputPro... |
Add dynamic left margin for line parts | using System;
using System.Collections.Generic;
namespace Hangman {
public class Row {
public Cell[] Cells;
public Row(Cell[] cells) {
Cells = cells;
}
public string Draw(int width) {
// return new String(' ', width - Text.Length) + Text;
return String.Join("\n", Lines());
}
... | using System;
using System.Collections.Generic;
namespace Hangman {
public class Row {
public Cell[] Cells;
private int Width;
public Row(Cell[] cells) {
Cells = cells;
}
public string Draw(int width) {
// return new String(' ', width - Text.Length) + Text;
Width = width;
... |
Use IsAssignableTo instead of IsAssignableFrom | using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
namespace Scrutor
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class ServiceDescriptorAttribute : Attribute
{
public ServiceDescriptorAttribute() : th... | using System;
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
namespace Scrutor
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class ServiceDescriptorAttribute : Attribute
{
public ServiceDescriptorAttribute() : this(null) { }
pub... |
Fix issue where Get-AzureRmContext does not allow user to silently continue | // ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.apa... | // ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.apa... |
Refactor NHibernate module for clarity | using System;
using Agiil.Data;
using Agiil.Domain;
using Autofac;
using NHibernate;
using NHibernate.Cfg;
namespace Agiil.Bootstrap.Data
{
public class NHibernateModule : Module
{
protected override void Load(ContainerBuilder builder)
{
// Configuration
builder
.Register((ctx, paramet... | using System;
using Agiil.Data;
using Agiil.Domain;
using Autofac;
using NHibernate;
using NHibernate.Cfg;
namespace Agiil.Bootstrap.Data
{
public class NHibernateModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder
.Register(BuildNHibernateConfiguration)
... |
Add InternalsVisibleTo for T4 Tests | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through t... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through t... |
Move conditional compilation around namespace. | namespace Cassette.Views
{
#if NET35
public interface IHtmlString
{
string ToHtmlString();
}
public class HtmlString : IHtmlString
{
string _htmlString;
public HtmlString(string htmlString)
{
this._htmlString = htmlString;
}
public stri... | #if NET35
namespace Cassette.Views
{
public interface IHtmlString
{
string ToHtmlString();
}
public class HtmlString : IHtmlString
{
string _htmlString;
public HtmlString(string htmlString)
{
this._htmlString = htmlString;
}
public stri... |
Update tests with new behaviour | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Globalization;
using NUnit.Framework;
using osu.Framework.Localisation;
namespace osu.Framework.Tests.Localisation
{
[TestFixture]
public class Cult... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Globalization;
using NUnit.Framework;
using osu.Framework.Localisation;
namespace osu.Framework.Tests.Localisation
{
[TestFixture]
public class Cult... |
Update the exception to be more developer friendly | using System;
using System.Collections.Generic;
using System.Text;
using Plugin.Permissions.Abstractions;
namespace Plugin.Media.Abstractions
{
/// <summary>
/// Permission exception.
/// </summary>
public class MediaPermissionException : Exception
{
/// <summary>
/// Permission required that is missin... | using System;
using System.Collections.Generic;
using System.Text;
using Plugin.Permissions.Abstractions;
namespace Plugin.Media.Abstractions
{
/// <summary>
/// Permission exception.
/// </summary>
public class MediaPermissionException : Exception
{
/// <summary>
/// Permission required that is missin... |
Modify trace injector to http injector | using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Criteo.Profiling.Tracing.Transport;
namespace Criteo.Profiling.Tracing.Middleware
{
public class TracingHandler : DelegatingHandler
{
private readonly ITraceInjector<HttpHeaders> _injector;
private readonl... | using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Criteo.Profiling.Tracing.Transport;
namespace Criteo.Profiling.Tracing.Middleware
{
public class TracingHandler : DelegatingHandler
{
private readonly ZipkinHttpTraceInjector _injector;
private readonly st... |
Fix master server auto-update with /nightly flag | using LmpGlobal;
using LmpUpdater.Appveyor.Contracts;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Net;
namespace LmpUpdater.Appveyor
{
public class AppveyorUpdateChecker
{
public static RootObject LatestBuild
{
get
{
try... | using LmpGlobal;
using LmpUpdater.Appveyor.Contracts;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Net;
namespace LmpUpdater.Appveyor
{
public class AppveyorUpdateChecker
{
public static RootObject LatestBuild
{
get
{
try... |
Write data to OBJ and MTL | using System;
using System.IO;
using System.Windows.Forms;
namespace JPMeshConverter {
public partial class Form1 : Form {
private ModelFileDialog fileDialog;
public Form1() {
InitializeComponent();
fileDialog = new ModelFileDialog(System.AppDomain.CurrentDomain.BaseDirect... | using System;
using System.IO;
using System.Windows.Forms;
namespace JPMeshConverter {
public partial class Form1 : Form {
private ModelFileDialog fileDialog;
public Form1() {
InitializeComponent();
fileDialog = new ModelFileDialog(System.AppDomain.CurrentDomain.BaseDirect... |
Fix for balance null ref | using System;
using System.Collections.Generic;
using System.Linq;
namespace Cash_Flow_Projection.Models
{
public static class Balance
{
public static Decimal CurrentBalance(this IEnumerable<Entry> entries, Account account = Account.Cash)
{
return GetLastBalanceEntry(entries, accou... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Cash_Flow_Projection.Models
{
public static class Balance
{
public static Decimal CurrentBalance(this IEnumerable<Entry> entries, Account account = Account.Cash)
{
return GetLastBalanceEntry(entries, accou... |
Fix unity call in another thread | using LunaClient.Base;
using LunaClient.Base.Interface;
using LunaClient.VesselUtilities;
using LunaCommon.Message.Data.Vessel;
using LunaCommon.Message.Interface;
using System.Collections.Concurrent;
namespace LunaClient.Systems.VesselPartModuleSyncSys
{
public class VesselPartModuleSyncMessageHandler : SubSyste... | using LunaClient.Base;
using LunaClient.Base.Interface;
using LunaClient.VesselUtilities;
using LunaCommon.Message.Data.Vessel;
using LunaCommon.Message.Interface;
using System.Collections.Concurrent;
namespace LunaClient.Systems.VesselPartModuleSyncSys
{
public class VesselPartModuleSyncMessageHandler : SubSyste... |
Work around faulty StatusStrip implementations | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
namespace ExtendedControls
{
public class StatusStripCustom : StatusStrip
{
public const int WM_NCHITTEST = 0x84;
public const int WM_NCLBUTTONDOWN = 0xA1;
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
namespace ExtendedControls
{
public class StatusStripCustom : StatusStrip
{
public const int WM_NCHITTEST = 0x84;
public const int WM_NCLBUTTONDOWN = 0xA1;
... |
Fix for null values when stripping characters in feeds. | /*
Copyright 2017 James Craig
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /*
Copyright 2017 James Craig
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... |
Add button to access first run setup on demand | // 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.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Secti... | // 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.Sprites;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using ... |
Add calc method for disposible income | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Identifies the method to calculate the result
/// </summary>
public enum CalculationType : byte
{
/// <summary>
/// Deduction is taken as a percentag... | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Identifies the method to calculate the result
/// </summary>
public enum CalculationType : byte
{
/// <summary>
/// Deduction is taken as a percentag... |
Support invalid certificates (e.g. if Fiddler is in use) and more security protocols (adds Tls1.1 and Tls1.2) | using System;
using System.Windows.Forms;
namespace DrawShip.Viewer
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
var applicationContext = new ApplicationContext();
var runMode = applicationContext.GetRunMode();... | using System;
using System.Net;
using System.Windows.Forms;
namespace DrawShip.Viewer
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, ch... |
Split out package equality comparer | //*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 License
//
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,... | //*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 License
//
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,... |
Remove trailing .exe in process name. | using System;
using System.Diagnostics;
namespace IronAHK.Rusty
{
partial class Core
{
#region Disk
static string[] Glob(string pattern)
{
return new string[] { };
}
#endregion
#region Process
static Process FindProcess(string name)
... | using System;
using System.Diagnostics;
namespace IronAHK.Rusty
{
partial class Core
{
#region Disk
static string[] Glob(string pattern)
{
return new string[] { };
}
#endregion
#region Process
static Process FindProcess(string name)
... |
Use the term response instead of 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.",... | 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... |
Fix spurious 404 response when deep linking to a client route | using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.StaticFiles;
using Microsoft.Extensions.Logging;
using System.Threading.Tasks;
namespace WebPackAngular2TypeScript.Routing
{
public class DeepLinkingMiddleware
{
public DeepLinkingMiddle... | using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.StaticFiles;
using Microsoft.Extensions.Logging;
using System.Threading.Tasks;
namespace WebPackAngular2TypeScript.Routing
{
public class DeepLinkingMiddleware
{
public DeepLinkingMiddle... |
Fix connectionStrings section attribute in BadConfig doc page | @using Dashboard
@using Microsoft.WindowsAzure.Jobs
@{
ViewBag.Title = "Configuration Error";
}
<h2>Bad Config</h2>
<p>
The configuration is not properly set for the Windows Azure Web Jobs SDK Dashboard.
In your configuration (such as web.config), you must set a connection string named <i>@JobHost.LoggingConnecti... | @using Dashboard
@using Microsoft.WindowsAzure.Jobs
@{
ViewBag.Title = "Configuration Error";
}
<h2>Bad Config</h2>
<p>
The configuration is not properly set for the Windows Azure Web Jobs SDK Dashboard.
In your configuration (such as web.config), you must set a connection string named <i>@JobHost.LoggingConnecti... |
Enhance the Mac command reference text a bit | using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
namespace RepoZ.UI.Mac.Story
{
public class StringCommandHandler
{
private Dictionary<string, Action> _commands = new Dictionary<string, Action>();
private StringBuilder _helpBuilder = new StringBuilder();
... | using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
namespace RepoZ.UI.Mac.Story
{
public class StringCommandHandler
{
private Dictionary<string, Action> _commands = new Dictionary<string, Action>();
private StringBuilder _helpBuilder = new StringBuilder();
... |
Use site title in email subject for exception handler. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ActionMailer.Net.Mvc;
using RationalVote.Models;
using System.Configuration;
namespace RationalVote.Controllers
{
public class MailController : MailerBase
{
public static string GetFromEmail( string purpose )
{
return ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ActionMailer.Net.Mvc;
using RationalVote.Models;
using System.Configuration;
namespace RationalVote.Controllers
{
public class MailController : MailerBase
{
public static string GetFromEmail( string purpose )
{
return ... |
Use SequenceEqual instead of operator== for comparison of arrays in 'Can_perform_query_with_max_length' test | namespace InfoCarrier.Core.EFCore.FunctionalTests
{
using Microsoft.EntityFrameworkCore.Specification.Tests;
using Xunit;
public class BuiltInDataTypesInfoCarrierTest : BuiltInDataTypesTestBase<BuiltInDataTypesInfoCarrierFixture>
{
public BuiltInDataTypesInfoCarrierTest(BuiltInDataTypesInfoCar... | namespace InfoCarrier.Core.EFCore.FunctionalTests
{
using System.Linq;
using Microsoft.EntityFrameworkCore.Specification.Tests;
using Xunit;
public class BuiltInDataTypesInfoCarrierTest : BuiltInDataTypesTestBase<BuiltInDataTypesInfoCarrierFixture>
{
public BuiltInDataTypesInfoCarrierTest(... |
Return JSON object from Values controller | using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace WebAPIApplication.Controllers
{
[Route("api/[controller]")]
public class ValuesController : Controller
{
[HttpGet]
[Route("ping")]
public string Ping()
{
return "All good. You don... | using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace WebAPIApplication.Controllers
{
[Route("api/[controller]")]
public class ValuesController : Controller
{
[HttpGet]
[Route("ping")]
public dynamic Ping()
{
return new {
... |
Make sure a capture will not leave the TemplateContext in an unbalanced state if an exception occurs | // Copyright (c) Alexandre Mutel. All rights reserved.
// Licensed under the BSD-Clause 2 license.
// See license.txt file in the project root for full license information.
using Scriban.Runtime;
namespace Scriban.Syntax
{
[ScriptSyntax("capture statement", "capture <variable> ... end")]
public class ScriptC... | // Copyright (c) Alexandre Mutel. All rights reserved.
// Licensed under the BSD-Clause 2 license.
// See license.txt file in the project root for full license information.
using Scriban.Runtime;
namespace Scriban.Syntax
{
[ScriptSyntax("capture statement", "capture <variable> ... end")]
public class ScriptC... |
Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the assembly version that remains at the major. | using System.Reflection;
[assembly: AssemblyTitle("Autofac.Tests.Integration.Mvc")]
[assembly: AssemblyDescription("")]
| using System.Reflection;
[assembly: AssemblyTitle("Autofac.Tests.Integration.Mvc")]
|
Rename app setting for finance api audiences | using System.Configuration;
using Microsoft.Owin;
using Microsoft.Owin.Security.ActiveDirectory;
using Owin;
using SFA.DAS.EmployerFinance.Api;
[assembly: OwinStartup(typeof(Startup))]
namespace SFA.DAS.EmployerFinance.Api
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
... | using System.Configuration;
using Microsoft.Owin;
using Microsoft.Owin.Security.ActiveDirectory;
using Owin;
using SFA.DAS.EmployerFinance.Api;
[assembly: OwinStartup(typeof(Startup))]
namespace SFA.DAS.EmployerFinance.Api
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
... |
Fix answer 28 to include square roots in prime test | using System;
using System.Linq;
namespace Abc.NCrafts.Quizz.Performance.Questions._028
{
[CorrectAnswer(Difficulty = Difficulty.Medium)]
public class Answer1
{
public static void Run()
{
// begin
var primes = Enumerable.Range(0, 10 * 1000)
... | using System;
using System.Linq;
namespace Abc.NCrafts.Quizz.Performance.Questions._028
{
[CorrectAnswer(Difficulty = Difficulty.Medium)]
public class Answer1
{
public static void Run()
{
// begin
var primes = Enumerable.Range(0, 10 * 1000)
... |
Add base uri to tests | using System;
using System.Diagnostics;
using Microsoft.Extensions.Configuration;
using Xunit;
using SocksSharp;
using SocksSharp.Proxy;
namespace SocksSharp.Tests
{
public class ProxyClientTests
{
private ProxySettings proxySettings;
private void GatherTestConfiguration()
{
... | using System;
using System.Diagnostics;
using Microsoft.Extensions.Configuration;
using Xunit;
using SocksSharp;
using SocksSharp.Proxy;
namespace SocksSharp.Tests
{
public class ProxyClientTests
{
private Uri baseUri = new Uri("http://httpbin.org/");
private ProxySettings proxySettings;
... |
Check Azure configuration more carefully. Add contracts for some base classes. Fix ExportOrder. | using System;
using System.ComponentModel.Composition;
namespace Cogito.Composition
{
/// <summary>
/// Attaches an Order metadata property to the export.
/// </summary>
[MetadataAttribute]
public class ExportOrderAttribute :
Attribute
{
readonly int order;
/// <summ... | using System;
using System.ComponentModel.Composition;
namespace Cogito.Composition
{
/// <summary>
/// Attaches an Order metadata property to the export.
/// </summary>
[MetadataAttribute]
public class ExportOrderAttribute :
Attribute,
IOrderedExportMetadata
{
/// <s... |
Add unit test for empty timezone | namespace DarkSky.UnitTests.Extensions
{
using System;
using NodaTime;
using Xunit;
using static DarkSky.Extensions.LongExtensions;
public class LongExtensionsUnitTests
{
public static System.Collections.Generic.IEnumerable<object[]> GetDateTimeOffsets()
{
yield return new object[] { DateTimeOffset.MinVa... | namespace DarkSky.UnitTests.Extensions
{
using System;
using NodaTime;
using Xunit;
using static DarkSky.Extensions.LongExtensions;
public class LongExtensionsUnitTests
{
public static System.Collections.Generic.IEnumerable<object[]> GetDateTimeOffsets()
{
yield return new object[] { DateTimeOffset.MinVa... |
Add basic setup for song select 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.
namespace osu.Game.Screens.Edit.Setup
{
public class SetupScreen : EditorScreen
{
public SetupScreen()
{
Child = new ScreenWhiteBox.U... | // 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.Shapes;
using osu.Game.Beatmaps.Drawa... |
Fix type mapping for IPubFileProvider | // Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using AutomaticTypeMapper;
using EOLib.IO.Pub;
namespace EOLib.IO.Repositories
{
[MappedType(BaseType = typeof(IPubFileRepository), IsSingleton = true)]
[MappedT... | // Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using AutomaticTypeMapper;
using EOLib.IO.Pub;
namespace EOLib.IO.Repositories
{
[MappedType(BaseType = typeof(IPubFileRepository), IsSingleton = true)]
[MappedT... |
Add IReloadable interface and method | using System.Collections.Generic;
using System.Linq;
using Wox.Plugin.BrowserBookmark.Commands;
using Wox.Plugin.SharedCommands;
namespace Wox.Plugin.BrowserBookmark
{
public class Main : IPlugin
{
private PluginInitContext context;
private List<Bookmark> cachedBookmarks = new List<Bo... | using System.Collections.Generic;
using System.Linq;
using Wox.Plugin.BrowserBookmark.Commands;
using Wox.Plugin.SharedCommands;
namespace Wox.Plugin.BrowserBookmark
{
public class Main : IPlugin, IReloadable
{
private PluginInitContext context;
private List<Bookmark> cachedBookmarks ... |
Change version number to v0.5.1.0 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Skylight")]
[assembly: AssemblyDescription("An API by TakoMan02 for Everybody Edits")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("TakoMan02")]
[assembly: AssemblyProdu... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Skylight")]
[assembly: AssemblyDescription("An API by TakoMan02 for Everybody Edits")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("TakoMan02")]
[assembly: AssemblyProdu... |
Rename fields name pattern to match rest of code | using System;
namespace SQLite.Net
{
public class BlobSerializerDelegate : IBlobSerializer
{
public delegate byte[] SerializeDelegate(object obj);
public delegate bool CanSerializeDelegate(Type type);
public delegate object DeserializeDelegate(byte[] data, Type type);
private ... | using System;
namespace SQLite.Net
{
public class BlobSerializerDelegate : IBlobSerializer
{
public delegate byte[] SerializeDelegate(object obj);
public delegate bool CanSerializeDelegate(Type type);
public delegate object DeserializeDelegate(byte[] data, Type type);
privat... |
Handle update based on a path object as well as the directory/file | using Cake.Core.IO;
using Ensconce.Update;
using System.IO;
namespace Ensconce.Cake
{
public static class EnsconceFileUpdateExtensions
{
public static void TextSubstitute(this IFile file, FilePath fixedStructureFile)
{
var tagDictionary = fixedStructureFile == null ? TagDictionaryB... | using Cake.Core.IO;
using Ensconce.Update;
using System.IO;
namespace Ensconce.Cake
{
public static class EnsconceFileUpdateExtensions
{
public static void TextSubstitute(this IFile file, FilePath fixedStructureFile)
{
file.Path.TextSubstitute(fixedStructureFile);
}
... |
Revert "fixed mandatory field error message" | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using BForms.Models;
using BForms.Mvc;
namespace BForms.Docs
{
public class MvcApplication : System.Web.HttpApplication
{
protected void ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using BForms.Models;
using BForms.Mvc;
namespace BForms.Docs
{
public class MvcApplication : System.Web.HttpApplication
{
protected void ... |
Add a const string field for the If-None-Match HTTP header | namespace ServiceStack.Common.Web
{
public static class HttpHeaders
{
public const string XParamOverridePrefix = "X-Param-Override-";
public const string XHttpMethodOverride = "X-Http-Method-Override";
public const string XUserAuthId = "X-UAId";
public const string X... | namespace ServiceStack.Common.Web
{
public static class HttpHeaders
{
public const string XParamOverridePrefix = "X-Param-Override-";
public const string XHttpMethodOverride = "X-Http-Method-Override";
public const string XUserAuthId = "X-UAId";
public const string XForwardedF... |
Make sure to clean my dic. | using Nito.AsyncEx;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.Extensions.Caching.Memory
{
public static class MemoryExtensions
{
private static Dictionary<object, AsyncLock> AsyncLocks { get; } = new Dictionary<object, AsyncLock>();
priva... | using Nito.AsyncEx;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.Extensions.Caching.Memory
{
public static class MemoryExtensions
{
private static Dictionary<object, AsyncLock> AsyncLocks { get; } = new Dictionary<object, As... |
Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the assembly version that remains at the major. | using System.Reflection;
[assembly: AssemblyTitle("Autofac.Tests.Integration.Web")]
[assembly: AssemblyDescription("")]
| using System.Reflection;
[assembly: AssemblyTitle("Autofac.Tests.Integration.Web")]
|
Add SourceID and SourceType to journal | using System;
namespace XeroApi.Model
{
public class Journal : EndpointModelBase
{
[ItemId]
public Guid JournalID { get; set; }
public DateTime JournalDate { get; set; }
public long JournalNumber { get; set; }
[ItemUpdatedDate]
public DateTime... | using System;
namespace XeroApi.Model
{
public class Journal : EndpointModelBase
{
[ItemId]
public Guid JournalID { get; set; }
public DateTime JournalDate { get; set; }
public long JournalNumber { get; set; }
[ItemUpdatedDate]
public DateTime... |
Fix bug to find non-existent sys db in mysql | using System;
using System.Configuration;
using System.Data.SqlClient;
using MySql.Data.MySqlClient;
namespace TrackableData.MySql.Tests
{
public class Database : IDisposable
{
public Database()
{
var cstr = ConfigurationManager.ConnectionStrings["TestDb"].ConnectionString;
... | using System;
using System.Configuration;
using System.Data.SqlClient;
using MySql.Data.MySqlClient;
namespace TrackableData.MySql.Tests
{
public class Database : IDisposable
{
public Database()
{
var cstr = ConfigurationManager.ConnectionStrings["TestDb"].ConnectionString;
... |
Remove use of UseWorkingDirectory in default template | using System.Threading.Tasks;
using Cake.Core;
using Cake.Core.Diagnostics;
using Cake.Frosting;
public static class Program
{
public static int Main(string[] args)
{
return new CakeHost()
.UseContext<BuildContext>()
.UseWorkingDirectory("..")
.Run(args);
}
}
pu... | using System.Threading.Tasks;
using Cake.Core;
using Cake.Core.Diagnostics;
using Cake.Frosting;
public static class Program
{
public static int Main(string[] args)
{
return new CakeHost()
.UseContext<BuildContext>()
.Run(args);
}
}
public class BuildContext : FrostingConte... |
Add other upgrades to enum | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum Upgrade {
NONE, ROBOT, NIGHTVISION, UNICORN, ZOMBIE, REDHAT, BEEARD
}
| using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum Upgrade {
NONE, ROBOT, NIGHTVISION, UNICORN, ZOMBIE, REDHAT, BEEARD, BEEBALL, SCHOOLBUZZ, BUZZFEED, BEACH, GUM, VISOR
}
|
Fix to also check the Required property of the JsonProperty when determining if a model property is required or optional. | using System;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
using Newtonsoft.Json.Serialization;
namespace Swashbuckle.Swagger
{
public static class JsonPropertyExtensions
{
public static bool IsRequired(this JsonProperty jsonProperty)
{
return jsonProperty.... | using System;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Swashbuckle.Swagger
{
public static class JsonPropertyExtensions
{
public static bool IsRequired(this JsonProperty jsonProperty)
{
... |
Set private.config to optional to fix unit tests on build server | using Microsoft.Extensions.Configuration;
using Xunit;
namespace RedditSharpTests
{
public class AuthenticatedTestsFixture
{
public IConfigurationRoot Config { get; private set; }
public string AccessToken { get; private set; }
public RedditSharp.BotWebAgent WebAgent { get; set; }
... | using Microsoft.Extensions.Configuration;
using Xunit;
namespace RedditSharpTests
{
public class AuthenticatedTestsFixture
{
public IConfigurationRoot Config { get; private set; }
public string AccessToken { get; private set; }
public RedditSharp.BotWebAgent WebAgent { get; set; }
... |
Reduce packet size, remove bloated time codes | using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;
namespace LiteNetLibManager
{
public struct ServerTimeMessage : INetSerializable
{
public int serverUnixTime;
public float serverTime;
public void Deserialize(NetDataReader reader)
{
... | using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;
namespace LiteNetLibManager
{
public struct ServerTimeMessage : INetSerializable
{
public int serverUnixTime;
public void Deserialize(NetDataReader reader)
{
serverUnixTime = reader.GetPack... |
Rename refactor;: GCMonitor.work -> GCMonitor._work | // Needed for Workaround
using System;
using System.Threading;
using Theraot.Collections.ThreadSafe;
namespace Theraot.Threading
{
public static partial class GCMonitor
{
private static class Internal
{
private static readonly WeakDelegateCollection _collectedEventHandlers;
... | // Needed for Workaround
using System;
using System.Threading;
using Theraot.Collections.ThreadSafe;
namespace Theraot.Threading
{
public static partial class GCMonitor
{
private static class Internal
{
private static readonly WeakDelegateCollection _collectedEventHandlers;
... |
Update for new version of Cardboard SDK | using UnityEngine;
using System.Collections;
/**
* Dealing with raw touch input from a Cardboard device
*/
public class ParsedTouchData {
private bool wasTouched = false;
public ParsedTouchData() {}
public void Update() {
wasTouched |= this.IsDown();
}
public bool IsDown() {
return Input.touchCou... | using UnityEngine;
using System.Collections;
/**
* Dealing with raw touch input from a Cardboard device
*/
public class ParsedTouchData {
private bool wasTouched = false;
public ParsedTouchData() {
Cardboard cardboard = CardboardGameObject().GetComponent<Cardboard>();
cardboard.TapIsTrigger = false;
}
... |
Add ability to mark auth handle as successful | using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
namespace BTCPayServer.Security;
public class AuthorizationFilterHandle
{
public AuthorizationHandlerContext Context { get; }
public PolicyRequirement Requirement { get; }
public HttpContext HttpContext { get; }
public bool Suc... | using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
namespace BTCPayServer.Security;
public class AuthorizationFilterHandle
{
public AuthorizationHandlerContext Context { get; }
public PolicyRequirement Requirement { get; }
public HttpContext HttpContext { get; }
public bool Suc... |
Mark ICCSaxDelegator class as internal. | /****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2009 Jason Booth
Copyright (c) 2011-2012 openxlive.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files ... | /****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2009 Jason Booth
Copyright (c) 2011-2012 openxlive.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files ... |
Fix the issue with settings name | using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
namespace BoardGamesApi.Controllers
{
[ApiExplorerSettings(IgnoreApi = true)]
public class TempController : Controller
{
private readonly IConfiguration _configuration;
publ... | using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
namespace BoardGamesApi.Controllers
{
[ApiExplorerSettings(IgnoreApi = true)]
public class TempController : Controller
{
private readonly IConfiguration _configuration;
publ... |
Allow Button.Text to be set to null | using Eto.Forms;
using MonoMac.AppKit;
using Eto.Drawing;
namespace Eto.Mac.Forms.Controls
{
public abstract class MacButton<TControl, TWidget, TCallback> : MacControl<TControl, TWidget, TCallback>, TextControl.IHandler
where TControl: NSButton
where TWidget: Control
where TCallback: Control.ICallback
{
publ... | using Eto.Forms;
using MonoMac.AppKit;
using Eto.Drawing;
namespace Eto.Mac.Forms.Controls
{
public abstract class MacButton<TControl, TWidget, TCallback> : MacControl<TControl, TWidget, TCallback>, TextControl.IHandler
where TControl: NSButton
where TWidget: Control
where TCallback: Control.ICallback
{
publ... |
Increase the point at which normal keys start in ManiaAction | // 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.ComponentModel;
using osu.Framework.Input.Bindings;
using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Mania
{
public class ManiaInputMa... | // 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.ComponentModel;
using osu.Framework.Input.Bindings;
using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Mania
{
public class ManiaInputMa... |
Remove unused field, for now | using System;
using System.Linq;
using System.Threading.Tasks;
using Octokit;
using Rackspace.Threading;
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
class LoadingView : Subview
{
private static readonly Vector2 viewSize = new Vector2(300, 250);
private bool isBusy;
... | using System;
using System.Linq;
using System.Threading.Tasks;
using Octokit;
using Rackspace.Threading;
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
class LoadingView : Subview
{
private static readonly Vector2 viewSize = new Vector2(300, 250);
private const string WindowTi... |
Handle physical back button in result view | using System;
using Xamarin.Forms;
using Xamarin.Forms.OAuth;
namespace OAuthTestApp
{
public class ResultPage : ContentPage
{
public ResultPage(AuthenticatonResult result, Action returnCallback)
{
var stack = new StackLayout
{
VerticalOptions = LayoutOp... | using System;
using Xamarin.Forms;
using Xamarin.Forms.OAuth;
using Xamarin.Forms.OAuth.Views;
namespace OAuthTestApp
{
public class ResultPage : ContentPage, IBackHandlingView
{
private readonly Action _returnCallback;
public ResultPage(AuthenticatonResult result, Action returnCallb... |
Move input block for thread safe | using Sync.Command;
using Sync.MessageFilter;
using Sync.Plugins;
using Sync.Source;
using Sync.Tools;
using System;
using System.Diagnostics;
using static Sync.Tools.IO;
namespace Sync
{
public static class Program
{
//public static I18n i18n;
static void Main(string[] args)
{
... | using Sync.Command;
using Sync.MessageFilter;
using Sync.Plugins;
using Sync.Source;
using Sync.Tools;
using System;
using System.Diagnostics;
using static Sync.Tools.IO;
namespace Sync
{
public static class Program
{
//public static I18n i18n;
static void Main(string[] args)
{
... |
Disable UWP C++ (for now) | using Microsoft.VisualStudio.ConnectedServices;
namespace AzureIoTHubConnectedService
{
[ConnectedServiceHandlerExport("Microsoft.AzureIoTHubService",
AppliesTo = "VisualC+WindowsAppContainer")]
internal class CppHandlerWAC : GenericAzureIoTHubServiceHandler
{
protected override HandlerManifes... | using Microsoft.VisualStudio.ConnectedServices;
namespace AzureIoTHubConnectedService
{
#if false // Disabled to a bug: https://github.com/Azure/azure-iot-sdks/issues/289
[ConnectedServiceHandlerExport("Microsoft.AzureIoTHubService",
AppliesTo = "VisualC+WindowsAppContainer")]
#endif
internal class CppHan... |
Add additional params to index request | // 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;
using osu.Game.Online.API;
namespace osu.Game.Online.Multiplayer
{
public class IndexPlaylistScoresRequest :... | // 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;
using osu.Framework.IO.Network;
using osu.Game.Extensions;
using osu.Game.Online.API;
using osu.Game.Online.API.R... |
Fix concurrency issue accessing Dictionary instance | using System;
using System.Collections.Generic;
using System.Linq;
namespace Orchard.Caching {
public class Cache<TKey, TResult> : ICache<TKey, TResult> {
private readonly Dictionary<TKey, CacheEntry> _entries;
public Cache() {
_entries = new Dictionary<TKey, CacheEntry>();
... | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
namespace Orchard.Caching {
public class Cache<TKey, TResult> : ICache<TKey, TResult> {
private readonly ConcurrentDictionary<TKey, CacheEntry> _entries;
public Cache() {
... |
Use local user when not in domain | using FootballLeague.Models;
using System.DirectoryServices;
namespace FootballLeague.Services
{
public class UsersADSearcher : IUsersADSearcher
{
public User LoadUserDetails(string userName)
{
var entry = new DirectoryEntry();
var searcher = new DirectorySearcher(entry... | using System.Linq;
using System.Web;
using FootballLeague.Models;
using System.DirectoryServices;
namespace FootballLeague.Services
{
public class UsersADSearcher : IUsersADSearcher
{
public User LoadUserDetails(string userName)
{
var entry = new DirectoryEntry();
var s... |
Use a set of defines, and some generics | using UnityEditor;
using UnityEditor.Build;
#if UNITY_2018_1_OR_NEWER
using UnityEditor.Build.Reporting;
#endif
using UnityEngine;
class TeakPreProcessDefiner :
#if UNITY_2018_1_OR_NEWER
IPreprocessBuildWithReport
#else
IPreprocessBuild
#endif
{
public int callbackOrder { get { return 0; } }
public sta... | using UnityEditor;
using UnityEditor.Build;
#if UNITY_2018_1_OR_NEWER
using UnityEditor.Build.Reporting;
#endif
using UnityEngine;
using System.Collections.Generic;
class TeakPreProcessDefiner :
#if UNITY_2018_1_OR_NEWER
IPreprocessBuildWithReport
#else
IPreprocessBuild
#endif
{
public int callbackOrder {... |
Add a detailed comment to explain why we test this | using System;
using System.Collections.Generic;
namespace Stripe.Tests.Xunit
{
public class coupons_fixture : IDisposable
{
public StripeCouponCreateOptions CouponCreateOptions { get; set; }
public StripeCouponUpdateOptions CouponUpdateOptions { get; set; }
public StripeCoupon Coupon {... | using System;
using System.Collections.Generic;
namespace Stripe.Tests.Xunit
{
public class coupons_fixture : IDisposable
{
public StripeCouponCreateOptions CouponCreateOptions { get; set; }
public StripeCouponUpdateOptions CouponUpdateOptions { get; set; }
public StripeCoupon Coupon {... |
Enable NesZord.Tests to se internal members of NesZord.Core | using System.Resources;
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.
[ass... | using System.Resources;
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.
[ass... |
Allow translation of boolean filtering text. | using UnityEngine;
namespace PrepareLanding.Core.Extensions
{
public static class FilterBooleanExtensions
{
public static string ToStringHuman(this FilterBoolean filterBool)
{
switch (filterBool)
{
case FilterBoolean.AndFiltering:
ret... | using UnityEngine;
using Verse;
namespace PrepareLanding.Core.Extensions
{
public static class FilterBooleanExtensions
{
public static string ToStringHuman(this FilterBoolean filterBool)
{
switch (filterBool)
{
case FilterBoolean.AndFiltering:
... |
Use correct Gnome3 default DPI | using System;
using System.Runtime.InteropServices;
namespace OpenSage.Utilities
{
public static class PlatformUtility
{
/// <summary>
/// Check if current platform is windows
/// </summary>
/// <returns></returns>
public static bool IsWindowsPlatform()
{
... | using System;
using System.Runtime.InteropServices;
namespace OpenSage.Utilities
{
public static class PlatformUtility
{
/// <summary>
/// Check if current platform is windows
/// </summary>
/// <returns></returns>
public static bool IsWindowsPlatform()
{
... |
Make $id and $token properties in plugin objects unmodifiable | using System.Text;
using TweetDuck.Plugins.Enums;
namespace TweetDuck.Plugins{
static class PluginScriptGenerator{
public static string GenerateConfig(PluginConfig config){
return config.AnyDisabled ? "window.TD_PLUGINS.disabled = [\""+string.Join("\",\"", config.DisabledPlugins)+"\"];" : stri... | using System.Globalization;
using TweetDuck.Plugins.Enums;
namespace TweetDuck.Plugins{
static class PluginScriptGenerator{
public static string GenerateConfig(PluginConfig config){
return config.AnyDisabled ? "window.TD_PLUGINS.disabled = [\""+string.Join("\",\"", config.DisabledPlugins)+"\"]... |
Make ApplyChangesTogether automatically filled to false if not present. | using System.Collections.Generic;
using Newtonsoft.Json;
namespace OmniSharp.Models
{
public class Request : SimpleFileRequest
{
[JsonConverter(typeof(ZeroBasedIndexConverter))]
public int Line { get; set; }
[JsonConverter(typeof(ZeroBasedIndexConverter))]
public int Column { ge... | using System.Collections.Generic;
using Newtonsoft.Json;
namespace OmniSharp.Models
{
public class Request : SimpleFileRequest
{
[JsonConverter(typeof(ZeroBasedIndexConverter))]
public int Line { get; set; }
[JsonConverter(typeof(ZeroBasedIndexConverter))]
public int Column { ge... |
Fix JSON file locking issue | using System.Collections.Generic;
using System.IO;
using System.Linq;
using Newtonsoft.Json.Linq;
namespace LibYear.Lib.FileTypes
{
public class ProjectJsonFile : IProjectFile
{
private string _fileContents;
public string FileName { get; }
public IDictionary<string, PackageVersion> Pack... | using System.Collections.Generic;
using System.IO;
using System.Linq;
using Newtonsoft.Json.Linq;
namespace LibYear.Lib.FileTypes
{
public class ProjectJsonFile : IProjectFile
{
private string _fileContents;
public string FileName { get; }
public IDictionary<string, PackageVersion> Packages { get; }
private ... |
Add example for state init option to quick-start guide example project. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using LearnositySDK.Request;
using LearnositySDK.Utils;
// static LearnositySDK.Credentials;
namespace LearnosityDemo.Pages
{
public class Ite... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using LearnositySDK.Request;
using LearnositySDK.Utils;
// static LearnositySDK.Credentials;
namespace LearnosityDemo.Pages
{
public class Ite... |
Change "RSS Headlines" widget name | namespace DesktopWidgets.Widgets.RSSFeed
{
public static class Metadata
{
public const string FriendlyName = "RSS Headlines";
}
} | namespace DesktopWidgets.Widgets.RSSFeed
{
public static class Metadata
{
public const string FriendlyName = "RSS Feed";
}
} |
Add new Google Analytics tracking ID | @using Microsoft.ApplicationInsights.Extensibility
@inject TelemetryConfiguration TelemetryConfiguration
<environment names="Production">
<script type="text/javascript">
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
... | @using Microsoft.ApplicationInsights.Extensibility
@inject TelemetryConfiguration TelemetryConfiguration
<environment names="Production">
<script type="text/javascript">
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
... |
Increment Intrinio time between calls to 1 minute | using System;
using QuantConnect.Parameters;
using QuantConnect.Util;
namespace QuantConnect.Data.Custom.Intrinio
{
/// <summary>
/// Auxiliary class to access all Intrinio API data.
/// </summary>
public static class IntrinioConfig
{
/// <summary>
/// </summary>
public... | using System;
using QuantConnect.Parameters;
using QuantConnect.Util;
namespace QuantConnect.Data.Custom.Intrinio
{
/// <summary>
/// Auxiliary class to access all Intrinio API data.
/// </summary>
public static class IntrinioConfig
{
/// <summary>
/// </summary>
public... |
Add missing attributes to paymentSource | using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace conekta
{
public class PaymentSource : Resource
{
public string id { get; set; }
public string type { get; set; }
/* In case card token */
public string token_id { get; set; }
/* In case card object*/
p... | using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace conekta
{
public class PaymentSource : Resource
{
public string id { get; set; }
public string type { get; set; }
/* In case card token */
public string token_id { get; set; }
/* In case card object*/
p... |
Remove redundant getters and setters | using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Shippo {
[JsonObject (MemberSerialization.OptIn)]
public class Track : ShippoId {
[JsonProperty (PropertyName = "carrier")]
public string Carrier { get; set; }
[JsonProperty (Prop... | using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Shippo {
[JsonObject (MemberSerialization.OptIn)]
public class Track : ShippoId
{
[JsonProperty (PropertyName = "carrier")]
private string Carrier;
[JsonProperty (PropertyName... |
Add comments to physical props | namespace OctoAwesome
{
/// <summary>
/// Repräsentiert die physikalischen Eigenschaften eines Blocks/Items/...
/// </summary>
public class PhysicalProperties
{
/// <summary>
/// Härte
/// </summary>
public float Hardness { get; set; }
/// <summary>
... | namespace OctoAwesome
{
/// <summary>
/// Repräsentiert die physikalischen Eigenschaften eines Blocks/Items/...
/// </summary>
public class PhysicalProperties
{
/// <summary>
/// Härte, welche Materialien können abgebaut werden
/// </summary>
public float Hardness { ... |
Add generic version of interface | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Framework.Bindables
{
/// <summary>
/// An interface that represents a read-only leased bindable.
/// </summary>
public interface ILeasedBin... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Framework.Bindables
{
/// <summary>
/// An interface that represents a read-only leased bindable.
/// </summary>
public interface ILeasedBin... |
Add the MitternachtBot instance and its services to the ASP.NET services. | using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace MitternachtWeb {
public class Startup {
public Startup(IConfiguration configuration) {
Configuration = co... | using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using System.Linq;
namespace MitternachtWeb {
public class St... |
Revert "make command line host non blocking" | using System.IO;
using Microsoft.AspNetCore.Hosting;
using Orchard.Hosting;
using Orchard.Web;
namespace Orchard.Console
{
public class Program
{
public static void Main(string[] args)
{
var currentDirectory = Directory.GetCurrentDirectory();
var host = new WebHostBuil... | using System.IO;
using Microsoft.AspNetCore.Hosting;
using Orchard.Hosting;
using Orchard.Web;
namespace Orchard.Console
{
public class Program
{
public static void Main(string[] args)
{
var currentDirectory = Directory.GetCurrentDirectory();
var host = new WebHostBuil... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.