Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Convert invoker proxy over to be internal | using Microsoft.AspNet.SignalR.Client;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent.Connection.Stream.Connection
{
public class StreamInvokerProxy : IStreamInvokerProxy
{
private readonly IHubProxy _hubProxy;
internal StreamInvokerProxy(IHubProxy hubProxy)
{
... | using Microsoft.AspNet.SignalR.Client;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent.Connection.Stream.Connection
{
internal class StreamInvokerProxy : IStreamInvokerProxy
{
private readonly IHubProxy _hubProxy;
internal StreamInvokerProxy(IHubProxy hubProxy)
{
... |
Use PlayMode instead of GameMode | using System;
using osu.Game.Beatmaps;
using SQLite;
namespace osu.Game.Database
{
public class BeatmapMetadata
{
[PrimaryKey]
public int ID { get; set; }
public string Title { get; set; }
public string TitleUnicode { get; set; }
public string Artist { get; set; }
... | using System;
using osu.Game.GameModes.Play;
using SQLite;
namespace osu.Game.Database
{
public class BeatmapMetadata
{
[PrimaryKey]
public int ID { get; set; }
public string Title { get; set; }
public string TitleUnicode { get; set; }
public string Artist { get; set... |
Fix spelling of .editorconfig option | // 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 Microsoft.CodeAnalysis.Options;
namespace Microsoft.CodeAnalysis.Editing
{
internal class GenerationOptions
{
public static readonly P... | // 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 Microsoft.CodeAnalysis.Options;
namespace Microsoft.CodeAnalysis.Editing
{
internal class GenerationOptions
{
public static readonly P... |
Fix formatting and remove unnecessary using | // 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 osu.Framework.Graphics.OpenGL;
using System;
namespace osu.Framework.Graphics.Shaders
{
public class Uniform<T> : IUniformWi... | // 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.OpenGL;
using System;
namespace osu.Framework.Graphics.Shaders
{
public class Uniform<T> : IUniformWithValue<T>
where T : struc... |
Append version number to title | using System.Windows;
using System.Windows.Controls;
using FlaUInspect.ViewModels;
namespace FlaUInspect.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly MainViewModel _vm;
publi... | using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using FlaUInspect.ViewModels;
namespace FlaUInspect.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly MainViewM... |
Fix legacy control point precision having an adverse effect on the editor | // 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.Bindables;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Screens.Edit.Timing
{
internal class Difficu... | // 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.Bindables;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Screens.Edit.Timing
{
internal class Difficu... |
Add tag replacement on backup paths | using System.IO;
using System.IO.Compression;
namespace Ensconce.Console
{
internal static class Backup
{
internal static void DoBackup()
{
if (File.Exists(Arguments.BackupDestination) && Arguments.BackupOverwrite)
{
File.Delete(Arguments.BackupDestinati... | using System.IO;
using System.IO.Compression;
namespace Ensconce.Console
{
internal static class Backup
{
internal static void DoBackup()
{
var backupSource = Arguments.BackupSource.Render();
var backupDestination = Arguments.BackupDestination.Render();
if ... |
Increment projects copyright year to 2020 | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata Framework")]
[assembly: AssemblyCopyright("© Yevgeniy Shunevych 2019")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1... | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata Framework")]
[assembly: AssemblyCopyright("© Yevgeniy Shunevych 2020")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1... |
Add a stronger dependency on UnityEngine for testing. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PluginTest
{
public class TestPlugin
{
}
}
| using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace PluginTest
{
public class TestPlugin : MonoBehaviour
{
private void Start()
{
Debug.Log("Start called");
}
}
}
|
Add handling for missing / | @{
string baseEditUrl = Context.String(DocsKeys.BaseEditUrl);
FilePath editFilePath = Model.FilePath(Wyam.Web.WebKeys.EditFilePath);
if(!string.IsNullOrWhiteSpace(baseEditUrl) && editFilePath != null)
{
string editUrl = baseEditUrl + editFilePath.FullPath;
<div><p><a href="@editUrl"><i c... | @{
string baseEditUrl = Context.String(DocsKeys.BaseEditUrl);
FilePath editFilePath = Model.FilePath(Wyam.Web.WebKeys.EditFilePath);
if(!string.IsNullOrWhiteSpace(baseEditUrl) && editFilePath != null)
{
if (!baseEditUrl[baseEditUrl.Length - 1].equals('/'))
{
baseEditUrl += "/... |
Fix problems with launching and exiting the app | using System;
using System.Net;
namespace a
{
class Program
{
//Code is dirty, who cares, it's C#.
static void Main(string[] args)
{
//IPHostEntry heserver = Dns.GetHostEntry(Dns.GetHostName());
//foreach (IPAddress curAdd in heserver.AddressList)
... | using System;
using System.Net;
namespace a
{
class Program
{
//Code is dirty, who cares, it's C#.
static void Main(string[] args)
{
Server server = new Server(IPAddress.Any, 5000);
server.Start();
Console.WriteLine("Press q to exit");
... |
Add unit test for complex types. | using Ploeh.AutoFixture.Xunit;
using Xunit;
using Xunit.Extensions;
namespace BobTheBuilder.Tests
{
public class BuildFacts
{
[Fact]
public void CreateADynamicInstanceOfTheRequestedType()
{
var sut = A.BuilderFor<SampleType>();
var result = sut.Build();
... | using System;
using Ploeh.AutoFixture.Xunit;
using Xunit;
using Xunit.Extensions;
namespace BobTheBuilder.Tests
{
public class BuildFacts
{
[Fact]
public void CreateADynamicInstanceOfTheRequestedType()
{
var sut = A.BuilderFor<SampleType>();
var result = sut.B... |
Add additional script languages which use the arabic shaper | // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using SixLabors.Fonts.Unicode;
namespace SixLabors.Fonts.Tables.AdvancedTypographic.Shapers
{
internal static class ShaperFactory
{
/// <summary>
/// Creates a Shaper based on the given script language.
///... | // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using SixLabors.Fonts.Unicode;
namespace SixLabors.Fonts.Tables.AdvancedTypographic.Shapers
{
internal static class ShaperFactory
{
/// <summary>
/// Creates a Shaper based on the given script language.
///... |
Fix a bug: When clean up disused images, the DefaultThumbnail.jpg could be removed by mistake if all books have their own images. | using Lbookshelf.Business;
using Microsoft.Expression.Interactivity.Core;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Configuration;
using Lbookshelf.Utils;
using Lbookshelf.Models;
using L... | using Lbookshelf.Business;
using Microsoft.Expression.Interactivity.Core;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Configuration;
using Lbookshelf.Utils;
using Lbookshelf.Models;
using L... |
Create server side API for single multiple answer question | using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbContext... | using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbContext... |
Update server side API for single multiple answer question | using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _dbContex... | using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _dbContex... |
Allow bind interface to be customized. | namespace MailTrace.Host.Selfhost
{
using System;
using MailTrace.Data.Postgresql;
using MailTrace.Host;
using MailTrace.Host.Data;
using Microsoft.Owin.Hosting;
internal static class Program
{
private static void Main(string[] args)
{
const string baseAddress... | namespace MailTrace.Host.Selfhost
{
using System;
using System.Linq;
using MailTrace.Data.Postgresql;
using MailTrace.Host.Data;
using Microsoft.Owin.Hosting;
internal static class Program
{
private static void Main(string[] args)
{
var baseAddress = args.Firs... |
Add documentation for alpha format. | namespace Avalonia.Platform
{
public enum AlphaFormat
{
Premul,
Unpremul,
Opaque
}
}
| namespace Avalonia.Platform
{
/// <summary>
/// Describes how to interpret the alpha component of a pixel.
/// </summary>
public enum AlphaFormat
{
/// <summary>
/// All pixels have their alpha premultiplied in their color components.
/// </summary>
Premul,
/... |
Add test for authorization requirement in TraktUserCustomListItemsRemoveRequest | namespace TraktApiSharp.Tests.Experimental.Requests.Users.OAuth
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Users.OAuth;
using TraktApiSharp.Objects.Post.Users.CustomListItems;
using TraktApiSharp.Objects.Post.Users.CustomL... | namespace TraktApiSharp.Tests.Experimental.Requests.Users.OAuth
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Users.OAuth;
using TraktApiSharp.Objects.Post.Users.CustomListItems;
using TraktApiSharp.Objects.Post.Users.CustomL... |
Revert "Change controller action to debug Kudu issue .." | using System.Web.Mvc;
using Amry.Gst.Properties;
using WebMarkupMin.Mvc.ActionFilters;
namespace Amry.Gst.Web.Controllers
{
public class HomeController : Controller
{
const int OneWeek = 604800;
const int OneYear = 31536000;
[Route, MinifyHtml, OutputCache(Duration = OneWeek)]
... | using System.Web.Mvc;
using Amry.Gst.Properties;
using WebMarkupMin.Mvc.ActionFilters;
namespace Amry.Gst.Web.Controllers
{
public class HomeController : Controller
{
const int OneWeek = 604800;
const int OneYear = 31536000;
[Route, MinifyHtml, OutputCache(Duration = OneWeek)]
... |
Fix uploading files with uppercase extensions | using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using CefSharp;
namespace TweetDuck.Core.Handling.General{
sealed class FileDialogHandler : IDialogHandler{
public bool OnFileDialog(IWebBrowser browserControl, IBrowser browser, CefFileDialogMode mode, strin... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using CefSharp;
namespace TweetDuck.Core.Handling.General{
sealed class FileDialogHandler : IDialogHandler{
public bool OnFileDialog(IWebBrowser browserControl, IBrowser browser, CefFileDialogMo... |
Correct builder path - .Net Framework folder starts from "v" | using System;
using System.Diagnostics;
namespace Bridge.Translator
{
public partial class Translator
{
protected static readonly char ps = System.IO.Path.DirectorySeparatorChar;
protected virtual string GetBuilderPath()
{
switch (Environment.OSVersion.Platform)
... | using System;
using System.Diagnostics;
namespace Bridge.Translator
{
public partial class Translator
{
protected static readonly char ps = System.IO.Path.DirectorySeparatorChar;
protected virtual string GetBuilderPath()
{
switch (Environment.OSVersion.Platform)
... |
Fix for assuming any legacy call is 32-bit | namespace RedGate.AppHost.Server
{
public class ChildProcessFactory
{
public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bool is64Bit, bool monitorHostProcess)
{
IProcessStartOperation processStarter;
if (is64Bit)
{
... | namespace RedGate.AppHost.Server
{
public class ChildProcessFactory
{
public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bool is64Bit, bool monitorHostProcess)
{
IProcessStartOperation processStarter;
if (is64Bit)
{
... |
Use of metadata proxies to generate table. | using System.Text;
using Models = EntityCore.Initialization.Metadata.Models;
namespace EntityCore.DynamicEntity
{
internal class EntityDatabaseStructure
{
public static string GenerateCreateTableSqlQuery(Models.Entity entity)
{
var createTable = new StringBuilder();
cre... | using EntityCore.Proxy.Metadata;
using System.Text;
namespace EntityCore.DynamicEntity
{
internal class EntityDatabaseStructure
{
public static string GenerateCreateTableSqlQuery(IEntity entity)
{
var createTable = new StringBuilder();
createTable.AppendFormat("CREATE T... |
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;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Configuration")]
[assembly: AssemblyDescription("Autofac XML Configuration Support")]
[assembly: InternalsVisibleTo("Autofac.Tests.Configuration, PublicKey=00240... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Configuration")]
[assembly: InternalsVisibleTo("Autofac.Tests.Configuration, PublicKey=00240000048000009400000006020000002400005253413100040000010001008728425885ef385e049261b188... |
Update deprecated code in iOS main entry | // 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 UIKit;
namespace osu.iOS
{
public static class Application
{
public static void Main(string[] args)
{
UIApplication.Main(args,... | // 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.iOS;
using UIKit;
namespace osu.iOS
{
public static class Application
{
public static void Main(string[] args)
{
... |
Update assembly info for development of the next version | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Alt... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Alt... |
Add credentials class for user authorization | using System;
using Microsoft.SPOT;
namespace Idiot.Net
{
class Credentials
{
}
}
| using System;
using Microsoft.SPOT;
using System.Text;
using GHIElectronics.NETMF.Net;
namespace Idiot.Net
{
public class Credentials
{
private string username;
private string password;
public Credentials(string username, string password)
{
this.username = username... |
Remove use of obsolete function | // Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class DriftUe4PluginServerTarget : TargetRules
{
public DriftUe4PluginServerTarget(TargetInfo Target)
{
Type = TargetType.Server;
}
//
// TargetRules interface.
... | // Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class DriftUe4PluginServerTarget : TargetRules
{
public DriftUe4PluginServerTarget(TargetInfo Target)
{
Type = TargetType.Server;
}
//
// TargetRules interface.
... |
Add beginnings of a method to parse TMD files | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LBD2OBJ
{
class Program
{
static void Main(string[] args)
{
}
}
}
| using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using LBD2OBJ.Types;
namespace LBD2OBJ
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("LBD2OBJ - Made by Figglewatts 2015");
foreach (string arg in ar... |
Allow publish without outputting a .md file | using System;
namespace GitReleaseNotes
{
public class ArgumentVerifier
{
public static bool VerifyArguments(GitReleaseNotesArguments arguments)
{
if (arguments.IssueTracker == null)
{
Console.WriteLine("The IssueTracker argument must be provided, see he... | using System;
namespace GitReleaseNotes
{
public class ArgumentVerifier
{
public static bool VerifyArguments(GitReleaseNotesArguments arguments)
{
if (arguments.IssueTracker == null)
{
Console.WriteLine("The IssueTracker argument must be provided, see he... |
Add Ids to footer links | @model SiteOptions
<hr />
<footer>
<p>
© @Model.Metadata.Author.Name @DateTimeOffset.UtcNow.Year |
<a id="link-status" href="@Model.ExternalLinks.Status.AbsoluteUri" target="_blank" title="View site uptime information">
Site Status & Uptime
</a>
| Built from
... | @model SiteOptions
<hr />
<footer>
<p>
© @Model.Metadata.Author.Name @DateTimeOffset.UtcNow.Year |
<a id="link-status" href="@Model.ExternalLinks.Status.AbsoluteUri" target="_blank" title="View site uptime information">
Site Status & Uptime
</a>
| Built from
... |
Fix casing of warden service. | namespace IronFoundry.Warden.Service
{
public static class Constants
{
public const string DisplayName = "Iron Foundry Warden Service";
public const string ServiceName = "ironfoundry.warden";
}
}
| namespace IronFoundry.Warden.Service
{
public static class Constants
{
public const string DisplayName = "Iron Foundry Warden Service";
public const string ServiceName = "IronFoundry.Warden";
}
}
|
Fix flushing issue and added number of files being processed. | using System;
using System.IO;
using System.Text;
namespace KuduSync.NET
{
public class Logger : IDisposable
{
private const int KeepAliveLogTimeInSeconds = 20;
private int _logCounter = 0;
private StreamWriter _writer;
private int _maxLogLines;
private DateTime _nextL... | using System;
using System.IO;
using System.Text;
namespace KuduSync.NET
{
public class Logger : IDisposable
{
private const int KeepAliveLogTimeInSeconds = 20;
private int _logCounter = 0;
private StreamWriter _writer;
private int _maxLogLines;
private DateTime _nextL... |
Remove unnecessary static method IsApplicable | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Pather.CSharp.PathElements
{
public class Property : IPathElement
{
public static bool IsApplicable(string pathElement)
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Pather.CSharp.PathElements
{
public class Property : IPathElement
{
private string property;
public Property(string propert... |
Add more quakes to map effect | // Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
namespace EOLib.IO.Map
{
public enum MapEffect : byte
{
None = 0,
HPDrain = 1,
TPDrain = 2,
Quake = 3
}
} | // Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
namespace EOLib.IO.Map
{
public enum MapEffect : byte
{
None = 0,
HPDrain = 1,
TPDrain = 2,
Quake1 = 3,
Quake2 = 4,
... |
Return view from index action | using System;
using System.Web.Mvc;
namespace Foo.Web.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
throw new NotImplementedException();
}
}
}
| using System;
using System.Web.Mvc;
namespace Foo.Web.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}
}
|
Make the ASP.NET demo more interesting | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using AspNetCoreMvc.Models;
using Ooui;
using Ooui.AspNetCore;
namespace AspNetCoreMvc.Controllers
{
public class HomeController : Controller
... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using AspNetCoreMvc.Models;
using Ooui;
using Ooui.AspNetCore;
namespace AspNetCoreMvc.Controllers
{
public class HomeController : Controller
... |
Fix broken fail judgement test | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play;
namespace 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;
using System.Linq;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Screens.Pl... |
Make sure you run the log after qemu starts... But it works. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Cosmos.Kernel.LogTail
{
public class ErrorStrippingFileStream : FileStream
{
public ErrorStrippingFileStream(string file)
: base(file, FileMode.Open, FileAccess.ReadW... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Cosmos.Kernel.LogTail
{
public class ErrorStrippingFileStream : FileStream
{
public ErrorStrippingFileStream(string file)
: base(file, FileMode.Open, FileAccess.Read,... |
Revert "Switch Guid implementation temporarily to avoid compile time error" | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Input.Bindings;
using osu.Game.Database;
using Realms;
namespace osu.Game.Input.Bindings
{
[MapTo(nameof(KeyBinding))]
public c... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Input.Bindings;
using osu.Game.Database;
using Realms;
namespace osu.Game.Input.Bindings
{
[MapTo(nameof(KeyBinding))]
public c... |
Fix non-generic dictionary serializer does not pack key value pair correctly. | using System;
using System.Collections;
namespace MsgPack.Serialization.DefaultSerializers
{
/// <summary>
/// Dictionary interface serializer.
/// </summary>
internal sealed class NonGenericDictionarySerializer : MessagePackSerializer<IDictionary>
{
private readonly System_Collections_DictionaryEntryMessageP... | using System;
using System.Collections;
using System.Runtime.Serialization;
namespace MsgPack.Serialization.DefaultSerializers
{
/// <summary>
/// Dictionary interface serializer.
/// </summary>
internal sealed class NonGenericDictionarySerializer : MessagePackSerializer<IDictionary>
{
private readonly IMessa... |
Add 10s delay for always failing worker | using BackOffice.Jobs.Interfaces;
using BackOffice.Jobs.Reports;
using System;
namespace BackOffice.Worker
{
public class CProductAlwaysFailingReportWorker : IJobWorker
{
private readonly AlwaysFailingReport report;
public CProductAlwaysFailingReportWorker(AlwaysFailingReport report)
... | using BackOffice.Jobs.Interfaces;
using BackOffice.Jobs.Reports;
using System;
using System.Threading;
namespace BackOffice.Worker
{
public class CProductAlwaysFailingReportWorker : IJobWorker
{
private readonly AlwaysFailingReport report;
public CProductAlwaysFailingReportWorker(AlwaysFailin... |
Make the discovery context null tests pass. | namespace NBench.VisualStudio.TestAdapter
{
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
public class NBenchTestDiscoverer : ITestDiscoverer
{
... | namespace NBench.VisualStudio.TestAdapter
{
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
public class NBenchTestDiscoverer : ITestDiscoverer
{
... |
Reduce memory usage by using a hashset instead of a list | using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
namespace Moq.Proxy
{
public class ProxyDiscoverer
{
public async Task<IImmutableSet<ImmutableArray<ITypeSymbol>>> DiscoverProxiesAsyn... | using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
namespace Moq.Proxy
{
public class ProxyDiscoverer
{
public async Task<IImmutableSet<ImmutableArray<ITypeSymbol>>> DiscoverProxiesAsyn... |
Add separator before action item in tool bar | using System.Linq;
using JetBrains.ActionManagement;
using JetBrains.Annotations;
using JetBrains.Application.DataContext;
using JetBrains.ReSharper.Features.Inspections.Actions;
using JetBrains.UI.ActionsRevised;
namespace Roflcopter.Plugin.TodoItems
{
[Action(nameof(TodoItemsCountDummyAction), Id = 944208914)]
... | using System.Linq;
using JetBrains.ActionManagement;
using JetBrains.Annotations;
using JetBrains.Application.DataContext;
using JetBrains.ReSharper.Features.Inspections.Actions;
using JetBrains.UI.ActionsRevised;
namespace Roflcopter.Plugin.TodoItems
{
[ActionGroup(nameof(TodoItemsCountDummyActionGroup), ActionGr... |
Fix mono bug in the FontHelper class | using System;
using System.Drawing;
using System.Linq;
using NUnit.Framework;
using Palaso.UI.WindowsForms;
namespace PalasoUIWindowsForms.Tests.FontTests
{
[TestFixture]
public class FontHelperTests
{
[SetUp]
public void SetUp()
{
// setup code goes here
}
[TearDown]
public void TearDown()
{
... | using System;
using System.Drawing;
using System.Linq;
using NUnit.Framework;
using Palaso.UI.WindowsForms;
namespace PalasoUIWindowsForms.Tests.FontTests
{
[TestFixture]
public class FontHelperTests
{
[SetUp]
public void SetUp()
{
// setup code goes here
}
[TearDown]
public void TearDown()
{
... |
Replace the existing ProblemDetailsFactory from MVC | using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using MvcProblemDetailsFactory = Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory;... | using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using MvcProblemDetailsFactory = Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory;... |
Remove dead private and comments | // Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System;
//using GLib;
//using Gtk;
using NDesk.DBus;
using NDesk.GLib;
using org.freedesktop.DBus;
namespace NDesk.DBus
{
//FIXME: this API needs review and de-unixification
public ... | // Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System;
//using GLib;
//using Gtk;
using NDesk.DBus;
using NDesk.GLib;
using org.freedesktop.DBus;
namespace NDesk.DBus
{
//FIXME: this API needs review and de-unixification
public ... |
Make CodeFactor happy at the cost of my own happiness (code unfolding) | using System.Collections.Generic;
using System.Diagnostics;
namespace osu_database_reader.Components.HitObjects
{
public class HitObjectSlider : HitObject
{
public CurveType CurveType;
public List<Vector2> Points = new List<Vector2>(); //does not include initial point!
public int Repe... | using System.Collections.Generic;
using System.Diagnostics;
namespace osu_database_reader.Components.HitObjects
{
public class HitObjectSlider : HitObject
{
public CurveType CurveType;
public List<Vector2> Points = new List<Vector2>(); //does not include initial point!
public int Repe... |
Use separate output directories for debug and release builds | using Cake.Common;
using Cake.Frosting;
namespace Build
{
public sealed class Lifetime : FrostingLifetime<Context>
{
public override void Setup(Context context)
{
context.Configuration = context.Argument("configuration", "Release");
context.BaseDir = context.Environment... | using Cake.Common;
using Cake.Frosting;
namespace Build
{
public sealed class Lifetime : FrostingLifetime<Context>
{
public override void Setup(Context context)
{
context.Configuration = context.Argument("configuration", "Release");
context.BaseDir = context.Environment... |
Fix test in the testproj | namespace testproj
{
using JetBrains.dotMemoryUnit;
using NUnit.Framework;
[TestFixture]
public class UnitTest1
{
[Test]
public void TestMethod1()
{
dotMemory.Check(
memory =>
{
Assert.AreEqual(10, memory.Obje... | namespace testproj
{
using System;
using JetBrains.dotMemoryUnit;
using NUnit.Framework;
[TestFixture]
public class UnitTest1
{
[Test]
public void TestMethod1()
{
dotMemory.Check(
memory =>
{
var str1 = "... |
Install service with "delayed auto start". | using System.ComponentModel;
using System.ServiceProcess;
using System.Configuration.Install;
namespace Graphite.System
{
public partial class ServiceInstaller
{
private IContainer components = null;
private global::System.ServiceProcess.ServiceInstaller serviceInstaller;
private Ser... | using System.ComponentModel;
using System.ServiceProcess;
using System.Configuration.Install;
namespace Graphite.System
{
public partial class ServiceInstaller
{
private IContainer components = null;
private global::System.ServiceProcess.ServiceInstaller serviceInstaller;
private Ser... |
Fix wrong value for the Preview tag. | //
// Nikon3MakerNoteEntryTag.cs:
//
// Author:
// Ruben Vermeersch (ruben@savanne.be)
//
// Copyright (C) 2010 Ruben Vermeersch
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License version
// 2.1 as published by the Free Software F... | //
// Nikon3MakerNoteEntryTag.cs:
//
// Author:
// Ruben Vermeersch (ruben@savanne.be)
//
// Copyright (C) 2010 Ruben Vermeersch
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License version
// 2.1 as published by the Free Software F... |
Change version number to 1.1 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("IS... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("IS... |
Fix error with multithreaded UniversalDetector reseting | using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using dokas.FluentStrings;
using Mozilla.CharDet;
namespace dokas.EncodingConverter.Logic
{
internal sealed class EncodingManager
{
private readonly FileManager _fileManager;
private static re... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using dokas.FluentStrings;
using Mozilla.CharDet;
namespace dokas.EncodingConverter.Logic
{
internal sealed class EncodingManager
{
private readonly FileManager _fileManager;
pri... |
Add Neon runtime information to NeonException | using System;
namespace csnex
{
[Serializable()]
public class NeonException: ApplicationException
{
public NeonException() {
}
public NeonException(string message) : base(message) {
}
public NeonException(string message, params object[] args) : base(string.Format(... | using System;
using System.Runtime.Serialization;
using System.Security.Permissions;
namespace csnex
{
[Serializable()]
public class NeonException: ApplicationException
{
public NeonException() {
}
public NeonException(string name, string info) : base(name) {
Name = na... |
Fix use of private addin registry | using System;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mono.Addins;
namespace MonoDevelop.Addins.Tasks
{
public abstract class AddinTask : Task
{
[Required]
public string ConfigDir { get; set; }
[Required]
public string AddinsDir { get; set; }
[Required]
... | using System;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mono.Addins;
namespace MonoDevelop.Addins.Tasks
{
public abstract class AddinTask : Task
{
[Required]
public string ConfigDir { get; set; }
[Required]
public string AddinsDir { get; set; }
[Required]
... |
Support fields and highlights in responses | using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace NElasticsearch.Models
{
/// <summary>
/// Individual hit response from ElasticSearch.
/// </summary>
[DebuggerDisplay("{_type} in {_index} id {_id}")]
public class Hit<T>
{
public string _index { get; s... | using System.Collections.Generic;
using System.Diagnostics;
namespace NElasticsearch.Models
{
/// <summary>
/// Individual hit response from ElasticSearch.
/// </summary>
[DebuggerDisplay("{_type} in {_index} id {_id}")]
public class Hit<T>
{
public string _index { get; set; }
... |
Update local echo server to work with binary messages | using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using wslib;
using wslib.Protocol;
namespace LocalServer
{
class Program
{
static void Main(string[] args)
{
TaskScheduler.UnobservedTaskException += LogUnobser... | using System;
using System.IO;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using wslib;
namespace LocalServer
{
class Program
{
static void Main(string[] args)
{
TaskScheduler.UnobservedTaskException += LogUnobservedTaskException;
var listen... |
Set Treenumerable version to 1.0.0 | using System.Reflection;
using System.Resources;
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.Reflection;
using System.Resources;
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... |
Add flow tree body to the function | namespace UnwindMC.Analysis
{
public class Function
{
public Function(ulong address)
{
Address = address;
Status = FunctionStatus.Created;
}
public ulong Address { get; }
public FunctionStatus Status { get; set; }
}
public enum FunctionS... | using System;
using System.Collections.Generic;
using UnwindMC.Analysis.Flow;
using UnwindMC.Analysis.IL;
namespace UnwindMC.Analysis
{
public class Function
{
private List<IBlock> _blocks;
public Function(ulong address)
{
Address = address;
Status = FunctionSt... |
Change example to contain default values | using System;
using System.Text;
namespace SCPI.Display
{
public class DISPLAY_GRID : ICommand
{
public string Description => "Set or query the grid type of screen display.";
public string Grid { get; private set; }
private readonly string[] gridRange = new string[] { "FULL", "HALF",... | using System;
using System.Text;
namespace SCPI.Display
{
public class DISPLAY_GRID : ICommand
{
public string Description => "Set or query the grid type of screen display.";
public string Grid { get; private set; }
private readonly string[] gridRange = new string[] { "FULL", "HALF",... |
Fix BCC for EOI emails | using CroquetAustralia.Domain.Features.TournamentEntry.Events;
namespace CroquetAustralia.QueueProcessor.Email.EmailGenerators
{
public class U21WorldsEOIEmailGenerator : BaseEmailGenerator
{
/* todo: remove hard coding of email addresses */
private static readonly EmailAddress U21Coordinator ... | using System.Linq;
using CroquetAustralia.Domain.Features.TournamentEntry.Events;
namespace CroquetAustralia.QueueProcessor.Email.EmailGenerators
{
public class U21WorldsEOIEmailGenerator : BaseEmailGenerator
{
/* todo: remove hard coding of email addresses */
private static readonly EmailAddr... |
Fix issues due to merge conflict. | namespace TraktApiSharp.Tests
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class TraktConfigurationTests
{
[TestMethod]
public void TestTraktConfigurationDefaultConstructor()
{
var client = new TraktClient();
... | namespace TraktApiSharp.Tests
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class TraktConfigurationTests
{
[TestMethod]
public void TestTraktConfigurationDefaultConstructor()
{
var client = new TraktClient();
... |
Update ModalitaPagamento validator with MP18..21 values | using BusinessObjects.Validators;
namespace FatturaElettronicaPA.Validators
{
/// <summary>
/// Validates FatturaElettronicaBody.DatiPagamento.DettaglioPagamento.ModalitaPagamento.
/// </summary>
public class FModalitaPagamentoValidator : DomainValidator
{
private const string BrokenDescri... | using BusinessObjects.Validators;
namespace FatturaElettronicaPA.Validators
{
/// <summary>
/// Validates FatturaElettronicaBody.DatiPagamento.DettaglioPagamento.ModalitaPagamento.
/// </summary>
public class FModalitaPagamentoValidator : DomainValidator
{
private const string BrokenDescri... |
Fix MonoMac/MonoTouch (for MonoMac builds) | // Copyright 2013 Xamarin Inc.
using System;
using System.Reflection;
using System.Collections;
using System.Runtime.InteropServices;
using MonoMac.ObjCRuntime;
namespace MonoMac.Foundation {
public partial class NSUrlCredential {
public NSUrlCredential (IntPtr trust, bool ignored) : base (NSObjectFlag.Empty)
... | // Copyright 2013 Xamarin Inc.
using System;
using System.Reflection;
using System.Collections;
using System.Runtime.InteropServices;
using MonoMac.ObjCRuntime;
namespace MonoMac.Foundation {
public partial class NSUrlCredential {
public NSUrlCredential (IntPtr trust, bool ignored) : base (NSObjectFlag.Empty)
... |
Change "Countdown" syncing priority order | using System;
namespace DesktopWidgets.Helpers
{
public static class DateTimeSyncHelper
{
public static DateTime SyncNext(this DateTime dateTime, bool syncYear, bool syncMonth, bool syncDay,
bool syncHour, bool syncMinute, bool syncSecond)
{
var endDateTime = dateTime;
... | using System;
namespace DesktopWidgets.Helpers
{
public static class DateTimeSyncHelper
{
public static DateTime SyncNext(this DateTime dateTime, bool syncYear, bool syncMonth, bool syncDay,
bool syncHour, bool syncMinute, bool syncSecond)
{
var endDateTime = dateTime;
... |
Add get top to service | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PhotoLife.Data.Contracts;
using PhotoLife.Models;
using PhotoLife.Services.Contracts;
namespace PhotoLife.Services
{
public class PostsService: IPostService
{
private readonly IRep... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PhotoLife.Data.Contracts;
using PhotoLife.Models;
using PhotoLife.Services.Contracts;
namespace PhotoLife.Services
{
public class PostsService : IPostService
{
private readonly IRe... |
Use ISO encoding, for cross platform | namespace SilentHunter
{
public static class Encoding
{
/// <summary>
/// The default encoding to use for parsing Silent Hunter game files.
/// </summary>
public static System.Text.Encoding ParseEncoding { get; } = System.Text.Encoding.GetEncoding(1252);
}
} | namespace SilentHunter
{
public static class Encoding
{
/// <summary>
/// The default encoding to use for parsing Silent Hunter game files.
/// </summary>
public static System.Text.Encoding ParseEncoding { get; } = System.Text.Encoding.GetEncoding("ISO-8859-1");
}
} |
Correct to print right result | using MQTTnet.Client.Connecting;
using MQTTnet.Exceptions;
namespace MQTTnet.Adapter
{
public class MqttConnectingFailedException : MqttCommunicationException
{
public MqttConnectingFailedException(MqttClientAuthenticateResult resultCode)
: base($"Connecting with MQTT server failed ({resul... | using MQTTnet.Client.Connecting;
using MQTTnet.Exceptions;
namespace MQTTnet.Adapter
{
public class MqttConnectingFailedException : MqttCommunicationException
{
public MqttConnectingFailedException(MqttClientAuthenticateResult resultCode)
: base($"Connecting with MQTT server failed ({resul... |
Use more proper name for test | using System;
using Xunit;
namespace CSharpInternals.ExceptionHandling
{
public class Basics
{
[Fact]
public void Test()
{
Assert.Throws<NullReferenceException>(() => ThrowsNullReferenceException());
}
// Fact - ToString allocates a lot, esp... | using System;
using Xunit;
namespace CSharpInternals.ExceptionHandling
{
public class Basics
{
[Fact]
public void ThrowsNull()
{
Assert.Throws<NullReferenceException>(() => ThrowsNullReferenceException());
}
// Fact - ToString allocates a lo... |
Fix resource leak that occurred when any GFX files were missing from GFX folder | // 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 System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using PELoaderLib;
namespace EOLib.Graphics
{
public sealed class PEFileCollectio... | // 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 System;
using System.Collections.Generic;
using System.IO;
using PELoaderLib;
namespace EOLib.Graphics
{
public sealed class PEFileCollection : Dictionary<GFXT... |
Remove one more nullable disable | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Game.Over... | // 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... |
Stop spurious VS "cannot override ExecuteAsync" errors even if you don't specify a base class | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*
* Currently if you have a .cshtml file in a project with <Project Sdk="Microsoft.NET.Sdk.Web">,
* Visual Studio will run design-time builds for th... | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*
* Currently if you have a .cshtml file in a project with <Project Sdk="Microsoft.NET.Sdk.Web">,
* Visual Studio will run design-time builds for th... |
Set thread culture to InvariantCulture on startup | using System.Windows;
namespace OpenSage.DataViewer
{
public partial class App : Application
{
}
}
| using System.Windows;
using System.Globalization;
using System.Threading;
namespace OpenSage.DataViewer
{
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
... |
Throw excpetion when type is not found | // Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Perspex;
using Perspex.Controls;
using Perspex.Controls.Presenters;
using System;
using System.Collections.Generic;
namespace Core2D.Perspex.Presenters
{
... | // Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Perspex;
using Perspex.Controls;
using Perspex.Controls.Presenters;
using System;
using System.Collections.Generic;
namespace Core2D.Perspex.Presenters
{
... |
Fix NoShrineRoom logic if shrine is null | using RimWorld;
using Verse;
namespace MTW_AncestorSpirits
{
class ThoughtWorker_NoShrineRoom : ThoughtWorker
{
private static RoomRoleDef shrineRoomDef = DefDatabase<RoomRoleDef>.GetNamed("MTW_ShrineRoom");
protected override ThoughtState CurrentStateInternal(Pawn p)
{
//... | using RimWorld;
using Verse;
namespace MTW_AncestorSpirits
{
class ThoughtWorker_NoShrineRoom : ThoughtWorker
{
private static RoomRoleDef shrineRoomDef = DefDatabase<RoomRoleDef>.GetNamed("MTW_ShrineRoom");
protected override ThoughtState CurrentStateInternal(Pawn p)
{
//... |
Add a few more tests | using System.Collections.Generic;
using System.Threading.Tasks;
using FluentAssertions;
using WeCantSpell.Tests.Utilities;
using Xunit;
namespace WeCantSpell.Tests.Integration.CSharp
{
public class CommentSpellingTests : CSharpTestBase
{
public static IEnumerable<object[]> can_find_mistakes_in_comment... | using System.Collections.Generic;
using System.Threading.Tasks;
using FluentAssertions;
using WeCantSpell.Tests.Utilities;
using Xunit;
namespace WeCantSpell.Tests.Integration.CSharp
{
public class CommentSpellingTests : CSharpTestBase
{
public static IEnumerable<object[]> can_find_mistakes_in_comment... |
Fix a typo in const name | namespace WebScriptHook.Framework.Messages.Outputs
{
/// <summary>
/// Sent by the component to request a channel for itself on the server.
/// This tells the server the name of this component, as well as the maximum number of requests
/// the component can handle per tick.
/// Once the server r... | namespace WebScriptHook.Framework.Messages.Outputs
{
/// <summary>
/// Sent by the component to request a channel for itself on the server.
/// This tells the server the name of this component, as well as the maximum number of requests
/// the component can handle per tick.
/// Once the server r... |
Update default Max Body Size | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.ComponentModel;
using Microsoft.AspNetCore.ResponseCaching.Internal;
namespace Microsoft.AspNetCore.Builder
{
public class ResponseCa... | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.ComponentModel;
using Microsoft.AspNetCore.ResponseCaching.Internal;
namespace Microsoft.AspNetCore.Builder
{
public class ResponseCa... |
Fix encounter url not opening | using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Data;
using Tera.Game;
namespace DamageMeter.UI
{
/// <summary>
/// Logique d'interaction pour HistoryLink.xaml
/// </summary>
public partial class HistoryLink
{
... | using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Data;
using Tera.Game;
namespace DamageMeter.UI
{
/// <summary>
/// Logique d'interaction pour HistoryLink.xaml
/// </summary>
public partial class HistoryLink
{
... |
Fix single core batch processing | using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
// ReSharper disable AccessToDisposedClosure
namespace VGAudio.Cli
{
internal static class Batch
{
public static bool BatchConvert(Options options)
{
if (options.Job != JobType.Batch) return false;
... | using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
// ReSharper disable AccessToDisposedClosure
namespace VGAudio.Cli
{
internal static class Batch
{
public static bool BatchConvert(Options options)
{
if (options.Job != JobType.Batch) return false;
... |
Fix enumerable not being consumed | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using BenchmarkDotNet.Attributes;
using osu.Game.Online.API;
using osu.Game.Rulesets.Osu;
namespace osu.Game.Benchmarks
{
public class BenchmarkRuleset : BenchmarkTe... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Engines;
using osu.Game.Online.API;
using osu.Game.Rulesets.Osu;
namespace osu.Game.Benchmarks
{
public class... |
Fix target file name generation | using System.IO;
namespace DevTyr.Gullap.Model
{
public static class MetaContentExtensions
{
public static string GetTargetFileName(this MetaContent content, SitePaths paths)
{
var isPage = content.Page != null;
string userDefinedFileName = content.GetOverriddenFileName();
... | using System.IO;
namespace DevTyr.Gullap.Model
{
public static class MetaContentExtensions
{
public static string GetTargetFileName(this MetaContent content, SitePaths paths)
{
var isPage = content.Page != null;
string userDefinedFileName = content.GetOverriddenFileName();
... |
Add example of using fixed provider | using Glimpse.Agent.Web;
using Microsoft.AspNet.Builder;
using Glimpse.Host.Web.AspNet;
using Microsoft.Framework.DependencyInjection;
namespace Glimpse.Agent.AspNet.Sample
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGlimpse()
... | using System.Collections.Generic;
using System.Reflection;
using System.Text.RegularExpressions;
using Glimpse.Agent.Web;
using Glimpse.Agent.Web.Framework;
using Glimpse.Agent.Web.Options;
using Microsoft.AspNet.Builder;
using Glimpse.Host.Web.AspNet;
using Microsoft.Framework.DependencyInjection;
namespace Glimpse.... |
Fix og:image path for home page | @{
Layout = "~/Views/Shared/_LayoutPublic.cshtml";
}
@section metaPage
{
<meta property="og:type" content="website">
<meta property="og:image" content="@(AppConfiguration.Value.SiteUrl + "/content/images/logo-og.jpg")">
}
@RenderBody() | @{
Layout = "~/Views/Shared/_LayoutPublic.cshtml";
}
@section metaPage
{
<meta property="og:type" content="website">
<meta property="og:image" content="@(AppConfiguration.Value.SiteUrl + "/images/logo-og.jpg")">
}
@RenderBody() |
Reorganize forms into project subfolder | using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace SqlDiffFramework
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Se... | using System;
using System.Collections.Generic;
using System.Windows.Forms;
using SqlDiffFramework.Forms;
namespace SqlDiffFramework
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVis... |
Read querystring instead of using route patterns | namespace WeatherDataFunctionApp
{
using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Host;
public static class WeatherDataService
{
... | namespace WeatherDataFunctionApp
{
using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Host;
public static class WeatherDat... |
Add informational logging to launcher | using Microsoft.Web.Administration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Threading;
using System.Threading.Task... | using Microsoft.Web.Administration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Threading;
using System.Threading.Task... |
Refactor verbose log of SingleThreadScheduler. | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CreviceApp.Threading
{
// http://www.codeguru.com/csharp/article.php/c18931/Understanding-the-NET-Ta... | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CreviceApp.Threading
{
// http://www.codeguru.com/csharp/article.php/c18931/Understanding-the-NET-Ta... |
Test case includes string with quotes. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ecologylab.serialization;
using ecologylab.attributes;
namespace ecologylabFundamentalTestCases.Polymorphic
{
/**
*
* <configuration>
<pref_double name="index_thumb_dist" value="200"/... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ecologylab.serialization;
using ecologylab.attributes;
namespace ecologylabFundamentalTestCases.Polymorphic
{
/**
*
* <configuration>
<pref_double name="index_thumb_dist" value="200"/... |
Fix checkbox not updating correctly. | using System;
using osu.Framework.Configuration;
using osu.Framework.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
{
public class CheckBoxOption : BasicCheckBox
{
private Bindable<bool> bindable;
public Bindable<bool> Bindable
{
set
{
... | using System;
using osu.Framework.Configuration;
using osu.Framework.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
{
public class CheckBoxOption : BasicCheckBox
{
private Bindable<bool> bindable;
public Bindable<bool> Bindable
{
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... |
Use locale's decimal separator instead of hardcoding period. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;... | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using S... |
Set WinApiNet assembly as CLS-compliant | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="WinAPI.NET">
// Copyright (c) Marek Dzikiewicz, All Rights Reserved.
// </copyright>
// ---------------------------------------------------------------... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="WinAPI.NET">
// Copyright (c) Marek Dzikiewicz, All Rights Reserved.
// </copyright>
// ---------------------------------------------------------------... |
Add an API for getting the result of an operation without knowing it's type. | using Silk.Data.SQL.Expressions;
using Silk.Data.SQL.Queries;
using System.Threading.Tasks;
namespace Silk.Data.SQL.ORM.Operations
{
public abstract class DataOperation
{
/// <summary>
/// Gets a value indicating if the operation can be executed as part of a batch operation.
/// </summary>
public... | using Silk.Data.SQL.Expressions;
using Silk.Data.SQL.Queries;
using System.Threading.Tasks;
namespace Silk.Data.SQL.ORM.Operations
{
public abstract class DataOperation
{
/// <summary>
/// Gets a value indicating if the operation can be executed as part of a batch operation.
/// </summary>
public... |
Remove xml encoding in reports. | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
namespace SimpleReport.Model.Replacers
{
/// <summary>
/// Used to replace xml code and remove sty... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
namespace SimpleReport.Model.Replacers
{
/// <summary>
/// Used to replace xml code and remove sty... |
Read parameters from command line arguments | using static System.Console;
namespace ConsoleApp
{
class Program
{
private static void Main()
{
var connectionString = @"Server=.\SQLEXPRESS;Database=LearnORM;Trusted_Connection=True;";
var schemaName = "dbo";
var tableName = "Book";
var column... | using static System.Console;
namespace ConsoleApp
{
class Program
{
private static void Main(string[] args)
{
if (args.Length != 3)
{
WriteLine("Usage: schema2fm.exe connectionstring schema table");
return;
}
var ... |
Update the Empty module template. | #region License
//
// Copyright (c) 2013, Kooboo team
//
// Licensed under the BSD License
// See the file LICENSE.txt for details.
//
#endregion
using Kooboo.CMS.Sites.Extension.ModuleArea;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Kooboo.CMS.... | #region License
//
// Copyright (c) 2013, Kooboo team
//
// Licensed under the BSD License
// See the file LICENSE.txt for details.
//
#endregion
using Kooboo.CMS.Sites.Extension.ModuleArea;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Kooboo.CMS.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.