using System;

namespace FbxSharp
{
    public struct FbxTime
    {
        public static readonly FbxTime Infinite = new FbxTime(0x7fffffffffffffffL);
        public static readonly FbxTime Zero = new FbxTime(0);

        public FbxTime(long time)
        {
            Value = time;
        }

        public long Value;

        public long Get()
        {
            return Value;
        }

        public double GetSecondDouble()
        {
            return Value / 46186158000.0;
        }

        public long GetFrameCount()
        {
            return Value / 1539538600L;
        }
    }

}

using System;

namespace FbxSharp
{
    public struct FbxTime
    {
        public static readonly FbxTime Infinite = new FbxTime(0x7fffffffffffffffL);
        public static readonly FbxTime Zero = new FbxTime(0);

        public const long UnitsPerSecond = 46186158000L;

        public FbxTime(long time)
        {
            Value = time;
        }

        public long Value;

        public long Get()
        {
            return Value;
        }

        public double GetSecondDouble()
        {
            return Value / (double)UnitsPerSecond;
        }

        public long GetFrameCount()
        {
            return Value / 1539538600L;
        }
    }

}

Store the number of time units per second in a static const value.


using Kentor.PU_Adapter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace PU_Stub.Controllers
{
    public class SnodController : ApiController
    {
        private static readonly IDictionary<string, string> TestPersons;
        static SnodController()
        {
            TestPersons = Kentor.PU_Adapter.TestData.TestPersonsPuData.PuDataList
                .ToDictionary(p => p.Substring(8, 12)); // index by person number
        }

        [HttpGet]
        public HttpResponseMessage PKNODPLUS(string arg)
        {
            System.Threading.Thread.Sleep(30); // Introduce production like latency

            string result;
            if (!TestPersons.TryGetValue(arg, out result))
            {
                // Returkod: 0001 = Sökt person saknas i registren
                result = "13270001                                                                                _";
            }
            var resp = new HttpResponseMessage(HttpStatusCode.OK);
            resp.Content = new StringContent(result, System.Text.Encoding.GetEncoding("ISO-8859-1"), "text/plain");
            return resp;
        }
    }
}

using Kentor.PU_Adapter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace PU_Stub.Controllers
{
    public class SnodController : ApiController
    {
        private static readonly IDictionary<string, string> TestPersons;
        static SnodController()
        {
            TestPersons = Kentor.PU_Adapter.TestData.TestPersonsPuData.PuDataList
                .ToDictionary(p => p.Substring(8, 12)); // index by person number
        }

        [HttpGet]
        public HttpResponseMessage PKNODPLUS(string arg)
        {
            System.Threading.Thread.Sleep(30); // Introduce production like latency

            string result;
            if (!TestPersons.TryGetValue(arg, out result))
            {
                // Returkod: 0001 = Sökt person saknas i registren
                result = "13270001                                                                                _";
            }
            result = "0\n0\n1327\n" + result; // add magic initial lines, like production PU does
            var resp = new HttpResponseMessage(HttpStatusCode.OK);
            resp.Content = new StringContent(result, System.Text.Encoding.GetEncoding("ISO-8859-1"), "text/plain");
            return resp;
        }
    }
}

Add inital response lines in PU-Stub to mimic production PU


using CIV.Ccs;

namespace CIV
{
    class Program
    {
        static void Main(string[] args)
        {
  			var text = System.IO.File.ReadAllText(args[0]);

			var processes = CcsFacade.ParseAll(text);
            var trace = CcsFacade.RandomTrace(processes["Prison"], 450);
            foreach (var action in trace)
            {
                System.Console.WriteLine(action);
            }
        }
    }
}

using static System.Console;
using CIV.Ccs;

namespace CIV
{
    class Program
    {
        static void Main(string[] args)
        {
  			var text = System.IO.File.ReadAllText(args[0]);

			var processes = CcsFacade.ParseAll(text);
            var trace = CcsFacade.RandomTrace(processes["Prison"], 450);
            foreach (var action in trace)
            {
                WriteLine(action);
            }
        }
    }
}

Add “using static System.Console” to main


// Copyright (c) Alexandre Mutel. All rights reserved.
// This file is licensed under the BSD-Clause 2 license.
// See the license.txt file in the project root for more information.

using System;
using System.IO;
using System.Reflection;
using Autofac;
using Lunet.Core;
using Microsoft.Extensions.Logging;

namespace Lunet
{
    public class SiteFactory
    {
        private readonly ContainerBuilder _containerBuilder;

        public SiteFactory()
        {
            _containerBuilder = new ContainerBuilder();

            // Pre-register some type
            _containerBuilder.RegisterInstance(this);
            _containerBuilder.RegisterType<LoggerFactory>().As<ILoggerFactory>().SingleInstance();
            _containerBuilder.RegisterType<SiteObject>().SingleInstance();
        }

        public ContainerBuilder ContainerBuilder => _containerBuilder;

        public SiteFactory Register<TPlugin>() where TPlugin : ISitePlugin
        {
            Register(typeof(TPlugin));
            return this;
        }

        public SiteFactory Register(Type pluginType)
        {
            if (pluginType == null) throw new ArgumentNullException(nameof(pluginType));
            if (!typeof(ISitePlugin).GetTypeInfo().IsAssignableFrom(pluginType))
            {
                throw new ArgumentException("Expecting a plugin type inheriting from ISitePlugin", nameof(pluginType));
            }
            _containerBuilder.RegisterType(pluginType).AsSelf().As<ISitePlugin>();
            return this;
        }

        public SiteObject Build()
        {
            var container = _containerBuilder.Build();
            return container.Resolve<SiteObject>();
        }
    }
}

// Copyright (c) Alexandre Mutel. All rights reserved.
// This file is licensed under the BSD-Clause 2 license.
// See the license.txt file in the project root for more information.

using System;
using System.IO;
using System.Reflection;
using Autofac;
using Lunet.Core;
using Microsoft.Extensions.Logging;

namespace Lunet
{
    public class SiteFactory
    {
        private readonly ContainerBuilder _containerBuilder;

        public SiteFactory()
        {
            _containerBuilder = new ContainerBuilder();

            // Pre-register some type
            _containerBuilder.RegisterInstance(this);
            _containerBuilder.RegisterType<LoggerFactory>().As<ILoggerFactory>().SingleInstance();
            _containerBuilder.RegisterType<SiteObject>().SingleInstance();
        }

        public ContainerBuilder ContainerBuilder => _containerBuilder;

        public SiteFactory Register<TPlugin>() where TPlugin : ISitePlugin
        {
            Register(typeof(TPlugin));
            return this;
        }

        public SiteFactory Register(Type pluginType)
        {
            if (pluginType == null) throw new ArgumentNullException(nameof(pluginType));
            if (!typeof(ISitePlugin).GetTypeInfo().IsAssignableFrom(pluginType))
            {
                throw new ArgumentException("Expecting a plugin type inheriting from ISitePlugin", nameof(pluginType));
            }
            _containerBuilder.RegisterType(pluginType).SingleInstance().AsSelf().As<ISitePlugin>();
            return this;
        }

        public SiteObject Build()
        {
            var container = _containerBuilder.Build();
            return container.Resolve<SiteObject>();
        }
    }
}

Make sure that a plugin is only created once


using UnityEngine;
using System.Collections;

public class GameStart : MonoBehaviour {
    static int gameMode = INSTRUCTION;

    const int INSTRUCTION = -1;
    const int ONE_PLAYER = 1;
    const int TWO_PLAYER = 2;

    /// <summary>
    /// The game mode of the current game
    /// </summary>
    public static int GameMode
    {
        get { return gameMode; }
        set
        {
            if(value == ONE_PLAYER || value == TWO_PLAYER || value == INSTRUCTION)
            {
                gameMode = value;
            }
        }
    }

    /// <summary>
    /// Add the game to the global board and then destroy this (no longer necessary)
    /// </summary>
    private void Awake()
    {
        if(GameMode == ONE_PLAYER)
        {
            gameObject.AddComponent<SinglePlayerGame>();
        }
        else if (GameMode == TWO_PLAYER)
        {
            gameObject.AddComponent<Game>();
        }
        else if (GameMode == INSTRUCTION)
        {
            gameObject.AddComponent<InstructionGame>();
        }
        Destroy(this);
    }
}

using UnityEngine;
using System.Collections;

public class GameStart : MonoBehaviour {
    static int gameMode = ONE_PLAYER;

    const int INSTRUCTION = -1;
    const int ONE_PLAYER = 1;
    const int TWO_PLAYER = 2;

    /// <summary>
    /// The game mode of the current game
    /// </summary>
    public static int GameMode
    {
        get { return gameMode; }
        set
        {
            if(value == ONE_PLAYER || value == TWO_PLAYER || value == INSTRUCTION)
            {
                gameMode = value;
            }
        }
    }

    /// <summary>
    /// Add the game to the global board and then destroy this (no longer necessary)
    /// </summary>
    private void Awake()
    {
        if(GameMode == ONE_PLAYER)
        {
            gameObject.AddComponent<SinglePlayerGame>();
        }
        else if (GameMode == TWO_PLAYER)
        {
            gameObject.AddComponent<Game>();
        }
        else if (GameMode == INSTRUCTION)
        {
            gameObject.AddComponent<InstructionGame>();
        }
        Destroy(this);
    }
}

Change default gamemode from INSTRUCTION to ONE_PLAYER


using Abp.AspNetCore.OData.Controllers;
using Abp.Dependency;
using Abp.Domain.Repositories;
using Abp.Web.Models;
using AbpODataDemo.People;
using Microsoft.AspNet.OData;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using System.Threading.Tasks;

namespace AbpODataDemo.Controllers
{
    [DontWrapResult]
    public class PersonsController : AbpODataEntityController<Person>, ITransientDependency
    {
        public PersonsController(IRepository<Person> repository)
            : base(repository)
        {
        }

