Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Handle hastebin failure in the CodePaste module
using Discord.Commands; using Modix.Services.AutoCodePaste; using System.Threading.Tasks; namespace Modix.Modules { [Name("Code Paste"), Summary("Paste some code to the internet.")] public class CodePasteModule : ModuleBase { private CodePasteService _service; public CodePasteModule(CodeP...
using Discord.Commands; using Modix.Services.AutoCodePaste; using System.Net; using System.Threading.Tasks; namespace Modix.Modules { [Name("Code Paste"), Summary("Paste some code to the internet.")] public class CodePasteModule : ModuleBase { private CodePasteService _service; public Cod...
Fix failing test ... by removing it
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace UnitTestProject1 { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { Assert.AreEqual(ClassLibrary1.Class1.ReturnFive(), 5); Assert.AreEqual(ClassLibrary1.C...
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace UnitTestProject1 { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { Assert.AreEqual(ClassLibrary1.Class1.ReturnFive(), 5); Assert.AreEqual(ClassLibrary1.C...
Fix to convert paragraph tag with single carriage return
using System; using System.Linq; using HtmlAgilityPack; namespace ReverseMarkdown.Converters { public class P : ConverterBase { public P(Converter converter) : base(converter) { Converter.Register("p", this); } public override string Convert(HtmlNode...
using System; using System.Linq; using HtmlAgilityPack; namespace ReverseMarkdown.Converters { public class P : ConverterBase { public P(Converter converter) : base(converter) { Converter.Register("p", this); } public override string Convert(HtmlNode...
Add test to verify overwriting of values.
using System; using System.Collections.Generic; using System.IO; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Microsoft.TeamFoundation.Authentication.Test { /// <summary> /// A class to test <see cref="Configuration"/>. /// </summary> [TestClass] public class ConfigurationTests ...
using System; using System.Collections.Generic; using System.IO; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Microsoft.TeamFoundation.Authentication.Test { /// <summary> /// A class to test <see cref="Configuration"/>. /// </summary> [TestClass] public class ConfigurationTests ...
Add function to get deductions from a payrun for a specific employee
using KeyPay.DomainModels.V2.PayRun; using RestSharp; namespace KeyPay.ApiFunctions.V2 { public class PayRunDeductionFunction : BaseFunction { public PayRunDeductionFunction(ApiRequestExecutor api) : base(api) { } public DeductionsResponse List(int businessId, int p...
using KeyPay.DomainModels.V2.PayRun; using RestSharp; namespace KeyPay.ApiFunctions.V2 { public class PayRunDeductionFunction : BaseFunction { public PayRunDeductionFunction(ApiRequestExecutor api) : base(api) { } public DeductionsResponse List(int businessId, int p...
Change app to use minified files
using System.Web; using System.Web.Optimization; namespace ClubChallengeBeta { public class BundleConfig { // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new...
using System.Web; using System.Web.Optimization; namespace ClubChallengeBeta { public class BundleConfig { // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new...
Remove windows long filename prefix
using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.InteropServices; namespace Tgstation.Server.Host.Watchdog { /// <summary> /// See <see cref="IActiveAssemblyDeleter"/> for Windows systems /// </summary> sealed class WindowsActiveAssemblyDelete...
using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.InteropServices; namespace Tgstation.Server.Host.Watchdog { /// <summary> /// See <see cref="IActiveAssemblyDeleter"/> for Windows systems /// </summary> sealed class WindowsActiveAssemblyDelete...
Fix namespace issue in uwp
using MarcelloDB.Collections; using MarcelloDB.Platform; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.Storage; namespace MarcelloDB.uwp { public class Platform : IPlatform { public Storage.IStorageStreamProvider Creat...
using MarcelloDB.Collections; using MarcelloDB.Platform; using MarcelloDB.Storage; using MarcelloDB.uwp.Storage; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.Storage; namespace MarcelloDB.uwp { public class Platform : IPlatform ...
Add new method to overwrite TransactionDetail line with a new string.
using System.Collections.Generic; namespace BankFileParsers { public class BaiDetail { public string TransactionDetail { get; private set; } public List<string> DetailContinuation { get; internal set; } public BaiDetail(string line) { TransactionDetail = line; ...
using System.Collections.Generic; namespace BankFileParsers { public class BaiDetail { public string TransactionDetail { get; private set; } public List<string> DetailContinuation { get; internal set; } public BaiDetail(string line) { TransactionDetail = line; ...
Replace obsolete NavMeshAgent interface fot he newer one
using UnityEngine; [CreateAssetMenu (menuName = "AI/Actions/Enemy_Patrol")] public class Action_Patrol : Action { public override void Act(StateController controller) { Act(controller as Enemy_StateController); } public void Act(Enemy_StateController controller) { Patrol(controller); } ...
using UnityEngine; [CreateAssetMenu (menuName = "AI/Actions/Enemy_Patrol")] public class Action_Patrol : Action { public override void Act(StateController controller) { Act(controller as Enemy_StateController); } public void Act(Enemy_StateController controller) { Patrol(controller); } ...
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.Extras.Tests.AggregateService")] [assembly: AssemblyDescription("")]
using System.Reflection; [assembly: AssemblyTitle("Autofac.Extras.Tests.AggregateService")]
Add HasClass extension method for IWebElement
using OpenQA.Selenium; using System; namespace Atata { // TODO: Review IWebElementExtensions class. Remove unused methods. public static class IWebElementExtensions { public static WebElementExtendedSearchContext Try(this IWebElement element) { return new WebElementExtendedSear...
using System; using System.Linq; using OpenQA.Selenium; namespace Atata { // TODO: Review IWebElementExtensions class. Remove unused methods. public static class IWebElementExtensions { public static WebElementExtendedSearchContext Try(this IWebElement element) { return new Web...
Use public interface in test app
using System; using Xamarin.Forms; namespace XamarinTest { public class App : Application { public App () { // The root page of your application MainPage = new ContentPage { Content = new StackLayout { VerticalOptions = LayoutOptions.Center, Children = { new Label { XAlign = Tex...
using System; using Xamarin.Forms; namespace XamarinTest { public class App : Application { public App () { // The root page of your application MainPage = new ContentPage { Content = new StackLayout { VerticalOptions = LayoutOptions.Center, Children = { new Label { XAlign = Tex...
Fix remote API load order
using NLog; using Sandbox; using Torch.API; using Torch.Managers; using VRage.Dedicated.RemoteAPI; namespace Torch.Server.Managers { public class RemoteAPIManager : Manager { /// <inheritdoc /> public RemoteAPIManager(ITorchBase torchInstance) : base(torchInstance) { ...
using NLog; using Sandbox; using Torch.API; using Torch.Managers; using VRage.Dedicated.RemoteAPI; namespace Torch.Server.Managers { public class RemoteAPIManager : Manager { /// <inheritdoc /> public RemoteAPIManager(ITorchBase torchInstance) : base(torchInstance) { ...
Fix regex pattern in removing emotes.
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...
Add input binder to allow for comma-separated list inputs for API routes
using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.ModelBinding; namespace api { public class CommaDelimitedArrayModelBinder : IModelBinder { pub...
using System; using System.ComponentModel; using System.Linq; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.ModelBinding; namespace api { public class CommaDelimitedArrayModelBinder : IModelBinder { public Task BindModelAsync(ModelBindingContext bindingContext) ...
Modify WhatDoIHave to show expected result
using Core; using StructureMap; using System.Diagnostics; using Xunit; namespace Tests { public class TroubleshootingTests { [Fact] public void ShowBuildPlan() { var container = new Container(x => { x.For<IService>().Use<Service>(); }...
using Core; using StructureMap; using Xunit; namespace Tests { public class TroubleshootingTests { [Fact] public void ShowBuildPlan() { var container = new Container(x => { x.For<IService>().Use<Service>(); }); var buildP...
Handle empty entity name in rescuer
using Rescuer.Management.Rescuers; namespace Rescuer.Management.Controller { public class RescuerController : IRescuerController { private readonly IRescuerFactory _factory; public RescuerController(IRescuerFactory factory) { _factory = factory; } ...
using System; using System.Text; using Rescuer.Management.Rescuers; namespace Rescuer.Management.Controller { public class RescuerController : IRescuerController { private readonly IRescuerFactory _factory; public RescuerController(IRescuerFactory factory) { ...
Fix string test for ubuntu
namespace ReamQuery.Test { using System; using Xunit; using ReamQuery.Helpers; using Microsoft.CodeAnalysis.Text; public class Helpers { [Fact] public void String_InsertTextAt() { var inp = "\r\n text\r\n"; var exp = "\r\n new text\r\n"; ...
namespace ReamQuery.Test { using System; using Xunit; using ReamQuery.Helpers; using Microsoft.CodeAnalysis.Text; public class Helpers { [Fact] public void String_InsertTextAt() { var inp = Environment.NewLine + " text" + Environment.NewLine; var...
Disable delayed messages to see what effect it has on tests.
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading; using System.Threading.Tasks; using Foundatio.Extensions; using Foundatio.Utility; namespace Foundatio.Messaging { public abstract class MessageBusBase : IMessagePublisher, IDisposable { pr...
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading; using System.Threading.Tasks; using Foundatio.Extensions; using Foundatio.Utility; namespace Foundatio.Messaging { public abstract class MessageBusBase : IMessagePublisher, IDisposable { pr...
Revert "(GH-36) Fix broken test"
using System; using Shouldly; using Xunit; namespace Cake.Figlet.Tests { public class FigletTests { [Fact] public void Figlet_can_render() { const string expected = @" _ _ _ _ __ __ _ _ | | | | ___ | || | ___ \ \ / ...
using System; using Shouldly; using Xunit; namespace Cake.Figlet.Tests { public class FigletTests { [Fact] public void Figlet_can_render() { const string expected = @" _ _ _ _ __ __ _ _ | | | | ___ | || | ___ \ \ /...
Fix xml comment cref compiler warning
namespace System.Collections.Async { /// <summary> /// This exception is thrown when you call <see cref="AsyncEnumerable{T}.Break"/>. /// </summary> public sealed class ForEachAsyncCanceledException : OperationCanceledException { } }
namespace System.Collections.Async { /// <summary> /// This exception is thrown when you call <see cref="ForEachAsyncExtensions.Break"/>. /// </summary> public sealed class ForEachAsyncCanceledException : OperationCanceledException { } }
Remove session-commit statement that is not needed and already handled by middleware
using Microsoft.AspNetCore.Http; using Newtonsoft.Json; using System.Text; namespace MotleyFlash.AspNetCore.MessageProviders { public class SessionMessageProvider : IMessageProvider { public SessionMessageProvider(ISession session) { this.session = session; } priva...
using Microsoft.AspNetCore.Http; using Newtonsoft.Json; using System.Text; namespace MotleyFlash.AspNetCore.MessageProviders { public class SessionMessageProvider : IMessageProvider { public SessionMessageProvider(ISession session) { this.session = session; } priva...
Update to use property, not field. bugid: 146
using System; using Csla.Server; namespace Csla.Testing.Business.DataPortal { /// <summary> /// Basically this test class exposes protected DataPortal constructor overloads to the /// Unit Testing System, allowing for a more fine-grained Unit Tests /// </summary> public class TestableDataPortal...
using System; using Csla.Server; namespace Csla.Testing.Business.DataPortal { /// <summary> /// Basically this test class exposes protected DataPortal constructor overloads to the /// Unit Testing System, allowing for a more fine-grained Unit Tests /// </summary> public class TestableDataPortal...
Make the UWP page presenter us a common content control
using System; using System.Collections.Generic; using System.Linq; using System.Reactive.Disposables; using System.Reactive.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Core; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; using ReactiveUI.Routing.Pre...
using System; using System.Collections.Generic; using System.Linq; using System.Reactive.Disposables; using System.Reactive.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Core; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; using ReactiveUI.Routing.Pre...
Fix compile error around exporting SecureString
using System; using System.Runtime.InteropServices; using System.Security; using LibGit2Sharp.Core; namespace LibGit2Sharp { /// <summary> /// Class that uses <see cref="SecureString"/> to hold username and password credentials for remote repository access. /// </summary> public sealed class SecureUse...
using System; using System.Runtime.InteropServices; using System.Security; using LibGit2Sharp.Core; namespace LibGit2Sharp { /// <summary> /// Class that uses <see cref="SecureString"/> to hold username and password credentials for remote repository access. /// </summary> public sealed class SecureUse...
Remove the build attributes because they'll be generated with a full namespace
//----------------------------------------------------------------------- // <copyright company="TheNucleus"> // Copyright (c) TheNucleus. All rights reserved. // Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. // </copyright> //-------...
//----------------------------------------------------------------------- // <copyright company="TheNucleus"> // Copyright (c) TheNucleus. All rights reserved. // Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information. // </copyright> //-------...
Use the same folder as the JAVA implementation
using System; using System.Text.RegularExpressions; namespace Floobits.Common { public class Constants { static public string baseDir = FilenameUtils.concat(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "floobits"); static public string shareDir = FilenameUtils.concat(baseD...
using System; using System.Text.RegularExpressions; namespace Floobits.Common { public class Constants { static public string baseDir = baseDirInit(); static public string shareDir = FilenameUtils.concat(baseDir, "share"); static public string version = "0.11"; static public string...
Use Timer based Observable to generate data
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DataGenerator { class Program { static void Main(string[] args) { var gen = new Fare.Xeger(ConfigurationSettings.Ap...
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Reactive.Linq; using System.Text; using System.Threading.Tasks; namespace DataGenerator { class Program { static void Main(string[] args) { var data = new Fare....
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...
Remove setters from IObservable properties
namespace Mappy.Models { using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using Mappy.Data; using Mappy.Database; public interface IMapViewSettingsModel { IObservable<bool> GridVisible { get; } IObservable...
namespace Mappy.Models { using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using Mappy.Data; using Mappy.Database; public interface IMapViewSettingsModel { IObservable<bool> GridVisible { get; } IObservable...
Split responsibility of ConvertMovie() method
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OpeningsMoeWpfClient { class FfmpegMovieConverter : IMovieConverter { private string ffmpegPath; public Task<string> Convert...
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OpeningsMoeWpfClient { class FfmpegMovieConverter : IMovieConverter { private string ffmpegPath; private Task<int> LaunchPro...
Allow .par in auto in case of '(T) expr.par'
using System.Linq; using JetBrains.Annotations; using JetBrains.ReSharper.Feature.Services.Lookup; using JetBrains.ReSharper.PostfixTemplates.LookupItems; using JetBrains.ReSharper.Psi.CSharp; using JetBrains.ReSharper.Psi.CSharp.Tree; namespace JetBrains.ReSharper.PostfixTemplates.Templates { // todo: (Bar) foo.pa...
using System.Linq; using JetBrains.Annotations; using JetBrains.ReSharper.Feature.Services.Lookup; using JetBrains.ReSharper.PostfixTemplates.LookupItems; using JetBrains.ReSharper.Psi.CSharp; using JetBrains.ReSharper.Psi.CSharp.Tree; namespace JetBrains.ReSharper.PostfixTemplates.Templates { [PostfixTemplate( ...
Fix AgileUploader (remove SO image resizer)
@using So.ImageResizer.Helpers @{ Style.Include("slimbox2.css"); Script.Require("jQuery").AtFoot(); Script.Include("slimbox2.js").AtFoot(); } @if (!string.IsNullOrEmpty(Model.ContentField.FileNames)) { <div class="stripGallery"> @foreach (var fileName in Model.ContentField.FileNames.Split(';')...
@{ Style.Include("slimbox2.css"); Script.Require("jQuery").AtFoot(); Script.Include("slimbox2.js").AtFoot(); } @if (!string.IsNullOrEmpty(Model.ContentField.FileNames)) { <div class="stripGallery"> @foreach (var fileName in Model.ContentField.FileNames.Split(';')) { <a href=...
Fix for Binding singleton to instance.
using System; namespace CmnTools.Suice { /// <summary> /// @author DisTurBinG /// </summary> public class SingletonProvider : AbstractProvider { internal object Instance; public SingletonProvider (Type providedType) : base(providedType) { } internal virtual void CreateSingletonInsta...
using System; namespace CmnTools.Suice { /// <summary> /// @author DisTurBinG /// </summary> public class SingletonProvider : AbstractProvider { internal object Instance; public SingletonProvider (Type providedType) : base(providedType) { } internal virtual void CreateSingletonInsta...
Fix NullReference when using T4MVC
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Web.Mvc; using System.Web.Routing; using System.Xml.Linq; namespace Twilio.TwiML.Mvc { public class TwiMLResult : ActionResult { XDocument data; public TwiMLResult() { } public TwiMLResul...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Web.Mvc; using System.Web.Routing; using System.Xml.Linq; namespace Twilio.TwiML.Mvc { public class TwiMLResult : ActionResult { XDocument data; public TwiMLResult() { } public TwiMLResul...
Fix a bug of wrong counting characters with HTTPS URL
using System.Linq; using System.Text.RegularExpressions; namespace Inscribe.Text { public static class TweetTextCounter { public static int Count(string input) { // URL is MAX 19 Chars. int prevIndex = 0; int totalCount = 0; foreach (var m in Reg...
using System.Linq; using System.Text.RegularExpressions; namespace Inscribe.Text { public static class TweetTextCounter { public static int Count(string input) { // URL is MAX 20 Chars (if URL has HTTPS scheme, URL is MAX 21 Chars) int prevIndex = 0; int tot...
Add problem function (with IsMacroType=true)
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using ExcelDna.Integration; namespace RtdArrayTest { public static class TestFunctions { public static object RtdArrayTest(string prefix) { object rtdValue = XlCall.RTD("...
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using ExcelDna.Integration; namespace RtdArrayTest { public static class TestFunctions { public static object RtdArrayTest(string prefix) { object rtdValue = XlCall.RTD("...
Use transform.Find instead of deprecated transform.FindChild
// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). // It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) using UnityEngine; using System.Collections; public class PortraitFlipTest...
// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). // It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) using UnityEngine; using System.Collections; public class PortraitFlipTest...
Add test description and fix param order in Assert call
using NUnit.Framework; namespace FullSerializer.Tests.InitialInstance { public class SimpleModel { public int A; } public class InitialInstanceTests { [Test] public void TestInitialInstance() { SimpleModel model1 = new SimpleModel { A = 3 }; fsData data; ...
using NUnit.Framework; namespace FullSerializer.Tests.InitialInstance { public class SimpleModel { public int A; } public class InitialInstanceTests { [Test] public void TestPopulateObject() { // This test verifies that when we pass in an existing object //...
Change assembly version from 2.0.0.0 to 2.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. [ass...
using System.Resources; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [ass...
Use empty stopwords set when the default stopwords file is missing.
using System.Collections.Generic; using System.IO; namespace JiebaNet.Analyser { public abstract class KeywordExtractor { protected static readonly List<string> DefaultStopWords = new List<string>() { "the", "of", "is", "and", "to", "in", "that", "we", "for", "an", "are", ...
using System.Collections.Generic; using System.IO; namespace JiebaNet.Analyser { public abstract class KeywordExtractor { protected static readonly List<string> DefaultStopWords = new List<string>() { "the", "of", "is", "and", "to", "in", "that", "we", "for", "an", "are", ...
Fix up InternalsVisibleTo to new name
using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyVersion(SolutionInfo.Version + ".0")] [assembly: AssemblyInformationalVersion(SolutionInfo.Version)] [assembly: AssemblyFileVersion(SolutionInfo.Version + ".0")] [assembly: ComVisible...
using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyVersion(SolutionInfo.Version + ".0")] [assembly: AssemblyInformationalVersion(SolutionInfo.Version)] [assembly: AssemblyFileVersion(SolutionInfo.Version + ".0")] [assembly: ComVisible...
Make foreign key converter thread-safe.
using System; using Newtonsoft.Json; namespace Toggl.Phoebe.Data { public class ForeignKeyJsonConverter : JsonConverter { public override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer) { var model = (Model)value; if (model == null) { ...
using System; using Newtonsoft.Json; namespace Toggl.Phoebe.Data { public class ForeignKeyJsonConverter : JsonConverter { public override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer) { var model = (Model)value; if (model == null) { ...
Implement rest call to get teams.
using System; using System.Collections.Generic; using Newtonsoft.Json; using OutlookMatters.Core.Http; using OutlookMatters.Core.Mattermost.v4.Interface; namespace OutlookMatters.Core.Mattermost.v4 { public class RestService : IRestService { private readonly IHttpClient _httpClient; public Re...
using System; using System.Collections.Generic; using Newtonsoft.Json; using OutlookMatters.Core.Http; using OutlookMatters.Core.Mattermost.v4.Interface; namespace OutlookMatters.Core.Mattermost.v4 { public class RestService : IRestService { private readonly IHttpClient _httpClient; public Re...
Fix import error in demo.
using System; using System.Collections.Generic; using Demo.Endpoints; using Distributor; namespace Demo { internal class Program { private static void Main(string[] args) { var distributables = new List<DistributableFile> { new DistributableFile ...
using System; using System.Collections.Generic; using Demo.Endpoints.FileSystem; using Demo.Endpoints.Sharepoint; using Distributor; namespace Demo { internal class Program { private static void Main(string[] args) { var distributables = new List<DistributableFile> { ...
Handle IPv4 Address and IPv6 Address
namespace McIP { using System; using System.Diagnostics; using System.IO; public static class Program { public static void Main() { var si = new ProcessStartInfo("ipconfig", "/all") { RedirectStandardOutput = true, UseShellExe...
namespace McIP { using System; using System.Diagnostics; using System.IO; public static class Program { public static void Main() { var si = new ProcessStartInfo("ipconfig", "/all") { RedirectStandardOutput = true, UseShellExe...
Create server side API for single multiple answer question
using Microsoft.AspNetCore.Mvc; using Promact.Trappist.DomainModel.ApplicationClasses; using Promact.Trappist.Repository.Questions; using System; namespace Promact.Trappist.Core.Controllers { [Route("api")] public class QuestionController : Controller { private readonly IQuestionRepository _quest...
using Microsoft.AspNetCore.Mvc; using Promact.Trappist.DomainModel.ApplicationClasses; using Promact.Trappist.Repository.Questions; using System; namespace Promact.Trappist.Core.Controllers { [Route("api")] public class QuestionController : Controller { private readonly IQuestionRepository _quest...
Remove timezone specification for scheduled triggers to use server timezone
// Copyright 2019 Maintainers of NUKE. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Linq; using Nuke.Common.Utilities; namespace Nuke.Common.CI.TeamCity.Configuration { public class TeamCityScheduledTrigger : TeamCityTrigger { ...
// Copyright 2019 Maintainers of NUKE. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Linq; using Nuke.Common.Utilities; namespace Nuke.Common.CI.TeamCity.Configuration { public class TeamCityScheduledTrigger : TeamCityTrigger { ...
Change char to byte in gaf frame header
namespace TAUtil.Gaf.Structures { using System.IO; public struct GafFrameData { public ushort Width; public ushort Height; public ushort XPos; public ushort YPos; public char Unknown1; public bool Compressed; public ushort FramePointers; ...
namespace TAUtil.Gaf.Structures { using System.IO; public struct GafFrameData { public ushort Width; public ushort Height; public ushort XPos; public ushort YPos; public byte Unknown1; public bool Compressed; public ushort FramePointers; ...
Make SplitTrimmed give empty list when given white-space-only string
using System.Collections.Generic; namespace Palaso.Extensions { public static class StringExtensions { public static List<string> SplitTrimmed(this string s, char seperator) { var x = s.Split(seperator); var r = new List<string>(); foreach (var part in x) { r.Add(part.Trim()); } return r;...
using System.Collections.Generic; namespace Palaso.Extensions { public static class StringExtensions { public static List<string> SplitTrimmed(this string s, char seperator) { if(s.Trim() == string.Empty) return new List<string>(); var x = s.Split(seperator); var r = new List<string>(); foreac...
Make sure password validation works after saving
namespace Snittlistan.Test { using System.IO; using System.Text; using Models; using Raven.Imports.Newtonsoft.Json; using Xunit; public class SerializationTest : DbTest { [Fact] public void CanSerialize8x4Match() { // Arrange va...
namespace Snittlistan.Test { using System.IO; using System.Text; using Models; using Raven.Imports.Newtonsoft.Json; using Xunit; public class SerializationTest : DbTest { [Fact] public void CanSerialize8x4Match() { // Arrange va...
Fix bug in the StringCollection converter when DataServicePackage.Authors is a simple string.
using System; using System.Collections.Generic; using System.Windows.Data; namespace NuPack.Dialog.PackageManagerUI { public class StringCollectionsToStringConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo cultur...
using System; using System.Collections.Generic; using System.Windows.Data; namespace NuPack.Dialog.PackageManagerUI { public class StringCollectionsToStringConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo cultur...
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...
Handle null id for Cars/Details action
using CarFuel.DataAccess; using CarFuel.Models; using CarFuel.Services; using Microsoft.AspNet.Identity; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace CarFuel.Controllers { public class CarsController : Controller { private ICarDb ...
using CarFuel.DataAccess; using CarFuel.Models; using CarFuel.Services; using Microsoft.AspNet.Identity; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Web; using System.Web.Mvc; namespace CarFuel.Controllers { public class CarsController : Controller { ...
Fix data migration code for UserRecord
using Orchard.Data.Migration; namespace Orchard.Users.DataMigrations { public class UsersDataMigration : DataMigrationImpl { public int Create() { //CREATE TABLE Orchard_Users_UserRecord (Id INTEGER not null, UserName TEXT, Email TEXT, NormalizedUserName TEXT, Password TEXT, PasswordFor...
using Orchard.Data.Migration; namespace Orchard.Users.DataMigrations { public class UsersDataMigration : DataMigrationImpl { public int Create() { //CREATE TABLE Orchard_Users_UserRecord (Id INTEGER not null, UserName TEXT, Email TEXT, NormalizedUserName TEXT, Password TEXT, PasswordFor...
Support list of hints per problem
using System; namespace CITS.Models { public class MathProblemModel : ProblemModel { public MathProblemModel(string Problem, string Solution):base(Problem,Solution){} public override Boolean IsSolutionCorrect(String candidateSolution) { return Solution.Equals(candidateSolut...
using System; using System.Collections.Generic; namespace CITS.Models { public class MathProblemModel : ProblemModel { public MathProblemModel(string problem, string solution, List<String> listOfHints):base(problem,solution, listOfHints){} public override Boolean IsSolutionCorrect(String candi...
Update TypeCatalogParser for CoreConsoleHost removal
using System; using System.IO; using System.Linq; using NuGet.Frameworks; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ProjectModel; using Microsoft.DotNet.ProjectModel.Graph; using Microsoft.Extensions.DependencyModel.Resolution; namespace ConsoleApplication { public class Program { public...
using System; using System.IO; using System.Linq; using NuGet.Frameworks; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ProjectModel; using Microsoft.DotNet.ProjectModel.Graph; using Microsoft.Extensions.DependencyModel.Resolution; namespace TypeCatalogParser { public class Program { public ...
Disable the disable mouse script for now
 using UnityEngine; using UnityEngine.EventSystems; class DisableMouse : MonoBehaviour { // private stuff we don't want the editor to see private GameObject m_lastSelectedGameObject; // this is called by unity before start void Awake() { m_lastSelectedGameObject = new GameObject(); } // this is called by u...
 using UnityEngine; using UnityEngine.EventSystems; class DisableMouse : MonoBehaviour { // private stuff we don't want the editor to see private GameObject m_lastSelectedGameObject; // this is called by unity before start void Awake() { m_lastSelectedGameObject = new GameObject(); } // this is called by u...
Update interface for return type
using com.techphernalia.MyPersonalAccounts.Model.Inventory; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace com.techphernalia.MyPersonalAccounts.Model.Controller { public interface IInventoryController { #region Stock Unit List<StockUnit> GetAll...
using com.techphernalia.MyPersonalAccounts.Model.Inventory; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace com.techphernalia.MyPersonalAccounts.Model.Controller { public interface IInventoryController { #region Stock Unit List<StockUnit> GetAll...
Add documentation for episode ids.
namespace TraktApiSharp.Objects.Get.Shows.Episodes { using Basic; public class TraktEpisodeIds : TraktIds { } }
namespace TraktApiSharp.Objects.Get.Shows.Episodes { using Basic; /// <summary>A collection of ids for various web services, including the Trakt id, for a Trakt episode.</summary> public class TraktEpisodeIds : TraktIds { } }
Fix DomainException LogError parameter order
namespace GeekLearning.Domain.AspnetCore { using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; public class DomainExceptionFilter : IActionFilter { private ILoggerFactory loggerFactory; private IOptions<DomainOptions> opti...
namespace GeekLearning.Domain.AspnetCore { using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; public class DomainExceptionFilter : IActionFilter { private ILoggerFactory loggerFactory; private IOptions<DomainOptions> opti...
Fix score retrieval no longer working
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using System.Collections.Generic; using osu.Game.Beatmaps; using osu.Game.Rulesets.Mods; using osu.Game.Users; using osu.Game.Rulesets.Replays; namespace...
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using System.Collections.Generic; using Newtonsoft.Json; using osu.Game.Beatmaps; using osu.Game.Rulesets.Mods; using osu.Game.Users; using osu.Game.Rules...
Enable testing in emulated or actual device mode
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace xwalk { class TwoinoneTest { static void Main(string[] args) { Emulator emulator = new Emulator(); TabletM...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace xwalk { class TwoinoneTest { static void Main(string[] args) { if (args.Length > 0 && args[0] == "emulator") ...
Add method ToString to override default display and replace by Caption
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NBi.Core.Analysis.Metadata { public class Property : IField { public string UniqueName { get; private set; } public string Caption { get; set; } public Property(string uniqueNam...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NBi.Core.Analysis.Metadata { public class Property : IField { public string UniqueName { get; private set; } public string Caption { get; set; } public Property(string uniqueNam...
Revert "Dummy commit to test PR. No real changes"
namespace Microsoft.ApplicationInsights.Extensibility.Implementation.Platform { using Microsoft.ApplicationInsights.DataContracts; using Microsoft.VisualStudio.TestTools.UnitTesting; using Assert = Xunit.Assert; [TestClass] public class PlatformReferencesTests { [TestMethod] pu...
namespace Microsoft.ApplicationInsights.Extensibility.Implementation.Platform { using Microsoft.ApplicationInsights.DataContracts; using Microsoft.VisualStudio.TestTools.UnitTesting; using Assert = Xunit.Assert; [TestClass] public class PlatformReferencesTests { [TestMethod] pu...
Mark Activity and it's properties as Serializable
// 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.Runtime.Remoting.Messaging; using System.Security; namespace System.Diagnostics { public partial c...
// 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.Runtime.Remoting.Messaging; using System.Security; namespace System.Diagnostics { // this code is ...
Add some tests for a bug.
using System.Linq; using Xunit; namespace Microsoft.Language.Xml.Tests { public class TestApi { [Fact] public void TestAttributeValue() { var root = Parser.ParseText("<e a=\"\"/>"); var attributeValue = root.Attributes.First().Value; Asse...
using System.Linq; using Xunit; namespace Microsoft.Language.Xml.Tests { public class TestApi { [Fact] public void TestAttributeValue() { var root = Parser.ParseText("<e a=\"\"/>"); var attributeValue = root.Attributes.First().Value; Asse...
Set nuget package version to 2.0.0-beta1
using System.Reflection; [assembly: AssemblyCompany("Andrew Davey")] [assembly: AssemblyProduct("Cassette")] [assembly: AssemblyCopyright("Copyright © 2011 Andrew Davey")] // NOTE: When changing this version, also update Cassette.MSBuild\Cassette.targets to match. [assembly: AssemblyInformationalVersion("2.0....
using System.Reflection; [assembly: AssemblyCompany("Andrew Davey")] [assembly: AssemblyProduct("Cassette")] [assembly: AssemblyCopyright("Copyright © 2011 Andrew Davey")] [assembly: AssemblyInformationalVersion("2.0.0-beta1")] [assembly: AssemblyVersion("2.0.0.*")] [assembly: AssemblyFileVersion("2.0.0.0"...
Support added for HTML comment removal
namespace DotnetThoughts.AspNet { using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using System.IO; using System.Threading.Tasks; using System.Text; using System.Text.RegularExpressions; public class HtmlMinificationMiddleware { private RequestDelegate _next; ...
namespace DotnetThoughts.AspNet { using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using System.IO; using System.Threading.Tasks; using System.Text; using System.Text.RegularExpressions; public class HtmlMinificationMiddleware { private RequestDelegate _next; ...
Change Always(x) so that it doesn't depend on the 'true' literal
using LogicalShift.Reason.Api; using LogicalShift.Reason.Clauses; using System; using System.Linq; namespace LogicalShift.Reason { /// <summary> /// Methods for creating an altering clauses /// </summary> public static class Clause { /// <summary> /// Creates a new negative Horn cl...
using LogicalShift.Reason.Api; using LogicalShift.Reason.Clauses; using System; using System.Linq; namespace LogicalShift.Reason { /// <summary> /// Methods for creating an altering clauses /// </summary> public static class Clause { /// <summary> /// Creates a new negative Horn cl...
Fix initial value not propagating
// 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.Bindables; namespace osu.Framework.Statistics { public class GlobalStatistic<T> : IGlobalStatistic { public string Group { get; } ...
// 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.Bindables; namespace osu.Framework.Statistics { public class GlobalStatistic<T> : IGlobalStatistic { public string Group { get; } ...
Remove trailing slashes from baseUrl in .NET to prevent double slashes in URL
using System; using System.Collections.Generic; using System.Text; using OpenQA.Selenium; using Selenium.Internal.SeleniumEmulation; namespace Selenium.Internal.SeleniumEmulation { /// <summary> /// Defines the command for the open keyword. /// </summary> internal class Open : SeleneseCommand { ...
using System; using System.Collections.Generic; using System.Text; using OpenQA.Selenium; using Selenium.Internal.SeleniumEmulation; namespace Selenium.Internal.SeleniumEmulation { /// <summary> /// Defines the command for the open keyword. /// </summary> internal class Open : SeleneseCommand { ...
Add comment to Auth Login action describing redirect
// Copyright(c) 2016 Google 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/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
// Copyright(c) 2016 Google 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/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
Use separator when joining string attributes
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; namespace SpotifyAPI.Web { public static class Util { public static string GetStringAttribute<T>(this T en, String separator) where T : struct, IConvertible { Enum e = (Enum)(object)en; ...
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; namespace SpotifyAPI.Web { public static class Util { public static string GetStringAttribute<T>(this T en, String separator) where T : struct, IConvertible { Enum e = (Enum)(object)en; ...
Implement IPropertyDescriptorInitializer to validate properties on initializing
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HermaFx.Settings { [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Property, AllowMultiple = false)] public sealed class SettingsAttribute : Attribute { public const string ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Castle.Components.DictionaryAdapter; namespace HermaFx.Settings { [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Property, AllowMultiple = false)] public sealed class SettingsAttr...
Remove duplicates from sorted array II - Linq
using System; static class Program { static int RemoveDupes(this int[] a) { int write = 1; int read = 0; bool same = false; int count = 0; for (int i = 1; i < a.Length; i++) { read = i; if (same && a[read] == a[write]) { count...
using System; using System.Linq; using System.Collections.Generic; static class Program { static int RemoveDupes(this int[] a) { int write = 1; int read = 0; bool same = false; int count = 0; for (int i = 1; i < a.Length; i++) { read = i; if ...
Store max combo in ScoreProcessor.
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.Configuration; using osu....
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.Configuration; using osu....
Include top left encoded targa in benchmark
using System.IO; using BenchmarkDotNet.Attributes; using FreeImageAPI; using ImageMagick; using DS = DevILSharp; namespace Pfim.Benchmarks { public class TargaBenchmark { [Params("true-32-rle-large.tga", "true-24-large.tga", "true-24.tga", "true-32-rle.tga")] public string Payload { get; set; ...
using System.IO; using BenchmarkDotNet.Attributes; using FreeImageAPI; using ImageMagick; using DS = DevILSharp; namespace Pfim.Benchmarks { public class TargaBenchmark { [Params("true-32-rle-large.tga", "true-24-large.tga", "true-24.tga", "true-32-rle.tga", "rgb24_top_left")] public string Pa...
Remove LocatorId generation code from DTO since the locator id will be generated by a SQL CLR function
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PS.Mothership.Core.Common.Dto.Merchant { public class AddProspectDto { public string CompanyName { get; set; } public string LocatorId { get ...
using System; namespace PS.Mothership.Core.Common.Dto.Merchant { public class AddProspectDto { public string CompanyName { get; set; } public string LocatorId { get; set; } public long MainPhoneCountryKey { get; set; } public string MainPhoneNumber { get; set; } pub...
Fix - The -t command-line switch is optional. Use first argument if omitted.
using System; using System.Collections.Generic; using System.IO; using NDesk.Options; namespace make { public class CommandLine { public string Program { get; set; } public string OutputFile { get; set; } public string InputFile { get; set; } public string[] Argumen...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using NDesk.Options; namespace make { public class CommandLine { public string Program { get; set; } public string OutputFile { get; set; } public string InputFile { get; set; } pub...
Stop playing the track in editor to avoid unused member warning
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK.Graphics; using osu.Framework.Screens; using osu.Game.Beatmaps; using osu.Game.Screens.Backgrounds; namespace osu.Game.Screens.Edit { intern...
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK.Graphics; using osu.Framework.Screens; using osu.Game.Beatmaps; using osu.Game.Screens.Backgrounds; namespace osu.Game.Screens.Edit { intern...
Change date type of MaxDownloadingItems to byte and change to get only
using System.Collections.Generic; using TirkxDownloader.Models; namespace TirkxDownloader.Framework.Interface { public delegate void DownloadCompleteHandler(GeneralDownloadItem downloadInfo); /// <summary> /// Implementation that implement this interface should implement PropertyChanged Event for data-bi...
using System.Collections.Generic; using TirkxDownloader.Models; namespace TirkxDownloader.Framework.Interface { public delegate void DownloadCompleteHandler(GeneralDownloadItem downloadInfo); /// <summary> /// Implementation that implement this interface should implement PropertyChanged Event for data-bi...
Read connection string from configuration
using System; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.Extensions.Configuration; namespace QueueGettingStarted { public class Program { public static void Main(string[] args) { // configuration var builder = new Co...
using System; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.Extensions.Configuration; namespace QueueGettingStarted { public class Program { public static void Main(string[] args) { // configuration var builder = new Co...
Add UserName to LogEntries When Authenticated
using LogBook.Services; using LogBook.Services.Models; using Portal.CMS.Web.Architecture.ViewEngines; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Razor; using System.Web.Routing; using System.Web.WebPages; namespace Portal.CMS.Web { public class MvcApplication : System.Web.HttpApplicatio...
using LogBook.Services; using LogBook.Services.Models; using Portal.CMS.Web.Architecture.Helpers; using Portal.CMS.Web.Architecture.ViewEngines; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Razor; using System.Web.Routing; using System.Web.WebPages; namespace Portal.CMS.Web { public class...
Fix potential crash in old .NET versions
namespace SnappyMap.IO { using System; using System.Collections.Generic; using System.Linq; using SnappyMap.Data; [Serializable] public struct SectionMapping { public SectionMapping(SectionType type, params string[] sections) : this() { ...
namespace SnappyMap.IO { using System; using System.Collections.Generic; using System.Linq; using SnappyMap.Data; [Serializable] public struct SectionMapping { public SectionMapping(SectionType type, params string[] sections) : this() { ...
Split out divider update in timer
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace elbgb.gameboy { class Timer { public static class Registers { public const ushort DIV = 0xFF04; public const ushort TIMA = 0xFF05; public const ushort TMA = 0xFF06; public ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace elbgb.gameboy { class Timer { public static class Registers { public const ushort DIV = 0xFF04; public const ushort TIMA = 0xFF05; public const ushort TMA = 0xFF06; public ...
Add image link to movie
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace MeDaUmFilme { public class Movie { public string Title { get; set; } public string Year { get; set; } } public class OmdbResult { public List<Movie> Search { get; set...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace MeDaUmFilme { public class Movie { public string Title { get; set; } public string Year { get; set; } public string Poster { get; set; } public string Type { get; set; } ...
Format file, remove outcommented code.
using Microsoft.EntityFrameworkCore; using Mitternacht.Services.Database; namespace Mitternacht.Services { public class DbService { private readonly DbContextOptions _options; public DbService(IBotCredentials creds) { var optionsBuilder = new DbContextOptionsBuilder(); ...
using Microsoft.EntityFrameworkCore; using Mitternacht.Services.Database; namespace Mitternacht.Services { public class DbService { private readonly DbContextOptions _options; public DbService(IBotCredentials creds) { var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseSqlite(creds.DbConn...
Fix Log4Net path for loading config file
// Copyright 2007-2011 Chris Patterson, Dru Sellers, Travis Smith, et. al. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use // this file except in compliance with the License. You may obtain a copy of the // License at // // http://www.apache.org/licenses/LICENSE-2....
// Copyright 2007-2011 Chris Patterson, Dru Sellers, Travis Smith, et. al. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use // this file except in compliance with the License. You may obtain a copy of the // License at // // http://www.apache.org/licenses/LICENSE-2....
Update file version of DLL to match NuGet package.
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("Di...
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("Di...
Introduce a retry machanism with the Blockchain API
using MultiMiner.Blockchain.Data; using MultiMiner.ExchangeApi; using MultiMiner.ExchangeApi.Data; using MultiMiner.Utility.Net; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Net; using System.Text; namespace MultiMiner.Blockchain { public class ApiContext : IApiContext {...
using MultiMiner.Blockchain.Data; using MultiMiner.ExchangeApi; using MultiMiner.ExchangeApi.Data; using MultiMiner.Utility.Net; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Text; namespace MultiMiner.Blockchain { public class ApiContext : IApiContext { public IE...
Fix the URL to point at the Noda Time blog because msmvps.com 503.
// Copyright 2014 The Noda Time Authors. All rights reserved. // Use of this source code is governed by the Apache License 2.0, // as found in the LICENSE.txt file. using System; namespace NodaTime.Annotations { /// <summary> /// Indicates that a value-type field which would otherwise by <c>readonly</...
// Copyright 2014 The Noda Time Authors. All rights reserved. // Use of this source code is governed by the Apache License 2.0, // as found in the LICENSE.txt file. using System; namespace NodaTime.Annotations { /// <summary> /// Indicates that a value-type field which would otherwise by <c>readonly</...
Update Console Program with a Condition - Add unit test for Guest role
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Training.CSharpWorkshop.Tests { [TestClass] public class ProgramTests { [Ignore] [TestMethod] public void IgnoreTest() { Assert.Fail(); } [TestMethod()] public v...
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Training.CSharpWorkshop.Tests { [TestClass] public class ProgramTests { [Ignore] [TestMethod] public void IgnoreTest() { Assert.Fail(); } [TestMethod()] public v...
Fix showing only minutes of the hour insteal of total minutes in virtual table.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml.Data; namespace TramlineFive.Converters { public class TimingConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, st...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml.Data; namespace TramlineFive.Converters { public class TimingConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, st...
Fix broken migration for v11
using System.Linq; using MongoDB.Bson; using MongoDB.Driver; namespace Hangfire.Mongo.Migration.Steps.Version11 { /// <summary> /// Create signal capped collection /// </summary> internal class UseObjectIdForJob : IMongoMigrationStep { public MongoSchema TargetSchema => MongoSchema.Version...
using System.Linq; using MongoDB.Bson; using MongoDB.Driver; namespace Hangfire.Mongo.Migration.Steps.Version11 { /// <summary> /// Create signal capped collection /// </summary> internal class UseObjectIdForJob : IMongoMigrationStep { public MongoSchema TargetSchema => MongoSchema.Version...
Update sample to use Save() and Load()
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Hjson; namespace HjsonSample { class Program { static void Main(string[] args) { var data=HjsonValue.Load("test.hjson").Qo(); Console.WriteLi...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Hjson; namespace HjsonSample { class Program { static void Main(string[] args) { var data=HjsonValue.Load("test.hjson").Qo(); Console.WriteLi...
Add extension method to add a disposable to a composite disposable
using System; using System.Collections.Generic; using System.Reactive.Disposables; using System.Text; namespace SolidworksAddinFramework { public static class DisposableExtensions { public static IDisposable ToCompositeDisposable(this IEnumerable<IDisposable> d) { return new Compos...
using System; using System.Collections.Generic; using System.Reactive.Disposables; using System.Text; namespace SolidworksAddinFramework { public static class DisposableExtensions { public static IDisposable ToCompositeDisposable(this IEnumerable<IDisposable> d) { return new Compos...
Use TabNavigation.Continue for top-level menu.
// ----------------------------------------------------------------------- // <copyright file="MenuStyle.cs" company="Steven Kirk"> // Copyright 2015 MIT Licence. See licence.md for more information. // </copyright> // ----------------------------------------------------------------------- namespace Perspex.Themes.De...
// ----------------------------------------------------------------------- // <copyright file="MenuStyle.cs" company="Steven Kirk"> // Copyright 2015 MIT Licence. See licence.md for more information. // </copyright> // ----------------------------------------------------------------------- namespace Perspex.Themes.De...
Use Wait() instead of Result in void overload
using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; namespace Bugsnag.Common { public class BugsnagClient : IClient { static Uri _uri = new Uri("http://notify.bugsnag.com"); static Uri...
using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; namespace Bugsnag.Common { public class BugsnagClient : IClient { static Uri _uri = new Uri("http://notify.bugsnag.com"); static Uri...