using System;
using System.Diagnostics;
using CIV.Formats;
using static System.Console;

namespace CIV
{

	[Flags]
	enum ExitCodes : int
	{
		Success = 0,
		FileNotFound = 1,
        ParsingFailed = 2,
        VerificationFailed = 4
	}

    class Program
    {
        static void Main(string[] args)
        {
            try
            {
				var project = new Caal().Load(args[0]);
                VerifyAll(project);
			}
            catch (System.IO.FileNotFoundException ex)
            {
                ForegroundColor = ConsoleColor.Red;
                WriteLine(ex.Message);
				ResetColor();
                Environment.Exit((int)ExitCodes.FileNotFound);
			}
		}

        static void VerifyAll(Caal project)
        {
			WriteLine("Loaded project {0}. Starting verification...", project.Name);

            var sw = new Stopwatch();
            sw.Start();
			foreach (var kv in project.Formulae)
			{
                Write($"{kv.Value} |= {kv.Key}...");
				Out.Flush();
				var isSatisfied = kv.Key.Check(kv.Value);
				ForegroundColor = isSatisfied ? ConsoleColor.Green : ConsoleColor.Red;
                var result = isSatisfied ? "Success!" : "Failure";
                Write($"\t{result}");
                WriteLine();
				ResetColor();
			}
            sw.Stop();
            WriteLine($"Completed in {sw.Elapsed.TotalMilliseconds} ms.");

        }
    }
}

using System;
using System.Diagnostics;
using CIV.Formats;
using CIV.Common;
using static System.Console;

namespace CIV
{

	[Flags]
	enum ExitCodes : int
	{
		Success = 0,
		FileNotFound = 1,
        ParsingFailed = 2,
        VerificationFailed = 4
	}

    class Program
    {
        static void Main(string[] args)
        {
            try
            {
				var project = new Caal().Load(args[0]);
                VerifyAll(project);
			}
            catch (Exception ex)
            {
                ForegroundColor = ConsoleColor.Red;
                WriteLine("An error has occurred:");
                WriteLine(ex.Message);
				ResetColor();
                Environment.Exit((int)ExitCodes.FileNotFound);
			}
		}

        static void VerifyAll(Caal project)
        {
			WriteLine("Loaded project {0}. Starting verification...", project.Name);

            var sw = new Stopwatch();
            sw.Start();
			foreach (var kv in project.Formulae)
			{
                Write($"{kv.Value} |= {kv.Key}...");
				Out.Flush();
				var isSatisfied = kv.Key.Check(kv.Value);
				ForegroundColor = isSatisfied ? ConsoleColor.Green : ConsoleColor.Red;
                var result = isSatisfied ? "Success!" : "Failure";
                Write($"\t{result}");
                WriteLine();
				ResetColor();
			}
            sw.Stop();
            WriteLine($"Completed in {sw.Elapsed.TotalMilliseconds} ms.");

        }
    }
}

Fix catch block in Main

Fix catch block in Main


@if (ViewData.ModelState.Any(x => x.Value.Errors.Any()))
{

      �
      @Html.ValidationSummary(true)

}

@if (ViewData.ModelState.Any(x => x.Value.Errors.Any()))
{

      ×/a>
      @Html.ValidationSummary(true)

}

Use `×` for close button

Use `×` for close button

I'm not sure about the encoding that was used; the X character renders strange. At http://twitter.github.com/bootstrap/components.html#alerts `×` is used for the close character, maybe we should too?


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using LifeTimeV3.BL.LifeTimeDiagram;

namespace LifeTimeV3.LifeTimeDiagram.CopyPeriodicDialog
{
    public partial class FormCopyPeriodicDialog : Form
    {
        #region properties
        public LifeTimeDiagramEditor.LifeTimeElement Object
        { get; set; }
        public List<LifeTimeDiagramEditor.LifeTimeElement> MultipliedObjectsCollection
        { get { return _multipliedObjects; } }
        #endregion

        #region fields
        private List<LifeTimeDiagramEditor.LifeTimeElement> _multipliedObjects = new List<LifeTimeDiagramEditor.LifeTimeElement>();
        #endregion

        #region constructor
        public FormCopyPeriodicDialog()
        {
            InitializeComponent();
        }
        #endregion

        #region private
        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }
        #endregion
    }
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using LifeTimeV3.BL.LifeTimeDiagram;

namespace LifeTimeV3.LifeTimeDiagram.CopyPeriodicDialog
{
    public partial class FormCopyPeriodicDialog : Form
    {
        #region properties
        public LifeTimeDiagramEditor.LifeTimeElement Object
        { get; set; }

        public List<LifeTimeDiagramEditor.LifeTimeElement> MultipliedObjectsCollection
        { get { return _multipliedObjects; } }

        public enum PeriodBaseEnum { Days, Month, Years};

        /// <summary>
        /// Base unit of the period (every [Period] [Day/Month/Year])
        /// </summary>
        public PeriodBaseEnum PeriodBase { get; set; }

        /// <summary>
        /// Period (every x [BaseUnit])
        /// </summary>
        public int Period { get; set; }

        /// <summary>
        /// Ammount of copies to add
        /// </summary>
        public int AmmountOfCopies { get; set; }

        /// <summary>
        /// Limit until copies are made
        /// </summary>
        public DateTime LimitForAddingCopies { get; set; }

        /// <summary>
        /// Switch to use either Limit or Ammount for adding copies
        /// </summary>
        public bool UseLimitForAddingCopies { get; set; }
        #endregion

        #region fields
        private List<LifeTimeDiagramEditor.LifeTimeElement> _multipliedObjects = new List<LifeTimeDiagramEditor.LifeTimeElement>();
        #endregion

        #region constructor
        public FormCopyPeriodicDialog()
        {
            InitializeComponent();
        }
        #endregion

        #region private
        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }
        #endregion
    }
}

Work on copy periodic wizard

Work on copy periodic wizard


// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

namespace osu.Game.Rulesets.Mania.Judgements
{
    public class HoldNoteTailJudgement : ManiaJudgement
    {
        /// <summary>
        /// Whether the hold note has been released too early and shouldn't give full score for the release.
        /// </summary>
        public bool HasBroken;
    }
}

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

namespace osu.Game.Rulesets.Mania.Judgements
{
    public class HoldNoteTailJudgement : ManiaJudgement
    {
        /// <summary>
        /// Whether the hold note has been released too early and shouldn't give full score for the release.
        /// </summary>
        public bool HasBroken;

        public override int NumericResultForScore(ManiaHitResult result)
        {
            switch (result)
            {
                default:
                    return base.NumericResultForScore(result);
                case ManiaHitResult.Great:
                case ManiaHitResult.Perfect:
                    return base.NumericResultForScore(HasBroken ? ManiaHitResult.Good : result);
            }
        }

        public override int NumericResultForAccuracy(ManiaHitResult result)
        {
            switch (result)
            {
                default:
                    return base.NumericResultForAccuracy(result);
                case ManiaHitResult.Great:
                case ManiaHitResult.Perfect:
                    return base.NumericResultForAccuracy(HasBroken ? ManiaHitResult.Good : result);
            }
        }
    }
}

Add hold note tail judgement.

Add hold note tail judgement.


namespace Stripe
{
    using Newtonsoft.Json;
    using Stripe.Infrastructure;

    public class ChargePaymentMethodDetailsCardPresentReceipt : StripeEntity
    {
        [JsonProperty("application_cryptogram")]
        public string ApplicationCryptogram { get; set; }

        [JsonProperty("application_preferred_name")]
        public string ApplicationPreferredName { get; set; }

        [JsonProperty("authorization_code")]
        public string AuthorizationCode { get; set; }

        [JsonProperty("authorization_response_code")]
        public long AuthorizationResponseCode { get; set; }

        [JsonProperty("cardholder_verification_method")]
        public long CardholderVerificationMethod { get; set; }

        [JsonProperty("dedicated_file_name")]
        public string DedicatedFileName { get; set; }

        [JsonProperty("terminal_verification_results")]
        public string TerminalVerificationResults { get; set; }

        [JsonProperty("transaction_status_information")]
        public string TransactionStatusInformation { get; set; }
    }
}

namespace Stripe
{
    using Newtonsoft.Json;
    using Stripe.Infrastructure;

    public class ChargePaymentMethodDetailsCardPresentReceipt : StripeEntity
    {
        [JsonProperty("application_cryptogram")]
        public string ApplicationCryptogram { get; set; }

        [JsonProperty("application_preferred_name")]
        public string ApplicationPreferredName { get; set; }

        [JsonProperty("authorization_code")]
        public string AuthorizationCode { get; set; }

        [JsonProperty("authorization_response_code")]
        public string AuthorizationResponseCode { get; set; }

        [JsonProperty("cardholder_verification_method")]
        public string CardholderVerificationMethod { get; set; }

        [JsonProperty("dedicated_file_name")]
        public string DedicatedFileName { get; set; }

        [JsonProperty("terminal_verification_results")]
        public string TerminalVerificationResults { get; set; }

        [JsonProperty("transaction_status_information")]
        public string TransactionStatusInformation { get; set; }
    }
}

Fix two properties to be string as expected on PaymentMethodDetails


// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Game.Online.API.Requests.Responses;

namespace osu.Game.Configuration
{
    /// <summary>
    /// Stores global per-session statics. These will not be stored after exiting the game.
    /// </summary>
    public class SessionStatics : InMemoryConfigManager<Static>
    {
        protected override void InitialiseDefaults()
        {
            Set(Static.LoginOverlayDisplayed, false);
            Set(Static.MutedAudioNotificationShownOnce, false);
            Set<APISeasonalBackgrounds>(Static.SeasonalBackgrounds, null);
        }
    }

    public enum Static
    {
        LoginOverlayDisplayed,
        MutedAudioNotificationShownOnce,
        SeasonalBackgrounds,
    }
}

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Game.Online.API.Requests.Responses;