        public override Task<IActionResult> Delete([FromODataUri] int key)
        {
            return base.Delete(key);
        }

        public override IQueryable<Person> Get()
        {
            return base.Get();
        }

        public override SingleResult<Person> Get([FromODataUri] int key)
        {
            return base.Get(key);
        }

        public override Task<IActionResult> Patch([FromODataUri] int key, Delta<Person> entity)
        {
            return base.Patch(key, entity);
        }

        public override Task<IActionResult> Post(Person entity)
        {
            return base.Post(entity);
        }

        public override Task<IActionResult> Put([FromODataUri] int key, Person update)
        {
            return base.Put(key, update);
        }
    }
}

using Abp.AspNetCore.OData.Controllers;
using Abp.Dependency;
using Abp.Domain.Repositories;
using Abp.Web.Models;
using AbpODataDemo.People;
using Microsoft.AspNet.OData;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using System.Threading.Tasks;

namespace AbpODataDemo.Controllers
{
    [DontWrapResult]
    public class PersonsController : AbpODataEntityController<Person>, ITransientDependency
    {
        public PersonsController(IRepository<Person> repository)
            : base(repository)
        {
        }

        public override Task<IActionResult> Delete([FromODataUri] int key)
        {
            return base.Delete(key);
        }

        public override IQueryable<Person> Get()
        {
            return base.Get();
        }

        public override SingleResult<Person> Get([FromODataUri] int key)
        {
            return base.Get(key);
        }

        public override Task<IActionResult> Patch([FromODataUri] int key, [FromBody] Delta<Person> entity)
        {
            return base.Patch(key, entity);
        }

        public override Task<IActionResult> Post([FromBody] Person entity)
        {
            return base.Post(entity);
        }

        public override Task<IActionResult> Put([FromODataUri] int key, [FromBody] Person update)
        {
            return base.Put(key, update);
        }
    }
}

Fix model binding for OData Patch, Post, Put


/**
Copyright 2014-2017 Robert McNeel and Associates

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
**/
using Rhino;
using Rhino.DocObjects;
using Rhino.UI;
using RhinoCyclesCore.Core;
using System;
using System.Drawing;

namespace RhinoCycles.Settings
{
	public class OptionsDialogPage : Rhino.UI.OptionsDialogPage
	{
		public OptionsDialogPage() : base(Localization.LocalizeString("Cycles", 7))
		{
			CollapsibleSectionHolder = new OptionsDialogCollapsibleSectionUIPanel();
		}

		public override object PageControl => CollapsibleSectionHolder;

		public override bool ShowApplyButton => false;
		public override bool ShowDefaultsButton => true;

		public override void OnDefaults()
		{
			RcCore.It.EngineSettings.DefaultSettings();
			CollapsibleSectionHolder.UpdateSections();
		}
		private OptionsDialogCollapsibleSectionUIPanel CollapsibleSectionHolder { get; }
	}
}

/**
Copyright 2014-2017 Robert McNeel and Associates

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
**/
using Rhino;
using Rhino.DocObjects;
using Rhino.UI;
using RhinoCyclesCore.Core;
using System;
using System.Drawing;

namespace RhinoCycles.Settings
{
	public class OptionsDialogPage : Rhino.UI.OptionsDialogPage
	{
    public OptionsDialogPage() : base("Cycles")
		{
			CollapsibleSectionHolder = new OptionsDialogCollapsibleSectionUIPanel();
		}

		public override object PageControl => CollapsibleSectionHolder;

		public override bool ShowApplyButton => false;
		public override bool ShowDefaultsButton => true;
    public override string LocalPageTitle => Localization.LocalizeString ("Cycles", 7);

    public override Image PageImage {
      get {
        var icon = Properties.Resources.Cycles_viewport_properties;
        return icon.ToBitmap ();
      }
    }

		public override void OnDefaults()
		{
			RcCore.It.EngineSettings.DefaultSettings();
			CollapsibleSectionHolder.UpdateSections();
		}
		private OptionsDialogCollapsibleSectionUIPanel CollapsibleSectionHolder { get; }
	}
}

Add PageImage override for Mac and fix title string


@model SFA.DAS.EmployerApprenticeshipsService.Domain.Entities.Account.Account

@Model.Name

                    Team

Invite new users and manage existing ones

                    Funding

Manage your funds including how much you have available to spend, your transactions and funds you could lose

Update funding link to go to account transactions index


namespace MadeWithLove.Middleware
{
    using Owin;

    public static class Extensions
    {
        public static void MakeWithLove(this IAppBuilder app, string customIngredient)
        {
            app.Use<MadeWithLoveMiddleware>(customIngredient);
        }
    }
}

namespace MadeWithLove.Middleware
{
    using Owin;

    public static class Extensions
    {
        public static void MakeWithLove(this IAppBuilder app, string customIngredient = null)
        {
            app.Use<MadeWithLoveMiddleware>(customIngredient);
        }
    }
}

Make custom ingredient optional on extension method


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

using osu.Framework.Allocation;
using osu.Framework.Input;
using osu.Framework.Statistics;

namespace osu.Framework.OS
{
    /// <summary>
    /// A GameHost which doesn't require a graphical or sound device.
    /// </summary>
    public class HeadlessGameHost : BasicGameHost
    {
        public override GLControl GLControl => null;
        public override bool IsActive => true;
        public override TextInputSource TextInput => null;

        protected override void DrawFrame()
        {
            //we can't draw.
        }

        public override void Run()
        {
            while (!ExitRequested)
            {
                UpdateMonitor.NewFrame();

                using (UpdateMonitor.BeginCollecting(PerformanceCollectionType.Scheduler))
                {
                    UpdateScheduler.Update();
                }

                using (UpdateMonitor.BeginCollecting(PerformanceCollectionType.Update))
                {
                    UpdateSubTree();
                    using (var buffer = DrawRoots.Get(UsageType.Write))
                        buffer.Object = GenerateDrawNodeSubtree(buffer.Object);
                }

                using (UpdateMonitor.BeginCollecting(PerformanceCollectionType.Sleep))
                {
                    UpdateClock.ProcessFrame();
                }
            }
        }
    }
}

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

using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Input;
using osu.Framework.Input.Handlers;
using osu.Framework.Statistics;

namespace osu.Framework.OS
{
    /// <summary>
    /// A GameHost which doesn't require a graphical or sound device.
    /// </summary>
    public class HeadlessGameHost : BasicGameHost
    {
        public override GLControl GLControl => null;
        public override bool IsActive => true;
        public override TextInputSource TextInput => null;

        protected override void DrawFrame()
        {
            //we can't draw.
        }

        public override void Run()
        {
            while (!ExitRequested)
            {
                UpdateMonitor.NewFrame();

                using (UpdateMonitor.BeginCollecting(PerformanceCollectionType.Scheduler))
                {
                    UpdateScheduler.Update();
                }

                using (UpdateMonitor.BeginCollecting(PerformanceCollectionType.Update))
                {
                    UpdateSubTree();
                    using (var buffer = DrawRoots.Get(UsageType.Write))
                        buffer.Object = GenerateDrawNodeSubtree(buffer.Object);
                }

                using (UpdateMonitor.BeginCollecting(PerformanceCollectionType.Sleep))
                {
                    UpdateClock.ProcessFrame();
                }
            }
        }

        public override IEnumerable<InputHandler> GetInputHandlers() => new InputHandler[] { };
    }
}

Add empty inputhandlers list for headless execution.


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

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.225
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

[assembly: AssemblyProductAttribute("Gitnub: Automated Tasks for Github")]
[assembly: AssemblyCompanyAttribute("Tall Ambitions LLC")]
[assembly: AssemblyCopyrightAttribute("Copyright  2011 Tall Ambitions LLC, and contributors")]
[assembly: AssemblyVersionAttribute("0.0.0.0")]
[assembly: AssemblyFileVersionAttribute("0.0.0.0")]
[assembly: ComVisibleAttribute(false)]
[assembly: CLSCompliantAttribute(true)]

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

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.225
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

[assembly: AssemblyProductAttribute("Gitnub: Automated Tasks for Github")]
[assembly: AssemblyCompanyAttribute("Tall Ambitions LLC")]
[assembly: AssemblyCopyrightAttribute("Copyright  2011 Tall Ambitions LLC, and contributors")]
[assembly: AssemblyVersionAttribute("0.1.0.0")]
[assembly: AssemblyFileVersionAttribute("0.1.0.0")]
[assembly: ComVisibleAttribute(false)]
[assembly: CLSCompliantAttribute(true)]

Increase version number to 0.1.0.0.

Increase version number to 0.1.0.0.


using System.Collections.Generic;

namespace LiveSplit.Model.Comparisons
{
    public class StandardComparisonGeneratorsFactory : IComparisonGeneratorsFactory
    {
        static StandardComparisonGeneratorsFactory()
        {
            CompositeComparisons.AddShortComparisonName(BestSegmentsComparisonGenerator.ComparisonName, BestSegmentsComparisonGenerator.ShortComparisonName);
            CompositeComparisons.AddShortComparisonName(Run.PersonalBestComparisonName, "PB");
            CompositeComparisons.AddShortComparisonName(AverageSegmentsComparisonGenerator.ComparisonName, AverageSegmentsComparisonGenerator.ShortComparisonName);
            CompositeComparisons.AddShortComparisonName(PercentileComparisonGenerator.ComparisonName, PercentileComparisonGenerator.ShortComparisonName);
        }
        public IEnumerable<IComparisonGenerator> Create(IRun run)
        {
            yield return new BestSegmentsComparisonGenerator(run);
            yield return new AverageSegmentsComparisonGenerator(run);
        }

