Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add standalone ifdef to leap example scene script | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEngine;
using Microsoft.MixedReality.Toolkit.Input;
using TMPro;
#if LEAPMOTIONCORE_PRESENT
using Microsoft.MixedReality.Toolkit.LeapMotion.Input;
#endif
namespace Microsoft.MixedReality.Toolkit.Examples
{
/// <summary>
///... | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEngine;
using Microsoft.MixedReality.Toolkit.Input;
using TMPro;
#if LEAPMOTIONCORE_PRESENT && UNITY_STANDALONE
using Microsoft.MixedReality.Toolkit.LeapMotion.Input;
#endif
namespace Microsoft.MixedReality.Toolkit.Examples
{
/... |
Add max job count to levels | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Levels : MonoBehaviour
{
/* Cette classe a pour destin d'être sur un prefab.
* Ce prefab agira comme une config manuelle de niveaux pour faciliter le level design.
* On pourra faire différentes configs si on veut... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Levels : MonoBehaviour
{
/* Cette classe a pour destin d'être sur un prefab.
* Ce prefab agira comme une config manuelle de niveaux pour faciliter le level design.
* On pourra faire différentes configs si on veut... |
Use static HttpClient in SO module | using Newtonsoft.Json;
using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace Modix.Services.StackExchange
{
public class StackExchangeService
{
private string _ApiReferenceUrl =
$"http://api.stackexchange.com/2.2/search/advanced" +
"?key... | using Newtonsoft.Json;
using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace Modix.Services.StackExchange
{
public class StackExchangeService
{
private static HttpClient HttpClient => new HttpClient(new HttpClientHandler
{
AutomaticDecompres... |
Fix assembly and file versions | 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(".N... | 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(".N... |
Reduce testing of coordinate nodes call | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Consul.Test
{
[TestClass]
public class CoordinateTest
{
[TestMethod]
public void TestCoordinate_Datacenters()
{
var client = new Client();
var info = client.Agent.Self();
... | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Consul.Test
{
[TestClass]
public class CoordinateTest
{
[TestMethod]
public void Coordinate_Datacenters()
{
var client = new Client();
var info = client.Agent.Self();
i... |
Normalize directory separator char for finding the embedded icon | using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media.Imaging;
using PackageExplorerViewModel;
namespace PackageExplorer
{
public class PackageIconConverter : IMultiValueConverter
{
#region IMultiValueConverter Members
public object? Convert(object[] ... | using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media.Imaging;
using PackageExplorerViewModel;
namespace PackageExplorer
{
public class PackageIconConverter : IMultiValueConverter
{
#region IMultiValueConverter Members
public object? Convert(object[] ... |
Add doc comments for Author and Committer | using System.Collections.Generic;
using System.Diagnostics;
namespace Octokit
{
/// <summary>
/// An enhanced git commit containing links to additional resources
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class GitHubCommit : GitReference
{
public GitHubCommit() { ... | using System.Collections.Generic;
using System.Diagnostics;
namespace Octokit
{
/// <summary>
/// An enhanced git commit containing links to additional resources
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class GitHubCommit : GitReference
{
public GitHubCommit() { ... |
Fix mono bug in the FontHelper class | using System;
using System.Drawing;
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()
{
// tear down code ... | 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()
{
... |
Remove trailing spaces from stamnummer. | /*
* Copyright 2017 Chirojeugd-Vlaanderen vzw. See the NOTICE file at the
* top-level directory of this distribution, and at
* https://gapwiki.chiro.be/copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obt... | /*
* Copyright 2017 Chirojeugd-Vlaanderen vzw. See the NOTICE file at the
* top-level directory of this distribution, and at
* https://gapwiki.chiro.be/copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obt... |
Fix remove logging controller apiKey parameter | /* Empiria Extensions Framework ******************************************************************************
* *
* Solution : Empiria Extensions Framework System : Empiria Microservices ... | /* Empiria Extensions Framework ******************************************************************************
* *
* Module : Empiria Web Api Component : Base controllers ... |
Use local function to verify mimetype string. | using System;
using System.Threading.Tasks;
using Windows.Storage;
namespace Papyrus
{
public static class EBookExtensions
{
public static async Task<bool> VerifyMimetypeAsync(this EBook ebook)
{
var mimetypeFile = await ebook._rootFolder.GetItemAsync("mimetype");
if (... | using System;
using System.Threading.Tasks;
using Windows.Storage;
namespace Papyrus
{
public static class EBookExtensions
{
public static async Task<bool> VerifyMimetypeAsync(this EBook ebook)
{
bool VerifyMimetypeString(string value) =>
value == "application/epub+... |
Rename GenerateWallet menuitem to WalletManager | using AvalonStudio.MainMenu;
using AvalonStudio.Menus;
using System;
using System.Collections.Generic;
using System.Composition;
using System.Text;
namespace WalletWasabi.Gui.Shell.MainMenu
{
internal class ToolsMainMenuItems
{
private IMenuItemFactory _menuItemFactory;
[ImportingConstructor]
public ToolsMai... | using AvalonStudio.MainMenu;
using AvalonStudio.Menus;
using System;
using System.Collections.Generic;
using System.Composition;
using System.Text;
namespace WalletWasabi.Gui.Shell.MainMenu
{
internal class ToolsMainMenuItems
{
private IMenuItemFactory _menuItemFactory;
[ImportingConstructor]
public ToolsMai... |
Save xpub instead of hex (wallet compatibility) | using NBitcoin;
using Newtonsoft.Json;
using System;
namespace WalletWasabi.JsonConverters
{
public class ExtPubKeyJsonConverter : JsonConverter
{
/// <inheritdoc />
public override bool CanConvert(Type objectType)
{
return objectType == typeof(ExtPubKey);
}
/// <inheritdoc />
public override object... | using NBitcoin;
using Newtonsoft.Json;
using System;
namespace WalletWasabi.JsonConverters
{
public class ExtPubKeyJsonConverter : JsonConverter
{
/// <inheritdoc />
public override bool CanConvert(Type objectType)
{
return objectType == typeof(ExtPubKey);
}
/// <inheritdoc />
public override object... |
Add converters for System.Drawing structures. | using System;
using System.Collections.Generic;
using System.Text;
using Draw = System.Drawing;
using Geo = ERY.AgateLib.Geometry;
namespace ERY.AgateLib.WinForms
{
public static class FormsInterop
{
public static Draw.Rectangle ToRectangle(Geo.Rectangle rect)
{
return n... | using System;
using System.Collections.Generic;
using System.Text;
using Draw = System.Drawing;
using ERY.AgateLib.Geometry;
namespace ERY.AgateLib.WinForms
{
public static class FormsInterop
{
public static Draw.Color ConvertColor(Color clr)
{
return Draw.Color.FromArgb... |
Allow spaces in !meme command. | using System.Text.RegularExpressions;
namespace MarekMotykaBot.ExtensionsMethods
{
public static class StringExtensions
{
public static string RemoveRepeatingChars(this string inputString)
{
string newString = string.Empty;
char[] charArray = inputString.ToCharArray();
for (int i = 0; i < charArray.Le... | using System.Text.RegularExpressions;
namespace MarekMotykaBot.ExtensionsMethods
{
public static class StringExtensions
{
public static string RemoveRepeatingChars(this string inputString)
{
string newString = string.Empty;
char[] charArray = inputString.ToCharArray();
for (int i = 0; i < charArray.Le... |
Change version to a reasonable value | 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("li... | 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("li... |
Fix a bug where dates are sometimes '-' | using System;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using VirusTotalNET.Exceptions;
namespace VirusTotalNET.DateTimeParsers
{
public class YearMonthDayConverter : DateTimeConverterBase
{
private readonly CultureInfo _culture = new CultureInfo("en-us");
... | using System;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using VirusTotalNET.Exceptions;
namespace VirusTotalNET.DateTimeParsers
{
public class YearMonthDayConverter : DateTimeConverterBase
{
private readonly CultureInfo _culture = new CultureInfo("en-us");
... |
Add more types to dropdown | // 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.ComponentModel;
namespace osu.Game.Configuration
{
public enum ScoreMeterType
{
[Description("None")]
None,
[Description("... | // 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.ComponentModel;
namespace osu.Game.Configuration
{
public enum ScoreMeterType
{
[Description("None")]
None,
[Description("... |
Correct issue where settings.json cannot be found when using a shadow copied DLL. | using System;
using System.IO;
using System.Reflection;
using JetBrains.Annotations;
using Microsoft.Extensions.Configuration;
namespace AudioWorks.Common
{
/// <summary>
/// Manages the retrieval of configuration settings from disk.
/// </summary>
public static class ConfigurationManager
{
... | using System;
using System.IO;
using System.Reflection;
using JetBrains.Annotations;
using Microsoft.Extensions.Configuration;
namespace AudioWorks.Common
{
/// <summary>
/// Manages the retrieval of configuration settings from disk.
/// </summary>
public static class ConfigurationManager
{
... |
Add test category to authenticated test | using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RohlikAPI;
namespace RohlikAPITests
{
[TestClass]
public class RohlikovacTests
{
private string[] GetCredentials()
{
string filePath = @"..\..\..\loginPassword.txt";
if (!File.Exists(filePath... | using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RohlikAPI;
namespace RohlikAPITests
{
[TestClass]
public class RohlikovacTests
{
private string[] GetCredentials()
{
string filePath = @"..\..\..\loginPassword.txt";
if (!File.Exists(filePath... |
Tweak to content for display on ES marketing site | using System;
using Reachmail.Easysmtp.Post.Request;
public void Main()
{
var reachmail = Reachmail.Api.Create("<API Token>");
var request = new DeliveryRequest {
FromAddress = "from@from.com",
Recipients = new Recipients {
new Recipient {
Address = "to@to.com"
... | using System;
using Reachmail.Easysmtp.Post.Request;
public void Main()
{
var reachmail = Reachmail.Api.Create("<API Token>");
var request = new DeliveryRequest {
FromAddress = "from@from.com",
Recipients = new Recipients {
new Recipient {
Address = "to@to.com"
... |
Fix tools being installed to wrong path | using System;
using Cake.Frosting;
public class Program
{
public static int Main(string[] args)
{
return new CakeHost()
.UseContext<Context>()
.UseLifetime<Lifetime>()
.UseWorkingDirectory("..")
.InstallTool(new Uri("nuget:?package=GitVersio... | using System;
using Cake.Frosting;
public class Program
{
public static int Main(string[] args)
{
return new CakeHost()
.UseContext<Context>()
.UseLifetime<Lifetime>()
.UseWorkingDirectory("..")
.SetToolPath("../tools")
.Install... |
Add back and cancel button commands | using System.Reactive.Linq;
using ReactiveUI;
using System;
namespace WalletWasabi.Fluent.ViewModels
{
public class AddWalletPageViewModel : NavBarItemViewModel
{
private string _walletName = "";
private bool _optionsEnabled;
public AddWalletPageViewModel(NavigationStateViewModel navigationState) : base(navig... | using System.Reactive.Linq;
using ReactiveUI;
using System;
using System.Windows.Input;
namespace WalletWasabi.Fluent.ViewModels
{
public class AddWalletPageViewModel : NavBarItemViewModel
{
private string _walletName = "";
private bool _optionsEnabled;
public AddWalletPageViewModel(NavigationStateViewModel n... |
Update the GelocationHandler example - seems people are still struggling with the callback concept. | // Copyright © 2010-2016 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Windows;
namespace CefSharp.Wpf.Example.Handlers
{
internal class GeolocationHandler : IGeolocationHandler
{
... | // Copyright © 2010-2016 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Windows;
namespace CefSharp.Wpf.Example.Handlers
{
internal class GeolocationHandler : IGeolocationHandler
{
... |
Handle message changing inventory size | using System.Drawing;
using MonoHaven.UI.Widgets;
namespace MonoHaven.UI.Remote
{
public class ServerInventoryWidget : ServerWidget
{
public static ServerWidget Create(ushort id, ServerWidget parent, object[] args)
{
var size = (Point)args[0];
var widget = new InventoryWidget(parent.Widget);
widget.Set... | using System.Drawing;
using MonoHaven.UI.Widgets;
namespace MonoHaven.UI.Remote
{
public class ServerInventoryWidget : ServerWidget
{
public static ServerWidget Create(ushort id, ServerWidget parent, object[] args)
{
var size = (Point)args[0];
var widget = new InventoryWidget(parent.Widget);
widget.Set... |
Use polling rate of 30 | using CommandLine;
using System;
using System.IO;
using System.Threading;
using WebScriptHook.Framework;
using WebScriptHook.Framework.BuiltinPlugins;
using WebScriptHook.Framework.Plugins;
using WebScriptHook.Service.Plugins;
namespace WebScriptHook.Service
{
class Program
{
static WebScriptHookCompo... | using CommandLine;
using System;
using System.IO;
using System.Threading;
using WebScriptHook.Framework;
using WebScriptHook.Framework.BuiltinPlugins;
using WebScriptHook.Framework.Plugins;
using WebScriptHook.Service.Plugins;
namespace WebScriptHook.Service
{
class Program
{
static WebScriptHookCompo... |
Fix handling of transient bindings to accomodate bindings that have been specified for an ancestral type | using System;
using System.Collections.Generic;
namespace WootzJs.Injection
{
public class Context
{
private ICache cache;
private IDictionary<Type, IBinding> transientBindings;
public Context(Context context = null, ICache cache = null, IDictionary<Type, IBinding> transientBindings =... | using System;
using System.Collections.Generic;
namespace WootzJs.Injection
{
public class Context
{
private ICache cache;
private IDictionary<Type, IBinding> transientBindings;
public Context(Context context = null, ICache cache = null, IDictionary<Type, IBinding> transientBindings =... |
Use 1.0.0 as the default informational version so it's easy to spot when it might have been un-patched during a build | using System.Reflection;
[assembly: AssemblyVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyInformationalVersion("1.4.15")] | using System.Reflection;
[assembly: AssemblyVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")] |
Add Try block. bugid: 623 | #if NUNIT
using NUnit.Framework;
using TestClass = NUnit.Framework.TestFixtureAttribute;
using TestInitialize = NUnit.Framework.SetUpAttribute;
using TestCleanup = NUnit.Framework.TearDownAttribute;
using TestMethod = NUnit.Framework.TestAttribute;
using TestSetup = NUnit.Framework.SetUpAttribute;
#elif MSTEST
... | #if NUNIT
using NUnit.Framework;
using TestClass = NUnit.Framework.TestFixtureAttribute;
using TestInitialize = NUnit.Framework.SetUpAttribute;
using TestCleanup = NUnit.Framework.TearDownAttribute;
using TestMethod = NUnit.Framework.TestAttribute;
using TestSetup = NUnit.Framework.SetUpAttribute;
#elif MSTEST
... |
Remove redundant specification of public in interface | // Copyright 2019 Jon Skeet. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
namespace VDrumExplorer.Data.Fields
{
public interface IField
{
string Description { get; }
FieldPath Path { get; }
ModuleAddress Add... | // Copyright 2019 Jon Skeet. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
namespace VDrumExplorer.Data.Fields
{
public interface IField
{
string Description { get; }
FieldPath Path { get; }
ModuleAddress Add... |
Use ChatRelay instead of UIManager when examining objects | using JetBrains.Annotations;
using PlayGroups.Input;
using UI;
using UnityEngine;
public class MessageOnInteract : InputTrigger
{
public string Message;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public override void Interact(GameObject origina... | using JetBrains.Annotations;
using PlayGroups.Input;
using UI;
using UnityEngine;
public class MessageOnInteract : InputTrigger
{
public string Message;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public override void Interact(GameObject origina... |
Make sure Settings is never null | namespace StackExchange.Exceptional.Internal
{
/// <summary>
/// Internal Exceptional static controls, not meant for consumption.
/// This can and probably will break without warning. Don't use the .Internal namespace directly.
/// </summary>
public static class Statics
{
/// <summary>
... | namespace StackExchange.Exceptional.Internal
{
/// <summary>
/// Internal Exceptional static controls, not meant for consumption.
/// This can and probably will break without warning. Don't use the .Internal namespace directly.
/// </summary>
public static class Statics
{
/// <summary>
... |
Use multicast instead of explicit BehaviourSubject setup | namespace Mappy
{
using System;
using System.ComponentModel;
using System.Reactive.Linq;
using System.Reactive.Subjects;
public static class ExtensionMethods
{
public static IObservable<TField> PropertyAsObservable<TSource, TField>(this TSource source, Func<TSource, TField> ac... | namespace Mappy
{
using System;
using System.ComponentModel;
using System.Reactive.Linq;
using System.Reactive.Subjects;
public static class ExtensionMethods
{
public static IObservable<TField> PropertyAsObservable<TSource, TField>(this TSource source, Func<TSource, TField> ac... |
Delete stop reciever, to stop receiver use CancellationToken | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TirkxDownloader.Framework.Interface
{
/// <summary>
/// This interface should be implemented for recieve JSON then parse it and return to caller
/// </summary>
/// <typeparam n... | using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace TirkxDownloader.Framework.Interface
{
/// <summary>
/// This interface should be implemented for recieve JSON then parse it and return to caller
/// </summary>
/// <typeparam name="T">Type of message, mus... |
Change MaybeNullWhenAttribute to internal to remove collision with diagnostics ns | #if NULLABLE_SHIMS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
public sealed class MaybeNullWhenAttribute : Attribute
{
public MaybeN... | #if NULLABLE_SHIMS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
internal sealed class MaybeNullWhenAttribute : Attribute
{
public Mayb... |
Fix regression in reading config | // 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;
using System.Collections.Generic;
using Microsoft.AspNet.Hosting.Server;
using Microsoft.Framework.Configuration;
namespace Microsoft.Asp... | // 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;
using System.Collections.Generic;
using Microsoft.AspNet.Hosting.Server;
using Microsoft.Framework.Configuration;
namespace Microsoft.Asp... |
Fix display scoreboard packet id | using System;
using Pdelvo.Minecraft.Network;
namespace Pdelvo.Minecraft.Protocol.Packets
{
[PacketUsage(PacketUsage.ServerToClient)]
public class DisplayScoreboard : Packet
{
public byte Position { get; set; }
public string ScoreName { get; set; }
/// <summary>
/// Init... | using System;
using Pdelvo.Minecraft.Network;
namespace Pdelvo.Minecraft.Protocol.Packets
{
[PacketUsage(PacketUsage.ServerToClient)]
public class DisplayScoreboard : Packet
{
public byte Position { get; set; }
public string ScoreName { get; set; }
/// <summary>
/// Init... |
Bump assembly version to 2.5.0. | using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[asse... | using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[asse... |
Use native pointer for format string | using System;
using System.Runtime.InteropServices;
using Foundation;
// Generated by Objective Sharpie (https://download.xamarin.com/objective-sharpie/ObjectiveSharpie.pkg)
// > sharpie bind -output TestFairy -namespace TestFairyLib -sdk iphoneos10.1 TestFairy.h
namespace TestFairyLib
{
public static class CFunction... | using System;
using System.Runtime.InteropServices;
using Foundation;
// Generated by Objective Sharpie (https://download.xamarin.com/objective-sharpie/ObjectiveSharpie.pkg)
// > sharpie bind -output TestFairy -namespace TestFairyLib -sdk iphoneos10.1 TestFairy.h
namespace TestFairyLib
{
public static class CFunction... |
Fix issue with long data string (e.g. base64) | using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
namespace PinSharp.Http
{
internal class FormUrlEncodedContent : ByteArrayContent
{
private static readonly Encoding DefaultHttpEncoding = Encoding.GetEncoding("ISO-8859-1");
... | using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
namespace PinSharp.Http
{
internal class FormUrlEncodedContent : ByteArrayContent
{
private static readonly Encoding DefaultHttpEncoding = Encoding.GetEncoding("ISO-8859-1");
... |
Fix test referring to wrong value | using System;
using System.Linq;
using System.Threading.Tasks;
using Bug2211;
using Marten;
using Marten.Testing.Harness;
using Shouldly;
using Weasel.Core;
using Xunit;
namespace DocumentDbTests.Bugs
{
public class Bug_2211_select_transform_inner_object: BugIntegrationContext
{
[Fact]
public a... | using System;
using System.Linq;
using System.Threading.Tasks;
using Bug2211;
using Marten;
using Marten.Testing.Harness;
using Shouldly;
using Weasel.Core;
using Xunit;
namespace DocumentDbTests.Bugs
{
public class Bug_2211_select_transform_inner_object: BugIntegrationContext
{
[Fact]
public a... |
Change serialize/deserialze abstract class to interface | using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;
using UnityEngine;
namespace LiteNetLibHighLevel
{
public class ServerSpawnSceneObjectMessage : LiteNetLibMessageBase
{
public uint objectId;
public Vector3 position;
public override void Deserialize(N... | using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;
using UnityEngine;
namespace LiteNetLibHighLevel
{
public class ServerSpawnSceneObjectMessage : ILiteNetLibMessage
{
public uint objectId;
public Vector3 position;
public void Deserialize(NetDataReader... |
Set correct version number, v0.1.1 | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18449
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//--... | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18449
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//--... |
Add more features to vector 2 -> vector 3 conversion | using UnityEngine;
namespace Pear.InteractionEngine.Converters
{
/// <summary>
/// Converts a Vector2 to Vector3
/// </summary>
public class Vector2ToVector3 : MonoBehaviour, IPropertyConverter<Vector2, Vector3>
{
public Vector3 Convert(Vector2 convertFrom)
{
return convertFrom;
}
}
}
| using System;
using System.Collections.Generic;
using UnityEngine;
namespace Pear.InteractionEngine.Converters
{
/// <summary>
/// Converts a Vector2 to Vector3
/// </summary>
public class Vector2ToVector3 : MonoBehaviour, IPropertyConverter<Vector2, Vector3>
{
[Tooltip("Where should the X value be ... |
Add Employee Standard Hours endpoints | using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("KeyPay")]
[assembly: AssemblyDescription("... | using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("KeyPay")]
[assembly: AssemblyDescription("... |
Add code to allow vendo img to show on Azure | @{
ViewBag.Title = "Home Page";
}
<div class="col-md-5">
<h1>
Vendo 5.0
</h1>
<p class="lead">The Future of Vending Machines</p>
<p class="text-justify">
Vendo 5.0 is among the first digitally integrated vending machines of the 21st century. It's so gr... | @{
ViewBag.Title = "Home Page";
}
<div class="col-md-5">
<h1>
Vendo 5.0
</h1>
<p class="lead">The Future of Vending Machines</p>
<p class="text-justify">
Vendo 5.0 is among the first digitally integrated vending machines of the 21st century. It's so gr... |
Increase project version number to 0.7.0 | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2016")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("0.6.0.0")... | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2016")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("0... |
Add the ability to have a simple variable declared inline. | using System;
using LinqToTTreeInterfacesLib;
namespace LINQToTTreeLib.Variables
{
/// <summary>
/// A simple variable (like int, etc.).
/// </summary>
public class VarSimple : IVariable
{
public string VariableName { get; private set; }
public string RawValue { get; pri... | using System;
using LinqToTTreeInterfacesLib;
namespace LINQToTTreeLib.Variables
{
/// <summary>
/// A simple variable (like int, etc.).
/// </summary>
public class VarSimple : IVariable
{
public string VariableName { get; private set; }
public string RawValue { get; pri... |
Use latest compat version in MvcSandbox | // 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.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft... | // 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.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft... |
Fix deserialization of scheduled job. | // ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ===========================... | // ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ===========================... |
Add special http method to return unprocessable entities | using System.Linq;
using Diploms.Dto;
using Microsoft.AspNetCore.Mvc;
namespace Diploms.WebUI
{
public static class ControllerExtensions
{
public static OperationResult GetErrors(this Controller controller, object model)
{
var result = new OperationResult();
if (model =... | using System.Linq;
using Diploms.Dto;
using Microsoft.AspNetCore.Mvc;
namespace Diploms.WebUI
{
public static class ControllerExtensions
{
public static OperationResult GetErrors(this Controller controller, object model)
{
var result = new OperationResult();
if (model =... |
Fix some formatting for Teams | using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HipChatConnect.Controllers.Listeners.Github.Models;
using HipChatConnect.Controllers.Listeners.TeamCity;
namespace HipChatConnect.Controllers.Listeners.Github
{
public class GithubAggregator
{
private IHipChatRoom Room { get; }
... | using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HipChatConnect.Controllers.Listeners.Github.Models;
using HipChatConnect.Controllers.Listeners.TeamCity;
namespace HipChatConnect.Controllers.Listeners.Github
{
public class GithubAggregator
{
private IHipChatRoom Room { get; }
... |
Add Layer to scene. Currently breaking on asset load | using System.Reflection;
using Microsoft.Xna.Framework;
using CocosDenshion;
using CocosSharp;
namespace Chess_Demo
{
class AppDelegate : CCApplicationDelegate
{
static CCWindow sharedWindow;
public static CCWindow SharedWindow
{
get { return sharedWindow; }
}
... | using System.Reflection;
using Microsoft.Xna.Framework;
using CocosDenshion;
using CocosSharp;
namespace Chess_Demo
{
class AppDelegate : CCApplicationDelegate
{
static CCWindow sharedWindow;
public static CCWindow SharedWindow
{
get { return sharedWindow; }
}
... |
Add random position of card | using System;
using System.Collections.Generic;
using System.Linq;
namespace MemoryGames
{
public class CardRandomPosition
{
private List<CardFace> gameCard = new List<CardFace>();
private string[] cardName = new string[8];//here will be the name of the card
private Random randomGenerato... | using System;
using System.Collections.Generic;
using System.Linq;
namespace MemoryGames
{
public class CardRandomPosition
{
public static CardFace[,] GetRandomCardFace(int dimentionZero, int dimentionOne)
{
const int pair = 2;
const int pairCount = 9;
CardF... |
Test needs to be public | /* ****************************************************************************
*
* Copyright (c) Microsoft Corporation.
*
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A
* copy of the license can be found in the License.html file at the root of this distribution. If ... | /* ****************************************************************************
*
* Copyright (c) Microsoft Corporation.
*
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A
* copy of the license can be found in the License.html file at the root of this distribution. If ... |
Allow filtering weapons by unit | using BatteryCommander.Web.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers.API
{
public class WeaponsController : ApiController
{
public WeaponsCon... | using BatteryCommander.Web.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Linq;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers.API
{
public class WeaponsController : ApiController
{
public WeaponsController(Database db) : base(db)
... |
Check configuration values are set in tests | using System.Threading.Tasks;
using Auth0.AuthenticationApi;
using Auth0.AuthenticationApi.Models;
using Microsoft.Extensions.Configuration;
namespace Auth0.Tests.Shared
{
public class TestBase
{
private readonly IConfigurationRoot _config;
public TestBase()
{
_config = ne... | using System;
using System.Threading.Tasks;
using Auth0.AuthenticationApi;
using Auth0.AuthenticationApi.Models;
using Microsoft.Extensions.Configuration;
namespace Auth0.Tests.Shared
{
public class TestBase
{
private readonly IConfigurationRoot _config;
public TestBase()
{
... |
Comment out the resource not found fix for .NET Core | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="Program.cs" company="Quartz Software SRL">
// Copyright (c) Quartz Software SRL. All rights reserved.
// </copyright>
// <summary>
// Implements the program class.
// </summar... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="Program.cs" company="Quartz Software SRL">
// Copyright (c) Quartz Software SRL. All rights reserved.
// </copyright>
// <summary>
// Implements the program class.
// </summar... |
Fix issue where ratio was always returning "1" | using System;
namespace Satrabel.OpenContent.Components.TemplateHelpers
{
public class Ratio
{
private readonly float _ratio;
public int Width { get; private set; }
public int Height { get; private set; }
public float AsFloat
{
get { return (float)Width / (... | using System;
namespace Satrabel.OpenContent.Components.TemplateHelpers
{
public class Ratio
{
private readonly float _ratio;
public int Width { get; private set; }
public int Height { get; private set; }
public float AsFloat
{
get { return (float)Width / (... |
Enable sliding expiration by default as that is what the Tea Commerce cache does | using System;
using TeaCommerce.Api.Dependency;
using TeaCommerce.Api.Infrastructure.Caching;
using Umbraco.Core;
using Umbraco.Core.Cache;
namespace TeaCommerce.Umbraco.Application.Caching
{
[SuppressDependency("TeaCommerce.Api.Infrastructure.Caching.ICacheService", "TeaCommerce.Api")]
public class UmbracoRu... | using System;
using TeaCommerce.Api.Dependency;
using TeaCommerce.Api.Infrastructure.Caching;
using Umbraco.Core;
using Umbraco.Core.Cache;
namespace TeaCommerce.Umbraco.Application.Caching
{
[SuppressDependency("TeaCommerce.Api.Infrastructure.Caching.ICacheService", "TeaCommerce.Api")]
public class UmbracoRu... |
Fix a missing semicolon in an example | public class StudentControllerTests
{
[SetUp]
public void Setup()
{
_fixture = new DatabaseFixture();
_controller = new StudentController(new StudentRepository(_fixture.Context));
}
[Test]
public void IndexAction_ShowsAllStudentsOrderedByName()
{
var expectedStudents = new List<Student>
{
... | public class StudentControllerTests
{
[SetUp]
public void Setup()
{
_fixture = new DatabaseFixture();
_controller = new StudentController(new StudentRepository(_fixture.Context));
}
[Test]
public void IndexAction_ShowsAllStudentsOrderedByName()
{
var expectedStudents = new List<Student>
{
... |
Fix erroneous removal of code | using UnityEditor;
using UnityEngine;
namespace GoogleMobileAds.Editor
{
[InitializeOnLoad]
[CustomEditor(typeof(GoogleMobileAdsSettings))]
public class GoogleMobileAdsSettingsEditor : UnityEditor.Editor
{
[MenuItem("Assets/Google Mobile Ads/Settings...")]
public static void OpenInspec... | using UnityEditor;
using UnityEngine;
namespace GoogleMobileAds.Editor
{
[InitializeOnLoad]
[CustomEditor(typeof(GoogleMobileAdsSettings))]
public class GoogleMobileAdsSettingsEditor : UnityEditor.Editor
{
[MenuItem("Assets/Google Mobile Ads/Settings...")]
public static void OpenInspec... |
Add more string extension methods for common operations | using System.Collections.Generic;
using System.Text;
namespace Novell.Directory.Ldap
{
internal static partial class ExtensionMethods
{
/// <summary>
/// Is the given collection null, or Empty (0 elements)?
/// </summary>
internal static bool IsEmpty<T>(this IReadOnlyCollection... | using System;
using System.Collections.Generic;
using System.Text;
namespace Novell.Directory.Ldap
{
internal static partial class ExtensionMethods
{
/// <summary>
/// Shortcut for <see cref="string.IsNullOrEmpty"/>
/// </summary>
internal static bool IsEmpty(this string input)... |
Update todo sample for latest metadata changes | // TodoItem.cs
//
using System;
using System.Runtime.CompilerServices;
namespace Todo {
[Imported]
[IgnoreNamespace]
[ScriptName("Object")]
internal sealed class TodoItem {
public bool Completed;
[ScriptName("id")]
public string ID;
public string Title;
}
}
| // TodoItem.cs
//
using System;
using System.Runtime.CompilerServices;
namespace Todo {
[ScriptImport]
[ScriptIgnoreNamespace]
[ScriptName("Object")]
internal sealed class TodoItem {
public bool Completed;
[ScriptName("id")]
public string ID;
public string Title;
... |
Use a more compatible method call | using System.Collections.Generic;
using BugsnagUnity.Payload;
using UnityEngine;
namespace BugsnagUnity
{
static class DictionaryExtensions
{
internal static void PopulateDictionaryFromAndroidData(this IDictionary<string, object> dictionary, AndroidJavaObject source)
{
using (var set = source.Call<An... | using System;
using System.Collections.Generic;
using BugsnagUnity.Payload;
using UnityEngine;
namespace BugsnagUnity
{
static class DictionaryExtensions
{
private static IntPtr Arrays { get; } = AndroidJNI.FindClass("java/util/Arrays");
private static IntPtr ToStringMethod { get; } = AndroidJNIHelper.Get... |
Add properties to patch creator button | namespace SIM.Tool.Windows.MainWindowComponents
{
using System;
using System.IO;
using System.Windows;
using Sitecore.Diagnostics.Base;
using JetBrains.Annotations;
using SIM.Core;
using SIM.Instances;
using SIM.Tool.Base;
using SIM.Tool.Base.Plugins;
[UsedImplicitly]
public class CreateSupportPa... | namespace SIM.Tool.Windows.MainWindowComponents
{
using System;
using System.IO;
using System.Windows;
using Sitecore.Diagnostics.Base;
using JetBrains.Annotations;
using SIM.Core;
using SIM.Instances;
using SIM.Tool.Base;
using SIM.Tool.Base.Plugins;
[UsedImplicitly]
public class CreateSupportPa... |
Fix result checker if no subscriber errors in response | using System;
using System.Linq;
using ExactTarget.TriggeredEmail.ExactTargetApi;
namespace ExactTarget.TriggeredEmail.Core
{
public class ExactTargetResultChecker
{
public static void CheckResult(Result result)
{
if (result == null)
{
throw new Exceptio... | using System;
using System.Linq;
using ExactTarget.TriggeredEmail.ExactTargetApi;
namespace ExactTarget.TriggeredEmail.Core
{
public class ExactTargetResultChecker
{
public static void CheckResult(Result result)
{
if (result == null)
{
throw new Exceptio... |
Modify the migration so it rebuilds the table. | namespace EfMigrationsBug.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class ChangePkType : DbMigration
{
public override void Up()
{
DropPrimaryKey("dbo.Foos");
AlterColumn("dbo.Foos", "ID", c => c.Int(nullable: fa... | namespace EfMigrationsBug.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class ChangePkType : DbMigration
{
public override void Up()
{
DropTable("dbo.Foos");
CreateTable(
"dbo.Foos",
... |
Add constructor that creates memory stream internally | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace Aurio.Streams {
public class MemoryWriterStream : MemorySourceStream, IAudioWriterStream {
public MemoryWriterStream(MemoryStream target, AudioProperties properties) :
base(target, ... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace Aurio.Streams {
public class MemoryWriterStream : MemorySourceStream, IAudioWriterStream {
public MemoryWriterStream(MemoryStream target, AudioProperties properties) :
base(target, ... |
Update type extension for net40 | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="TypeExtensions.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// <summary>
// Provides extension methods for types.
// </summary>
// -------... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="TypeExtensions.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// <summary>
// Provides extension methods for types.
// </summary>
// -------... |
Use SdlClipboard on Linux when using new SDL2 backend | // 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.Platform.Linux.Native;
using osu.Framework.Platform.Linux.Sdl;
using osuTK;
namespace osu.Framework.Platform.Linux
{
public class LinuxGameHost ... | // 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.Platform.Linux.Native;
using osu.Framework.Platform.Linux.Sdl;
using osuTK;
namespace osu.Framework.Platform.Linux
{
public class LinuxGameHost ... |
Change quarter type to enum to allow for "ot" as value. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace mdryden.cflapi.v1.Models.Games
{
public class LineScore
{
[JsonProperty(PropertyName = "quarter")]
public int Quarter { get; set; }
[JsonProperty(PropertyName =... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace mdryden.cflapi.v1.Models.Games
{
public class LineScore
{
[JsonProperty(PropertyName = "quarter")]
public Quarters Quarter { get; set; }
[JsonProperty(PropertyN... |
Make GetValue method handle value types | using System.Linq;
using EPiServer.Core;
namespace Meridium.EPiServer.Migration.Support {
public class SourcePage {
public string TypeName { get; set; }
public PropertyDataCollection Properties { get; set; }
public TValue GetValue<TValue>(string propertyName, TValue @default = default(TVal... | using System.Linq;
using EPiServer.Core;
namespace Meridium.EPiServer.Migration.Support {
public class SourcePage {
public string TypeName { get; set; }
public PropertyDataCollection Properties { get; set; }
public TValue GetValue<TValue>(string propertyName, TValue @default = default(TVal... |
Remove usage of parallelism when compiling templates (causing crash in Jurassic?). | using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
namespace Templar
{
public class TemplateSource : IContentSource
{
private readonly string global;
private readonly Compiler compiler;
private readonly TemplateFinder finder;
public Templat... | using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
namespace Templar
{
public class TemplateSource : IContentSource
{
private readonly string global;
private readonly Compiler compiler;
private readonly TemplateFinder finder;
public Templat... |
Handle optionargumentpairs with only option | namespace Moya.Runner.Console
{
public struct OptionArgumentPair
{
public string Option { get; set; }
public string Argument { get; set; }
public static OptionArgumentPair Create(string stringFromCommandLine)
{
string[] optionAndArgument = stringFromCommandLine.Spl... | namespace Moya.Runner.Console
{
using System.Linq;
public struct OptionArgumentPair
{
public string Option { get; set; }
public string Argument { get; set; }
public static OptionArgumentPair Create(string stringFromCommandLine)
{
string[] optionAndArgument = s... |
Add missing states and xmldoc for all states' purposes | // 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.Online.RealtimeMultiplayer
{
public enum MultiplayerUserState
{
Idle,
Ready,
WaitingForLoad,
Loaded,
Pl... | // 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.Online.RealtimeMultiplayer
{
public enum MultiplayerUserState
{
/// <summary>
/// The user is idle and waiting for something to... |
Add required validation for rich text components on server side | using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace CollAction.ValidationAttributes
{
public class RichTextRequiredAttribute : ValidationAttribute, IClientModelValidator
{
public void AddValidation(ClientModelValidationContext context)
... | using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace CollAction.ValidationAttributes
{
public class RichTextRequiredAttribute : RequiredAttribute, IClientModelValidator
{
public void AddValidation(ClientModelValidationContext context)
... |
Revert "disable automatic migration data loss" | namespace QuizFactory.Data.Migrations
{
using System;
using System.Data.Entity.Migrations;
using System.Linq;
using QuizFactory.Data;
internal sealed class Configuration : DbMigrationsConfiguration<QuizFactoryDbContext>
{
public Configuration()
{
this.AutomaticMigrat... | namespace QuizFactory.Data.Migrations
{
using System;
using System.Data.Entity.Migrations;
using System.Linq;
using QuizFactory.Data;
internal sealed class Configuration : DbMigrationsConfiguration<QuizFactoryDbContext>
{
public Configuration()
{
this.AutomaticMigrat... |
Replace map with manual initialization | using AutoMapper;
using MediatR;
using SupportManager.DAL;
using SupportManager.Web.Infrastructure.CommandProcessing;
namespace SupportManager.Web.Features.User
{
public class CreateCommandHandler : RequestHandler<CreateCommand>
{
private readonly SupportManagerContext db;
public CreateComman... | using SupportManager.DAL;
using SupportManager.Web.Infrastructure.CommandProcessing;
namespace SupportManager.Web.Features.User
{
public class CreateCommandHandler : RequestHandler<CreateCommand>
{
private readonly SupportManagerContext db;
public CreateCommandHandler(SupportManagerContext db... |
Move from powershell.getchell.org to ngetchell.com | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class NicholasMGetchell : IAmACommunityMember
{
public string FirstName => "Nicholas";
public st... | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class NicholasMGetchell : IAmACommunityMember
{
public string FirstName => "Nicholas";
public st... |
Change etag from DateTime to string, to reflect updated api. | using System;
using Newtonsoft.Json;
namespace Storage.Net.Microsoft.Azure.DataLake.Store.Gen2.Models
{
public class DirectoryItem
{
[JsonProperty("contentLength")] public int? ContentLength { get; set; }
[JsonProperty("etag")] public DateTime Etag { get; set; }
[JsonProperty("group")] publi... | using System;
using Newtonsoft.Json;
namespace Storage.Net.Microsoft.Azure.DataLake.Store.Gen2.Models
{
public class DirectoryItem
{
[JsonProperty("contentLength")] public int? ContentLength { get; set; }
[JsonProperty("etag")] public string Etag { get; set; }
[JsonProperty("group")] public ... |
Use InvariantContains instead of Contains when looking for culture in the querystring | using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Formatting;
using System.Web.Http.Controllers;
using System.Web.Http.ModelBinding;
namespace Umbraco.Web.WebApi.Filters
{
/// <summary>
/// Allows an Action to execute with an arbitrary number of QueryStrings
/// </summary>
///... | using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Formatting;
using System.Web.Http.Controllers;
using System.Web.Http.ModelBinding;
using Umbraco.Core;
namespace Umbraco.Web.WebApi.Filters
{
/// <summary>
/// Allows an Action to execute with an arbitrary number of QueryStrings
//... |
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... |
Add unit test for AuthSettings class | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
namespace Solomobro.Instagram.Tests.WebApi
{
[TestFixture]
public class AuthSettingsTests
{
//WebApiDemo.Settings.EnvironmentManager.
}
}
| using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
using Solomobro.Instagram.WebApiDemo.Settings;
namespace Solomobro.Instagram.Tests.WebApi
{
[TestFixture]
public class AuthSettingsTests
{
con... |
Set default values (to avoid null references for invalid user data) | using System;
namespace MultiMiner.Xgminer
{
//marked Serializable to allow deep cloning of CoinConfiguration
[Serializable]
public class MiningPool
{
public string Host { get; set; }
public int Port { get; set; }
public string Username { get; set; }
public string Passw... | using System;
namespace MultiMiner.Xgminer
{
//marked Serializable to allow deep cloning of CoinConfiguration
[Serializable]
public class MiningPool
{
public MiningPool()
{
//set defaults
Host = String.Empty;
Username = String.Empty;
Pass... |
Fix package id version checking during pack - The logic wasn't in sync with nuget.exe | // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Globalization;
namespace NuGet
{
public static class PackageIdValidator
{
internal const int MaxPacka... | // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Globalization;
using System.Text.RegularExpressions;
namespace NuGet
{
public static class PackageIdValidator
... |
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... |
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... |
Add an improved string representation of PackageBuild instances | // <copyright file="PackageBuildList.cs" company="Mark Final">
// Opus
// </copyright>
// <summary>Opus Core</summary>
// <author>Mark Final</author>
namespace Opus.Core
{
public class PackageBuild
{
public PackageBuild(PackageIdentifier id)
{
this.Name = id.Name;
... | // <copyright file="PackageBuildList.cs" company="Mark Final">
// Opus
// </copyright>
// <summary>Opus Core</summary>
// <author>Mark Final</author>
namespace Opus.Core
{
public class PackageBuild
{
public PackageBuild(PackageIdentifier id)
{
this.Name = id.Name;
... |
Fix new warning around nullability | // Copyright 2020 Jon Skeet. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using Newtonsoft.Json;
using System;
using VDrumExplorer.Utility;
namespace VDrumExplorer.Model.Schema.Json
{
internal class HexInt32Converter : JsonConverter<H... | // Copyright 2020 Jon Skeet. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using Newtonsoft.Json;
using System;
using VDrumExplorer.Utility;
namespace VDrumExplorer.Model.Schema.Json
{
internal class HexInt32Converter : JsonConverter<H... |
Add TODO for Input Requirement | using HarryPotterUnity.Game;
using JetBrains.Annotations;
using UnityEngine;
namespace HarryPotterUnity.Cards.PlayRequirements
{
public class InputRequirement : MonoBehaviour, ICardPlayRequirement
{
private BaseCard _cardInfo;
[SerializeField, UsedImplicitly]
private int _fromHandActi... | using HarryPotterUnity.Game;
using JetBrains.Annotations;
using UnityEngine;
namespace HarryPotterUnity.Cards.PlayRequirements
{
public class InputRequirement : MonoBehaviour, ICardPlayRequirement
{
private BaseCard _cardInfo;
[SerializeField, UsedImplicitly]
private int _fromHandActi... |
Fix a typo in a comment | namespace System
{
/// <summary>
/// Represents a 32-bit integer.
/// </summary>
public struct Int32
{
// Note: integers are equivalent to instances of this data structure because
// flame-llvm the contents of single-field structs as a value of their single
// field, rather t... | namespace System
{
/// <summary>
/// Represents a 32-bit integer.
/// </summary>
public struct Int32
{
// Note: integers are equivalent to instances of this data structure because
// flame-llvm stores the contents of single-field structs as a value of their
// field, rather t... |
Fix build error with unused variable | using Android.App;
using Android.OS;
using MvvmCross.Droid.Support.V7.AppCompat;
using System;
namespace ExpandableList.Droid.Views
{
[Activity(Label = "DetailsView")]
public class DetailsView : MvxAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
... | using Android.App;
using Android.OS;
using MvvmCross.Droid.Support.V7.AppCompat;
using System;
namespace ExpandableList.Droid.Views
{
[Activity(Label = "DetailsView")]
public class DetailsView : MvxAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
... |
Fix new test on CI host | // 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.Audio;
using osu.Framework.IO.Stores;
using osu.Framework.Threading;
namespace osu.Framework.Tes... | // 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.Audio;
using osu.Framework.IO.Stores;
using osu.Framework.Platform;
using osu.Framework.Threading... |
Remove old bootstrapper stuff from UI-project. | using System.Windows;
using Arkivverket.Arkade.UI.Views;
using Arkivverket.Arkade.Util;
using Autofac;
using Prism.Autofac;
using Prism.Modularity;
namespace Arkivverket.Arkade.UI
{
public class Bootstrapper : AutofacBootstrapper
{
protected override DependencyObject CreateShell()
{
... | using System.Windows;
using Arkivverket.Arkade.UI.Views;
using Arkivverket.Arkade.Util;
using Autofac;
using Prism.Autofac;
using Prism.Modularity;
namespace Arkivverket.Arkade.UI
{
public class Bootstrapper : AutofacBootstrapper
{
protected override DependencyObject CreateShell()
{
... |
Remove unused method on timeline db | using System;
using System.Collections.Generic;
using System.Linq;
namespace Totem.Runtime.Timeline
{
/// <summary>
/// Describes the database persisting the timeline
/// </summary>
public interface ITimelineDb
{
Many<TimelinePoint> Append(TimelinePosition cause, Many<Event> events);
TimelinePoint AppendOcc... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Totem.Runtime.Timeline
{
/// <summary>
/// Describes the database persisting the timeline
/// </summary>
public interface ITimelineDb
{
Many<TimelinePoint> Append(TimelinePosition cause, Many<Event> events);
TimelinePoint AppendOcc... |
Update session only is value is changed | namespace Nancy.Session
{
using System.Collections;
using System.Collections.Generic;
public class Session : ISession
{
private readonly IDictionary<string, object> dictionary;
private bool hasChanged;
public Session() : this(new Dictionary<string, object>(0)){}
... | namespace Nancy.Session
{
using System.Collections;
using System.Collections.Generic;
public class Session : ISession
{
private readonly IDictionary<string, object> dictionary;
private bool hasChanged;
public Session() : this(new Dictionary<string, object>(0)){}
... |
Fix tournament videos stuttering when changing scenes | // 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.IO;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
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 System.IO;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using os... |
Fix typo in public variable | using UnityEngine;
public class RoomGenerator : MonoBehaviour
{
public GameObject roomPrefab;
public int roomCount = 100;
public int spaceWidth = 500;
public int spaceLength = 500;
public int minRoomWidth = 5;
public int maxRoomWidth = 20;
public int minRoomLength = 5;
public int maxRoomLength = 20;
pub... | using UnityEngine;
public class RoomGenerator : MonoBehaviour
{
public GameObject roomPrefab;
public int roomCount = 100;
public int spaceWidth = 500;
public int spaceLength = 500;
public int minRoomWidth = 5;
public int maxRoomWidth = 20;
public int minRoomLength = 5;
public int maxRoomLength = 20;
pub... |
Add support for listening on multiple urls. | using System;
using DeployStatus.Configuration;
using DeployStatus.SignalR;
using log4net;
using Microsoft.Owin.Hosting;
namespace DeployStatus.Service
{
public class DeployStatusService : IService
{
private IDisposable webApp;
private readonly ILog log;
private readonly DeployStatusCon... | using System;
using System.Linq;
using DeployStatus.Configuration;
using DeployStatus.SignalR;
using log4net;
using Microsoft.Owin.Hosting;
namespace DeployStatus.Service
{
public class DeployStatusService : IService
{
private IDisposable webApp;
private readonly ILog log;
private reado... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.