Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Make characterset serialisation test explicit | using System.Dynamic;
using System.Xml.Serialization;
using com.esendex.sdk.core;
using com.esendex.sdk.messaging;
using com.esendex.sdk.utilities;
using NUnit.Framework;
namespace com.esendex.sdk.test.messaging
{
[TestFixture]
public class SmsMessageSerializationTests
{
[Test]
... | using com.esendex.sdk.core;
using com.esendex.sdk.messaging;
using com.esendex.sdk.utilities;
using NUnit.Framework;
namespace com.esendex.sdk.test.messaging
{
[TestFixture]
public class SmsMessageSerializationTests
{
[TestCase(CharacterSet.Auto, @"<?xml version=""1.0"" encoding=""utf-8"... |
Remove duplicate attribute that fails the build | using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyDescription ("Clide.Vsix")]
[assembly: InternalsVisibleTo ("Clide.IntegrationTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d9776e258bdf5f7c38f3c880404b9861ebbd235d8198315cdfda0f0c25b18608bdfd03e34bac9... | using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo ("Clide.IntegrationTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d9776e258bdf5f7c38f3c880404b9861ebbd235d8198315cdfda0f0c25b18608bdfd03e34bac9d0ec95766e8c3928140c6eda581a9448066af7dfaf88d3b... |
Fix incorrect control display key | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ControlDisplay : MonoBehaviour
{
#pragma warning disable 0649 //Serialized Fields
[SerializeField]
private SpriteRenderer controlRenderer;
[SerializeField]
private Text controlText;
#pr... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ControlDisplay : MonoBehaviour
{
#pragma warning disable 0649 //Serialized Fields
[SerializeField]
private SpriteRenderer controlRenderer;
[SerializeField]
private Text controlText;
#pr... |
Fix incorrect default view names | // <copyright file="ViewResolver.cs" company="Stormpath, Inc.">
// Copyright (c) 2016 Stormpath, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/lic... | // <copyright file="ViewResolver.cs" company="Stormpath, Inc.">
// Copyright (c) 2016 Stormpath, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/lic... |
Implement TrySaveToFile() by using File.WriteAllText(). | /*********************************************************************************
* SettingsTextBox.UIActions.cs
*
* Copyright (c) 2004-2018 Henk Nicolai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may o... | /*********************************************************************************
* SettingsTextBox.UIActions.cs
*
* Copyright (c) 2004-2018 Henk Nicolai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may o... |
Revert "Add option for allowed user roles" | using System;
using System.Collections.Generic;
namespace Glimpse.Server
{
public class GlimpseServerWebOptions
{
public GlimpseServerWebOptions()
{
AllowedUserRoles = new List<string>();
}
public bool AllowRemote { get; set; }
public IList<string> Allowed... | using System;
namespace Glimpse.Server
{
public class GlimpseServerWebOptions
{
public bool AllowRemote { get; set; }
}
} |
Add dumping of solution based on dummy data | using System;
using System.Collections.Generic;
using System.Windows.Forms;
using UniProgramGen.Data;
namespace UniProgramGen
{
public partial class ResultsTab : UserControl
{
public ResultsTab()
{
InitializeComponent();
}
private List<Teacher> teachers;
pr... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using UniProgramGen.Data;
namespace UniProgramGen
{
public partial class ResultsTab : UserControl
{
public ResultsTab()
{
InitializeComponent();
}
private List<Teacher> t... |
Improve json conversion: support more types + cleanup code | using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace template_designer
{
public class JsonToDictionaryConverter
{
public static Dictionary<string, object> DeserializeJsonToDictionary(string json)
{
var jObject = JObject.Parse(json);
var dict = Parse... | using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
namespace template_designer
{
public class JsonToDictionaryConverter
{
public static Dictionary<string, object> DeserializeJsonToDictionary(string json)
{
var jObject = JObject.Parse(json);
... |
Switch back to implicit operators for conversions to and from CodeStyleOption and CodeStyleOption2 respectively. These are needed to prevent InvalidCastException when user invokes `optionSet.WithChangedOption(..., new CodeStyleOption<bool>(...))` and any of our internal code base tries to fetch the option value with `o... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.CodeAnalysis.CodeStyle
{
internal partial class CodeStyleOption2<T>
{
public st... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.CodeAnalysis.CodeStyle
{
internal partial class CodeStyleOption2<T>
{
public st... |
Add option for only 1 hop propagation | using Plantain;
using System.Collections.Generic;
using UnityEngine;
[AddComponentMenu("Plantain/Trigger/Propagator")]
public class TriggerPropagator : Trigger {
/// <summary>
/// A list of GameObjects that will have the current GameObject's triggers passed on to.
/// </summary>
public List<GameObject>... | using Plantain;
using System.Collections.Generic;
using UnityEngine;
[AddComponentMenu("Plantain/Trigger/Propagator")]
public class TriggerPropagator : Trigger {
/// <summary>
/// Prevent a trigger from hopping any further than the targeted objects.
/// </summary>
public bool preventPropigation = false... |
Add Database initializer to Global | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace Samesound
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Star... | using Samesound.Data;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace Samesound
{
public class WebApiApplication : System.Web.HttpApplicati... |
Fix logout form input button | @using Microsoft.AspNet.Identity
<div class="row">
<div class="col-md-6">
<h1>
@ViewBag.Title
<small>
@ViewBag.Lead
</small>
</h1>
</div>
<div class="col-md-6">
<ul class="nav nav-pills pull-right">
@i... | @using Microsoft.AspNet.Identity
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
{
@Html.AntiForgeryToken()
}
<div class="row">
<div class="col-md-6">
<h1>
@ViewBag.Title
<small>
@Vie... |
Make tcpSocketManager writes async to avoid blocking everything else | using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
namespace TcpSocketDataSender
{
public class TcpSocketManager : IDisposable
{
private TcpClient _tcpClient;
BinaryWriter _writer = null;
public int ServerPort = 7839;
public string ServerIp = "127.0.0.1... | using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
namespace TcpSocketDataSender
{
public class TcpSocketManager : IDisposable
{
private TcpClient _tcpClient;
BinaryWriter _writer = null;
public int ServerPo... |
Adjust accuracy display to match stable | // 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.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play;
using o... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play;
using o... |
Add message to exit in debug mode | using System;
using System.IO;
using System.Linq;
namespace Cams
{
class Program
{
static void Main(string[] args)
{
string rawDir = Path.Combine(Settings.Path, "raw");
string processedDir = Path.Combine(Settings.Path, "processed");
var cameras = Directory.GetDirectories(rawDir).Select(BuildCamera);
... | using System;
using System.IO;
using System.Linq;
namespace Cams
{
class Program
{
static void Main(string[] args)
{
string rawDir = Path.Combine(Settings.Path, "raw");
string processedDir = Path.Combine(Settings.Path, "processed");
var cameras = Directory.GetDirectories(rawDir).Select(BuildCamera);
... |
Allow compiler to set assembly version. | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("GitHubFeeds")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bradley Grainger")]
[assembly: AssemblyProduct("GitHubFeeds")]
[assembly: AssemblyCopyright("Copyright 2... | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("GitHubFeeds")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bradley Grainger")]
[assembly: AssemblyProduct("GitHubFeeds")]
[assembly: AssemblyCopyright("Copyright 2... |
Return now submits quick poll | <div ng-controller="CreateBasicPageController">
<div>
<h2>Regular Poller?</h2>
Register for more config options. It's free!
</div>
<form name="quickPollForm">
<div id="question-block">
Your Question <br />
<input id="question" placeholder="E.g. Where should ... | <div ng-controller="CreateBasicPageController">
<div>
<h2>Regular Poller?</h2>
Register for more config options. It's free!
</div>
<form name="quickPollForm" ng-submit="createPoll(pollQuestion)">
<div id="question-block">
Your Question <br />
<input id="ques... |
Add UserVoice widget to global footer. | | @using GiveCRM.Web.Infrastructure
@if (ConfigurationSettings.IsUserVoiceIntegrationEnabled)
{
<script type="text/javascript">
var uvOptions = { };
(function() {
var uv = document.createElement('script');
uv.type = 'text/javascript';
uv.async = true;
... |
Fix Log Out link so it works everywhere. | @if (Request.IsAuthenticated) {
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-user" style="color: #f2105c"></i> @Session["DisplayName"]<span class="caret"></span></a>
<ul class="dropdown-menu">
<li>@Html.ActionLink("Profile", "Profile", "User")</li>
<li class="divide... | @if (Request.IsAuthenticated) {
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-user" style="color: #f2105c"></i> @Session["DisplayName"]<span class="caret"></span></a>
<ul class="dropdown-menu">
<li>@Html.ActionLink("Profile", "Profile", "User")</li>
<li class="divide... |
Refactor Expose parse operator to deriving tests. Use [SetUp] attribute to recreate parser for every test. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using fitSharp.Machine.Engine;
using fitSharp.Machine.Model;
using NUnit.Framework;
using fitSharp.Samples.Fit;
using fitSharp.Fit.Operators;
namespace fitSharp.Test.NUnit.Fit {
public class ParseOperatorTest<ParseOperatorType>
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using fitSharp.Machine.Engine;
using fitSharp.Machine.Model;
using NUnit.Framework;
using fitSharp.Samples.Fit;
using fitSharp.Fit.Operators;
namespace fitSharp.Test.NUnit.Fit {
public class ParseOperatorTest<ParseOperatorType>
... |
Add implementation details to SQLiteSchema Aggregator | using System;
using System.Data;
namespace Gigobyte.Daterpillar.Data
{
public class SQLiteSchemaAggregator : SchemaAggregatorBase
{
public SQLiteSchemaAggregator(IDbConnection connection) : base(connection)
{
}
protected override string GetColumnInfoQuery(string tableName)
... | using System;
using System.Data;
using Gigobyte.Daterpillar.Transformation;
using System.Text.RegularExpressions;
namespace Gigobyte.Daterpillar.Data
{
public class SQLiteSchemaAggregator : SchemaAggregatorBase
{
public SQLiteSchemaAggregator(IDbConnection connection) : base(connection)
{
... |
Fix last remaining critical issue in sonar | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
namespace Psistats.App
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
namespace Psistats.App
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
... |
Replace hard coded string with field in utf8string tests where the value is irrelevant | using System.Reflection;
using Xunit;
namespace System.Text.Utf8.Tests
{
public class TypeConstraintsTests
{
[Fact]
public void Utf8StringIsAStruct()
{
var utf8String = "anyString"u8;
Assert.True(utf8String.GetType().GetTypeInfo().IsValueType);
}
... | using System.Reflection;
using Xunit;
namespace System.Text.Utf8.Tests
{
public class TypeConstraintsTests
{
private Utf8String _anyUtf8String;
public TypeConstraintsTests()
{
_anyUtf8String = "anyString"u8;
}
[Fact]
public void Utf8StringIsAStruct... |
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.SignalR")]
[assembly: AssemblyDescription("")]
| using System.Reflection;
[assembly: AssemblyTitle("Autofac.Tests.Integration.SignalR")]
|
Set correct base type for script instances. | using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.IO;
namespace IronAHK.Scripting
{
partial class Parser : ICodeParser
{
Dictionary<string, CodeMemberMethod> methods;
Type core;
const string mainScope = "";
CodeEnt... | using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.IO;
namespace IronAHK.Scripting
{
partial class Parser : ICodeParser
{
Dictionary<string, CodeMemberMethod> methods;
Type core;
const string mainScope = "";
CodeEnt... |
Change ui text "Package" to "Dataset" | @using CkanDotNet.Api.Model
@model Package
<div class="container">
<h2 class="container-title">Rate this Package</h2>
<div class="container-content">
@Html.Partial("~/Views/Shared/_Rating.cshtml", Model, new ViewDataDictionary { { "editable", true } })
</div>
</div>
| @using CkanDotNet.Api.Model
@model Package
<div class="container">
<h2 class="container-title">Rate this Dataset</h2>
<div class="container-content">
@Html.Partial("~/Views/Shared/_Rating.cshtml", Model, new ViewDataDictionary { { "editable", true } })
</div>
</div>
|
Use Regex in stead of string | using CommonMarkSharp.Blocks;
using CommonMarkSharp.Inlines;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonMarkSharp.InlineParsers
{
public class LineBreakParser : IParser<LineBreak>
{
public string Start... | using CommonMarkSharp.Blocks;
using CommonMarkSharp.Inlines;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace CommonMarkSharp.InlineParsers
{
public class LineBreakParser : IParser<LineBre... |
Make driver name and version static properties constants and use dictionary structure for connections to simplify their retrieval. | using System.Collections.Generic;
using System.Linq;
using Arango.Client.Protocol;
namespace Arango.Client
{
public static class ArangoClient
{
private static List<Connection> _connections = new List<Connection>();
public static string DriverName
{
get { return ... | using System.Collections.Generic;
using System.Linq;
using Arango.Client.Protocol;
namespace Arango.Client
{
public static class ArangoClient
{
private static Dictionary<string, Connection> _connections = new Dictionary<string, Connection>();
public const string DriverName = "ArangoD... |
Read in post data from the data store | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
using BlogTemplate.Models;
namespace BlogTemplate.Pages
{
public class PostModel : PageModel
{
private Blog _blog;
public PostModel(Blog blog)
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
using BlogTemplate.Models;
namespace BlogTemplate.Pages
{
public class PostModel : PageModel
{
private Blog _blog;
public PostModel(Blog blog)
{
... |
Add defulat constructor and add day as an attribute | namespace food_tracker {
public class NutritionItem {
public string name { get; set; }
public double calories { get; set; }
public double carbohydrates { get; set; }
public double sugars { get; set; }
public double fats { get; set; }
public double saturatedFats { get... | using System.ComponentModel.DataAnnotations;
namespace food_tracker {
public class NutritionItem {
[Key]
public int NutritionItemId { get; set; }
public string name { get; set; }
public string dayId { get; set; }
public double calories { get; set; }
public double ca... |
Add before notify to client interface | using Bugsnag.Payload;
namespace Bugsnag
{
public interface IClient
{
void Notify(System.Exception exception, Request request = null);
void Notify(System.Exception exception, Severity severity, Request request = null);
void Notify(System.Exception exception, HandledState severity, Request request = nul... | using Bugsnag.Payload;
namespace Bugsnag
{
public interface IClient
{
void Notify(System.Exception exception, Request request = null);
void Notify(System.Exception exception, Severity severity, Request request = null);
void Notify(System.Exception exception, HandledState severity, Request request = nul... |
Add support to set thread priority | using System;
using System.Threading;
namespace SPAD.neXt.Interfaces.Base
{
public interface ISPADBackgroundThread
{
string WorkerName { get; }
bool IsRunning { get; }
TimeSpan Interval { get; }
bool ScheduleOnTimeout { get; }
EventWaitHandle SignalHandle { get; }
... | using System;
using System.Threading;
namespace SPAD.neXt.Interfaces.Base
{
public interface ISPADBackgroundThread
{
string WorkerName { get; }
bool IsRunning { get; }
TimeSpan Interval { get; }
bool ScheduleOnTimeout { get; }
EventWaitHandle SignalHandle { get; }
... |
Update max combo test value | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Mania.Difficulty;
using osu.Game.Rulesets.Mania.Mods;
using os... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Mania.Difficulty;
using osu.Game.Rulesets.Mania.Mods;
using os... |
Update build properties with correct data | 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("Da... | 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("Da... |
Remove duplicate line (copy paste bug). | using System.Threading.Tasks;
using System.Web;
using SignalR.Abstractions;
namespace SignalR.AspNet
{
public class AspNetResponse : IResponse
{
private readonly HttpRequestBase _request;
private readonly HttpResponseBase _response;
public AspNetResponse(HttpRequestBase request, HttpR... | using System.Threading.Tasks;
using System.Web;
using SignalR.Abstractions;
namespace SignalR.AspNet
{
public class AspNetResponse : IResponse
{
private readonly HttpRequestBase _request;
private readonly HttpResponseBase _response;
public AspNetResponse(HttpRequestBase request, HttpR... |
Add additional methods to interface | using System.Collections.Generic;
namespace DevelopmentInProgress.DipState
{
public interface IDipState
{
int Id { get; }
string Name { get; }
bool IsDirty { get; }
bool InitialiseWithParent { get; }
DipStateType Type { get; }
DipStateStatus Status { get; }
... | using System;
using System.Collections.Generic;
namespace DevelopmentInProgress.DipState
{
public interface IDipState
{
int Id { get; }
string Name { get; }
bool IsDirty { get; }
bool InitialiseWithParent { get; }
DipStateType Type { get; }
DipStateStatus Status... |
Make sure file is open before getting on with it. | using System.IO;
namespace LINQToTreeHelpers.FutureUtils
{
/// <summary>
/// Future TFile - really just a normal TFile, but gets written out in the future...
/// </summary>
public class FutureTFile : FutureTDirectory
{
private static ROOTNET.Interface.NTFile CreateOpenFile(string ... | using System;
using System.IO;
namespace LINQToTreeHelpers.FutureUtils
{
/// <summary>
/// Future TFile - really just a normal TFile, but gets written out in the future...
/// </summary>
public class FutureTFile : FutureTDirectory
{
private static ROOTNET.Interface.NTFile CreateO... |
Make the api changes public! | using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.EventHubs;
using ServiceFabric.Utilities;
namespace SceneSkope.ServiceFabric.EventHubs
{
public static class EventHubConfiguration
{
public static async Task<EventHubClient> GetEventHubClientAsync(string sectionN... | using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.EventHubs;
using ServiceFabric.Utilities;
namespace SceneSkope.ServiceFabric.EventHubs
{
public static class EventHubConfiguration
{
public static async Task<EventHubClient> GetEventHubClientAsync(string sectionN... |
Fix CI complaining about no `ConfigureAwait()` | // 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.Threading.Tasks;
using NUnit.Framework;
using osu.Framework.IO.Stores;
using osu.Framework.Tests.Visual;
namespace osu.Framework.Tests.IO
{
public class... | // 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.Threading.Tasks;
using NUnit.Framework;
using osu.Framework.IO.Stores;
using osu.Framework.Tests.Visual;
namespace osu.Framework.Tests.IO
{
public class... |
Clean up Web Api Config Commit | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Owin.Security.OAuth;
using Newtonsoft.Json.Serialization;
namespace NeedDotNet.Web
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Owin.Security.OAuth;
using Newtonsoft.Json.Serialization;
namespace NeedDotNet.Web
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)... |
Fix functions not being called | using UnityEngine;
using System.Collections;
using System;
namespace Lockstep
{
public class Buff
{
protected int Duration;
protected int Timer;
protected LSAgent Target;
internal int ID {get; set;}
public bool Active {get; private set;}
public void Init... | using UnityEngine;
using System.Collections;
using System;
namespace Lockstep
{
public class Buff
{
protected int Duration;
protected int Timer;
protected LSAgent Target;
internal int ID {get; set;}
public bool Active {get; private set;}
public void Init... |
Add ISqlQuery<object> SqlQuery(this DatabaseFacade database, Type type, string sqlQuery, params SqlParameter[] parameters) | using EntityFrameworkCore.RawSQLExtensions.SqlQuery;
using Microsoft.EntityFrameworkCore.Infrastructure;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
namespace EntityFrameworkCore.RawSQLExtensions.Extensions
{
public static class DatabaseFacadeExtensions
{
public s... | using EntityFrameworkCore.RawSQLExtensions.SqlQuery;
using Microsoft.EntityFrameworkCore.Infrastructure;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
namespace EntityFrameworkCore.RawSQLExtensions.Extensions
{
public static class DatabaseFacadeExtensions
{
... |
Add an option to set the number of decimal places that will be used in the formatting | using System;
namespace GUtils.IO
{
public static class FileSizes
{
public const UInt64 B = 1024;
public const UInt64 KiB = 1024 * B;
public const UInt64 MiB = 1024 * KiB;
public const UInt64 GiB = 1024 * MiB;
public const UInt64 TiB = 1024 * GiB;
public const U... | using System;
namespace GUtils.IO
{
public static class FileSizes
{
public const UInt64 B = 1024;
public const UInt64 KiB = 1024 * B;
public const UInt64 MiB = 1024 * KiB;
public const UInt64 GiB = 1024 * MiB;
public const UInt64 TiB = 1024 * GiB;
public const UInt64 PiB = 1024 * TiB;
private static ... |
Remove population of Visual Studio's TestCase.DisplayName property during test discovery. This has no effect and is misleading. TestCase.FullyQualifiedName is set to the method group of a test method, but TestCase.DisplayName should only be set during execution time to the full name of a test case including input param... | using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using Fixie.Execution;
namespace Fixie.VisualStudio.TestAdapter
{
[D... | using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using Fixie.Execution;
namespace Fixie.VisualStudio.TestAdapter
{
[D... |
Fix spinners not starting placement with the first click | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Osu.Edit.Blueprints.Spinners.Components;
using osu.... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Osu.Edit.Blueprints.Spinners.Components;
using osu.... |
Revert accidental change to @async flag. | using System;
using System.Diagnostics;
namespace NuGetConsole.Implementation.PowerConsole {
/// <summary>
/// Represents a host with extra info.
/// </summary>
class HostInfo : ObjectWithFactory<PowerConsoleWindow> {
Lazy<IHostProvider, IHostMetadata> HostProvider { get; set; }
... | using System;
using System.Diagnostics;
namespace NuGetConsole.Implementation.PowerConsole {
/// <summary>
/// Represents a host with extra info.
/// </summary>
class HostInfo : ObjectWithFactory<PowerConsoleWindow> {
Lazy<IHostProvider, IHostMetadata> HostProvider { get; set; }
... |
Add a note about `OnlineID` potentially being zero in non-autoincrement cases | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
namespace osu.Game.Database
{
public interface IHasOnlineID
{
/// <summary>
/// The server-side ID representing this instance, i... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
namespace osu.Game.Database
{
public interface IHasOnlineID
{
/// <summary>
/// The server-side ID representing this instance, i... |
Fix refresh tokens not working correctly | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Globalization;
using Newtonsoft.Json;
using osu.Framework.Extensions;
namespace osu.Game.Online.API
{
[Serializable]
inte... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Globalization;
using Newtonsoft.Json;
using osu.Framework.Extensions;
namespace osu.Game.Online.API
{
[Serializable]
inte... |
Clean up dependency node class | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NProcessPipe.DependencyAnalysis
{
public class Node<T>
{
public Node(T data)
{
//Index = -1;
Data = data;
}
public T Data { get; private set; ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NProcessPipe.DependencyAnalysis
{
public class Node<T>
{
public Node(T data)
{
Data = data;
}
public T Data { get; private set; }
public bool Eq... |
Update userHandle to be consistent in all examples instead of random | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="CourseExerciseFiles.cs" company="CodeBlueDev">
// All rights reserved.
// </copyright>
// <summary>
// Represents a PluralSight Course's exercise files information.
// </summa... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="CourseExerciseFiles.cs" company="CodeBlueDev">
// All rights reserved.
// </copyright>
// <summary>
// Represents a PluralSight Course's exercise files information.
// </summa... |
Add extension method to translate text coordinates | using System.Collections.Generic;
using System.IO;
using System.Management.Automation.Language;
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Extensions
{
// TODO Add documentation
public static class Extensions
{
public static IEnumerable<string> GetLines(this string text)
{
... | using System;
using System.Collections.Generic;
using System.IO;
using System.Management.Automation.Language;
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Extensions
{
// TODO Add documentation
public static class Extensions
{
public static IEnumerable<string> GetLines(this string text)
... |
Decrease number of socket instances in SocketPerformance_MultipleSocketClientAsync_LocalHostServerAsync | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Net.Sockets.Tests;
using System.Net.Test.Common;
using Xunit;
using Xunit.Abstractions;
... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Net.Sockets.Tests;
using System.Net.Test.Common;
using Xunit;
using Xunit.Abstractions;
... |
Clear CellsCollection on WorksheetInternals disposal to make it easier to GC to collect unused references | using System;
namespace ClosedXML.Excel
{
internal class XLWorksheetInternals : IDisposable
{
public XLWorksheetInternals(
XLCellsCollection cellsCollection,
XLColumnsCollection columnsCollection,
XLRowsCollection rowsCollection,
XLRanges mergedRanges
... | using System;
namespace ClosedXML.Excel
{
internal class XLWorksheetInternals : IDisposable
{
public XLWorksheetInternals(
XLCellsCollection cellsCollection,
XLColumnsCollection columnsCollection,
XLRowsCollection rowsCollection,
XLRanges mergedRanges
... |
Fix mania hold note heads hiding when frozen | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
/// <summary>
/// The head of a <see cref="DrawableHoldNote"/>.
/// </summary>
public class Drawable... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
/// <summary>
/// The head of a <see cref="DrawableHoldNote"/>.
... |
Add API to extract resource from assembly | using System.IO;
using Htc.Vita.Core.Runtime;
namespace Htc.Vita.Core.Util
{
public static partial class Extract
{
public static bool FromFileToIcon(FileInfo fromFile, FileInfo toIcon)
{
if (!Platform.IsWindows)
{
return false;
}
... | using System;
using System.IO;
using System.IO.Compression;
using System.Reflection;
using Htc.Vita.Core.Log;
using Htc.Vita.Core.Runtime;
namespace Htc.Vita.Core.Util
{
public static partial class Extract
{
public static bool FromFileToIcon(
FileInfo fromFile,
FileInfo... |
Append numbers to created playlist names if taken | using Rg.Plugins.Popup.Pages;
using Rg.Plugins.Popup.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using XamMusic.Interfaces;
using XamMusic.ViewModels;
namespace XamMusic.Controls
{
[... | using Rg.Plugins.Popup.Pages;
using Rg.Plugins.Popup.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using XamMusic.Interfaces;
using XamMusic.ViewModels;
namespace XamMusic.Controls
{
[... |
Disable locally failiny npm command test | //*********************************************************//
// 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,... |
Fix arg parsing for design time db contexts. | using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
// ReSharper disable UnusedType.Global
namespace Content.Server.Database;
public sealed class DesignTimeContextFactoryPostgres : IDesignTimeDbContextFactory<PostgresServerDbContext>
{
public PostgresServerDbContext CreateDbContext(s... | using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
// ReSharper disable UnusedType.Global
namespace Content.Server.Database;
public sealed class DesignTimeContextFactoryPostgres : IDesignTimeDbContextFactory<PostgresServerDbContext>
{
public PostgresServerDbContext CreateDbContext(s... |
Add inherit from Hub and Next | using System;
using System.Data.Entity;
using System.Linq;
using System.Web;
using MusicPickerService.Models;
using StackExchange.Redis;
namespace MusicPickerService.Hubs
{
public class MusicHub
{
private static ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost");
private ... | using System;
using System.Data.Entity;
using System.Linq;
using System.Web;
using MusicPickerService.Models;
using StackExchange.Redis;
using Microsoft.AspNet.SignalR;
namespace MusicPickerService.Hubs
{
public class MusicHub: Hub
{
private static ConnectionMultiplexer redis = ConnectionMultiplexer.C... |
Change tweet query to include fictional wizards | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Mime;
using System.Web.Compilation;
using System.Web.Http;
using Newtonsoft.Json;
using RestSharp;
using WizardCentralServer.Model.Dtos;
using WizardWebApi.Models.Obj... | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Mime;
using System.Web.Compilation;
using System.Web.Http;
using Newtonsoft.Json;
using RestSharp;
using WizardCentralServer.Model.Dtos;
using WizardWebApi.Models.Obj... |
Add AtataContextBuilder_OnDriverCreated and AtataContextBuilder_OnDriverCreated_RestartDriver tests | using System;
using NUnit.Framework;
namespace Atata.Tests
{
[TestFixture]
public class AtataContextBuilderTests
{
[Test]
public void AtataContextBuilder_Build_WithoutDriver()
{
InvalidOperationException exception = Assert.Throws<InvalidOperationException>(() =>
... | using System;
using NUnit.Framework;
namespace Atata.Tests
{
public class AtataContextBuilderTests : UITestFixtureBase
{
[Test]
public void AtataContextBuilder_Build_WithoutDriver()
{
InvalidOperationException exception = Assert.Throws<InvalidOperationException>(() =>
... |
Change EnumerableExtensions to partial class | using System.Collections.Generic;
namespace Treenumerable
{
internal static class EnumerableExtensions
{
internal static IEnumerable<VirtualTree<T>> ToVirtualTrees<T>(
this IEnumerable<T> source,
VirtualTree<T> virtualTree)
{
foreach (T node in source)
... | using System.Collections.Generic;
namespace Treenumerable
{
internal static partial class EnumerableExtensions
{
internal static IEnumerable<VirtualTree<T>> ToVirtualTrees<T>(
this IEnumerable<T> source,
VirtualTree<T> virtualTree)
{
foreach (T node in sourc... |
Fix an inadvertent 204 in activator tests | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc;
namespace ActivatorWebSite
{
public class RegularController : Controller... | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc;
namespace ActivatorWebSite
{
public class ... |
Add titles to tutorial pages | using System.Web.Mvc;
using StackExchange.DataExplorer.Helpers;
namespace StackExchange.DataExplorer.Controllers
{
public class TutorialController : StackOverflowController
{
[StackRoute("tutorial")]
public ActionResult Index()
{
SetHeader("Tutorial");
return Vi... | using System.Web.Mvc;
using StackExchange.DataExplorer.Helpers;
namespace StackExchange.DataExplorer.Controllers
{
public class TutorialController : StackOverflowController
{
[StackRoute("tutorial")]
public ActionResult Index()
{
SetHeader("Tutorial");
ViewData[... |
Add documentation and convenience func to interface | using System;
using System.Threading;
using System.Threading.Tasks;
namespace KafkaNet
{
public interface IKafkaTcpSocket : IDisposable
{
Uri ClientUri { get; }
Task<byte[]> ReadAsync(int readSize);
Task<byte[]> ReadAsync(int readSize, CancellationToken cancellationToken);
Tas... | using System;
using System.Threading;
using System.Threading.Tasks;
namespace KafkaNet
{
public interface IKafkaTcpSocket : IDisposable
{
/// <summary>
/// The Uri to the connected server.
/// </summary>
Uri ClientUri { get; }
/// <summary>
/// Read a certain b... |
Add commandline switch to benchmark to avoid need for rebuilds | using BenchmarkDotNet.Running;
namespace Benchmark.NetCore
{
internal class Program
{
private static void Main(string[] args)
{
//BenchmarkRunner.Run<MetricCreationBenchmarks>();
//BenchmarkRunner.Run<SerializationBenchmarks>();
//BenchmarkRunner.Run<LabelBe... | using BenchmarkDotNet.Running;
namespace Benchmark.NetCore
{
internal class Program
{
private static void Main(string[] args)
{
// Give user possibility to choose which benchmark to run.
// Can be overridden from the command line with the --filter option.
ne... |
Increase the default Cloud Files connection limit | namespace Rackspace.VisualStudio.CloudExplorer.Files
{
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VSDesigner.ServerExplorer;
using net.openstack.Core.Domain;
using net.openstack.Providers.Rackspace;
public class... | namespace Rackspace.VisualStudio.CloudExplorer.Files
{
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VSDesigner.ServerExplorer;
using net.openstack.Core.Domain;
using net.openstack.Providers.Rackspace;
public class... |
Add non-generic polygon type that uses double type by default. | using System;
using System.Collections.Generic;
using System.Text;
namespace Geode.Geometry
{
public class Polygon<T> : IGeoType
{
public string Type => "Polygon";
public IEnumerable<IEnumerable<T>> Coordinates { get; set; }
public Polygon(IEnumerable<IEnumerable<T>> coordinates)
... | using System;
using System.Collections.Generic;
using System.Text;
namespace Geode.Geometry
{
public class Polygon: IGeoType
{
public string Type => "Polygon";
public IEnumerable<IEnumerable<double>> Coordinates { get; set; }
public Polygon(IEnumerable<IEnumerable<double>> coordinates)... |
Check for valid URI in publisher information. | using System;
using System.Security.Cryptography.Pkcs;
namespace AuthenticodeLint.Rules
{
public class PublisherInformationPresentRule : IAuthenticodeRule
{
public int RuleId { get; } = 10004;
public string RuleName { get; } = "Publisher Information Rule";
public string Sh... | using System;
using System.Security.Cryptography.Pkcs;
namespace AuthenticodeLint.Rules
{
public class PublisherInformationPresentRule : IAuthenticodeRule
{
public int RuleId { get; } = 10004;
public string RuleName { get; } = "Publisher Information Rule";
public string Sh... |
Remove code involving MessageBox that did not belong in this class | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServiceProvider
{
public static class SettingsManager
{
internal static void CheckForXmlFileDirectory(Func<string> getXmlFilePath, Action<string, string> messageForUser)
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServiceProvider
{
public static class SettingsManager
{
internal static void CheckForXmlFileDirectory(Func<string> getXmlFilePath, Action<string, string> messageForUser)
... |
Fix bug where ParseExpression doesn't parse an expression but a query | using System;
namespace NQuery.Language
{
public sealed class SyntaxTree
{
private readonly CompilationUnitSyntax _root;
private readonly TextBuffer _textBuffer;
private SyntaxTree(CompilationUnitSyntax root, TextBuffer textBuffer)
{
_root = root;
_textB... | using System;
namespace NQuery.Language
{
public sealed class SyntaxTree
{
private readonly CompilationUnitSyntax _root;
private readonly TextBuffer _textBuffer;
private SyntaxTree(CompilationUnitSyntax root, TextBuffer textBuffer)
{
_root = root;
_textB... |
Fix test json file path on unix systems | using System.IO;
using Stranne.VasttrafikNET.Tests.Json;
namespace Stranne.VasttrafikNET.Tests.Helpers
{
public static class JsonHelper
{
public static string GetJson(JsonFile jsonFile)
{
var fileName = $"{jsonFile}.json";
var json = File.ReadAllText($@"Json\{fileName}"... | using System.IO;
using Stranne.VasttrafikNET.Tests.Json;
namespace Stranne.VasttrafikNET.Tests.Helpers
{
public static class JsonHelper
{
public static string GetJson(JsonFile jsonFile)
{
var fileName = $"{jsonFile}.json";
var json = File.ReadAllText($@"Json/{fileName}"... |
Fix for searching for basebuilder already defined on all assemblies | using AutoMapper;
namespace Caelan.Frameworks.Common.Classes
{
public static class GenericBuilder
{
public static BaseBuilder<TSource, TDestination> Create<TSource, TDestination>()
where TDestination : class, new()
where TSource : class, new()
{
var builder = new BaseBuilder<TSource, TDestination>();
... | using System;
using System.Linq;
using System.Reflection;
using AutoMapper;
namespace Caelan.Frameworks.Common.Classes
{
public static class GenericBuilder
{
public static BaseBuilder<TSource, TDestination> Create<TSource, TDestination>()
where TDestination : class, new()
where TSource : class, new()
{
... |
Add stream variant of GetFileHeader() | /*
* Programmed by Umut Celenli umut@celenli.com
*/
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace MimeBank
{
/// <summary>
/// This is the main class to check the file mime type
/// Header list is loaded once
/// </summary>
public class MimeChecker
... | /*
* Programmed by Umut Celenli umut@celenli.com
*/
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace MimeBank
{
/// <summary>
/// This is the main class to check the file mime type
/// Header list is loaded once
/// </summary>
public class MimeChecker
... |
Redact DB password in logging | using Ensconce.Database;
using Ensconce.Helpers;
using System.Data.SqlClient;
namespace Ensconce.Cli
{
internal static class DatabaseInteraction
{
internal static void DoDeployment()
{
SqlConnectionStringBuilder connStr = null;
if (!string.IsNullOrEmpty(Arguments.Connec... | using Ensconce.Database;
using Ensconce.Helpers;
using System.Data.SqlClient;
namespace Ensconce.Cli
{
internal static class DatabaseInteraction
{
internal static void DoDeployment()
{
SqlConnectionStringBuilder connStr = null;
if (!string.IsNullOrEmpty(Arguments.Connec... |
Disable the master mobile site. | using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Routing;
using Microsoft.AspNet.FriendlyUrls;
namespace TechProFantasySoccer
{
public static class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new Friendly... | using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Routing;
using Microsoft.AspNet.FriendlyUrls;
namespace TechProFantasySoccer
{
public static class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
/*var settings = new Friend... |
Make sure config exists by checking steam credentials | /*
* Copyright (c) 2013, SteamDB. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Future non-SteamKit stuff should go in this file.
*/
using System;
using System.Threading;
namespace PICSUpdater
{
class Program
{
sta... | /*
* Copyright (c) 2013, SteamDB. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Future non-SteamKit stuff should go in this file.
*/
using System;
using System.Configuration;
using System.Threading;
namespace PICSUpdater
{
cla... |
Fix date 2008 -> 2009 | <p>Welcome! Codingteam is an open community of engineers and programmers.</p>
<p>And here're today's conference logs:</p>
<iframe class="logs" src="@ViewData["LogUrl"]"></iframe>
<a href="/old-logs/codingteam@conference.jabber.ru/">Older logs (mostly actual in period 2008-08-22 — 2016-12-09)</a>
| <p>Welcome! Codingteam is an open community of engineers and programmers.</p>
<p>And here're today's conference logs:</p>
<iframe class="logs" src="@ViewData["LogUrl"]"></iframe>
<a href="/old-logs/codingteam@conference.jabber.ru/">Older logs (mostly actual in period 2009-08-22 — 2016-12-09)</a>
|
Enforce single responsibility principle -- decorators can implement additional functionality. | namespace Bakery.Logging
{
using System;
using Time;
public class ConsoleLog
: ILog
{
private readonly IClock clock;
public ConsoleLog(IClock clock)
{
this.clock = clock;
}
public void Write(Level logLevel, String message)
{
const String FORMAT = "{0}: [{1}] {2}";
var ... | namespace Bakery.Logging
{
using System;
public class ConsoleLog
: ILog
{
public void Write(Level logLevel, String message)
{
var textWriter = logLevel >= Level.Warning
? Console.Error
: Console.Out;
textWriter.WriteLine(message);
}
}
}
|
Improve test coverage for Parsed<T> by mirroring the test coverage for Error<T>. | namespace Parsley.Tests;
class ParsedTests
{
public void HasAParsedValue()
{
new Parsed<string>("parsed", new(1, 1)).Value.ShouldBe("parsed");
}
public void HasNoErrorMessageByDefault()
{
new Parsed<string>("x", new(1, 1)).ErrorMessages.ShouldBe(ErrorMessageList.Empty);
}
... | namespace Parsley.Tests;
class ParsedTests
{
public void CanIndicateSuccessfullyParsedValueAtTheCurrentPosition()
{
var parsed = new Parsed<string>("parsed", new(12, 34));
parsed.Success.ShouldBe(true);
parsed.Value.ShouldBe("parsed");
parsed.ErrorMessages.ShouldBe(ErrorMessageL... |
Fix accidental type conversion breakage. | using System;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
namespace clipr.Utils
{
/// <summary>
/// <para>
/// A TypeConverter that allows conversion of any object to System.Object.
/// Does not actually perform a conversion, just passes the value on
/// through.
... | using System;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
namespace clipr.Utils
{
/// <summary>
/// <para>
/// A TypeConverter that allows conversion of any object to System.Object.
/// Does not actually perform a conversion, just passes the value on
/// through.
... |
Allow $ as import root | using System;
using SourceSafeTypeLib;
namespace vsslib
{
public static class VssItemExtensions
{
/// <summary>
/// If VSS conatins $/Project1 but requested $/project1, then case will not be fixed and $/project1 will be retuned.
/// This methor return case to normal -> $/Project1
/// </summary>
/// <param... | using System;
using SourceSafeTypeLib;
namespace vsslib
{
public static class VssItemExtensions
{
/// <summary>
/// If VSS conatins $/Project1 but requested $/project1, then case will not be fixed and $/project1 will be retuned.
/// This methor return case to normal -> $/Project1
/// </summary>
/// <param... |
Use json in WCF REST response. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Text;
namespace DemoWcfRest
{
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(R... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Text;
namespace DemoWcfRest
{
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(R... |
Change default popup title text | #region
using System.Windows;
#endregion
namespace SteamAccountSwitcher
{
internal class Popup
{
public static MessageBoxResult Show(string text, MessageBoxButton btn = MessageBoxButton.OK,
MessageBoxImage img = MessageBoxImage.Information, MessageBoxResult defaultbtn = MessageBoxResult.... | #region
using System.Windows;
#endregion
namespace SteamAccountSwitcher
{
internal class Popup
{
public static MessageBoxResult Show(string text, MessageBoxButton btn = MessageBoxButton.OK,
MessageBoxImage img = MessageBoxImage.Information, MessageBoxResult defaultbtn = MessageBoxResult.... |
Adjust profile ruleset selector to new design | // 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.Game.Rulesets;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Overlays.Profile.Head... | // 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.Game.Rulesets;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Overlays.Profile.Head... |
Return exit values through wrapper. | using System.Linq;
using System.Reflection;
// ReSharper disable once CheckNamespace
internal class Program
{
private static void Main(string[] args)
{
var mainAsm = Assembly.Load("citizenmp_server_updater");
mainAsm.GetType("Costura.AssemblyLoader")
.GetMethod("Attach")
... | using System;
using System.IO;
using System.Reflection;
// ReSharper disable once CheckNamespace
internal static class Program
{
private static int Main(string[] args)
{
// Mono's XBuild uses assembly redirects to make sure it uses .NET 4.5 target binaries.
// We emulate it using our own assem... |
Fix zero size parent container in visual tests | // 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.Cursor;
using osu.Framework.Graphics.Containers;
using osu.Framework.Platform;... | // 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.Cursor;
using osu.Framework.Graphics.Containers;
using osu.Framework.Platform;... |
Add test case for open generics | using Ninject;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ninject.Extensions.Conventions;
namespace FunWithNinject.Conventions
{
[TestFixture]
public class ConventionsTests
{
[Test]
public... | using Ninject;
using Ninject.Extensions.Conventions;
using NUnit.Framework;
namespace FunWithNinject.Conventions
{
[TestFixture]
public class ConventionsTests
{
[Test]
public void Bind_OneClassWithMultipleInterfaces_BindsOneInstanceToAll()
{
// Assemble
usin... |
Split WCF functionality out of Autofac.Extras.Multitenant into a separate assembly/package, Autofac.Extras.Multitenant.Wcf. Both packages are versioned 3.1.0. | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34003
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... |
Fix Razor tests broken by change to full string passing. | using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Cogito.Web.Razor.Tests
{
[TestClass]
public class RazorTemplateBuilderTests
{
TextReader LoadTemplateText(string name)
{
return new StreamReader(typeof(RazorTemplateBuilderTests).Asse... | using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Cogito.Web.Razor.Tests
{
[TestClass]
public class RazorTemplateBuilderTests
{
TextReader LoadTemplateText(string name)
{
return new StreamReader(typeof(RazorTemplateBuilderTests).Asse... |
Fix list view template for soldiers | @model IEnumerable<BatteryCommander.Common.Models.Soldier>
@{
ViewBag.Title = "List";
}
<h2>List</h2>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.LastName)
</th>
<th>
@Html.DisplayNameFor(model => model.FirstName)
</th>
... | @model IEnumerable<BatteryCommander.Common.Models.Soldier>
@{
ViewBag.Title = "List";
}
<h2>@ViewBag.Title</h2>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.FirstOrDefault().LastName)
</th>
<th>
@Html.DisplayN... |
Disable CS0660 where Full Solution Analysis produces a different result | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Immutable;
namespace Microsoft.CodeAnalysis.CSharp.Symbols
{
internal partial class T... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Immutable;
#pragma warning disable CS0660 // Warning is reported only for Full Solution A... |
Remove the unused bindattrs parameter from the ShaderStageProcessor delegate. | using System;
namespace ChamberLib.Content
{
public delegate IModel ModelProcessor(ModelContent asset, IContentProcessor processor);
public delegate ITexture2D TextureProcessor(TextureContent asset, IContentProcessor processor);
public delegate IShaderStage ShaderStageProcessor(ShaderContent asset, IConte... | using System;
namespace ChamberLib.Content
{
public delegate IModel ModelProcessor(ModelContent asset, IContentProcessor processor);
public delegate ITexture2D TextureProcessor(TextureContent asset, IContentProcessor processor);
public delegate IShaderStage ShaderStageProcessor(ShaderContent asset, IConte... |
Fix nullref in date text box | // 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.Bindables;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
namespace osu.Game.Tournament.Components
{
publ... | // 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.Bindables;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
namespace osu.Game.Tournament.Components
{
publ... |
Extend character set of function names (including ".") (again) | using System;
using System.Linq;
using System.Text.RegularExpressions;
namespace ExcelDna.IntelliSense
{
static class FormulaParser
{
// Set from IntelliSenseDisplay.Initialize
public static char ListSeparator = ',';
internal static bool TryGetFormulaInfo(string formulaPrefix, out stri... | using System;
using System.Linq;
using System.Text.RegularExpressions;
namespace ExcelDna.IntelliSense
{
static class FormulaParser
{
// Set from IntelliSenseDisplay.Initialize
public static char ListSeparator = ',';
// TODO: What's the Unicode situation?
public static string fo... |
Update to Unity 5.2 cleanup. | using UnityEngine;
using System.Collections;
public class ColliderFriction : GameObjectBehavior {
public float frictionValue=0;
// Use this for initialization
void Start () {
collider.material.staticFriction = frictionValue;
collider.material.staticFriction2 = frictionValue;
... | using UnityEngine;
using System.Collections;
public class ColliderFriction : GameObjectBehavior {
public float frictionValue=0;
// Use this for initialization
void Start () {
collider.material.staticFriction = frictionValue;
//collider.material.staticFriction2 = frictionValue;
colli... |
Fix version of .NET Framework used to look up XML documentation | using System.Collections.Generic;
using System.IO;
using System.Reflection;
using JetBrains.Annotations;
using Microsoft.CodeAnalysis;
using AshMind.Extensions;
using System;
using SharpLab.Server.Common.Internal;
namespace SharpLab.Server.Owin.Platform {
public class Net48AssemblyDocumentationResolver : IAssembly... | using System.Collections.Generic;
using System.IO;
using System.Reflection;
using JetBrains.Annotations;
using Microsoft.CodeAnalysis;
using AshMind.Extensions;
using System;
using SharpLab.Server.Common.Internal;
namespace SharpLab.Server.Owin.Platform {
public class Net48AssemblyDocumentationResolver : IAssembly... |
Fix output for overloaded operators | using System.Collections.Generic;
namespace PublicApiGenerator
{
internal static class CSharpOperatorKeyword
{
static readonly IDictionary<string, string> OperatorNameMap = new Dictionary<string, string>
{
{ "op_Addition", "+" },
{ "op_UnaryPlus", "+" },
{ "o... | using System.Collections.Generic;
namespace PublicApiGenerator
{
internal static class CSharpOperatorKeyword
{
static readonly IDictionary<string, string> OperatorNameMap = new Dictionary<string, string>
{
{ "op_False", "false" },
{ "op_True", "true" },
{ "op... |
Make it possible to configure time to pulse | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IPOCS_Programmer.ObjectTypes
{
public class PointsMotor_Pulse : PointsMotor
{
public override byte motorTypeId { get { return 1; } }
public byte ThrowLeftOutput { get; ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IPOCS_Programmer.ObjectTypes
{
public class PointsMotor_Pulse : PointsMotor
{
public override byte motorTypeId { get { return 1; } }
public byte ThrowLeftOut... |
Tweak the Monokai color theme | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.Graphics;
using Repository.EditorServices.SyntaxHighlighting;
namespace Repository.Internal.EditorServices.SyntaxHighlighting
{
internal class MonokaiColorTheme : IColorTheme
{
public Color B... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.Graphics;
using Repository.EditorServices.SyntaxHighlighting;
namespace Repository.Internal.EditorServices.SyntaxHighlighting
{
internal class MonokaiColorTheme : IColorTheme
{
public Color B... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.