        public IEnumerable<IComparisonGenerator> GetAllGenerators(IRun run)
        {
            yield return new BestSegmentsComparisonGenerator(run);
            yield return new BestSplitTimesComparisonGenerator(run);
            yield return new AverageSegmentsComparisonGenerator(run);
            yield return new WorstSegmentsComparisonGenerator(run);
            yield return new PercentileComparisonGenerator(run);
            yield return new NoneComparisonGenerator(run);
        }
    }
}

using System.Collections.Generic;

namespace LiveSplit.Model.Comparisons
{
    public class StandardComparisonGeneratorsFactory : IComparisonGeneratorsFactory
    {
        static StandardComparisonGeneratorsFactory()
        {
            CompositeComparisons.AddShortComparisonName(BestSegmentsComparisonGenerator.ComparisonName, BestSegmentsComparisonGenerator.ShortComparisonName);
            CompositeComparisons.AddShortComparisonName(Run.PersonalBestComparisonName, "PB");
            CompositeComparisons.AddShortComparisonName(AverageSegmentsComparisonGenerator.ComparisonName, AverageSegmentsComparisonGenerator.ShortComparisonName);
            CompositeComparisons.AddShortComparisonName(WorstSegmentsComparisonGenerator.ComparisonName, WorstSegmentsComparisonGenerator.ShortComparisonName);
            CompositeComparisons.AddShortComparisonName(PercentileComparisonGenerator.ComparisonName, PercentileComparisonGenerator.ShortComparisonName);
        }
        public IEnumerable<IComparisonGenerator> Create(IRun run)
        {
            yield return new BestSegmentsComparisonGenerator(run);
            yield return new AverageSegmentsComparisonGenerator(run);
        }

        public IEnumerable<IComparisonGenerator> GetAllGenerators(IRun run)
        {
            yield return new BestSegmentsComparisonGenerator(run);
            yield return new BestSplitTimesComparisonGenerator(run);
            yield return new AverageSegmentsComparisonGenerator(run);
            yield return new WorstSegmentsComparisonGenerator(run);
            yield return new PercentileComparisonGenerator(run);
            yield return new NoneComparisonGenerator(run);
        }
    }
}

Add short name for Worst Segments

Add short name for Worst Segments


namespace Microsoft.ApplicationInsights.AspNetCore.Tests.ContextInitializers
{
    using System;
    using System.Globalization;
    using System.Net;
    using System.Net.NetworkInformation;
    using Helpers;
    using Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers;
    using Microsoft.ApplicationInsights.DataContracts;
    using Microsoft.ApplicationInsights.Extensibility.Implementation;
    using Microsoft.AspNetCore.Http;
    using Xunit;

    public class DomainNameRoleInstanceTelemetryInitializerTests
    {
        private const string TestListenerName = "TestListener";

        [Fact]
        public void RoleInstanceNameIsSetToDomainAndHost()
        {
            var source = new DomainNameRoleInstanceTelemetryInitializer();
            var requestTelemetry = new RequestTelemetry();
            source.Initialize(requestTelemetry);

            string hostName = Dns.GetHostName();

#if net46
            string domainName = IPGlobalProperties.GetIPGlobalProperties().DomainName;
            if (hostName.EndsWith(domainName, StringComparison.OrdinalIgnoreCase) == false)
            {
                hostName = string.Format(CultureInfo.InvariantCulture, "{0}.{1}", hostName, domainName);
            }
#endif

            Assert.Equal(hostName, requestTelemetry.Context.Cloud.RoleInstance);
        }

        [Fact]
        public void ContextInitializerDoesNotOverrideMachineName()
        {
            var source = new DomainNameRoleInstanceTelemetryInitializer();
            var requestTelemetry = new RequestTelemetry();
            requestTelemetry.Context.Cloud.RoleInstance = "Test";
            source.Initialize(requestTelemetry);
            Assert.Equal("Test", requestTelemetry.Context.Cloud.RoleInstance);
        }
    }
}

namespace Microsoft.ApplicationInsights.AspNetCore.Tests.ContextInitializers
{
    using System;
    using System.Globalization;
    using System.Net;
    using System.Net.NetworkInformation;
    using Helpers;
    using Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers;
    using Microsoft.ApplicationInsights.DataContracts;
    using Microsoft.ApplicationInsights.Extensibility.Implementation;
    using Microsoft.AspNetCore.Http;
    using Xunit;

    public class DomainNameRoleInstanceTelemetryInitializerTests
    {
        private const string TestListenerName = "TestListener";

        [Fact]
        public void RoleInstanceNameIsSetToDomainAndHost()
        {
            var source = new DomainNameRoleInstanceTelemetryInitializer();
            var requestTelemetry = new RequestTelemetry();
            source.Initialize(requestTelemetry);

            string hostName = Dns.GetHostName();

#if NET46
            string domainName = IPGlobalProperties.GetIPGlobalProperties().DomainName;
            if (hostName.EndsWith(domainName, StringComparison.OrdinalIgnoreCase) == false)
            {
                hostName = string.Format(CultureInfo.InvariantCulture, "{0}.{1}", hostName, domainName);
            }
#endif

            Assert.Equal(hostName, requestTelemetry.Context.Cloud.RoleInstance);
        }

        [Fact]
        public void ContextInitializerDoesNotOverrideMachineName()
        {
            var source = new DomainNameRoleInstanceTelemetryInitializer();
            var requestTelemetry = new RequestTelemetry();
            requestTelemetry.Context.Cloud.RoleInstance = "Test";
            source.Initialize(requestTelemetry);
            Assert.Equal("Test", requestTelemetry.Context.Cloud.RoleInstance);
        }
    }
}

Correct compie time constant to be NET46


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

namespace ElectronicCash
{
    public abstract class BaseActor
    {
        public string Name { get; set; }
        public Guid ActorGuid { get; set; }
    }
}

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

namespace ElectronicCash
{
    /// <summary>
    /// The base actor abstracts all common properties of our actors (mainly Bank, Merchant, Customer)
    /// </summary>
    public abstract class BaseActor
    {
        public string Name { get; set; }
        public Guid ActorGuid { get; set; }
        public Int32 Money { get; set; }
        public Dictionary<Guid, List<MoneyOrder>> Ledger { get; private set; }
    }
}

Move more stuff to superclass

Move more stuff to superclass


using System;
using System.Linq;

namespace CefSharp.Example
{
    public static class CefExample
    {
        public const string DefaultUrl = "custom://cefsharp/BindingTest.html";

        // Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
        private const bool debuggingSubProcess = true;

        public static void Init()
        {
            var settings = new CefSettings();
            settings.RemoteDebuggingPort = 8088;
            //settings.CefCommandLineArgs.Add("renderer-process-limit", "1");
            //settings.CefCommandLineArgs.Add("renderer-startup-dialog", "renderer-startup-dialog");

            if (debuggingSubProcess)
            {
                settings.BrowserSubprocessPath = "..\\..\\..\\..\\CefSharp.BrowserSubprocess\\bin\\x86\\Debug\\CefSharp.BrowserSubprocess.exe";
            }

            settings.RegisterScheme(new CefCustomScheme
            {
                SchemeName = CefSharpSchemeHandlerFactory.SchemeName,
                SchemeHandlerFactory = new CefSharpSchemeHandlerFactory()
            });

            if (!Cef.Initialize(settings))
            {
                if (Environment.GetCommandLineArgs().Contains("--type=renderer"))
                {
                    Environment.Exit(0);
                }
                else
                {
                    return;
                }
            }
        }
    }
}

using System;
using System.Linq;

namespace CefSharp.Example
{
    public static class CefExample
    {
        public const string DefaultUrl = "custom://cefsharp/BindingTest.html";

        // Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
        private const bool debuggingSubProcess = true;

        public static void Init()
        {
            var settings = new CefSettings();
            settings.RemoteDebuggingPort = 8088;
            //settings.CefCommandLineArgs.Add("renderer-process-limit", "1");
            //settings.CefCommandLineArgs.Add("renderer-startup-dialog", "renderer-startup-dialog");

            if (debuggingSubProcess)
            {
                var architecture = Environment.Is64BitProcess ? "x64" : "x86";
                settings.BrowserSubprocessPath = "..\\..\\..\\..\\CefSharp.BrowserSubprocess\\bin\\" + architecture + "\\Debug\\CefSharp.BrowserSubprocess.exe";
            }

            settings.RegisterScheme(new CefCustomScheme
            {
                SchemeName = CefSharpSchemeHandlerFactory.SchemeName,
                SchemeHandlerFactory = new CefSharpSchemeHandlerFactory()
            });

            if (!Cef.Initialize(settings))
            {
                if (Environment.GetCommandLineArgs().Contains("--type=renderer"))
                {
                    Environment.Exit(0);
                }
                else
                {
                    return;
                }
            }
        }
    }
}

Add environment check to determine architecture


using System.Reflection;

#if DEBUG
[assembly: AssemblyProduct("Ensure.That (Debug)")]
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyProduct("Ensure.That (Release)")]
[assembly: AssemblyConfiguration("Release")]
#endif

[assembly: AssemblyDescription("Yet another guard clause project.")]
[assembly: AssemblyCompany("Daniel Wertheim")]
[assembly: AssemblyCopyright("Copyright © Daniel Wertheim")]
[assembly: AssemblyTrademark("")]

[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]

using System.Reflection;

#if DEBUG
[assembly: AssemblyProduct("Ensure.That (Debug)")]
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyProduct("Ensure.That (Release)")]
[assembly: AssemblyConfiguration("Release")]
#endif

[assembly: AssemblyDescription("Yet another guard clause project.")]
[assembly: AssemblyCompany("Daniel Wertheim")]
[assembly: AssemblyCopyright("Copyright © Daniel Wertheim")]
[assembly: AssemblyTrademark("")]

[assembly: AssemblyVersion("0.10.1.*")]
[assembly: AssemblyFileVersion("0.10.1")]

Include version to get e.g ReSharper happy.


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

namespace Moq.Tests
{
	public class ExtensionsFixture
	{
		[Fact]
		public void IsMockeableReturnsFalseForValueType()
		{
			Assert.False(typeof(int).IsMockeable());
		}