namespace osu.Game.Configuration
{
    /// <summary>
    /// Stores global per-session statics. These will not be stored after exiting the game.
    /// </summary>
    public class SessionStatics : InMemoryConfigManager<Static>
    {
        protected override void InitialiseDefaults()
        {
            Set(Static.LoginOverlayDisplayed, false);
            Set(Static.MutedAudioNotificationShownOnce, false);
            Set<APISeasonalBackgrounds>(Static.SeasonalBackgrounds, null);
        }
    }

    public enum Static
    {
        LoginOverlayDisplayed,
        MutedAudioNotificationShownOnce,

        /// <summary>
        /// Info about seasonal backgrounds available fetched from API - see <see cref="APISeasonalBackgrounds"/>.
        /// Value under this lookup can be <c>null</c> if there are no backgrounds available (or API is not reachable).
        /// </summary>
        SeasonalBackgrounds,
    }
}

Document nullability of seasonal backgrounds


using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("ValueConverters.UWP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Thomas Galliker")]
[assembly: AssemblyProduct("ValueConverters.UWP")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

Revert assembly info change in uwp project


// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Game.Screens.Select;

namespace osu.Game.Screens.Multi.RealtimeMultiplayer
{
    public class RealtimeMatchSongSelect : SongSelect
    {
        protected override BeatmapDetailArea CreateBeatmapDetailArea()
        {
            throw new System.NotImplementedException();
        }

        protected override bool OnStart()
        {
            throw new System.NotImplementedException();
        }
    }
}

// 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.Linq;
using Humanizer;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Screens;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Screens.Select;

namespace osu.Game.Screens.Multi.RealtimeMultiplayer
{
    public class RealtimeMatchSongSelect : SongSelect, IMultiplayerSubScreen
    {
        public string ShortTitle => "song selection";

        public override string Title => ShortTitle.Humanize();

        [Resolved(typeof(Room), nameof(Room.Playlist))]
        private BindableList<PlaylistItem> playlist { get; set; }

        [Resolved]
        private StatefulMultiplayerClient client { get; set; }

        protected override bool OnStart()
        {
            var item = new PlaylistItem();

            item.Beatmap.Value = Beatmap.Value.BeatmapInfo;
            item.Ruleset.Value = Ruleset.Value;

            item.RequiredMods.Clear();
            item.RequiredMods.AddRange(Mods.Value.Select(m => m.CreateCopy()));

            // If the client is already in a room, update via the client.
            // Otherwise, update the playlist directly in preparation for it to be submitted to the API on match creation.
            if (client.Room != null)
                client.ChangeSettings(item: item);
            else
            {
                playlist.Clear();
                playlist.Add(item);
            }

            this.Exit();
            return true;
        }

        protected override BeatmapDetailArea CreateBeatmapDetailArea() => new PlayBeatmapDetailArea();
    }
}

Implement realtime match song select

Implement realtime match song select


namespace Pdelvo.Minecraft.Protocol.Helper
{
    /// <summary>
    ///
    /// </summary>
    /// <remarks></remarks>
    public static class ProtocolInformation
    {
        /// <summary>
        ///
        /// </summary>
        public const int MinSupportedClientVersion = 22;
        /// <summary>
        ///
        /// </summary>
        public const int MaxSupportedClientVersion = 46;
        /// <summary>
        ///
        /// </summary>
        public const int MinSupportedServerVersion = 22;
        /// <summary>
        ///
        /// </summary>
        public const int MaxSupportedServerVersion = 46;
    }
}

namespace Pdelvo.Minecraft.Protocol.Helper
{
    /// <summary>
    ///
    /// </summary>
    /// <remarks></remarks>
    public static class ProtocolInformation
    {
        /// <summary>
        ///
        /// </summary>
        public const int MinSupportedClientVersion = 22;
        /// <summary>
        ///
        /// </summary>
        public const int MaxSupportedClientVersion = 47;
        /// <summary>
        ///
        /// </summary>
        public const int MinSupportedServerVersion = 22;
        /// <summary>
        ///
        /// </summary>
        public const int MaxSupportedServerVersion = 47;
    }
}

Change max supported version constants

Change max supported version constants


using System.Collections.Generic;
using Raml.Parser.Expressions;

namespace Raml.Parser.Builders
{
	public class SecuritySchemeDescriptorBuilder
	{
        public SecuritySchemeDescriptor Build(IDictionary<string, object> dynamicRaml, string defaultMediaType)
		{
			var descriptor = new SecuritySchemeDescriptor();

			if (dynamicRaml.ContainsKey("headers"))
				descriptor.Headers = new ParametersBuilder((IDictionary<string, object>)dynamicRaml["headers"]).GetAsDictionary();

			if (dynamicRaml.ContainsKey("queryParameters"))
				descriptor.QueryParameters = new ParametersBuilder((IDictionary<string, object>)dynamicRaml["queryParameters"]).GetAsDictionary();

			if (dynamicRaml.ContainsKey("responses"))
                descriptor.Responses = new ResponsesBuilder((IDictionary<string, object>)dynamicRaml["responses"]).GetAsDictionary(defaultMediaType);

			return descriptor;
		}
	}
}

using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using Raml.Parser.Expressions;

namespace Raml.Parser.Builders
{
	public class SecuritySchemeDescriptorBuilder
	{
        public SecuritySchemeDescriptor Build(IDictionary<string, object> dynamicRaml, string defaultMediaType)
		{
			var descriptor = new SecuritySchemeDescriptor();

			if (dynamicRaml.ContainsKey("headers"))
				descriptor.Headers = new ParametersBuilder((IDictionary<string, object>)dynamicRaml["headers"]).GetAsDictionary();

			if (dynamicRaml.ContainsKey("queryParameters"))
				descriptor.QueryParameters = new ParametersBuilder((IDictionary<string, object>)dynamicRaml["queryParameters"]).GetAsDictionary();

            var responsesNest = ((object[])dynamicRaml["responses"]).ToList().Cast<ExpandoObject>() ;
            var responses = responsesNest.ToDictionary(k => ((IDictionary<string, object>)k)["code"].ToString(), v => (object)v);

            if (dynamicRaml.ContainsKey("responses"))
                descriptor.Responses = new ResponsesBuilder(responses).GetAsDictionary(defaultMediaType);

			return descriptor;
		}
	}
}

Fix issue where Security Scheme responses are not parsed correctly.


using System;
using UnityEngine;
using UnityEngine.Assertions;

namespace Alensia.Core.Common
{
    public enum Axis
    {
        X,
        Y,
        Z,
        InverseX,
        InverseY,
        InverseZ
    }

    public static class AxisExtensions
    {
        public static Vector3 Of(this Axis axis, Transform transform)
        {
            Assert.IsNotNull(transform, "transform != null");

            switch (axis)
            {
                case Axis.X:
                    return transform.right;
                case Axis.Y:
                    return transform.up;
                case Axis.Z:
                    return transform.forward;
                case Axis.InverseX:
                    return transform.right * -1;
                case Axis.InverseY:
                    return transform.up * -1;
                case Axis.InverseZ:
                    return transform.forward * -1;
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }

        public static Vector3 Direction(this Axis axis)
        {
            switch (axis)
            {
                case Axis.X:
                    return Vector3.right;
                case Axis.Y:
                    return Vector3.up;
                case Axis.Z:
                    return Vector3.forward;
                case Axis.InverseX:
                    return Vector3.right * -1;
                case Axis.InverseY:
                    return Vector3.up * -1;
                case Axis.InverseZ:
                    return Vector3.forward * -1;
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }
    }
}

using System;
using UnityEngine;
using UnityEngine.Assertions;

namespace Alensia.Core.Common
{
    public enum Axis
    {
        X,
        Y,
        Z,
        InverseX,
        InverseY,
        InverseZ
    }

    public static class AxisExtensions
    {
        public static Vector3 Of(this Axis axis, Transform transform)
        {
            Assert.IsNotNull(transform, "transform != null");

            switch (axis)
            {
                case Axis.X:
                    return transform.right;
                case Axis.Y:
                    return transform.up;
                case Axis.Z:
                    return transform.forward;
                case Axis.InverseX:
                    return transform.right * -1;
                case Axis.InverseY:
                    return transform.up * -1;
                case Axis.InverseZ:
                    return transform.forward * -1;
                default:
                    throw new ArgumentOutOfRangeException(nameof(axis));
            }
        }

        public static Vector3 Direction(this Axis axis)
        {
            switch (axis)
            {
                case Axis.X:
                    return Vector3.right;
                case Axis.Y:
                    return Vector3.up;
                case Axis.Z:
                    return Vector3.forward;
                case Axis.InverseX:
                    return Vector3.right * -1;
                case Axis.InverseY:
                    return Vector3.up * -1;
                case Axis.InverseZ:
                    return Vector3.forward * -1;
                default:
                    throw new ArgumentOutOfRangeException(nameof(axis));
            }
        }
    }
}

Use 'nameof' when throwing ArgumentOutOfRangeException


using BmpListener.MiscUtil.Conversion;
using System;
using System.Collections.Generic;
using System.Linq;

namespace BmpListener.Bgp
{
    public class PathAttributeMPUnreachNLRI : PathAttribute
    {
        public AddressFamily AFI { get; private set; }
        public SubsequentAddressFamily SAFI { get; private set; }
        public IList<IPAddrPrefix> WithdrawnRoutes { get; } = new List<IPAddrPrefix>();

        public override void Decode(byte[] data, int offset)
        {
            AFI = (AddressFamily)EndianBitConverter.Big.ToInt16(data, offset);
            SAFI = (SubsequentAddressFamily)data.ElementAt(offset + 2);

            for (var i = 3; i < Length;)
            {
                (IPAddrPrefix prefix, int byteLength) = IPAddrPrefix.Decode(data, offset + i, AFI);
                WithdrawnRoutes.Add(prefix);
                offset += byteLength;
                i += byteLength;
            }
        }
    }
}

using BmpListener.MiscUtil.Conversion;
using System;
using System.Collections.Generic;
using System.Linq;

namespace BmpListener.Bgp
{
    public class PathAttributeMPUnreachNLRI : PathAttribute
    {
        public AddressFamily AFI { get; private set; }
        public SubsequentAddressFamily SAFI { get; private set; }
        public IList<IPAddrPrefix> WithdrawnRoutes { get; } = new List<IPAddrPrefix>();

        public override void Decode(byte[] data, int offset)
        {
            AFI = (AddressFamily)EndianBitConverter.Big.ToInt16(data, offset);
            offset++;
            SAFI = (SubsequentAddressFamily)data.ElementAt(offset);
            offset++;

            for (var i = 3; i < Length;)
            {
                (IPAddrPrefix prefix, int byteLength) = IPAddrPrefix.Decode(data, offset + i, AFI);
                WithdrawnRoutes.Add(prefix);
                offset += byteLength;
                i += byteLength;
            }
        }
    }
}

Fix BGP Multipath withdraw decoding

Fix BGP Multipath withdraw decoding


using Xunit;

public class AcronymTest
{
    [Fact]
    public void Empty_string_abbreviated_to_empty_string()
    {
        Assert.Equal(string.Empty, Acronym.Abbreviate(string.Empty));
    }

    [Theory(Skip = "Remove to run test")]
    [InlineData("Portable Network Graphics", "PNG")]
    [InlineData("Ruby on Rails", "ROR")]
    [InlineData("HyperText Markup Language", "HTML")]
    [InlineData("First In, First Out", "FIFO")]
    [InlineData("PHP: Hypertext Preprocessor", "PHP")]
    [InlineData("Complementary metal-oxide semiconductor", "CMOS")]
    public void Phrase_abbreviated_to_acronym(string phrase, string expected)
    {
        Assert.Equal(expected, Acronym.Abbreviate(phrase));
    }
}

using Xunit;

public class AcronymTest
{
    [Fact]
    public void Basic()
    {
        Assert.Equal("PNG", Acronym.Abbreviate("Portable Network Graphics"));
    }

    [Fact(Skip = "Remove to run test")]
    public void Lowercase_words()
    {
        Assert.Equal("ROR", Acronym.Abbreviate("Ruby on Rails"));
    }

    [Fact(Skip = "Remove to run test")]
    public void Camelcase()
    {
        Assert.Equal("HTML", Acronym.Abbreviate("HyperText Markup Language"));
    }

    [Fact(Skip = "Remove to run test")]
    public void Punctuation()
    {
        Assert.Equal("FIFO", Acronym.Abbreviate("First In, First Out"));
    }

    [Fact(Skip = "Remove to run test")]
    public void All_caps_words()
    {
        Assert.Equal("PHP", Acronym.Abbreviate("PHP: Hypertext Preprocessor"));
    }

    [Fact(Skip = "Remove to run test")]
    public void NonAcronymAllCapsWord()
    {
        Assert.Equal("GIMP", Acronym.Abbreviate("GNU Image Manipulation Program"));
    }

    [Fact(Skip = "Remove to run test")]
    public void Hyphenated()
    {
        Assert.Equal("CMOS", Acronym.Abbreviate("Complementary metal-oxide semiconductor"));
    }
}

Replace Theory with multiple Fact tests

Replace Theory with multiple Fact tests

Refs #194


using System;

namespace Foundatio.Repositories.Elasticsearch.Configuration {
    public interface IChildIndexType : IIndexType {
        string ParentPath { get; }
    }

    public interface IChildIndexType<T> : IChildIndexType {
        string GetParentId(T document);
    }

    public class ChildIndexType<T> : IndexTypeBase<T>, IChildIndexType<T> where T : class {
        protected readonly Func<T, string> _getParentId;

        public ChildIndexType(string parentPath, Func<T, string> getParentId, string name = null, IIndex index = null): base(index, name) {
            if (_getParentId == null)
                throw new ArgumentNullException(nameof(getParentId));

            ParentPath = parentPath;
            _getParentId = getParentId;
        }

        public string ParentPath { get; }

        public virtual string GetParentId(T document) {
            return _getParentId(document);
        }
    }
}

using System;

namespace Foundatio.Repositories.Elasticsearch.Configuration {
    public interface IChildIndexType : IIndexType {
        string ParentPath { get; }
    }

    public interface IChildIndexType<T> : IChildIndexType {
        string GetParentId(T document);
    }

    public class ChildIndexType<T> : IndexTypeBase<T>, IChildIndexType<T> where T : class {
        protected readonly Func<T, string> _getParentId;

        public ChildIndexType(string parentPath, Func<T, string> getParentId, string name = null, IIndex index = null): base(index, name) {
            if (getParentId == null)
                throw new ArgumentNullException(nameof(getParentId));

            ParentPath = parentPath;
            _getParentId = getParentId;
        }

        public string ParentPath { get; }

        public virtual string GetParentId(T document) {
            return _getParentId(document);
        }
    }
}

Fix parent child index type

Fix parent child index type


using System;
using System.Collections.Generic;
using System.IO;
using OpenSage.Data;
using OpenSage.Data.Sav;
using OpenSage.Mods.Generals;
using Veldrid;
using Xunit;

namespace OpenSage.Tests.Data.Sav
{
    public class SaveFileTests
    {
        private static readonly string RootFolder = Path.Combine(Environment.CurrentDirectory, "Data", "Sav", "Assets");

        [Theory]
        [MemberData(nameof(GetSaveFiles))]
        public void CanLoadSaveFiles(string relativePath)
        {
            var rootFolder = InstalledFilesTestData.GetInstallationDirectory(SageGame.CncGenerals);
            var installation = new GameInstallation(new GeneralsDefinition(), rootFolder);

            Platform.Start();

            using (var game = new Game(installation, GraphicsBackend.Direct3D11))
            {
                var fullPath = Path.Combine(RootFolder, relativePath);
                using (var stream = File.OpenRead(fullPath))
                {
                    SaveFile.LoadFromStream(stream, game);
                }
            }

            Platform.Stop();
        }

        public static IEnumerable<object[]> GetSaveFiles()
        {
            foreach (var file in Directory.GetFiles(RootFolder, "*.sav", SearchOption.AllDirectories))
            {
                var relativePath = file.Substring(RootFolder.Length + 1);
                yield return new object[] { relativePath };
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.IO;
using OpenSage.Data;
using OpenSage.Data.Sav;
using OpenSage.Mods.Generals;
using Veldrid;
using Xunit;

namespace OpenSage.Tests.Data.Sav
{
    public class SaveFileTests
    {
        private static readonly string RootFolder = Path.Combine(Environment.CurrentDirectory, "Data", "Sav", "Assets");

        [Theory(Skip = "Not working yet")]
        [MemberData(nameof(GetSaveFiles))]
        public void CanLoadSaveFiles(string relativePath)
        {
            var rootFolder = InstalledFilesTestData.GetInstallationDirectory(SageGame.CncGenerals);
            var installation = new GameInstallation(new GeneralsDefinition(), rootFolder);

            Platform.Start();

            using (var game = new Game(installation, GraphicsBackend.Direct3D11))
            {
                var fullPath = Path.Combine(RootFolder, relativePath);
                using (var stream = File.OpenRead(fullPath))
                {
                    SaveFile.LoadFromStream(stream, game);
                }
            }

            Platform.Stop();
        }

        public static IEnumerable<object[]> GetSaveFiles()
        {
            foreach (var file in Directory.GetFiles(RootFolder, "*.sav", SearchOption.AllDirectories))
            {
                var relativePath = file.Substring(RootFolder.Length + 1);
                yield return new object[] { relativePath };
            }
        }
    }
}

Disable .sav tests for now

Disable .sav tests for now


using System.Linq;
using AutoMapper;
using IObjectMapper = Abp.ObjectMapping.IObjectMapper;

namespace Abp.AutoMapper
{
    public class AutoMapperObjectMapper : IObjectMapper
    {
        private readonly IMapper _mapper;

        public AutoMapperObjectMapper(IMapper mapper)
        {
            _mapper = mapper;
        }

        public TDestination Map<TDestination>(object source)
        {
            return _mapper.Map<TDestination>(source);
        }

        public TDestination Map<TSource, TDestination>(TSource source, TDestination destination)
        {
            return _mapper.Map(source, destination);
        }

        public IQueryable<TDestination> ProjectTo<TDestination>(IQueryable source)
        {
            return _mapper.ProjectTo<TDestination>(source);
        }
    }
}

using System.Linq;
using AutoMapper;
using IObjectMapper = Abp.ObjectMapping.IObjectMapper;

namespace Abp.AutoMapper
{
    public class AutoMapperObjectMapper : IObjectMapper
    {
        protected readonly IMapper _mapper;

        public AutoMapperObjectMapper(IMapper mapper)
        {
            _mapper = mapper;
        }

        public TDestination Map<TDestination>(object source)
        {
            return _mapper.Map<TDestination>(source);
        }

        public TDestination Map<TSource, TDestination>(TSource source, TDestination destination)
        {
            return _mapper.Map(source, destination);
        }

        public IQueryable<TDestination> ProjectTo<TDestination>(IQueryable source)
        {
            return _mapper.ProjectTo<TDestination>(source);
        }
    }
}

Change IMapper visibility from private to protected

In order to simply the extension of the AutoMapperObjectMapper, this proposal want to promote the IMapper attribute to protected.
This allows to extend the IObjectMapper without realizing a new version of Abp.

See #4882 and #4885


/*
    Copyright (c) 2017 Marcin Szeniak (https://github.com/Klocman/)
    Apache License Version 2.0
*/

using System;
using System.Diagnostics;
using System.IO;
using System.Text;

namespace BulkCrapUninstaller
{
    internal sealed class LogWriter : StreamWriter
    {
        public LogWriter(string path) : base(path, true, Encoding.UTF8)
        {
        }

        public static LogWriter StartLogging(string logPath)
        {
            try
            {
                // Limit log size to 100 kb
                var fileInfo = new FileInfo(logPath);
                if (fileInfo.Exists && fileInfo.Length > 1024 * 100)
                    fileInfo.Delete();

                // Create new log writer
                var logWriter = new LogWriter(logPath);

                // Make sure we can write to the file
                logWriter.WriteSeparator();
                logWriter.WriteLine("Application startup");
                logWriter.Flush();

                Console.SetOut(logWriter);
                Console.SetError(logWriter);
#if DEBUG
                Debug.Listeners.Add(new ConsoleTraceListener(false));
#endif
                return logWriter;
            }
            catch (Exception ex)
            {
                // Ignore logging errors
                Console.WriteLine(ex);
                return null;
            }
        }

        public void WriteSeparator()
        {
            base.WriteLine("--------------------------------------------------");
        }

        public override void WriteLine(string value)
        {
            value = DateTime.Now.ToLongTimeString() + " - " + value;
            base.WriteLine(value);
        }
    }
}

/*
    Copyright (c) 2017 Marcin Szeniak (https://github.com/Klocman/)
    Apache License Version 2.0
*/

using System;
using System.Diagnostics;
using System.IO;
using System.Text;

namespace BulkCrapUninstaller
{
    internal sealed class LogWriter : StreamWriter
    {
        public LogWriter(string path) : base(path, true, Encoding.UTF8)
        {
        }

        public static LogWriter StartLogging(string logPath)
        {
            try
            {
                // Limit log size to 100 kb
                var fileInfo = new FileInfo(logPath);
                if (fileInfo.Exists && fileInfo.Length > 1024 * 100)
                    fileInfo.Delete();

                // Create new log writer
                var logWriter = new LogWriter(logPath);

                // Make sure we can write to the file
                logWriter.WriteSeparator();
                logWriter.WriteLine("Application startup");
                logWriter.Flush();

                Console.SetOut(logWriter);
                Console.SetError(logWriter);
#if DEBUG
                Debug.Listeners.Add(new ConsoleTraceListener(false));
#endif
                return logWriter;
            }
            catch (Exception ex)
            {
                // Ignore logging errors
                Console.WriteLine(ex);
                return null;
            }
        }

        public void WriteSeparator()
        {
            base.WriteLine("--------------------------------------------------");
        }

        public override void WriteLine(string value)
        {
            value = DateTime.UtcNow.ToLongTimeString() + " - " + value;
            base.WriteLine(value);
        }
    }
}

Change log timestamps to utc for better performance


using System;
using WampSharp.Binding;
using WampSharp.Fleck;
using WampSharp.V2;
using WampSharp.V2.MetaApi;

namespace Adaptive.ReactiveTrader.MessageBroker
{
    public class MessageBroker : IDisposable
    {
        private WampHost _router;

        public void Dispose()
        {
            _router.Dispose();
        }

        public void Start()
        {
            _router = new WampHost();
            var jsonBinding = new JTokenJsonBinding();
            var msgPack = new JTokenMsgpackBinding();

            _router.RegisterTransport(new FleckWebSocketTransport("ws://127.0.0.1:8080/ws"), jsonBinding, msgPack);
            _router.Open();

            var realm = _router.RealmContainer.GetRealmByName("com.weareadaptive.reactivetrader");
            realm.HostMetaApiService();
        }
    }
}

using System;
using WampSharp.Binding;
using WampSharp.Fleck;
using WampSharp.V2;
using WampSharp.V2.MetaApi;

namespace Adaptive.ReactiveTrader.MessageBroker
{
    public class MessageBroker : IDisposable
    {
        private WampHost _router;

        public void Dispose()
        {
            _router.Dispose();
        }

        public void Start()
        {
            _router = new WampHost();
            var jsonBinding = new JTokenJsonBinding();
            var msgPack = new JTokenMsgpackBinding();

            _router.RegisterTransport(new FleckWebSocketTransport("ws://0.0.0.0:8080/ws"), jsonBinding, msgPack);
            _router.Open();

            var realm = _router.RealmContainer.GetRealmByName("com.weareadaptive.reactivetrader");
            realm.HostMetaApiService();
        }
    }
}

Test broker listens on all IPs

Test broker listens on all IPs


// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.Graphics;

namespace osu.Game.Overlays.Settings.Sections
{
    public class GraphicsSection : SettingsSection
    {
        public override LocalisableString Header => GraphicsSettingsStrings.GraphicsSectionHeader;

        public override Drawable CreateIcon() => new SpriteIcon
        {
            Icon = FontAwesome.Solid.Laptop
        };

        public GraphicsSection()
        {
            Children = new Drawable[]
            {
                new LayoutSettings(),
                new RendererSettings(),
                new ScreenshotSettings(),
                new VideoSettings(),
            };
        }
    }
}

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings.Sections.Graphics;

namespace osu.Game.Overlays.Settings.Sections
{
    public class GraphicsSection : SettingsSection
    {
        public override LocalisableString Header => GraphicsSettingsStrings.GraphicsSectionHeader;

        public override Drawable CreateIcon() => new SpriteIcon
        {
            Icon = FontAwesome.Solid.Laptop
        };

        public GraphicsSection()
        {
            Children = new Drawable[]
            {
                new LayoutSettings(),
                new RendererSettings(),
                new VideoSettings(),
                new ScreenshotSettings(),
            };
        }
    }
}

Reorder to have video settings next to renderer

Co-authored-by: Salman Ahmed <a7afa2b28823372a757eb860a4c7da8b68c3cb44@gmail.com>


// 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;

namespace osu.Game.Skinning
{
    public class UnsupportedSkinComponentException : Exception
    {
        public UnsupportedSkinComponentException(ISkinComponent component)
            : base($@"Unsupported component type: {component.GetType()}(""{component.LookupName}"").")
        {
        }
    }
}

// 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;

namespace osu.Game.Skinning
{
    public class UnsupportedSkinComponentException : Exception
    {
        public UnsupportedSkinComponentException(ISkinComponent component)
            : base($@"Unsupported component type: {component.GetType()} (lookup: ""{component.LookupName}"").")
        {
        }
    }
}

Add a touch more detail to the unsupported skin component exception


using ArcGIS.ServiceModel.Operation;
using System;
using System.Collections.Generic;

namespace ArcGIS.ServiceModel.Serializers.ServiceStackV3
{
    public class ServiceStackSerializer : ISerializer
    {
        static ISerializer _serializer = null;

        public static void Init()
        {
            _serializer = new ServiceStackSerializer();
            SerializerFactory.Get = (() => _serializer ?? new ServiceStackSerializer());
        }

        public ServiceStackSerializer()
        {
            ServiceStack.Text.JsConfig.EmitCamelCaseNames = true;
            ServiceStack.Text.JsConfig.IncludeTypeInfo = false;
            ServiceStack.Text.JsConfig.ConvertObjectTypesIntoStringDictionary = true;
            ServiceStack.Text.JsConfig.IncludeNullValues = false;
        }

        public Dictionary<String, String> AsDictionary<T>(T objectToConvert) where T : CommonParameters
        {
            return ServiceStack.Text.TypeSerializer.ToStringDictionary<T>(objectToConvert);
        }

        public T AsPortalResponse<T>(String dataToConvert) where T : IPortalResponse
        {
            return ServiceStack.Text.JsonSerializer.DeserializeFromString<T>(dataToConvert);
        }
    }
}

using ArcGIS.ServiceModel.Operation;
using System;
using System.Collections.Generic;

namespace ArcGIS.ServiceModel.Serializers
{
    public class ServiceStackSerializer : ISerializer
    {
        static ISerializer _serializer = null;

        public static void Init()
        {
            _serializer = new ServiceStackSerializer();
            SerializerFactory.Get = (() => _serializer ?? new ServiceStackSerializer());
        }

        public ServiceStackSerializer()
        {
            ServiceStack.Text.JsConfig.EmitCamelCaseNames = true;
            ServiceStack.Text.JsConfig.IncludeTypeInfo = false;
            ServiceStack.Text.JsConfig.ConvertObjectTypesIntoStringDictionary = true;
            ServiceStack.Text.JsConfig.IncludeNullValues = false;
        }

        public Dictionary<String, String> AsDictionary<T>(T objectToConvert) where T : CommonParameters
        {
            return ServiceStack.Text.TypeSerializer.ToStringDictionary<T>(objectToConvert);
        }

        public T AsPortalResponse<T>(String dataToConvert) where T : IPortalResponse
        {
            return ServiceStack.Text.JsonSerializer.DeserializeFromString<T>(dataToConvert);
        }
    }
}

Use same namespace for serializers

Use same namespace for serializers


using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Networking;

public class SubsystemManager : NetworkBehaviour
{
	private List<SubsystemBehaviour> systems = new List<SubsystemBehaviour>();
	private bool initialized;

	public override void OnStartServer()
	{
		systems = systems.OrderByDescending(s => s.Priority).ToList();

		Initialize();
	}

	private void Initialize()
	{
		for (int i = 0; i < systems.Count; i++)
		{
			systems[i].Initialize();
		}

		initialized = true;
	}

	public void Register(SubsystemBehaviour system)
	{
		systems.Add(system);
	}

	public void UpdateAt(Vector3Int position)
	{
		if (!initialized)
		{
			return;
		}

		for (int i = 0; i < systems.Count; i++)
		{
			systems[i].UpdateAt(position);
		}
	}
}

using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Networking;

public class SubsystemManager : NetworkBehaviour
{
	private List<SubsystemBehaviour> systems = new List<SubsystemBehaviour>();
	private bool initialized;

	private void Start()
	{
		if (isServer)
		{
			systems = systems.OrderByDescending(s => s.Priority).ToList();
			Initialize();
		}
	}

	private void Initialize()
	{
		for (int i = 0; i < systems.Count; i++)
		{
			systems[i].Initialize();
		}

		initialized = true;
	}

	public void Register(SubsystemBehaviour system)
	{
		systems.Add(system);
	}

	public void UpdateAt(Vector3Int position)
	{
		if (!initialized)
		{
			return;
		}

		for (int i = 0; i < systems.Count; i++)
		{
			systems[i].UpdateAt(position);
		}
	}
}

Change Subsystem Init to Start() instead of StartOnServer(), otherwise Cross-matrices might not work correctly due to somethings not being initialized yet.


using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.SignalR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Ordering.SignalrHub
{
    [Authorize]
    public class NotificationsHub : Hub
    {

        public override async Task OnConnectedAsync()
        {
            await Groups.AddToGroupAsync(Context.ConnectionId, Context.User.Identity.Name);
            await base.OnConnectedAsync();
        }

        public override async Task OnDisconnectedAsync(Exception ex)
        {
            await Groups.AddToGroupAsync(Context.ConnectionId, Context.User.Identity.Name);
            await base.OnDisconnectedAsync(ex);
        }
    }
}

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.SignalR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Ordering.SignalrHub
{
    [Authorize]
    public class NotificationsHub : Hub
    {

        public override async Task OnConnectedAsync()
        {
            await Groups.AddToGroupAsync(Context.ConnectionId, Context.User.Identity.Name);
            await base.OnConnectedAsync();
        }

        public override async Task OnDisconnectedAsync(Exception ex)
        {
            await Groups.RemoveFromGroupAsync(Context.ConnectionId, Context.User.Identity.Name);
            await base.OnDisconnectedAsync(ex);
        }
    }
}

Fix method name in OnDisconnectAsync

Fix method name in OnDisconnectAsync


// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Collections.Generic;
using System.Linq;
using osu.Framework.Extensions;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Scoring;

namespace osu.Game.Overlays.BeatmapListing
{
    public class BeatmapSearchScoreFilterRow : BeatmapSearchMultipleSelectionFilterRow<ScoreRank>
    {
        public BeatmapSearchScoreFilterRow()
            : base(BeatmapsStrings.ListingSearchFiltersRank)
        {
        }

        protected override MultipleSelectionFilter CreateMultipleSelectionFilter() => new RankFilter();

        private class RankFilter : MultipleSelectionFilter
        {
            protected override MultipleSelectionFilterTabItem CreateTabItem(ScoreRank value) => new RankItem(value);

            protected override IEnumerable<ScoreRank> GetValues() => base.GetValues().Reverse();
        }

        private class RankItem : MultipleSelectionFilterTabItem
        {
            public RankItem(ScoreRank value)
                : base(value)
            {
            }

            protected override LocalisableString LabelFor(ScoreRank value) => value.GetLocalisableDescription();
        }
    }
}

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Collections.Generic;
using System.Linq;
using osu.Framework.Extensions;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Scoring;

namespace osu.Game.Overlays.BeatmapListing
{
    public class BeatmapSearchScoreFilterRow : BeatmapSearchMultipleSelectionFilterRow<ScoreRank>
    {
        public BeatmapSearchScoreFilterRow()
            : base(BeatmapsStrings.ListingSearchFiltersRank)
        {
        }

        protected override MultipleSelectionFilter CreateMultipleSelectionFilter() => new RankFilter();

        private class RankFilter : MultipleSelectionFilter
        {
            protected override MultipleSelectionFilterTabItem CreateTabItem(ScoreRank value) => new RankItem(value);

            protected override IEnumerable<ScoreRank> GetValues() => base.GetValues().Where(r => r > ScoreRank.F).Reverse();
        }

        private class RankItem : MultipleSelectionFilterTabItem
        {
            public RankItem(ScoreRank value)
                : base(value)
            {
            }

            protected override LocalisableString LabelFor(ScoreRank value) => value.GetLocalisableDescription();
        }
    }
}

Hide F rank from beatmap overlay

Hide F rank from beatmap overlay


// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.

using System;
using Perspex.Win32.Interop;

namespace Perspex.Win32
{
    public class EmbeddedWindowImpl : WindowImpl
    {
        private static readonly System.Windows.Forms.UserControl WinFormsControl = new System.Windows.Forms.UserControl();

        public IntPtr Handle { get; private set; }

        protected override IntPtr CreateWindowOverride(ushort atom)
        {
            var hWnd = UnmanagedMethods.CreateWindowEx(
                0,
                atom,
                null,
                (int)UnmanagedMethods.WindowStyles.WS_CHILD,
                UnmanagedMethods.CW_USEDEFAULT,
                UnmanagedMethods.CW_USEDEFAULT,
                UnmanagedMethods.CW_USEDEFAULT,
                UnmanagedMethods.CW_USEDEFAULT,
                WinFormsControl.Handle,
                IntPtr.Zero,
                IntPtr.Zero,
                IntPtr.Zero);
            Handle = hWnd;
            return hWnd;
        }
    }
}

// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.

using System;
using Perspex.Win32.Interop;

namespace Perspex.Win32
{
    public class EmbeddedWindowImpl : WindowImpl
    {
        private static readonly System.Windows.Forms.UserControl WinFormsControl = new System.Windows.Forms.UserControl();

        public IntPtr Handle { get; private set; }

        protected override IntPtr CreateWindowOverride(ushort atom)
        {
            var hWnd = UnmanagedMethods.CreateWindowEx(
                0,
                atom,
                null,
                (int)UnmanagedMethods.WindowStyles.WS_CHILD,
                0,
                0,
                640,
                480,
                WinFormsControl.Handle,
                IntPtr.Zero,
                IntPtr.Zero,
                IntPtr.Zero);
            Handle = hWnd;
            return hWnd;
        }
    }
}

Use predefined default size for embedded windows


@model IEnumerable<MMLibrarySystem.Models.BorrowRecord>

@{
    ViewBag.Title = "Borrowed Books";
}

            Book Number

            Title

            Borrowed By

            Borrowed Start From

            State

            Operation

    @{
        foreach (var item in Model)
        {

            @item.Book.BookNumber

            @item.Book.BookType.Title

            @item.User.DisplayName

            @item.BorrowedDate

            @(item.IsCheckedOut ? "Checked Out" : "Borrow Accepted")

                @{
            if (item.IsCheckedOut)
            {
                    @Html.ActionLink("Return", "Return", "Admin", new { borrowId = @item.BorrowRecordId }, new { onclick = "return confirm('Are you sure to return this book?')" })
            }
            else
            {
                    @Html.ActionLink("Check Out", "CheckOut", "Admin", new { borrowId = @item.BorrowRecordId }, null)
            }
                }

      }
    }

@model IEnumerable<MMLibrarySystem.Models.BorrowRecord>

@{
    ViewBag.Title = "Borrowed Books";
}

            Book Number

            Title

            Borrowed By

            Borrowed Start From

            Return Data

            State

            Operation

    @{
        foreach (var item in Model)
        {

            @item.Book.BookNumber

            @item.Book.BookType.Title

            @item.User.DisplayName

            @item.BorrowedDate.ToShortDateString()

            @item.BorrowedDate.AddDays(31).ToShortDateString()

            @(item.IsCheckedOut ? "Checked Out" : "Borrow Accepted")

                @{
            if (item.IsCheckedOut)
            {
                    @Html.ActionLink("Return", "Return", "Admin", new { borrowId = @item.BorrowRecordId }, new { onclick = "return confirm('Are you sure to return this book?')" })
            }
            else
            {
                    @Html.ActionLink("Check Out", "CheckOut", "Admin", new { borrowId = @item.BorrowRecordId }, null)
            }
                }

      }
    }

Add the return date, and change the long time string to short date string.


using System;

namespace Hangman {
  public class Table {
    public int Width;
    public int Spacing;
    public Row[] Rows;

    public Table(int width, int spacing, Row[] rows) {
      Width = width;
      Spacing = spacing;
      Rows = rows;
    }

    public string Draw() {
      return "Hello World";
    }
  }
}

using System;
using System.Collections.Generic;
using System.Text;

namespace Hangman {
  public class Table {
    public int Width;
    public int Spacing;
    public Row[] Rows;

    public Table(int width, int spacing, Row[] rows) {
      Width = width;
      Spacing = spacing;
      Rows = rows;
    }

    public string Draw() {
      List<string> rowTexts = new List<string>();
      foreach (var row in Rows) {
        rowTexts.Add(row.Text);
      }
      return String.Join("\n", rowTexts);
    }
  }
}

Print the texts of each row

Print the texts of each row


using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace DesktopWidgets.WidgetBase.Settings
{
    public class WidgetClockSettingsBase : WidgetSettingsBase
    {
        [Category("General")]
        [DisplayName("Refresh Interval")]
        public int UpdateInterval { get; set; }

        [Category("Style")]
        [DisplayName("Time Format")]
        public List<string> DateTimeFormat { get; set; }

        [Category("General")]
        [DisplayName("Time Offset")]
        public TimeSpan TimeOffset { get; set; }

        public override void SetDefaults()
        {
            base.SetDefaults();
            UpdateInterval = -1;
            DateTimeFormat = new List<string> {"{hh}:{mm} {tt}"};
            TimeOffset = TimeSpan.FromHours(0);
        }
    }
}

using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace DesktopWidgets.WidgetBase.Settings
{
    public class WidgetClockSettingsBase : WidgetSettingsBase
    {
        [Category("General")]
        [DisplayName("Refresh Interval")]
        public int UpdateInterval { get; set; }

        [Category("Style")]
        [DisplayName("Time Format")]
        public List<string> DateTimeFormat { get; set; }

        [Category("General")]
        [DisplayName("Time Offset")]
        public TimeSpan TimeOffset { get; set; }

        public override void SetDefaults()
        {
            base.SetDefaults();
            UpdateInterval = -1;
            DateTimeFormat = new List<string> {"{hh}:{mm} {tt}"};
            TimeOffset = TimeSpan.FromHours(0);

            FontSize = 24;
        }
    }
}

Change clock widgets "Font Size" default value


using Xunit;

// This is a work-around for #11.
// https://github.com/CXuesong/WikiClientLibrary/issues/11
[assembly:CollectionBehavior(DisableTestParallelization = true)]

using Xunit;

// This is a work-around for #11.
// https://github.com/CXuesong/WikiClientLibrary/issues/11
// We are using Bot Password on CI, which may naturally evade the issue.
#if ENV_CI_BUILD
[assembly:CollectionBehavior(DisableTestParallelization = true)]
#endif

Remove DisableTestParallelization on CI due to the same reason.


using System;
using System.Threading.Tasks;
using AutoMapper;
using Diploms.Core;
using Diploms.Dto;
using Diploms.Dto.Departments;

namespace Diploms.Services.Departments
{
    public class DepartmentsService
    {
        private readonly IRepository<Department> _repository;
        private readonly IMapper _mapper;

        public DepartmentsService(IRepository<Department> repository, IMapper mapper)
        {
            _repository = repository ?? throw new System.ArgumentNullException(nameof(repository));
            _mapper = mapper ?? throw new System.ArgumentNullException(nameof(mapper));
        }

        public async Task<OperationResult> Add(DepartmentEditDto model)
        {
            var result = new OperationResult();

            try
            {
                var department  = _mapper.Map<Department>(model);
                department.CreateDate = DateTime.UtcNow;
                _repository.Add(department);

                await _repository.SaveChanges();
            }
            catch(Exception e)
            {
                result.Errors.Add(e.Message);
            }

            return result;
        }

        public async Task<OperationResult> Edit(DepartmentEditDto model)
        {
            var result = new OperationResult();

            try
            {
                var department  = _mapper.Map<Department>(model);
                department.ChangeDate = DateTime.UtcNow;
                _repository.Update(department);

                await _repository.SaveChanges();
            }
            catch(Exception e)
            {
                result.Errors.Add(e.Message);
            }

            return result;
        }
    }
}

using System;
using System.Threading.Tasks;
using AutoMapper;
using Diploms.Core;
using Diploms.Dto;
using Diploms.Dto.Departments;

namespace Diploms.Services.Departments
{
    public class DepartmentsService : CrudService<Department, DepartmentEditDto, DepartmentEditDto, DepartmentEditDto>
    {
        public DepartmentsService(IRepository<Department> repository, IMapper mapper) : base(repository, mapper)
        {
        }
    }
}

Modify DepartmentService to use new CrudService


using System.Web.Mvc;
using System.Web.Security;
using N2.Templates.Mvc.Models.Parts;
using N2.Templates.Mvc.Models;
using N2.Web;

namespace N2.Templates.Mvc.Controllers
{
	[Controls(typeof(LoginItem))]
	public class LoginController : TemplatesControllerBase<LoginItem>
	{
		public override ActionResult Index()
		{
			var model = new LoginModel(CurrentItem)
			            	{
			            		LoggedIn = User.Identity.IsAuthenticated
			            	};

			return View(model);
		}

		public ActionResult Login(string userName, string password, bool? remember)
		{
			if(Membership.ValidateUser(userName, password)
				|| FormsAuthentication.Authenticate(userName, password))
			{
				FormsAuthentication.SetAuthCookie(userName, remember ?? false);
				return RedirectToParentPage();
			}
			else
			{
				ModelState.AddModelError("Login.Failed", CurrentItem.FailureText);
			}
			return ViewParentPage();
		}

		public ActionResult Logout()
		{
			FormsAuthentication.SignOut();

			return RedirectToParentPage();
		}
	}
}

using System.Web.Mvc;
using System.Web.Security;
using N2.Templates.Mvc.Models.Parts;
using N2.Templates.Mvc.Models;
using N2.Web;

namespace N2.Templates.Mvc.Controllers
{
	[Controls(typeof(LoginItem))]
	public class LoginController : TemplatesControllerBase<LoginItem>
	{
		public override ActionResult Index()
		{
			var model = new LoginModel(CurrentItem)
			            	{
			            		LoggedIn = User.Identity.IsAuthenticated
			            	};

			return View(model);
		}

		public ActionResult Login(string userName, string password, bool? remember)
		{
			if(Membership.ValidateUser(userName, password)
				|| FormsAuthentication.Authenticate(userName, password))
			{
				FormsAuthentication.SetAuthCookie(userName, remember ?? false);

				if (string.IsNullOrEmpty(Request["returnUrl"]))
					return RedirectToParentPage();
				else
					return Redirect(Request["returnUrl"]);
			}
			else
			{
				ModelState.AddModelError("Login.Failed", CurrentItem.FailureText);
			}
			return ViewParentPage();
		}

		public ActionResult Logout()
		{
			FormsAuthentication.SignOut();

			return RedirectToParentPage();
		}
	}
}

Allow redirect to returnUrl from login part


using UnityEngine;
using System.Collections;

public class Projectile : MonoBehaviour
{

    public float damage = 10;
    public float speed = 30;
    public Vector3 direction;

    // Use this for initialization
    void Start()
    {
        direction = direction.normalized * speed;
    }

    // Update is called once per frame
    void Update()
    {
        transform.Translate(direction.normalized * speed * Time.deltaTime);
    }

    void OnTriggerEnter(Collider other)
    {
        if (other.GetComponent<Enemy>() != null && other.GetComponent<Rigidbody>() != null)
        {
            other.GetComponent<Enemy>().Damage(damage);
            other.GetComponent<Rigidbody>().AddForce(direction.normalized * 200);
        }
        if (other.GetComponent<PlayerController>() == null)
        {
            GameObject.Destroy(this.gameObject);
        }
    }
}

using UnityEngine;
using System.Collections;

public class Projectile : MonoBehaviour
{

    public float lifetime = 2;
    private float age = 0;
    public float damage = 10;
    public float speed = 30;
    public Vector3 direction;

    // Use this for initialization
    void Start()
    {
        direction = direction.normalized * speed;
    }

    // Update is called once per frame
    void Update()
    {
        age += Time.deltaTime;
        if (age > lifetime)
        {
            Destroy(this.gameObject);
        }
        transform.Translate(direction.normalized * speed * Time.deltaTime);
    }

    void OnTriggerEnter(Collider other)
    {
        if (other.GetComponent<Enemy>() != null && other.GetComponent<Rigidbody>() != null)
        {
            other.GetComponent<Enemy>().Damage(damage);
            other.GetComponent<Rigidbody>().AddForce(direction.normalized * 200);
        }
        if (other.GetComponent<PlayerController>() == null)
        {
            GameObject.Destroy(this.gameObject);
        }
    }
}

Kill projectiles after 2 seconds

Kill projectiles after 2 seconds


// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details

using System;
//using GLib;
//using Gtk;
using NDesk.DBus;
using NDesk.GLib;
using org.freedesktop.DBus;

namespace NDesk.DBus
{
	//FIXME: this API needs review and de-unixification. It is horrid, but gets the job done.
	public static class BusG
	{
		static bool SystemDispatch (IOChannel source, IOCondition condition, IntPtr data)
		{
			Bus.System.Iterate ();
			return true;
		}

		static bool SessionDispatch (IOChannel source, IOCondition condition, IntPtr data)
		{
			Bus.Session.Iterate ();
			return true;
		}

		static bool initialized = false;
		public static void Init ()
		{
			if (initialized)
				return;

			Init (Bus.System, SystemDispatch);
			Init (Bus.Session, SessionDispatch);

			initialized = true;
		}

		public static void Init (Connection conn, IOFunc dispatchHandler)
		{
			IOChannel channel = new IOChannel ((int)conn.Transport.SocketHandle);
			IO.AddWatch (channel, IOCondition.In, dispatchHandler);
		}

		//TODO: add public API to watch an arbitrary connection
	}
}

// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details

using System;
//using GLib;
//using Gtk;
using NDesk.DBus;
using NDesk.GLib;
using org.freedesktop.DBus;

namespace NDesk.DBus
{
	//FIXME: this API needs review and de-unixification. It is horrid, but gets the job done.
	public static class BusG
	{
		static bool initialized = false;
		public static void Init ()
		{
			if (initialized)
				return;

			Init (Bus.System);
			Init (Bus.Session);
			//TODO: consider starter bus?

			initialized = true;
		}

		public static void Init (Connection conn)
		{
			IOFunc dispatchHandler = delegate (IOChannel source, IOCondition condition, IntPtr data) {
				conn.Iterate ();
				return true;
			};

			Init (conn, dispatchHandler);
		}

		public static void Init (Connection conn, IOFunc dispatchHandler)
		{
			IOChannel channel = new IOChannel ((int)conn.Transport.SocketHandle);
			IO.AddWatch (channel, IOCondition.In, dispatchHandler);
		}
	}
}

Support watching of arbitrary connections


// Copyright © 2010-2014 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.

namespace CefSharp
{
    public interface ILifeSpanHandler
    {
        bool OnBeforePopup(IWebBrowser browser, string sourceUrl, string targetUrl, ref int x, ref int y, ref int width, ref int height);
        void OnBeforeClose(IWebBrowser browser);
    }
}

// Copyright © 2010-2014 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.

namespace CefSharp
{
    public interface ILifeSpanHandler
    {
        /// <summary>
        /// Called before a popup window is created.
        /// </summary>
        /// <param name="browser">The IWebBrowser control this request is for.</param>
        /// <param name="sourceUrl">The URL of the HTML frame that launched this popup.</param>
        /// <param name="targetUrl">The URL of the popup content. (This may be empty/null)</param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <returns></returns>
        /// <remarks>
        /// CEF documentation:
        ///
        /// Called on the IO thread before a new popup window is created. The |browser|
        /// and |frame| parameters represent the source of the popup request. The
        /// |target_url| and |target_frame_name| values may be empty if none were
        /// specified with the request. The |popupFeatures| structure contains
        /// information about the requested popup window. To allow creation of the
        /// popup window optionally modify |windowInfo|, |client|, |settings| and
        /// |no_javascript_access| and return false. To cancel creation of the popup
        /// window return true. The |client| and |settings| values will default to the
        /// source browser's values. The |no_javascript_access| value indicates whether
        /// the new browser window should be scriptable and in the same process as the
        /// source browser.
        /// </remarks>
        bool OnBeforePopup(IWebBrowser browser, string sourceUrl, string targetUrl, ref int x, ref int y, ref int width, ref int height);

        /// <summary>
        /// Called before a CefBrowser window (either the main browser for IWebBrowser,
        /// or one of its children)
        /// </summary>
        /// <param name="browser"></param>
        void OnBeforeClose(IWebBrowser browser);
    }
}

Paste in some more CEF docs.

Paste in some more CEF docs.


namespace TweetDick.Core.Controls {
    partial class FlatProgressBar {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing) {
            brush.Dispose();

            if (disposing && (components != null)) {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent() {
            components = new System.ComponentModel.Container();
        }

        #endregion
    }
}

namespace TweetDick.Core.Controls {
    partial class FlatProgressBar {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing) {
            if (brush != null)brush.Dispose();

            if (disposing && (components != null)) {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent() {
            components = new System.ComponentModel.Container();
        }

        #endregion
    }
}

Add a null check to FlatProgressBar.brush


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("GoogleMeasurementProtocol")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GoogleMeasurementProtocol")]
[assembly: AssemblyCopyright("Copyright ©  2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("64a833e9-803e-4d51-8820-ac631ff2c9a5")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.5.0")]
[assembly: AssemblyFileVersion("1.3.5.0")]

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("GoogleMeasurementProtocol")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GoogleMeasurementProtocol")]
[assembly: AssemblyCopyright("Copyright ©  2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("64a833e9-803e-4d51-8820-ac631ff2c9a5")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.6.0")]
[assembly: AssemblyFileVersion("1.3.6.0")]

Update library version to 1.3.6

Update library version to 1.3.6


// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Tests.Visual;
using osuTK;

namespace osu.Game.Rulesets.Osu.Tests
{
    [TestFixture]
    public class TestSceneHitCircleLongCombo : PlayerTestScene
    {
        public TestSceneHitCircleLongCombo()
            : base(new OsuRuleset())
        {
        }

        protected override IBeatmap CreateBeatmap(RulesetInfo ruleset)
        {
            var beatmap = new Beatmap
            {
                BeatmapInfo = new BeatmapInfo
                {
                    BaseDifficulty = new BeatmapDifficulty { CircleSize = 6 },
                    Ruleset = ruleset
                }
            };

            for (int i = 0; i < 512; i++)
                beatmap.HitObjects.Add(new HitCircle { Position = new Vector2(256, 192), StartTime = i * 100 });

            return beatmap;
        }
    }
}

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Tests.Visual;
using osuTK;

namespace osu.Game.Rulesets.Osu.Tests
{
    [TestFixture]
    public class TestSceneHitCircleLongCombo : PlayerTestScene
    {
        public TestSceneHitCircleLongCombo()
            : base(new OsuRuleset())
        {
        }

        protected override IBeatmap CreateBeatmap(RulesetInfo ruleset)
        {
            var beatmap = new Beatmap
            {
                BeatmapInfo = new BeatmapInfo
                {
                    BaseDifficulty = new BeatmapDifficulty { CircleSize = 6 },
                    Ruleset = ruleset
                }
            };

            for (int i = 0; i < 512; i++)
                if (i % 32 < 20)
                    beatmap.HitObjects.Add(new HitCircle { Position = new Vector2(256, 192), StartTime = i * 100 });

            return beatmap;
        }
    }
}

Fix HitCircleLongCombo test stacking off-screen


using System;
using System.Text.RegularExpressions;

namespace KillrVideo.Host.Config
{
    /// <summary>
    /// Gets configuration values from environment variables.
    /// </summary>
    public class EnvironmentConfigurationSource : IHostConfigurationSource
    {
        private static readonly Regex MatchCaps = new Regex("[ABCDEFGHIJKLMNOPQRSTUVWXYZ]", RegexOptions.Singleline | RegexOptions.Compiled);

        public string GetConfigurationValue(string key)
        {
            key = ConfigKeyToEnvironmentVariableName(key);
            return Environment.GetEnvironmentVariable(key);
        }

        /// <summary>
        /// Utility method to convert a config key to an approriate environment variable name.
        /// </summary>
        private static string ConfigKeyToEnvironmentVariableName(string key)
        {
            key = MatchCaps.Replace(key, match => match.Index == 0 ? match.Value : $"_{match.Value}");
            return $"KILLRVIDEO_{key.ToUpperInvariant()}";
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace KillrVideo.Host.Config
{
    /// <summary>
    /// Gets configuration values from command line args and environment variables.
    /// </summary>
    public class EnvironmentConfigurationSource : IHostConfigurationSource
    {
        private static readonly Regex MatchCaps = new Regex("[ABCDEFGHIJKLMNOPQRSTUVWXYZ]", RegexOptions.Singleline | RegexOptions.Compiled);
        private readonly Lazy<IDictionary<string, string>> _commandLineArgs;

        public EnvironmentConfigurationSource()
        {
            _commandLineArgs = new Lazy<IDictionary<string,string>>(ParseCommandLineArgs);
        }

        public string GetConfigurationValue(string key)
        {
            // See if command line had it
            string val;
            if (_commandLineArgs.Value.TryGetValue(key, out val))
                return val;

            // See if environment variables have it
            key = ConfigKeyToEnvironmentVariableName(key);
            return Environment.GetEnvironmentVariable(key);
        }

        private static IDictionary<string, string> ParseCommandLineArgs()
        {
            var results = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

            // Get command line args but skip the first one which will be the process/executable name
            string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray();

            string argName = null;
            foreach (string arg in args)
            {
                // Do we have an argument?
                if (arg.StartsWith("-"))
                {
                    // If we currently have an argName, assume it was a switch and just add TrueString as the value
                    if (argName != null)
                        results.Add(argName, bool.TrueString);

                    argName = arg.TrimStart('-');
                    continue;
                }

                // Do we have an argument that doesn't have a previous arg name?
                if (argName == null)
                    throw new InvalidOperationException($"Unknown command line argument {arg}");

                // Add argument value under previously parsed arg name
                results.Add(argName, arg);
                argName = null;
            }

            return results;
        }

        /// <summary>
        /// Utility method to convert a config key to an approriate environment variable name.
        /// </summary>
        private static string ConfigKeyToEnvironmentVariableName(string key)
        {
            key = MatchCaps.Replace(key, match => match.Index == 0 ? match.Value : $"_{match.Value}");
            return $"KILLRVIDEO_{key.ToUpperInvariant()}";
        }
    }
}

Add support for command line arguments to configuration


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Harlow
{
    public class VectorPoint : VectorFeature
    {
        public VectorPoint(int numOfPoints, ShapeType shapeType) :
            base (numOfPoints, shapeType)
        {
            if (shapeType != ShapeType.Point)
            {
                Bbox = new double[4];
            }

            this.Coordinates = new double[numOfPoints];
            this.Properties = new Dictionary<string, string>();
        }

        /// <summary>
        /// All of the points that make up the vector feature.
        /// Points don't have segments
        /// </summary>
        new public double[] Coordinates { get; set; }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Harlow
{
    public class VectorPoint : VectorFeature
    {
        public VectorPoint(int numOfPoints, ShapeType shapeType) :
            base (numOfPoints, shapeType)
        {
            this.Coordinates = new double[numOfPoints];
            this.Properties = new Dictionary<string, string>();
        }

        /// <summary>
        /// All of the points that make up the vector feature.
        /// Points don't have segments
        /// </summary>
        new public double[] Coordinates { get; set; }
    }
}

Remove unnecessary point type check

Remove unnecessary point type check


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("MonoGameUtils")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MonoGameUtils")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4ecedc75-1f2d-4915-9efe-368a5d104e41")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.5.0")]
[assembly: AssemblyFileVersion("1.0.5.0")]

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("MonoGameUtils")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MonoGameUtils")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4ecedc75-1f2d-4915-9efe-368a5d104e41")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.6.0")]
[assembly: AssemblyFileVersion("1.0.6.0")]

Increment assembly version for new Nuget build.


// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;

namespace osu.Game.Overlays.BeatmapSet
{
    public class ExplicitBeatmapPill : CompositeDrawable
    {
        public ExplicitBeatmapPill()
        {
            AutoSizeAxes = Axes.Both;
        }

        [BackgroundDependencyLoader(true)]
        private void load(OsuColour colours, OverlayColourProvider colourProvider)
        {
            InternalChild = new CircularContainer
            {
                Masking = true,
                AutoSizeAxes = Axes.Both,
                Children = new Drawable[]
                {
                    new Box
                    {
                        RelativeSizeAxes = Axes.Both,
                        Colour = colourProvider?.Background5 ?? colours.Gray2,
                    },
                    new OsuSpriteText
                    {
                        Margin = new MarginPadding { Horizontal = 10f, Vertical = 2f },
                        Text = "EXPLICIT",
                        Font = OsuFont.GetFont(size: 10, weight: FontWeight.Bold),
                        Colour = OverlayColourProvider.Orange.Colour2,
                    }
                }
            };
        }
    }
}

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;

namespace osu.Game.Overlays.BeatmapSet
{
    public class ExplicitBeatmapPill : CompositeDrawable
    {
        public ExplicitBeatmapPill()
        {
            AutoSizeAxes = Axes.Both;
        }

        [BackgroundDependencyLoader(true)]
        private void load(OsuColour colours, OverlayColourProvider colourProvider)
        {
            InternalChild = new CircularContainer
            {
                Masking = true,
                AutoSizeAxes = Axes.Both,
                Children = new Drawable[]
                {
                    new Box
                    {
                        RelativeSizeAxes = Axes.Both,
                        Colour = colourProvider?.Background5 ?? colours.Gray2,
                    },
                    new OsuSpriteText
                    {
                        Margin = new MarginPadding { Horizontal = 10f, Vertical = 2f },
                        Text = "EXPLICIT",
                        Font = OsuFont.GetFont(size: 10, weight: FontWeight.SemiBold),
                        Colour = OverlayColourProvider.Orange.Colour2,
                    }
                }
            };
        }
    }
}

Make explicit marker font semi-bold

Make explicit marker font semi-bold


using System;
using System.Collections.Generic;
using System.IO;
using System.Net;

namespace PlaylistGrabber
{
    public class Downloader
    {
        public string State { get; private set; }

        public int DownloadedFiles { get; private set; }

        public int TotalFiles { get; private set; }

        public void DownloadFiles(List<Uri> uris)
        {
            TotalFiles = uris.Count;
            foreach (var uri in uris)
            {
                DownloadFile(uri);
                DownloadedFiles++;
            }
        }

        private void DownloadFile(Uri uri)
        {
            State = $"Downloading {uri} ...";

            var webClient = new WebClient();
            var destinationPath = GetDestinationPath(uri);
            webClient.DownloadFile(uri, destinationPath);
        }

        private static string GetDestinationPath(Uri uri)
        {
            var parts = uri.ToString().Split('/');
            var directoryName = parts[parts.Length - 2];
            var fileName = parts[parts.Length - 1];

            string destinationDirectory = $@"Z:\Downloads\{directoryName}";

            // only creates dir if it doesn't already exist
            Directory.CreateDirectory(destinationDirectory);

            string destinationPath = $@"{destinationDirectory}\{fileName}";

            if (File.Exists(destinationPath))
            {
                File.Delete(destinationPath);
            }

            return destinationPath;
        }
    }
}

using System;
using System.Collections.Generic;
using System.IO;
using System.Net;

namespace PlaylistGrabber
{
    public class Downloader
    {
        public string State { get; private set; }

        public int DownloadedFiles { get; private set; }

        public int TotalFiles { get; private set; }

        public void DownloadFiles(List<Uri> uris)
        {
            TotalFiles = uris.Count;
            foreach (var uri in uris)
            {
                DownloadFile(uri);
                DownloadedFiles++;
            }
        }

        private void DownloadFile(Uri uri)
        {
            State = $"Downloading {uri} ...";

            var webClient = new WebClient();
            var destinationPath = GetDestinationPath(uri);
            webClient.DownloadFile(uri, destinationPath);
        }

        private static string GetDestinationPath(Uri uri)
        {
            var parts = uri.ToString().Split('/');
            var directoryName = parts[^2];
            var fileName = parts[^1];

            string destinationDirectory = $@"Z:\Downloads\{directoryName}";

            // only creates dir if it doesn't already exist
            Directory.CreateDirectory(destinationDirectory);

            string destinationPath = $@"{destinationDirectory}\{fileName}";

            if (File.Exists(destinationPath))
            {
                File.Delete(destinationPath);
            }

            return destinationPath;
        }
    }
}

Use new array indexing syntax

Use new array indexing syntax


// 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 Microsoft.AspNetCore.E2ETesting;
using Microsoft.AspNetCore.Testing;
using Templates.Test.Helpers;
using Xunit;

[assembly: TestFramework("Microsoft.AspNetCore.E2ETesting.XunitTestFrameworkWithAssemblyFixture", "ProjectTemplates.Tests")]

[assembly: Microsoft.AspNetCore.E2ETesting.AssemblyFixture(typeof(ProjectFactoryFixture))]
[assembly: Microsoft.AspNetCore.E2ETesting.AssemblyFixture(typeof(SeleniumStandaloneServer))]

[assembly: QuarantinedTest("Investigation pending in https://github.com/dotnet/aspnetcore/issues/21748")]

Revert "Quarantine all ProjectTemplate tests until dotnet new lock issue is resolved."

This reverts commit 9a5d3c7640de12d8f7ecba53e9e49433a4d47588.


using System.Threading;
using System.Threading.Tasks;
using MatterHackers.Agg.UI;
using NUnit.Framework;

namespace MatterHackers.MatterControl.Tests.Automation
{
	[TestFixture, Category("MatterControl.UI.Automation"), RunInApplicationDomain]
	public class ShowTerminalButtonClickedOpensTerminal
	{
		[Test, Apartment(ApartmentState.STA)]
		public async Task ClickingShowTerminalButtonOpensTerminal()
		{
			await MatterControlUtilities.RunTest((testRunner) =>
			{
				testRunner.CloseSignInAndPrinterSelect();

				Assert.IsFalse(testRunner.WaitForName("TerminalWidget", 0.5), "Terminal Window should not exist");

				testRunner.ClickByName("Terminal Sidebar");
				testRunner.Delay(1);

				Assert.IsTrue(testRunner.WaitForName("TerminalWidget"), "Terminal Window should exists after Show Terminal button is clicked");

				return Task.CompletedTask;
			});
		}
	}
}

using System.Threading;
using System.Threading.Tasks;
using MatterHackers.Agg.UI;
using NUnit.Framework;

namespace MatterHackers.MatterControl.Tests.Automation
{
	[TestFixture, Category("MatterControl.UI.Automation"), RunInApplicationDomain]
	public class ShowTerminalButtonClickedOpensTerminal
	{
		[Test, Apartment(ApartmentState.STA)]
		public async Task ClickingShowTerminalButtonOpensTerminal()
		{
			await MatterControlUtilities.RunTest((testRunner) =>
			{
				testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");

				Assert.IsFalse(testRunner.WaitForName("TerminalWidget", 0.5), "Terminal Window should not exist");

				testRunner.ClickByName("Terminal Sidebar");
				testRunner.Delay(1);

				Assert.IsTrue(testRunner.WaitForName("TerminalWidget"), "Terminal Window should exists after Show Terminal button is clicked");

				return Task.CompletedTask;
			});
		}
	}
}

Fix regression due to starting in Part view without printer selection


using Glimpse.Agent.Connection.Stream.Connection;
using System;
using System.Threading.Tasks;

namespace Glimpse.Agent
{
    public class WebSocketChannelSender : IChannelSender
    {
        private readonly IMessageConverter _messageConverter;
        private readonly IStreamHubProxyFactory _streamHubProxyFactory;
        private IStreamHubProxy _streamHubProxy;

        public WebSocketChannelSender(IMessageConverter messageConverter, IStreamHubProxyFactory streamHubProxyFactory)
        {
            _messageConverter = messageConverter;
            _streamHubProxyFactory = streamHubProxyFactory;
            _streamHubProxyFactory.Register("RemoteStreamMessagePublisherResource", x => _streamHubProxy = x);
        }

        public async Task PublishMessage(IMessage message)
        {
            // TODO: Probably not the best place to put this
            await _streamHubProxyFactory.Start();

            var newMessage = _messageConverter.ConvertMessage(message);

            await _streamHubProxy.Invoke("HandleMessage", newMessage);
        }
    }
}

using Glimpse.Agent.Connection.Stream.Connection;
using System;
using System.Threading.Tasks;

namespace Glimpse.Agent
{
    public class WebSocketChannelSender : IChannelSender
    {
        private readonly IMessageConverter _messageConverter;
        private readonly IStreamHubProxyFactory _streamHubProxyFactory;
        private IStreamHubProxy _streamHubProxy;

        public WebSocketChannelSender(IMessageConverter messageConverter, IStreamHubProxyFactory streamHubProxyFactory)
        {
            _messageConverter = messageConverter;
            _streamHubProxyFactory = streamHubProxyFactory;
            _streamHubProxyFactory.Register("WebSocketChannelReceiver", x => _streamHubProxy = x);
        }

        public async Task PublishMessage(IMessage message)
        {
            // TODO: Probably not the best place to put this
            await _streamHubProxyFactory.Start();

            var newMessage = _messageConverter.ConvertMessage(message);

            await _streamHubProxy.Invoke("HandleMessage", newMessage);
        }
    }
}

Fix bug where factory name hadn't been udpated


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Palaso.IO;

namespace Bloom
{
	public class HelpLauncher
	{
		public static void Show(Control parent)
		{
			Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication("Bloom.CHM"));
		}
		public static void Show(Control parent, string topic)
		{
			Show(parent, "Bloom.CHM", topic);
		}

		public static void Show(Control parent, string helpFileName, string topic)
		{
			Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication(helpFileName), topic);
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Palaso.IO;

namespace Bloom
{
	public class HelpLauncher
	{
		public static void Show(Control parent)
		{
			Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication("Bloom.chm"));
		}
		public static void Show(Control parent, string topic)
		{
			Show(parent, "Bloom.chm", topic);
		}

		public static void Show(Control parent, string helpFileName, string topic)
		{
			Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication(helpFileName), topic);
		}
	}
}

Fix name of help file

Fix name of help file

Linux filenames are case sensitive.


// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Allocation;

namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
    public class DrawableTinyDroplet : DrawableDroplet
    {
        public DrawableTinyDroplet(TinyDroplet h)
            : base(h)
        {
        }

        [BackgroundDependencyLoader]
        private void load()
        {
            ScaleContainer.Scale /= 2;
        }
    }
}

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
    public class DrawableTinyDroplet : DrawableDroplet
    {
        protected override float ScaleFactor => base.ScaleFactor / 2;

        public DrawableTinyDroplet(TinyDroplet h)
            : base(h)
        {
        }
    }
}

Fix tiny droplet scale factor

Fix tiny droplet scale factor


using UnityEngine;
using System.Collections;

namespace Fungus
{
	// Defines a camera view point.
	// The position and rotation are specified using the game object's transform, so this class
	// only specifies the ortographic view size.
	[ExecuteInEditMode]
	public class View : MonoBehaviour
	{
		public float viewSize = 0.5f;

		void Start()
		{
			// An empty Start() method is needed to display enable checkbox in editor
		}
	}
}

using UnityEngine;
using System.Collections;

namespace Fungus
{
	// Defines a camera view point.
	// The position and rotation are specified using the game object's transform, so this class
	// only specifies the ortographic view size.
	[ExecuteInEditMode]
	public class View : MonoBehaviour
	{
		public float viewSize = 0.5f;

		// An empty Start() method is needed to display enable checkbox in editor
		void Start()
		{}
	}
}

Tidy up Start() function comment

Tidy up Start() function comment


using System;

namespace EnjoyCQRS.Attributes
{
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class ProjectionProviderAttribute : Attribute
    {
        public Type Provider { get; }

        public ProjectionProviderAttribute(Type provider)
        {
            Provider = provider;
        }
    }
}

using System;
using System.Reflection;
using EnjoyCQRS.EventSource.Projections;

namespace EnjoyCQRS.Attributes
{
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class ProjectionProviderAttribute : Attribute
    {
        public Type Provider { get; }

        public ProjectionProviderAttribute(Type provider)
        {
            if (provider == null) throw new ArgumentNullException(nameof(provider));

            if (provider.IsAssignableFrom(typeof(IProjectionProvider))) throw new ArgumentException($"Provider should be inherited of {nameof(IProjectionProvider)}.");

            Provider = provider;
        }
    }
}

Check if argument in projection provider attribute is a valid type