        // [Fact]
        // public void OnceDoesNotThrowOnSecondCallIfCountWasResetBefore()
        // {
        //     var mock = new Mock<IFooReset>();
        //     mock.Setup(foo => foo.Execute("ping"))
        //         .Returns("ack")
        //         .AtMostOnce();

        //     Assert.Equal("ack", mock.Object.Execute("ping"));
        //     mock.ResetAllCalls();
        //     Assert.DoesNotThrow(() => mock.Object.Execute("ping"));
        // }
	}

    public interface IFooReset
    {
        object Execute(string ping);
    }
}

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

namespace Moq.Tests
{
    public class ExtensionsFixture
    {
        #region Public Methods

        [Fact]
        public void IsMockeableReturnsFalseForValueType()
        {
            Assert.False(typeof(int).IsMockeable());
        }

        [Fact]
        public void OnceDoesNotThrowOnSecondCallIfCountWasResetBefore()
        {
            var mock = new Mock<IFooReset>();
            mock.Setup(foo => foo.Execute("ping")).Returns("ack");

            mock.Object.Execute("ping");
            mock.ResetAllCalls();
            mock.Object.Execute("ping");
            mock.Verify(o => o.Execute("ping"), Times.Once());
        }

        #endregion
    }

    public interface IFooReset
    {
        #region Public Methods

        object Execute(string ping);

        #endregion
    }
}

Fix poorly written test (sorry).

Fix poorly written test (sorry).

- test was using obsolete methods, leading to a failed build in Release mode, because of the unit test was failing.


using System;
using System.IO;
using System.IO.Compression;
using System.Net.Http;
using System.Threading.Tasks;

namespace Dotnet.Script.Core
{
    public class ScriptDownloader
    {
        public async Task<string> Download(string uri)
        {
            using (HttpClient client = new HttpClient())
            {
                using (HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead))
                {
                    response.EnsureSuccessStatusCode();

                    using (HttpContent content = response.Content)
                    {
                        var mediaType = content.Headers.ContentType.MediaType?.ToLowerInvariant().Trim();
                        switch (mediaType)
                        {
                            case null:
                            case "":
                            case "text/plain":
                                return await content.ReadAsStringAsync();
                            case "application/gzip":
                            case "application/x-gzip":
                                using (var stream = await content.ReadAsStreamAsync())
                                using (var gzip = new GZipStream(stream, CompressionMode.Decompress))
                                using (var reader = new StreamReader(gzip))
                                    return await reader.ReadToEndAsync();
                            default:
                                throw new NotSupportedException($"The media type '{mediaType}' is not supported when executing a script over http/https");
                        }
                    }
                }
            }
        }
    }
}

using System;
using System.IO;
using System.IO.Compression;
using System.Net.Http;
using System.Threading.Tasks;

namespace Dotnet.Script.Core
{
    public class ScriptDownloader
    {
        public async Task<string> Download(string uri)
        {
            using (HttpClient client = new HttpClient())
            {
                using (HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead))
                {
                    response.EnsureSuccessStatusCode();

                    using (HttpContent content = response.Content)
                    {
                        var mediaType = content.Headers.ContentType?.MediaType?.ToLowerInvariant().Trim();
                        switch (mediaType)
                        {
                            case null:
                            case "":
                            case "text/plain":
                                return await content.ReadAsStringAsync();
                            case "application/gzip":
                            case "application/x-gzip":
                                using (var stream = await content.ReadAsStreamAsync())
                                using (var gzip = new GZipStream(stream, CompressionMode.Decompress))
                                using (var reader = new StreamReader(gzip))
                                    return await reader.ReadToEndAsync();
                            default:
                                throw new NotSupportedException($"The media type '{mediaType}' is not supported when executing a script over http/https");
                        }
                    }
                }
            }
        }
    }
}

Support remote scripts with empty/null Content Type


using System;
using System.Collections.Generic;
using Firehose.Web.Infrastructure;

namespace Firehose.Web.Authors
{
    public class MartijnVanDijk : IAmAMicrosoftMVP, IAmAXamarinMVP
    {
        public IEnumerable<Uri> FeedUris
        {
            get { yield return new Uri("https://medium.com/feed/@martijn00"); }
        }

        public string FirstName => "Martijn";
        public string LastName => "Van Dijk";
        public string StateOrRegion => "Amsterdam, Netherlands";
        public string EmailAddress => "mhvdijk@gmail.com";
        public string ShortBioOrTagLine => "";
        public Uri WebSite => new Uri("https://medium.com/@martijn00");
        public string TwitterHandle => "mhvdijk";
        public string GravatarHash => "22155f520ab611cf04f76762556ca3f5";
        public string GitHubHandle => string.Empty;
        public GeoPosition Position => new GeoPosition(52.3702160, 4.8951680);
    }
}

using System;
using System.Collections.Generic;
using Firehose.Web.Infrastructure;

namespace Firehose.Web.Authors
{
    public class MartijnVanDijk : IAmAMicrosoftMVP, IAmAXamarinMVP
    {
        public IEnumerable<Uri> FeedUris
        {
            get { yield return new Uri("https://medium.com/feed/@martijn00"); }
        }

        public string FirstName => "Martijn";
        public string LastName => "Van Dijk";
        public string StateOrRegion => "Amsterdam, Netherlands";
        public string EmailAddress => "mhvdijk@gmail.com";
        public string ShortBioOrTagLine => "is a Xamarin and Microsoft MVP working with MvvmCross";
        public Uri WebSite => new Uri("https://medium.com/@martijn00");
        public string TwitterHandle => "mhvdijk";
        public string GravatarHash => "22155f520ab611cf04f76762556ca3f5";
        public string GitHubHandle => "martijn00";
        public GeoPosition Position => new GeoPosition(52.3702160, 4.8951680);
    }
}

Add bio and Github profile

Add bio and Github profile


// Copyright 2007-2015 Chris Patterson, Dru Sellers, Travis Smith, et. al.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
namespace MassTransit.Internals.Mapping
{
    using System;
    using Reflection;

    public class NullableValueObjectMapper<T, TValue> :
        IObjectMapper<T>
        where TValue : struct
    {
        readonly ReadWriteProperty<T> _property;

        public NullableValueObjectMapper(ReadWriteProperty<T> property)
        {
            _property = property;
        }

        public void ApplyTo(T obj, IObjectValueProvider valueProvider)
        {
            object value;
            if (valueProvider.TryGetValue(_property.Property.Name, out value))
            {
                TValue? nullableValue = value as TValue?;
                if (!nullableValue.HasValue)
                    nullableValue = (TValue)Convert.ChangeType(value, typeof(TValue));

                _property.Set(obj, nullableValue);
            }
        }
    }
}

// Copyright 2007-2015 Chris Patterson, Dru Sellers, Travis Smith, et. al.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
namespace MassTransit.Internals.Mapping
{
    using System;
    using System.ComponentModel;
    using Reflection;

    public class NullableValueObjectMapper<T, TValue> :
        IObjectMapper<T>
        where TValue : struct
    {
        readonly ReadWriteProperty<T> _property;

        public NullableValueObjectMapper(ReadWriteProperty<T> property)
        {
            _property = property;
        }

        public void ApplyTo(T obj, IObjectValueProvider valueProvider)
        {
            object value;
            if (valueProvider.TryGetValue(_property.Property.Name, out value))
            {
                TValue? nullableValue = null;
                if (value != null)
                {
                    var converter = TypeDescriptor.GetConverter(typeof(TValue));
                    nullableValue = converter.CanConvertFrom(value.GetType())
                        ? (TValue)converter.ConvertFrom(value)
                        : default(TValue?);
                }

                _property.Set(obj, nullableValue);
            }
        }
    }
}

Use a type converter to try and convert values


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

using System;
using System.Runtime.InteropServices;

namespace osu.Framework.Platform.Linux.SDL2
{
    public class SDL2Clipboard : Clipboard
    {
        private const string lib = "libSDL2.so";

        [DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_free", ExactSpelling = true)]
        internal static extern void SDL_free(IntPtr ptr);

        /// <returns>Returns the clipboard text on success or <see cref="IntPtr.Zero"/> on failure. </returns>
        [DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetClipboardText", ExactSpelling = true)]
        internal static extern IntPtr SDL_GetClipboardText();

        [DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SetClipboardText", ExactSpelling = true)]
        internal static extern int SDL_SetClipboardText(string text);

        public override string GetText()
        {
            IntPtr ptrToText = SDL_GetClipboardText();
            string text = Marshal.PtrToStringAnsi(ptrToText);
            SDL_free(ptrToText);
            return text;
        }

        public override void SetText(string selectedText)
        {
            SDL_SetClipboardText(selectedText);
        }
    }
}

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

namespace osu.Framework.Platform.Linux.SDL2
{
    public class SDL2Clipboard : Clipboard
    {
        public override string GetText() => SDL.SDL_GetClipboardText();

        public override void SetText(string selectedText) => SDL.SDL_SetClipboardText(selectedText);
    }
}

Remove no longer required SDL2 P/Invokes in Linux clipboard


using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using IdentityServer.Contrib.JsonWebKeyAdapter;
using Microsoft.Azure.KeyVault;
using Microsoft.Extensions.OptionsModel;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Microsoft.IdentityModel.Protocols;

namespace IdentityServer3.Contrib.AzureKeyVaultTokenSigningService
{
    public class AzureKeyVaultPublicKeyProvider : IPublicKeyProvider
    {
        private readonly AzureKeyVaultTokenSigningServiceOptions _options;
        private readonly AzureKeyVaultAuthentication _authentication;
        private JsonWebKey _jwk;

        /// <summary>
        /// Initializes a new instance of the <see cref="AzureKeyVaultTokenSigningService"/> class.
        /// </summary>
        /// <param name="options">The options.</param>
        public AzureKeyVaultPublicKeyProvider(IOptions<AzureKeyVaultTokenSigningServiceOptions> options)
        {
            _options = options.Value;
            _authentication = new AzureKeyVaultAuthentication(_options.ClientId, _options.ClientSecret);
        }

        public async Task<IEnumerable<JsonWebKey>> GetAsync()
        {
            if (_jwk == null)
            {
                var keyVaultClient = new KeyVaultClient(_authentication.KeyVaultClientAuthenticationCallback);
                var keyBundle = await keyVaultClient.GetKeyAsync(_options.KeyIdentifier).ConfigureAwait(false);
                _jwk = new JsonWebKey(keyBundle.Key.ToString());
            }

            return new List<JsonWebKey> { _jwk };
        }
    }
}

using System.Collections.Generic;
using System.Threading.Tasks;
using IdentityServer.Contrib.JsonWebKeyAdapter;
using Microsoft.Azure.KeyVault;
using Microsoft.Extensions.OptionsModel;
using Microsoft.IdentityModel.Protocols;

namespace IdentityServer3.Contrib.AzureKeyVaultTokenSigningService
{
    public class AzureKeyVaultPublicKeyProvider : IPublicKeyProvider
    {
        private readonly AzureKeyVaultTokenSigningServiceOptions _options;
        private readonly AzureKeyVaultAuthentication _authentication;
        private JsonWebKey _jwk;

        /// <summary>
        /// Initializes a new instance of the <see cref="AzureKeyVaultTokenSigningService"/> class.
        /// </summary>
        /// <param name="options">The options.</param>
        public AzureKeyVaultPublicKeyProvider(IOptions<AzureKeyVaultTokenSigningServiceOptions> options)
        {
            _options = options.Value;
            _authentication = new AzureKeyVaultAuthentication(_options.ClientId, _options.ClientSecret);
        }

        public async Task<IEnumerable<JsonWebKey>> GetAsync()
        {
            if (_jwk == null)
            {
                var keyVaultClient = new KeyVaultClient(_authentication.KeyVaultClientAuthenticationCallback);
                var keyBundle = await keyVaultClient.GetKeyAsync(_options.KeyIdentifier).ConfigureAwait(false);
                _jwk = new JsonWebKey(keyBundle.Key.ToString());
            }

            return new List<JsonWebKey> { _jwk };
        }
    }
}

Tidy up some unused usings

Tidy up some unused usings


// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Composition;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Host;

namespace Microsoft.CodeAnalysis.Remote.Storage
{
    [ExportWorkspaceService(typeof(IPersistentStorageLocationService)), Shared]
    [Export(typeof(RemotePersistentStorageLocationService))]
    internal class RemotePersistentStorageLocationService : IPersistentStorageLocationService
    {
        private static readonly object _gate = new object();
        private static readonly Dictionary<SolutionId, string> _idToStorageLocation = new Dictionary<SolutionId, string>();

        public string GetStorageLocation(Solution solution)
        {
            string result;
            _idToStorageLocation.TryGetValue(solution.Id, out result);
            return result;
        }

        public bool IsSupported(Workspace workspace)
        {
            lock (_gate)
            {
                return _idToStorageLocation.ContainsKey(workspace.CurrentSolution.Id);
            }
        }

        public static void UpdateStorageLocation(SolutionId id, string storageLocation)
        {
            lock (_gate)
            {
                _idToStorageLocation[id] = storageLocation;
            }
        }
    }
}

// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Composition;
using System.IO;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;

namespace Microsoft.CodeAnalysis.Remote.Storage
{
    [ExportWorkspaceService(typeof(IPersistentStorageLocationService)), Shared]
    [Export(typeof(RemotePersistentStorageLocationService))]
    internal class RemotePersistentStorageLocationService : IPersistentStorageLocationService
    {
        private static readonly object _gate = new object();
        private static readonly Dictionary<SolutionId, string> _idToStorageLocation = new Dictionary<SolutionId, string>();

        public string GetStorageLocation(Solution solution)
        {
            string result;
            _idToStorageLocation.TryGetValue(solution.Id, out result);
            return result;
        }

        public bool IsSupported(Workspace workspace)
        {
            lock (_gate)
            {
                return _idToStorageLocation.ContainsKey(workspace.CurrentSolution.Id);
            }
        }

        public static void UpdateStorageLocation(SolutionId id, string storageLocation)
        {
            lock (_gate)
            {
                // Store the esent database in a different location for the out of proc server.
                _idToStorageLocation[id] = Path.Combine(storageLocation, "Server");
            }
        }
    }
}

Store OOP server persistence database in a different file.


Update Disqus partial to use node name for the page title configuration variable


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

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.Net.WebSockets")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[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("9a9e41ae-1494-4d87-a66f-a4019ff68ce5")]

// 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.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyMetadata("Serviceable", "True")]
[assembly: NeutralResourcesLanguage("en-us")]
[assembly: AssemblyCompany("Microsoft Corporation.")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft ASP.NET Core")]

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

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

[assembly: AssemblyTitle("Microsoft.Net.WebSockets")]
[assembly: ComVisible(false)]

[assembly: Guid("9a9e41ae-1494-4d87-a66f-a4019ff68ce5")]
[assembly: AssemblyMetadata("Serviceable", "True")]
[assembly: NeutralResourcesLanguage("en-us")]
[assembly: AssemblyCompany("Microsoft Corporation.")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft ASP.NET Core")]

Fix assembly metadata to fix package verifier warnings


namespace TAUtil.Gaf.Structures
{
    using System.IO;

    public struct GafFrameData
    {
        public ushort Width;
        public ushort Height;
        public ushort XPos;
        public ushort YPos;
        public char Unknown1;
        public bool Compressed;
        public ushort FramePointers;
        public uint Unknown2;
        public uint PtrFrameData;
        public uint Unknown3;

        public static void Read(Stream f, ref GafFrameData e)
        {
            BinaryReader b = new BinaryReader(f);
            e.Width = b.ReadUInt16();
            e.Height = b.ReadUInt16();
            e.XPos = b.ReadUInt16();
            e.YPos = b.ReadUInt16();
            e.Unknown1 = b.ReadChar();
            e.Compressed = b.ReadBoolean();
            e.FramePointers = b.ReadUInt16();
            e.Unknown2 = b.ReadUInt32();
            e.PtrFrameData = b.ReadUInt32();
            e.Unknown3 = b.ReadUInt32();
        }
    }
}

namespace TAUtil.Gaf.Structures
{
    using System.IO;

    public struct GafFrameData
    {
        public ushort Width;
        public ushort Height;
        public ushort XPos;
        public ushort YPos;
        public byte Unknown1;
        public bool Compressed;
        public ushort FramePointers;
        public uint Unknown2;
        public uint PtrFrameData;
        public uint Unknown3;

        public static void Read(Stream f, ref GafFrameData e)
        {
            BinaryReader b = new BinaryReader(f);
            e.Width = b.ReadUInt16();
            e.Height = b.ReadUInt16();
            e.XPos = b.ReadUInt16();
            e.YPos = b.ReadUInt16();
            e.Unknown1 = b.ReadByte();
            e.Compressed = b.ReadBoolean();
            e.FramePointers = b.ReadUInt16();
            e.Unknown2 = b.ReadUInt32();
            e.PtrFrameData = b.ReadUInt32();
            e.Unknown3 = b.ReadUInt32();
        }
    }
}

Change char to byte in gaf frame header

Change char to byte in gaf frame header


using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;

namespace Promact.Trappist.Repository.Questions
{
    public class QuestionRepository : IQuestionRepository
    {
        private readonly TrappistDbContext _dbContext;

        public QuestionRepository(TrappistDbContext dbContext)
        {
            _dbContext = dbContext;
        }

        /// <summary>
        /// Get all questions
        /// </summary>
        /// <returns>Question list</returns>
        public List<SingleMultipleAnswerQuestion> GetAllQuestions()
        {
            var questions = _dbContext.SingleMultipleAnswerQuestion.ToList();
            return questions;
        }
        /// <summary>
        /// Add single multiple answer question into SingleMultipleAnswerQuestion model
        /// </summary>
        /// <param name="singleMultipleAnswerQuestion"></param>
        /// <param name="singleMultipleAnswerQuestionOption"></param>
        public void AddSingleMultipleAnswerQuestion(SingleMultipleAnswerQuestion singleMultipleAnswerQuestion, SingleMultipleAnswerQuestionOption singleMultipleAnswerQuestionOption)
        {
            _dbContext.SingleMultipleAnswerQuestion.Add(singleMultipleAnswerQuestion);
            _dbContext.SingleMultipleAnswerQuestionOption.Add(singleMultipleAnswerQuestionOption);
            _dbContext.SaveChanges();
        }
    }
}

Update server side API for single multiple answer question


@using StackExchange.Opserver.Data.SQL
@{
    Layout = null;
    var clusters = SQLModule.Clusters;
    var standalone = SQLModule.StandaloneInstances;
}
@helper RenderInstances(IEnumerable<SQLInstance> instances)
{
    foreach (var i in instances)
    {
        var props = i.ServerProperties.SafeData(true);

            @i.IconSpan() @i.Name
            @props.MajorVersion

    }
}

Please select a SQL instance.

    @foreach (var c in clusters)
    {

@c.Name

                    @RenderInstances(c.Nodes)

    }
    @if (standalone.Any())
    {

Standalone

                    @RenderInstances(standalone)

    }

@using StackExchange.Opserver.Data.SQL
@{
    Layout = null;
    var clusters = SQLModule.Clusters;
    var standalone = SQLModule.StandaloneInstances;
}
@helper RenderInstances(IEnumerable<SQLInstance> instances, bool showVersion)
{
    foreach (var i in instances)
    {
        var props = i.ServerProperties.SafeData(true);

            @i.IconSpan() @i.Name

                @props.MajorVersion
                @if (showVersion)
                {
                     (@i.Version.ToString())
                }

    }
}
@helper RenderList(IEnumerable<SQLInstance> instances, string title)
{
    var versions = instances.Select(n => n.Version).Distinct().ToList();

                @title
                @if (versions.Count == 1)
                {
                    (Version @versions[0].ToString())
                }

                @RenderInstances(instances, versions.Count > 1)

}

Please select a SQL instance.

    @foreach (var c in clusters)
    {
        @RenderList(c.Nodes, c.Name)
    }
    @if (standalone.Any())
    {
        @RenderList(standalone, "Standalone")
    }

Add version to SQL instance selector screen

This selector now doubles as a dashboard for checking versions across
your infrastructure.


// Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

namespace PInvoke
{
    using System;

    /// <content>
    /// Contains the <see cref="NCryptCreatePersistedKeyFlags"/> nested type.
    /// </content>
    public static partial class NCrypt
    {
        /// <summary>
        /// Flags that may be passed to the <see cref="NCryptCreatePersistedKey(SafeProviderHandle, out SafeKeyHandle, string, string, LegacyKeySpec, NCryptCreatePersistedKeyFlags)"/> method.
        /// </summary>
        [Flags]
        public enum NCryptCreatePersistedKeyFlags
        {
            /// <summary>
            /// No flags.
            /// </summary>
            None = 0x0,

            /// <summary>
            /// The key applies to the local computer. If this flag is not present, the key applies to the current user.
            /// </summary>
            NCRYPT_MACHINE_KEY_FLAG,

            /// <summary>
            /// If a key already exists in the container with the specified name, the existing key will be overwritten. If this flag is not specified and a key with the specified name already exists, this function will return <see cref="SECURITY_STATUS.NTE_EXISTS"/>.
            /// </summary>
            NCRYPT_OVERWRITE_KEY_FLAG,
        }
    }
}

// Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

namespace PInvoke
{
    using System;

    /// <content>
    /// Contains the <see cref="NCryptCreatePersistedKeyFlags"/> nested type.
    /// </content>
    public static partial class NCrypt
    {
        /// <summary>
        /// Flags that may be passed to the <see cref="NCryptCreatePersistedKey(SafeProviderHandle, out SafeKeyHandle, string, string, LegacyKeySpec, NCryptCreatePersistedKeyFlags)"/> method.
        /// </summary>
        [Flags]
        public enum NCryptCreatePersistedKeyFlags
        {
            /// <summary>
            /// No flags.
            /// </summary>
            None = 0x0,

            /// <summary>
            /// The key applies to the local computer. If this flag is not present, the key applies to the current user.
            /// </summary>
            NCRYPT_MACHINE_KEY_FLAG = 0x20,

            /// <summary>
            /// If a key already exists in the container with the specified name, the existing key will be overwritten. If this flag is not specified and a key with the specified name already exists, this function will return <see cref="SECURITY_STATUS.NTE_EXISTS"/>.
            /// </summary>
            NCRYPT_OVERWRITE_KEY_FLAG = 0x80,
        }
    }
}

Add values for a couple of enum values

Add values for a couple of enum values


using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace MessageBird.Objects
{
    public class Recipient
    {
        public enum RecipientStatus { Scheduled, Sent, Buffered, Delivered, DeliveryFailed };

        [JsonProperty("recipient")]
        public long Msisdn {get; set;}

        [JsonProperty("status")]
        [JsonConverter(typeof(StringEnumConverter))]
        public RecipientStatus? Status {get; set;}

        [JsonProperty("statusDatetime")]
        public DateTime? StatusDatetime {get; set;}

        public Recipient(long msisdn)
        {
            Msisdn = msisdn;
        }
    }
}

using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime.Serialization;

namespace MessageBird.Objects
{
    public class Recipient
    {
        public enum RecipientStatus
        {
            // Message status
            [EnumMember(Value = "scheduled")]
            Scheduled,
            [EnumMember(Value = "sent")]
            Sent,
            [EnumMember(Value = "buffered")]
            Buffered,
            [EnumMember(Value = "delivered")]
            Delivered,
            [EnumMember(Value = "delivery_failed")]
            DeliveryFailed,
        };

        [JsonProperty("recipient")]
        public long Msisdn {get; set;}

        [JsonProperty("status")]
        [JsonConverter(typeof(StringEnumConverter))]
        public RecipientStatus? Status {get; set;}

        [JsonProperty("statusDatetime")]
        public DateTime? StatusDatetime {get; set;}

        public Recipient(long msisdn)
        {
            Msisdn = msisdn;
        }
    }
}

Fix incorrect serialization of recipient status


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.IO;

namespace Microsoft.DotNet.Execute
{
    internal class Interop
    {
        public static bool GetUnixVersion(out string result)
        {
            result = null;
            const string OSReleaseFileName = @"/etc/os-release";
            if (File.Exists(OSReleaseFileName))
            {
                string content = File.ReadAllText(OSReleaseFileName);
                int idIndex = content.IndexOf("ID");
                int versionIndex = content.IndexOf("VERSION_ID");
                if (idIndex != -1 && versionIndex != -1)
                {
                    string id = content.Substring(idIndex + 3, content.IndexOf(Environment.NewLine, idIndex + 3) - idIndex - 3);
                    string version = content.Substring(versionIndex + 12, content.IndexOf('"', versionIndex + 12) - versionIndex - 12);
                    result = $"{id}.{version}";
                }
            }

            return result != null;
        }
    }
}

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.IO;

namespace Microsoft.DotNet.Execute
{
    internal class Interop
    {
        public static bool GetUnixVersion(out string result)
        {
            const string OSId = "ID=";
            const string OSVersionId = "VERSION_ID=";
            result = null;
            const string OSReleaseFileName = @"/etc/os-release";
            if (File.Exists(OSReleaseFileName))
            {
                string[] content = File.ReadAllLines(OSReleaseFileName);
                string id = null, version = null;
                foreach (string line in content)
                {
                    if (line.StartsWith(OSId))
                    {
                        id = line.Substring(OSId.Length, line.Length - OSId.Length);
                    }
                    else if (line.StartsWith(OSVersionId))
                    {
                        int startOfVersion = line.IndexOf('"', OSVersionId.Length) + 1;
                        int endOfVersion = startOfVersion == 0 ? line.Length : line.IndexOf('"', startOfVersion);
                        if (startOfVersion == 0)
                            startOfVersion = OSVersionId.Length;

                        version = line.Substring(startOfVersion, endOfVersion - startOfVersion);
                    }

                    // Skip parsing rest of the file contents.
                    if (id != null && version != null)
                        break;
                }

                result = $"{id}.{version}";
            }

            return result != null;
        }
    }
}

Improve parsing /etc/os-release, handle more cases.


// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

namespace Microsoft.VisualStudio.IntegrationTest.Utilities.Common.ProjectUtils
{
    public abstract class Identity
    {
        public string Name { get; protected set; }
    }

    public class Project : Identity
    {
        public Project(string name, string relativePath = null)
        {
            Name = name;
            RelativePath = relativePath;
        }

        public string RelativePath { get; }
    }

    public class ProjectReference : Identity
    {
        public ProjectReference(string name)
        {
            Name = name;
        }
    }

    public class AssemblyReference : Identity
    {
        public AssemblyReference(string name)
        {
            Name = name;
        }
    }

    public class PackageReference : Identity
    {
        public string Version { get; }

        public PackageReference(string name, string version)
        {
            Name = name;
            Version = version;
        }
    }
}

// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.IO;

namespace Microsoft.VisualStudio.IntegrationTest.Utilities.Common.ProjectUtils
{
    public abstract class Identity
    {
        public string Name { get; protected set; }
    }

    public class Project : Identity
    {
        public Project(string name, string projectExtension = ".csproj", string relativePath = null)
        {
            Name = name;

            if (string.IsNullOrWhiteSpace(relativePath))
            {
                RelativePath = Path.Combine(name, name + projectExtension);
            }
            else
            {
                RelativePath = relativePath;
            }
        }

        /// <summary>
        /// This path is relative to the Solution file. Default value is set to ProjectName\ProjectName.csproj
        /// </summary>
        public string RelativePath { get; }
    }

    public class ProjectReference : Identity
    {
        public ProjectReference(string name)
        {
            Name = name;
        }
    }

    public class AssemblyReference : Identity
    {
        public AssemblyReference(string name)
        {
            Name = name;
        }
    }

    public class PackageReference : Identity
    {
        public string Version { get; }

        public PackageReference(string name, string version)
        {
            Name = name;
            Version = version;
        }
    }
}

Set default relative path for Project Identity in Integration tests


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

using osu.Game.Beatmaps;
using osu.Game.Rulesets.Replays;
using osu.Game.Rulesets.Replays.Legacy;
using osu.Game.Rulesets.Replays.Types;

namespace osu.Game.Rulesets.Catch.Replays
{
    public class CatchReplayFrame : ReplayFrame, IConvertibleReplayFrame
    {
        public float Position;
        public bool Dashing;

        public CatchReplayFrame()
        {
        }

        public CatchReplayFrame(double time, float? position = null, bool dashing = false)
            : base(time)
        {
            Position = position ?? -1;
            Dashing = dashing;
        }

        public void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap)
        {
            // Todo: This needs to be re-scaled
            Position = legacyFrame.Position.X;
            Dashing = legacyFrame.ButtonState == ReplayButtonState.Left1;
        }
    }
}

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

using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Replays;
using osu.Game.Rulesets.Replays.Legacy;
using osu.Game.Rulesets.Replays.Types;

namespace osu.Game.Rulesets.Catch.Replays
{
    public class CatchReplayFrame : ReplayFrame, IConvertibleReplayFrame
    {
        public float Position;
        public bool Dashing;

        public CatchReplayFrame()
        {
        }

        public CatchReplayFrame(double time, float? position = null, bool dashing = false)
            : base(time)
        {
            Position = position ?? -1;
            Dashing = dashing;
        }

        public void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap)
        {
            Position = legacyFrame.Position.X / CatchPlayfield.BASE_WIDTH;
            Dashing = legacyFrame.ButtonState == ReplayButtonState.Left1;
        }
    }
}

Fix catch legacy replay positions not being relative to playfield size


#region

using System.Net;
using Tabster.Core.Data.Processing;
using Tabster.Core.Types;

#endregion

namespace Tabster.Core.Searching
{
    /// <summary>
    ///   Tab service which enables searching.
    /// </summary>
    public interface ISearchService
    {
        /// <summary>
        ///   Service name.
        /// </summary>
        string Name { get; }

        /// <summary>
        ///   Associated parser.
        /// </summary>
        ITablatureWebpageImporter Parser { get; }

        /// <summary>
        ///   Service flags.
        /// </summary>
        SearchServiceFlags Flags { get; }

        /// <summary>
        /// Proxy settings.
        /// </summary>
        WebProxy Proxy { get; }

        /// <summary>
        /// Determines whether the service supports ratings.
        /// </summary>
        bool SupportsRatings { get; }

        /// <summary>
        ///   Queries service and returns results based on search parameters.
        /// </summary>
        /// <param name="query"> Search query. </param>
        SearchResult[] Search(SearchQuery query);

        ///<summary>
        ///  Determines whether a specific TabType is supported by the service.
        ///</summary>
        ///<param name="type"> The type to check. </param>
        ///<returns> True if the type is supported by the service; otherwise, False. </returns>
        bool SupportsTabType(TabType type);
    }
}

#region

using System.Net;
using Tabster.Core.Data.Processing;
using Tabster.Core.Types;

#endregion

namespace Tabster.Core.Searching
{
    /// <summary>
    ///   Tab service which enables searching.
    /// </summary>
    public interface ISearchService
    {
        /// <summary>
        ///   Service name.
        /// </summary>
        string Name { get; }

        /// <summary>
        ///   Associated parser.
        /// </summary>
        ITablatureWebpageImporter Parser { get; }

        /// <summary>
        ///   Service flags.
        /// </summary>
        SearchServiceFlags Flags { get; }

        /// <summary>
        /// Proxy settings.
        /// </summary>
        WebProxy Proxy { get; set; }

        /// <summary>
        /// Determines whether the service supports ratings.
        /// </summary>
        bool SupportsRatings { get; }

        /// <summary>
        ///   Queries service and returns results based on search parameters.
        /// </summary>
        /// <param name="query"> Search query. </param>
        SearchResult[] Search(SearchQuery query);

        ///<summary>
        ///  Determines whether a specific TabType is supported by the service.
        ///</summary>
        ///<param name="type"> The type to check. </param>
        ///<returns> True if the type is supported by the service; otherwise, False. </returns>
        bool SupportsTabType(TabType type);
    }
}

Add setter to Proxy property.

Add setter to Proxy property.


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

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BTDB")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BTDB")]
[assembly: AssemblyCopyright("Copyright  Boris Letocha 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM componenets.  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("d949b20a-70ec-46bf-8eed-3a3cfb0d4593")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
[assembly: AssemblyVersion("2.13.0.0")]
[assembly: AssemblyFileVersion("2.13.0.0")]

[assembly: InternalsVisibleTo("BTDBTest")]

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

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BTDB")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BTDB")]
[assembly: AssemblyCopyright("Copyright  Boris Letocha 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM componenets.  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("d949b20a-70ec-46bf-8eed-3a3cfb0d4593")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]

[assembly: InternalsVisibleTo("BTDBTest")]

Bump it even more to follow semver

Bump it even more to follow semver


// Copyright (c) Microsoft Corporation.  All rights reserved.
// Licensed under the MIT License.  See License.txt in the project root for license information.

using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;

#if !BUILD_GENERATED_VERSION
[assembly: AssemblyCompany("Microsoft Corporation.")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
#endif
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
#if !NOT_CLS_COMPLIANT
[assembly: CLSCompliant(true)]
#endif
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyMetadata("Serviceable", "True")]

// ===========================================================================
//  DO NOT EDIT OR REMOVE ANYTHING BELOW THIS COMMENT.
//  Version numbers are automatically generated based on regular expressions.
// ===========================================================================

#if ASPNETODATA
#if !BUILD_GENERATED_VERSION
[assembly: AssemblyVersion("5.5.0.0")] // ASPNETODATA
[assembly: AssemblyFileVersion("5.5.0.0")] // ASPNETODATA
#endif
[assembly: AssemblyProduct("Microsoft OData Web API")]
#endif

// Copyright (c) Microsoft Corporation.  All rights reserved.
// Licensed under the MIT License.  See License.txt in the project root for license information.

using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;

#if !BUILD_GENERATED_VERSION
[assembly: AssemblyCompany("Microsoft Corporation.")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
#endif
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
#if !NOT_CLS_COMPLIANT
[assembly: CLSCompliant(true)]
#endif
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyMetadata("Serviceable", "True")]

// ===========================================================================
//  DO NOT EDIT OR REMOVE ANYTHING BELOW THIS COMMENT.
//  Version numbers are automatically generated based on regular expressions.
// ===========================================================================

#if ASPNETODATA
#if !BUILD_GENERATED_VERSION
[assembly: AssemblyVersion("5.5.1.0")] // ASPNETODATA
[assembly: AssemblyFileVersion("5.5.1.0")] // ASPNETODATA
#endif
[assembly: AssemblyProduct("Microsoft OData Web API")]
#endif

Upgrade version from 5.5.0 to 5.5.1

Upgrade version from 5.5.0 to 5.5.1


using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Office.Interop.Excel;

namespace XtabFileOpener.TableContainer.SpreadsheetTableContainer.ExcelTableContainer
{
    /// <summary>
    /// Implementation of Table, that manages an Excel table
    /// </summary>
    internal class ExcelTable : Table
    {
        internal ExcelTable(string name, Range cells) : base(name)
        {
            /*
             * "The only difference between this property and the Value property is that the Value2 property
             *  doesn’t use the Currency and Date data types. You can return values formatted with these
             *  data types as floating-point numbers by using the Double data type."
             * */
            tableArray = cells.Value;
            firstRowContainsColumnNames = true;
        }
    }
}

using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Office.Interop.Excel;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("XtabFileOpenerTest")]
namespace XtabFileOpener.TableContainer.SpreadsheetTableContainer.ExcelTableContainer
{
    /// <summary>
    /// Implementation of Table, that manages an Excel table.
    /// Cells that are date formatted in Excel will be converted to ISO strings.
    /// </summary>
    internal class ExcelTable : Table
    {
        internal ExcelTable(string name, Range cells) : base(name)
        {
            tableArray = cells.Value;
            firstRowContainsColumnNames = true;

            ConvertDateTimesToIsoFormat();
        }

        private void ConvertDateTimesToIsoFormat()
        {
            string iso_time_format = "{0:yyyy-MM-dd HH:mm:ss}";
            string iso_time_format_with_miliseconds = "{0:yyyy-MM-dd HH:mm:ss.ffffff}00";

            for (int i = tableArray.GetLowerBound(0); i <= tableArray.GetUpperBound(0); i++)
            {
                for (int j = tableArray.GetLowerBound(1); j <= tableArray.GetUpperBound(1); j++)
                {
                    object cell = tableArray[i, j];
                    if (cell is DateTime && cell != null)
                    {
                        DateTime dt = (DateTime) cell;
                        string format = (dt.Millisecond > 0) ? iso_time_format_with_miliseconds : iso_time_format;
                        tableArray[i, j] = String.Format(format, dt);
                    }
                }
            }
        }
    }
}

Convert DateTime objects to ISO format that is understood by DBUnit. DateTime objects are returned by Excel if cell is formatted for date display.


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

[assembly: AssemblyTitle("Autofac.Extras.NHibernate")]
[assembly: AssemblyDescription("Autofac Integration for NHibernate")]
[assembly: ComVisible(false)]

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

[assembly: AssemblyTitle("Autofac.Extras.NHibernate")]
[assembly: ComVisible(false)]

Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the assembly version that remains at the major.


using System;
using System.Threading;

namespace Example1
{
  public class Program
  {
    public static void Main (string [] args)
    {
      using (var streamer = new AudioStreamer ("ws://agektmr.node-ninja.com:3000/socket"))
      //using (var streamer = new AudioStreamer ("ws://localhost:3000/socket"))
      {
        string name;
        do {
          Console.Write ("Input your name> ");
          name = Console.ReadLine ();
        }
        while (name.Length == 0);

        streamer.Connect (name);
        Console.WriteLine ("\nType \"exit\" to exit.\n");
        while (true) {
          Thread.Sleep (1000);
          Console.Write ("> ");
          var msg = Console.ReadLine ();
          if (msg == "exit")
            break;

          streamer.Write (msg);
        }
      }
    }
  }
}

using System;
using System.Threading;

namespace Example1
{
  public class Program
  {
    public static void Main (string [] args)
    {
      using (var streamer = new AudioStreamer ("ws://agektmr.node-ninja.com:3000/socket"))
      //using (var streamer = new AudioStreamer ("ws://localhost:3000/socket"))
      {
        string name;
        do {
          Console.Write ("Input your name> ");
          name = Console.ReadLine ();
        }
        while (name.Length == 0);

        streamer.Connect (name);

        Console.WriteLine ("\nType 'exit' to exit.\n");
        while (true) {
          Thread.Sleep (1000);
          Console.Write ("> ");
          var msg = Console.ReadLine ();
          if (msg == "exit")
            break;

          streamer.Write (msg);
        }
      }
    }
  }
}

Fix a few for Example1

Fix a few for Example1


using System;
using NUnit.Framework;
namespace Google.Apis.Tools.CodeGen.Tests
{
    [TestFixture()]
    public class NewtonsoftObjectToJsonTest
    {
        [Test()]
        public void TestCase ()
        {
            Assert.Fail("Not tested yet");
        }
    }
}

/*
Copyright 2010 Google Inc

Licensed under the Apache License, Version 2.0 (the ""License"");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an ""AS IS"" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
using System;
using NUnit.Framework;
namespace Google.Apis.Tools.CodeGen.Tests.Decorator.ServiceDecorator
{
    [TestFixture()]
    public class NewtonsoftObjectToJsonTest
    {
        [Test()]
        public void TestCase ()
        {
            Assert.Fail("Not tested yet");
        }
    }
}

Correct the namespace and add copyright message.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SiliconStudio.Core.Mathematics;
using SiliconStudio.Xenko.Input;
using SiliconStudio.Xenko.Engine;
using SiliconStudio.Xenko.UI.Controls;
using XenkoToolkit.Samples.Core;

namespace XenkoToolkit.Samples.Core
{
    public class NavigationButtonHandler : SyncScript
    {
        public UIPage Page { get; set; }

        public string ButtonName { get; set; }

        public INavigationButtonAction ButtonAction { get; set; } = new NavigateToScreen();

        public override void Start()
        {

            Page = Page ?? this.Entity.Get<UIComponent>()?.Page;

            if (string.IsNullOrEmpty(ButtonName) || ButtonAction == null) return;

            // Initialization of the script.
            if (Page?.RootElement.FindName(ButtonName) is Button button)
            {
                button.Click += Button_Click;

            }
        }

        private async void Button_Click(object sender, SiliconStudio.Xenko.UI.Events.RoutedEventArgs e)
        {
            var navService = Game.Services.GetService<ISceneNavigationService>();

            await ButtonAction?.Handle(navService);
        }

        public override void Update()
        {
            // Do stuff every new frame
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SiliconStudio.Core.Mathematics;
using SiliconStudio.Xenko.Input;
using SiliconStudio.Xenko.Engine;
using SiliconStudio.Xenko.UI.Controls;
using XenkoToolkit.Samples.Core;

namespace XenkoToolkit.Samples.Core
{
    public class NavigationButtonHandler : SyncScript
    {
        public UIPage Page { get; set; }

        public string ButtonName { get; set; }

        public INavigationButtonAction ButtonAction { get; set; } = new NavigateToScreen();

        public override void Start()
        {

            Page = Page ?? this.Entity.Get<UIComponent>()?.Page;

            if (string.IsNullOrEmpty(ButtonName) || ButtonAction == null) return;

            // Initialization of the script.
            if (Page?.RootElement.FindName(ButtonName) is Button button)
            {
                button.Click += Button_Click;

            }
        }

        private async void Button_Click(object sender, SiliconStudio.Xenko.UI.Events.RoutedEventArgs e)
        {
            var navService = Game.Services.GetService<ISceneNavigationService>();

            await ButtonAction?.Handle(navService);
        }

        public override void Update()
        {
            // Do stuff every new frame
        }

        public override void Cancel()
        {
            if (Page?.RootElement.FindName(ButtonName) is Button button)
            {
                button.Click -= Button_Click;

            }
        }
    }
}

Remove button handler on Cancel.

Remove button handler on Cancel.


using System;
using Xunit;

namespace SparkPost.Tests
{
    public partial class ClientTests
    {
        public partial class UserAgentTests
        {
            private readonly Client.Settings settings;

            public UserAgentTests()
            {
                settings = new Client.Settings();
            }

            [Fact]
            public void It_should_default_to_the_library_version()
            {
                Assert.Equal($"csharp-sparkpost/2.0.0", settings.UserAgent);
            }

            [Fact]
            public void It_should_allow_the_user_agent_to_be_changed()
            {
                var userAgent = Guid.NewGuid().ToString();
                settings.UserAgent = userAgent;
                Assert.Equal(userAgent, settings.UserAgent);
            }
        }
    }
}

using System;
using Xunit;

namespace SparkPost.Tests
{
    public partial class ClientTests
    {
        public partial class UserAgentTests
        {
            private readonly Client.Settings settings;

            public UserAgentTests()
            {
                settings = new Client.Settings();
            }

            [Fact]
            public void It_should_default_to_the_library_version()
            {
                Assert.StartsWith($"csharp-sparkpost/2.", settings.UserAgent);
            }

            [Fact]
            public void It_should_allow_the_user_agent_to_be_changed()
            {
                var userAgent = Guid.NewGuid().ToString();
                settings.UserAgent = userAgent;
                Assert.Equal(userAgent, settings.UserAgent);
            }
        }
    }
}

Make agent test less brittle

Make agent test less brittle


using Flood.Tools.RPCGen;
using NUnit.Framework;
using System;
using System.IO;
using System.Reflection;

namespace RPCGen.Tests
{
    [TestFixture]
    class RPCGenTests
    {
        [Test]
        public void MainTest()
        {
            string genDirectory = Path.Combine("..", "..", "gen", "RPCGen.Tests");
            Directory.CreateDirectory(genDirectory);

            var sourceDllPath = Path.GetFullPath("RPCGen.Tests.Services.dll");
            var destDllPath = Path.Combine(genDirectory, "RPCGen.Tests.Services.dll");
            var sourcePdbPath = Path.GetFullPath("RPCGen.Tests.Services.pdb");
            var destPdbPath = Path.Combine(genDirectory, "RPCGen.Tests.Services.pdb");

            System.IO.File.Copy(sourceDllPath, destDllPath, true);

            if (File.Exists(sourcePdbPath))
                System.IO.File.Copy(sourcePdbPath, destPdbPath, true);

            var args = new string[]
            {
                String.Format("-o={0}", genDirectory),
                destDllPath
            };

            var ret = Flood.Tools.RPCGen.Program.Main(args);
            Assert.AreEqual(0, ret);
        }
    }
}

using NUnit.Framework;
using System;
using System.IO;

namespace RPCGen.Tests
{
    [TestFixture]
    class RPCGenTests
    {
        [Test]
        public void MainTest()
        {
            string genDirectory = Path.Combine("..", "..", "gen", "RPCGen.Tests");

            Directory.CreateDirectory(genDirectory);

            var assemblyName = "RPCGen.Tests.Services";
            var assemblyDll = assemblyName + ".dll";
            var assemblyPdb = assemblyName + ".pdb";

            var sourceDllPath = Path.GetFullPath(assemblyDll);
            var destDllPath = Path.Combine(genDirectory, assemblyDll);
            var sourcePdbPath = Path.GetFullPath(assemblyPdb);
            var destPdbPath = Path.Combine(genDirectory, assemblyPdb);

            File.Copy(sourceDllPath, destDllPath, true);

            if (File.Exists(sourcePdbPath))
                File.Copy(sourcePdbPath, destPdbPath, true);

            var args = new string[]
            {
                String.Format("-o={0}", genDirectory),
                destDllPath
            };

            var ret = Flood.Tools.RPCGen.Program.Main(args);
            Assert.AreEqual(0, ret);
        }
    }
}

Refactor assembly name in MainTests.

Refactor assembly name in MainTests.


@inherits Umbraco.Web.Mvc.UmbracoViewPage<dynamic>

            @Model.Header

            @Html.Raw(@Model.Body)

        @if (Model.Footer != null && !String.IsNullOrEmpty(Convert.ToString(Model.Footer)))
        {

                @Model.Footer

        }

@helper AccordionHelper()
{
if (Model != null && Model.AccordionParent != null)
{
        @:data-parent="@Model.AccordionParent"
    }
}

@inherits Umbraco.Web.Mvc.UmbracoViewPage<dynamic>

            @Model.Header

            @Html.Raw(@Model.Body)

        @if (Model.Footer != null && !String.IsNullOrEmpty(Convert.ToString(Model.Footer)))
        {

                @Model.Footer

        }

@helper AccordionHelper()
{
if (Model != null && Model.AccordionParent != null)
{
        @:data-parent="@Model.AccordionParent" class="collapsed"
    }
}

Set accordion panels to be default collapsed


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

namespace ValueUtilsTest {
    class SampleClass {
        public SampleEnum AnEnum;

        public string AutoPropWithPrivateBackingField { get; set; }
    }

}

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

namespace ValueUtilsTest {
    struct CustomStruct {
        public int Bla;
    }

    class SampleClass {
        public SampleEnum AnEnum;
        public int? NullableField;
        public CustomStruct PlainStruct;
        public CustomStruct? NullableStruct;

        public string AutoPropWithPrivateBackingField { get; set; }
    }

}

Add tricky cases to test class: - nullable primitives - non-nullable custom structs - nullable structs


#if NETCOREAPP2_1
using System.Runtime.InteropServices;
#endif

namespace XSharp.Launch
{
    internal static class RuntimeHelper
    {
        public static bool IsWindows
        {
            get
            {
#if NETCOREAPP2_1
                return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
#elif NET471
                return true;
#endif
            }
        }

        public static bool IsOSX
        {
            get
            {
#if NETCOREAPP2_1
                return RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
#elif NET471
                return false;
#endif
            }
        }

        public static bool IsLinux
        {
            get
            {
#if NETCOREAPP2_1
                return RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
#elif NET471
                return false;
#endif
            }
        }
    }
}

#if NETCOREAPP2_0
using System.Runtime.InteropServices;
#endif

namespace XSharp.Launch
{
    internal static class RuntimeHelper
    {
        public static bool IsWindows
        {
            get
            {
#if NETCOREAPP2_0
                return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
#elif NET472
                return true;
#endif
            }
        }

        public static bool IsOSX
        {
            get
            {
#if NETCOREAPP2_0
                return RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
#elif NET472
                return false;
#endif
            }
        }

        public static bool IsLinux
        {
            get
            {
#if NETCOREAPP2_0
                return RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
#elif NET472
                return false;
#endif
            }
        }
    }
}

Update conditional code blocks with new versions