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

[assembly: AssemblyTitle("Autofac.Integration.Wcf")]
[assembly: AssemblyDescription("Autofac WCF Integration")]
[assembly: InternalsVisibleTo("Autofac.Tests.Integration.Wcf, PublicKey=00240000048000009400000006020000002400005253413100040000010001008728425885ef385e049261b18878327dfaaf0d666dea3bd2b0e4f18b33929ad4e5fbc9087e7eda3c1291d2de579206d9b4292456abffbe8be6c7060b36da0c33b883e3878eaf7c89fddf29e6e27d24588e81e86f3a22dd7b1a296b5f06fbfb500bbd7410faa7213ef4e2ce7622aefc03169b0324bcd30ccfe9ac8204e4960be6")]
[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.Collections.Generic;

namespace Gigobyte.Daterpillar.Compare
{
    public class ComparisonReport
    {
        public Counter Counters;

        public Outcome Summary { get; set; }
        public IList<Discrepancy> Discrepancies { get; set; }

        public struct Counter
        {
            public int SourceTables;

            public int DestTables;
        }
    }
}

using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Gigobyte.Daterpillar.Compare
{
    [DataContract]
    public class ComparisonReport : IEnumerable<Discrepancy>
    {
        public Counter Counters;

        [DataMember]
        public Outcome Summary { get; set; }

        [DataMember]
        public IList<Discrepancy> Discrepancies { get; set; }

        public IEnumerator<Discrepancy> GetEnumerator()
        {
            foreach (var item in Discrepancies) { yield return item; }
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        public struct Counter
        {
            public int SourceTables;

            public int DestTables;
        }
    }
}

Add data contract attributes to ComparisionReport.cs


using System;
using Newtonsoft.Json;
using Toggl.Phoebe.Bugsnag.Json;
using System.Collections.Generic;

namespace Toggl.Phoebe.Bugsnag.Data
{
    [JsonObject (MemberSerialization.OptIn)]
    public class Event
    {
        [JsonProperty ("user", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public UserInfo User { get; set; }

        [JsonProperty ("app")]
        public ApplicationInfo App { get; set; }

        [JsonProperty ("appState", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public ApplicationState AppState { get; set; }

        [JsonProperty ("device", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public SystemInfo System { get; set; }

        [JsonProperty ("deviceState", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public SystemState SystemState { get; set; }

        [JsonProperty ("context")]
        public string Context { get; set; }

        [JsonProperty ("severity"), JsonConverter (typeof(ErrorSeverityConverter))]
        public ErrorSeverity Severity { get; set; }

        [JsonProperty ("exceptions")]
        public List<ExceptionInfo> Exceptions { get; set; }

        [JsonProperty ("metadata")]
        public Metadata Metadata { get; set; }
    }
}

using System;
using Newtonsoft.Json;
using Toggl.Phoebe.Bugsnag.Json;
using System.Collections.Generic;

namespace Toggl.Phoebe.Bugsnag.Data
{
    [JsonObject (MemberSerialization.OptIn)]
    public class Event
    {
        [JsonProperty ("user", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public UserInfo User { get; set; }

        [JsonProperty ("app")]
        public ApplicationInfo App { get; set; }

        [JsonProperty ("appState", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public ApplicationState AppState { get; set; }

        [JsonProperty ("device", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public SystemInfo System { get; set; }

        [JsonProperty ("deviceState", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public SystemState SystemState { get; set; }

        [JsonProperty ("context")]
        public string Context { get; set; }

        [JsonProperty ("severity"), JsonConverter (typeof(ErrorSeverityConverter))]
        public ErrorSeverity Severity { get; set; }

        [JsonProperty ("exceptions")]
        public List<ExceptionInfo> Exceptions { get; set; }

        [JsonProperty ("metaData")]
        public Metadata Metadata { get; set; }
    }
}

Fix metaData JSON property name case.

Fix metaData JSON property name case.


using System.Runtime.Serialization;

namespace Plexo
{
    [DataContract]
    public class Currency
    {
        [DataMember]
        public int CurrencyId { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Plural { get; set; }
        [DataMember]
        public string Symbol { get; set; }
        //Mercury Id is for internal use, no serialization required
        public int MercuryId { get; set; }
    }
}

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

namespace Plexo
{
    [DataContract]
    public class Currency
    {
        [DataMember]
        public int CurrencyId { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Plural { get; set; }
        [DataMember]
        public string Symbol { get; set; }
        //Mercury Id is for internal use, no serialization required
        [JsonIgnore]
        public int MercuryId { get; set; }
    }
}

Make sure MercuryId do not get serialized.


namespace GraphQL.Types
{
    public interface INamedType
    {
        string Name { get; set; }
    }

    public interface IGraphType : IProvideMetadata, INamedType
    {
        string Description { get; set; }
        string DeprecationReason { get; set; }

        string CollectTypes(TypeCollectionContext context);
    }

    public interface IOutputGraphType : IGraphType
    {
    }

    public interface IInputGraphType : IGraphType
    {
    }
}

namespace GraphQL.Types
{
    public interface INamedType
    {
        string Name { get; set; }
    }

    public interface IGraphType : IProvideMetadata, INamedType
    {
        string Description { get; set; }
        string DeprecationReason { get; set; }

        string CollectTypes(TypeCollectionContext context);
    }
}

Remove input/output interfaces for now

Remove input/output interfaces for now

Fixes #335


using JetBrains.TextControl.DocumentMarkup;

namespace JetBrains.ReSharper.Plugins.Unity.AsmDef.Feature.Services.Daemon.Attributes
{
    [RegisterHighlighter(GUID_REFERENCE_TOOLTIP, EffectType = EffectType.TEXT)]
    public static class AsmDefHighlightingAttributeIds
    {
        public const string GUID_REFERENCE_TOOLTIP = "ReSharper AsmDef GUID Reference Tooltip";
    }
}

using JetBrains.TextControl.DocumentMarkup;

namespace JetBrains.ReSharper.Plugins.Unity.AsmDef.Feature.Services.Daemon.Attributes
{
    // Rider doesn't support an empty set of attributes (all the implementations of IRiderHighlighterModelCreator
    // return null), so we must define something. If we define an EffectType, ReSharper throws if we don't define it
    // properly. But this is just a tooltip, and should have EffectType.NONE. So define one dummy attribute, this keeps
    // both Rider and ReSharper happy
    [RegisterHighlighter(GUID_REFERENCE_TOOLTIP, FontFamily = "Unused")]
    public static class AsmDefHighlightingAttributeIds
    {
        public const string GUID_REFERENCE_TOOLTIP = "ReSharper AsmDef GUID Reference Tooltip";
    }
}

Fix registration of tooltip only highlighter

Resolves part of RSPL-6988


// The MIT License (MIT)
//
// Copyright (c) 2015 Rasmus Mikkelsen
// https://github.com/rasmus/EventFlow
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

namespace EventFlow
{
    public sealed class MetadataKeys
    {
        public const string EventName = "event_name";
        public const string EventVersion = "event_version";
        public const string Timestamp = "timestamp";
        public const string AggregateSequenceNumber = "global_sequence_number";
    }
}

// The MIT License (MIT)
//
// Copyright (c) 2015 Rasmus Mikkelsen
// https://github.com/rasmus/EventFlow
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

namespace EventFlow
{
    public sealed class MetadataKeys
    {
        public const string EventName = "event_name";
        public const string EventVersion = "event_version";
        public const string Timestamp = "timestamp";
        public const string AggregateSequenceNumber = "aggregate_sequence_number";
    }
}

Fix metadata key, its the aggregate sequence number not the global one


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

using osu.Framework.Allocation;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osuTK;

namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
    public abstract class CatchSelectionBlueprint<THitObject> : HitObjectSelectionBlueprint<THitObject>
        where THitObject : CatchHitObject
    {
        public override Vector2 ScreenSpaceSelectionPoint
        {
            get
            {
                float x = HitObject.OriginalX;
                float y = HitObjectContainer.PositionAtTime(HitObject.StartTime);
                return HitObjectContainer.ToScreenSpace(new Vector2(x, y + HitObjectContainer.DrawHeight));
            }
        }

        public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => SelectionQuad.Contains(screenSpacePos);

        protected ScrollingHitObjectContainer HitObjectContainer => (ScrollingHitObjectContainer)playfield.HitObjectContainer;

        [Resolved]
        private Playfield playfield { get; set; }

        protected CatchSelectionBlueprint(THitObject hitObject)
            : base(hitObject)
        {
        }
    }
}

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

using osu.Framework.Allocation;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osuTK;

namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
    public abstract class CatchSelectionBlueprint<THitObject> : HitObjectSelectionBlueprint<THitObject>
        where THitObject : CatchHitObject
    {
        protected override bool AlwaysShowWhenSelected => true;

        public override Vector2 ScreenSpaceSelectionPoint
        {
            get
            {
                float x = HitObject.OriginalX;
                float y = HitObjectContainer.PositionAtTime(HitObject.StartTime);
                return HitObjectContainer.ToScreenSpace(new Vector2(x, y + HitObjectContainer.DrawHeight));
            }
        }

        public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => SelectionQuad.Contains(screenSpacePos);

        protected ScrollingHitObjectContainer HitObjectContainer => (ScrollingHitObjectContainer)playfield.HitObjectContainer;

        [Resolved]
        private Playfield playfield { get; set; }

        protected CatchSelectionBlueprint(THitObject hitObject)
            : base(hitObject)
        {
        }
    }
}

Fix catch selection blueprint not displayed after copy-pasted


using System;

namespace Cake.Xamarin.Build
{
    [Flags]
    public enum BuildPlatforms
    {
        Mac = 0,
        Windows = 1,
        Linux = 2
    }
}

using System;

namespace Cake.Xamarin.Build
{
    [Flags]
    public enum BuildPlatforms
    {
        Mac = 1,
        Windows = 2,
        Linux = 4
    }
}

Fix flags (Mac shouldn't be 0 based)

Fix flags (Mac shouldn't be 0 based)


using System.IO;
using System.IO.Compression;
using System.Web;

namespace Kudu.Services
{
    public static class HttpRequestExtensions
    {
        public static Stream GetInputStream(this HttpRequestBase request)
        {
            var contentEncoding = request.Headers["Content-Encoding"];

            if (contentEncoding != null && contentEncoding.Contains("gzip"))
            {
                return new GZipStream(request.InputStream, CompressionMode.Decompress);
            }

            return request.InputStream;
        }
    }
}

using System.IO;
using System.IO.Compression;
using System.Web;

namespace Kudu.Services
{
    public static class HttpRequestExtensions
    {
        public static Stream GetInputStream(this HttpRequestBase request)
        {
            var contentEncoding = request.Headers["Content-Encoding"];

            if (contentEncoding != null && contentEncoding.Contains("gzip"))
            {
                return new GZipStream(request.GetBufferlessInputStream(), CompressionMode.Decompress);
            }

            return request.GetBufferlessInputStream();
        }
    }
}

Use bufferless stream to improve perf and resource usage

Fixes #518


using System.Diagnostics.Tracing;
using Glimpse.Agent.AspNet.Mvc;
using Glimpse.Agent.Web;
using Glimpse.Server.Web;
using Microsoft.AspNet.Builder;
using Microsoft.Framework.DependencyInjection;

namespace Glimpse.FunctionalTest.Website
{
    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services
                .AddGlimpse()
                .RunningAgentWeb()
                .RunningServerWeb()
                .WithLocalAgent();

            services.AddMvc();
            services.AddTransient<MvcTelemetryListener>();
        }

        public void Configure(IApplicationBuilder app)
        {
            var telemetryListener = app.ApplicationServices.GetRequiredService<TelemetryListener>();
            telemetryListener.SubscribeWithAdapter(app.ApplicationServices.GetRequiredService<MvcTelemetryListener>());

            app.UseGlimpseServer();
            app.UseGlimpseAgent();

            app.UseMvcWithDefaultRoute();
        }
    }
}

using System.Diagnostics.Tracing;
using Glimpse.Agent.AspNet.Mvc;
using Glimpse.Agent.Web;
using Glimpse.Server.Web;
using Microsoft.AspNet.Builder;
using Microsoft.Framework.DependencyInjection;

namespace Glimpse.FunctionalTest.Website
{
    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services
                .AddGlimpse()
                .RunningAgentWeb()
                .RunningServerWeb()
                .WithLocalAgent();

            services.AddMvc();
        }

        public void Configure(IApplicationBuilder app)
        {
            app.UseGlimpseServer();
            app.UseGlimpseAgent();

            app.UseMvcWithDefaultRoute();
        }
    }
}

Remove need for function test to register telemetry source


// Copyright (c) Samuel Cragg.
//
// Licensed under the MIT license. See LICENSE file in the project root for
// full license information.

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

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Samuel Cragg")]
[assembly: AssemblyProduct("Crest.OpenApi")]
[assembly: AssemblyTrademark("")]

[assembly: ComVisible(false)]
[assembly: InternalsVisibleTo("OpenApi.UnitTests")]

// Copyright (c) Samuel Cragg.
//
// Licensed under the MIT license. See LICENSE file in the project root for
// full license information.

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

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Samuel Cragg")]
[assembly: AssemblyProduct("Crest.OpenApi")]
[assembly: AssemblyTrademark("")]

[assembly: ComVisible(false)]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // NSubstitute
[assembly: InternalsVisibleTo("OpenApi.UnitTests")]

Allow substituting of internal types.

Allow substituting of internal types.


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class DestroyEnemy : MonoBehaviour {

	public static int kills = 0;

	void OnCollisionEnter (Collision col) {
		if(col.gameObject.name.Contains("Monster")) {
			kills += 1;
			Destroy(col.gameObject);

			if (kills >= 5) {
				SceneManager.LoadScene ("GameWin", LoadSceneMode.Single);
			}
		}
	}
}

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class DestroyEnemy : MonoBehaviour {

	public static int kills = 0;

	void OnCollisionEnter (Collision col) {
		if(col.gameObject.name.Contains("Monster")) {
			kills += 1;
			Destroy(col.gameObject);

			if (kills >= 5) {
				kills = 0;
				SceneManager.LoadScene ("GameWin", LoadSceneMode.Single);
			}
		}
	}
}

Reset the counter for the next playthrough - BH


using System;
using Microsoft.Extensions.DependencyInjection;
using MR.Augmenter.Internal;

namespace MR.Augmenter
{
	public static class AugmenterServiceCollectionExtensions
	{
		public static IAugmenterBuilder AddAugmenter(
			this IServiceCollection services,
			Action<AugmenterConfiguration> configure)
		{
			services.AddScoped<IAugmenter, Augmenter>();

			var configuration = new AugmenterConfiguration();
			configure(configuration);
			configuration.Build();
			services.AddSingleton(configuration);

			return new AugmenterBuilder(services);
		}
	}
}

using System;
using Microsoft.Extensions.DependencyInjection;
using MR.Augmenter.Internal;

namespace MR.Augmenter
{
	public static class AugmenterServiceCollectionExtensions
	{
		/// <summary>
		/// Adds augmenter to services.
		/// </summary>
		/// <param name="services"></param>
		/// <param name="configure">Can be null.</param>
		public static IAugmenterBuilder AddAugmenter(
			this IServiceCollection services,
			Action<AugmenterConfiguration> configure)
		{
			services.AddScoped<IAugmenter, Augmenter>();

			var configuration = new AugmenterConfiguration();
			configure?.Invoke(configuration);
			configuration.Build();
			services.AddSingleton(configuration);

			return new AugmenterBuilder(services);
		}
	}
}

Allow configure to be null

Allow configure to be null


using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Input;
using AudioSharp.Utils;

namespace AudioSharp.Config
{
    public class ConfigHandler
    {
        public static void SaveConfig(Configuration config)
        {
            string json = JsonUtils.SerializeObject(config);
            File.WriteAllText(Path.Combine(FileUtils.AppDataFolder, "settings.json"), json);
        }

        public static Configuration ReadConfig()
        {
            string path = Path.Combine(FileUtils.AppDataFolder, "settings.json");
            if (File.Exists(path))
            {
                string json = File.ReadAllText(path);
                Configuration config = JsonUtils.DeserializeObject<Configuration>(json);

                if (config.MP3EncodingPreset == 0)
                    config.MP3EncodingPreset = 1001;

                return config;
            }

            return new Configuration()
            {
                RecordingsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic),
                RecordingPrefix = "Recording{n}",
                NextRecordingNumber = 1,
                AutoIncrementRecordingNumber = true,
                OutputFormat = "wav",
                ShowTrayIcon = true,
                GlobalHotkeys = new Dictionary<HotkeyType, Tuple<Key, ModifierKeys>>(),
                RecordingSettingsPanelVisible = true,
                RecordingOutputPanelVisible = true,
                CheckForUpdates = true
            };
        }
    }
}

using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Input;
using AudioSharp.Utils;

namespace AudioSharp.Config
{
    public class ConfigHandler
    {
        public static void SaveConfig(Configuration config)
        {
            string json = JsonUtils.SerializeObject(config);
            File.WriteAllText(Path.Combine(FileUtils.AppDataFolder, "settings.json"), json);
        }

        public static Configuration ReadConfig()
        {
            string path = Path.Combine(FileUtils.AppDataFolder, "settings.json");
            if (File.Exists(path))
            {
                string json = File.ReadAllText(path);
                Configuration config = JsonUtils.DeserializeObject<Configuration>(json);

                if (config.MP3EncodingPreset == 0)
                    config.MP3EncodingPreset = 1001;

                return config;
            }

            return new Configuration()
            {
                RecordingsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic),
                RecordingPrefix = "Recording{n}",
                NextRecordingNumber = 1,
                AutoIncrementRecordingNumber = true,
                OutputFormat = "wav",
                ShowTrayIcon = true,
                GlobalHotkeys = new Dictionary<HotkeyType, Tuple<Key, ModifierKeys>>(),
                RecordingSettingsPanelVisible = true,
                RecordingOutputPanelVisible = true,
                CheckForUpdates = true,
                MP3EncodingPreset = 1001
            };
        }
    }
}

Set a default value for MP3 recording preset for new config files


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("ExtjsWd")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("ExtjsWd")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
[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("efc31b18-7c2f-44f2-a1f3-4c49b28f409c")]

// 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")]

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("ExtjsWd")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("ExtjsWd")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
[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("efc31b18-7c2f-44f2-a1f3-4c49b28f409c")]

// 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.2")]
[assembly: AssemblyFileVersion("1.0.0.2")]

Update assembly and file version

Update assembly and file version


using System.Linq;
using BobTheBuilder.ArgumentStore.Queries;
using JetBrains.Annotations;

namespace BobTheBuilder.Activation
{
    internal class InstanceCreator
    {
        private readonly IArgumentStoreQuery constructorArgumentsQuery;

        public InstanceCreator([NotNull]IArgumentStoreQuery constructorArgumentsQuery)
        {
            this.constructorArgumentsQuery = constructorArgumentsQuery;
        }

        public T CreateInstanceOf<T>() where T: class
        {
            var instanceType = typeof(T);
            var constructor = instanceType.GetConstructors().Single();
            var constructorArguments = constructorArgumentsQuery.Execute(instanceType);
            return (T)constructor.Invoke(constructorArguments.Select(arg => arg.Value).ToArray());
        }
    }
}

using System.Linq;
using BobTheBuilder.ArgumentStore.Queries;
using JetBrains.Annotations;

namespace BobTheBuilder.Activation
{
    internal class InstanceCreator
    {
        private readonly IArgumentStoreQuery constructorArgumentsQuery;

        public InstanceCreator([NotNull]IArgumentStoreQuery constructorArgumentsQuery)
        {
            this.constructorArgumentsQuery = constructorArgumentsQuery;
        }

        public T CreateInstanceOf<T>() where T: class
        {
            var instanceType = typeof(T);
            var constructor = instanceType.GetConstructors().Single();
            var constructorArguments = constructorArgumentsQuery.Execute(instanceType);
            return constructor.Invoke(constructorArguments.Select(arg => arg.Value).ToArray()) as T;
        }
    }
}

Use safe cast for readability

Use safe cast for readability


using System;
using System.Web.Mvc;

using TeacherPouch.Models;
using TeacherPouch.Web.ViewModels;

namespace TeacherPouch.Web.Controllers
{
    public partial class PagesController : ControllerBase
    {
        // GET: /
        public virtual ViewResult Home()
        {
            return View(Views.Home);
        }

        public virtual ViewResult About()
        {
            return View(Views.About);
        }

        // GET: /Contact
        public virtual ViewResult Contact()
        {
            var viewModel = new ContactViewModel();

            return View(Views.Contact, viewModel);
        }

        // POST: /Contact
        [HttpPost]
        [ValidateAntiForgeryToken]
        public virtual ActionResult Contact(ContactSubmission submision)
        {
            if (submision.IsValid)
            {
                if (!base.Request.IsLocal)
                {
                    submision.SendEmail();
                }
            }
            else
            {
                var viewModel = new ContactViewModel();
                viewModel.ErrorMessage = "You must fill out the form before submitting.";

                return View(Views.Contact, viewModel);
            }

            return RedirectToAction(Actions.ContactThanks());
        }

        // GET: /Contact/Thanks
        public virtual ViewResult ContactThanks()
        {
            return View(Views.ContactThanks);
        }

        // GET: /Copyright
        public virtual ViewResult Copyright()
        {
            return View(Views.Copyright);
        }
    }
}

using System;
using System.Web.Mvc;

using TeacherPouch.Models;
using TeacherPouch.Web.ViewModels;

namespace TeacherPouch.Web.Controllers
{
    public partial class PagesController : ControllerBase
    {
        // GET: /
        public virtual ViewResult Home()
        {
            return View(Views.Home);
        }

        public virtual ViewResult About()
        {
            return View(Views.About);
        }

        // GET: /Contact
        public virtual ViewResult Contact()
        {
            var viewModel = new ContactViewModel();

            return View(Views.Contact, viewModel);
        }

        // POST: /Contact
        [HttpPost]
        [ValidateAntiForgeryToken]
        public virtual ActionResult Contact(ContactSubmission submision)
        {
            if (submision.IsValid)
            {
                if (!base.Request.IsLocal)
                {
                    submision.SendEmail();
                }
            }
            else
            {
                var viewModel = new ContactViewModel();
                viewModel.ErrorMessage = "You must fill out the form before submitting.";

                return View(Views.Contact, viewModel);
            }

            return RedirectToAction(Actions.ContactThanks());
        }

        // GET: /Contact/Thanks
        public virtual ViewResult ContactThanks()
        {
            return View(Views.ContactThanks);
        }

        // GET: /License
        public virtual ViewResult License()
        {
            return View(Views.License);
        }
    }
}

Change Copyright page to License page.

Change Copyright page to License page.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation.Language;

namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Extensions
{
    // TODO Add documentation
    public static class Extensions
    {
        public static IEnumerable<string> GetLines(this string text)
        {
            return text.Split('\n').Select(line => line.TrimEnd('\r'));
        }

        public static IScriptExtent Translate(this IScriptExtent extent, int lineDelta, int columnDelta)
        {
            var newStartLineNumber = extent.StartLineNumber + lineDelta;
            if (newStartLineNumber < 1)
            {
                throw new ArgumentException(
                    "Invalid line delta. Resulting start line number must be greather than 1.");
            }

            var newStartColumnNumber = extent.StartColumnNumber + columnDelta;
            var newEndColumnNumber = extent.EndColumnNumber + columnDelta;
            if (newStartColumnNumber < 1 || newEndColumnNumber < 1)
            {
                throw new ArgumentException(@"Invalid column delta.
Resulting start column and end column number must be greather than 1.");
            }

            return new ScriptExtent(
                new ScriptPosition(
                    extent.File,
                    newStartLineNumber,
                    newStartColumnNumber,
                    extent.StartScriptPosition.Line),
                new ScriptPosition(
                    extent.File,
                    extent.EndLineNumber + lineDelta,
                    newEndColumnNumber,
                    extent.EndScriptPosition.Line));
        }

        /// <summary>
        /// Converts IScriptExtent to Range
        /// </summary>
        public static Range ToRange(this IScriptExtent extent)
        {
           return new Range(
                extent.StartLineNumber,
                extent.StartColumnNumber,
                extent.EndLineNumber,
                extent.EndColumnNumber);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation.Language;

namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Extensions
{
    // TODO Add documentation
    public static class Extensions
    {
        public static IEnumerable<string> GetLines(this string text)
        {
            return text.Split('\n').Select(line => line.TrimEnd('\r'));
        }

        /// <summary>
        /// Converts IScriptExtent to Range
        /// </summary>
        public static Range ToRange(this IScriptExtent extent)
        {
           return new Range(
                extent.StartLineNumber,
                extent.StartColumnNumber,
                extent.EndLineNumber,
                extent.EndColumnNumber);
        }
    }
}

Remove IScriptExtent.Translate method from extensions


using GitHub.Exports;
using GitHub.UI;
using GitHub.ViewModels;
using System.ComponentModel.Composition;
using System.Windows.Controls;
using ReactiveUI;

namespace GitHub.VisualStudio.UI.Views
{
    public class GenericPullRequestCreationView : SimpleViewUserControl<IPullRequestCreationViewModel, GenericPullRequestCreationView>
    { }

    [ExportView(ViewType = UIViewType.PRCreation)]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public partial class PullRequestCreationView : GenericPullRequestCreationView
    {
        public PullRequestCreationView()
        {
            InitializeComponent();
            // DataContextChanged += (s, e) => ViewModel = e.NewValue as IPullRequestCreationViewModel;
            DataContextChanged += (s, e) => ViewModel = new GitHub.SampleData.PullRequestCreationViewModelDesigner() as IPullRequestCreationViewModel;

            this.WhenActivated(d =>
            {
            });
        }
    }
}

using GitHub.Exports;
using GitHub.UI;
using GitHub.ViewModels;
using System.ComponentModel.Composition;
using System.Windows.Controls;
using ReactiveUI;

namespace GitHub.VisualStudio.UI.Views
{
    public class GenericPullRequestCreationView : SimpleViewUserControl<IPullRequestCreationViewModel, GenericPullRequestCreationView>
    { }

    [ExportView(ViewType = UIViewType.PRCreation)]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public partial class PullRequestCreationView : GenericPullRequestCreationView
    {
        public PullRequestCreationView()
        {
            InitializeComponent();
            DataContextChanged += (s, e) => ViewModel = e.NewValue as IPullRequestCreationViewModel;

            this.WhenActivated(d =>
            {
            });
        }
    }
}

Revert "Try to use SampleData instead of real data in the meantime"

This reverts commit 2b0105a4c5761ac030bfc31ed7aebcfb4e8d3253.


using System.Linq;
using System.Net;
using AngleSharp;
using AngleSharp.Parser.Html;

namespace WebDriverManager.DriverConfigs.Impl
{
    public class OperaConfig : IDriverConfig
    {
        public virtual string GetName()
        {
            return "Opera";
        }

        public virtual string GetUrl32()
        {
            return "https://github.com/operasoftware/operachromiumdriver/releases/download/v.<version>/operadriver_win32.zip";
        }

        public virtual string GetUrl64()
        {
            return "https://github.com/operasoftware/operachromiumdriver/releases/download/v.<version>/operadriver_win64.zip";
        }

        public virtual string GetBinaryName()
        {
            return "operadriver.exe";
        }

        public virtual string GetLatestVersion()
        {
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            using (var client = new WebClient())
            {
                var htmlCode = client.DownloadString("https://github.com/operasoftware/operachromiumdriver/releases");
                var parser = new HtmlParser(Configuration.Default.WithDefaultLoader());
                var document = parser.Parse(htmlCode);
                var version = document.QuerySelectorAll("[class~='release-title'] a")
                    .Select(element => element.TextContent)
                    .FirstOrDefault();
                return version;
            }
        }
    }
}

using System.Linq;
using System.Net;
using AngleSharp;
using AngleSharp.Parser.Html;

namespace WebDriverManager.DriverConfigs.Impl
{
    public class OperaConfig : IDriverConfig
    {
        public virtual string GetName()
        {
            return "Opera";
        }

        public virtual string GetUrl32()
        {
            return "https://github.com/operasoftware/operachromiumdriver/releases/download/v.<version>/operadriver_win32.zip";
        }

        public virtual string GetUrl64()
        {
            return "https://github.com/operasoftware/operachromiumdriver/releases/download/v.<version>/operadriver_win64.zip";
        }

        public virtual string GetBinaryName()
        {
            return "operadriver.exe";
        }

        public virtual string GetLatestVersion()
        {
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            using (var client = new WebClient())
            {
                var htmlCode = client.DownloadString("https://github.com/operasoftware/operachromiumdriver/releases");
                var parser = new HtmlParser(Configuration.Default.WithDefaultLoader());
                var document = parser.Parse(htmlCode);
                var version = document.QuerySelectorAll(".release-title > a")
                    .Select(element => element.TextContent)
                    .FirstOrDefault();
                return version;
            }
        }
    }
}

Simplify release title with version selector


namespace TraktApiSharp.Objects.Get.Shows.Seasons
{
    using Newtonsoft.Json;

    /// A collection of ids for various web services, including the Trakt id, for a Trakt season.
    public class TraktSeasonIds
    {
        /// Gets or sets the Trakt numeric id.
        [JsonProperty(PropertyName = "trakt")]
        public int Trakt { get; set; }

        /// Gets or sets the numeric id from thetvdb.com
        [JsonProperty(PropertyName = "tvdb")]
        public int? Tvdb { get; set; }

        /// Gets or sets the numeric id from themoviedb.org
        [JsonProperty(PropertyName = "tmdb")]
        public int? Tmdb { get; set; }

        /// Gets or sets the numeric id from tvrage.com
        [JsonProperty(PropertyName = "tvrage")]
        public int? TvRage { get; set; }

        /// Returns, whether any id has been set.
        [JsonIgnore]
        public bool HasAnyId => Trakt > 0 || Tvdb > 0 || Tvdb > 0 || TvRage > 0;
    }
}

namespace TraktApiSharp.Objects.Get.Shows.Seasons
{
    using Newtonsoft.Json;

    /// A collection of ids for various web services, including the Trakt id, for a Trakt season.
    public class TraktSeasonIds
    {
        /// Gets or sets the Trakt numeric id.
        [JsonProperty(PropertyName = "trakt")]
        public int Trakt { get; set; }

        /// Gets or sets the numeric id from thetvdb.com
        [JsonProperty(PropertyName = "tvdb")]
        public int? Tvdb { get; set; }

        /// Gets or sets the numeric id from themoviedb.org
        [JsonProperty(PropertyName = "tmdb")]
        public int? Tmdb { get; set; }

        /// Gets or sets the numeric id from tvrage.com
        [JsonProperty(PropertyName = "tvrage")]
        public int? TvRage { get; set; }

        /// Returns, whether any id has been set.
        [JsonIgnore]
        public bool HasAnyId => Trakt > 0 || Tvdb > 0 || Tvdb > 0 || TvRage > 0;

        /// Gets the most reliable id from those that have been set.
        /// <returns>The id as a string or an empty string, if no id is set.</returns>
        public string GetBestId()
        {
            if (Trakt > 0)
                return Trakt.ToString();

            if (Tvdb.HasValue && Tvdb.Value > 0)
                return Tvdb.Value.ToString();

            if (Tmdb.HasValue && Tmdb.Value > 0)
                return Tmdb.Value.ToString();

            if (TvRage.HasValue && TvRage.Value > 0)
                return TvRage.Value.ToString();

            return string.Empty;
        }
    }
}

Add get best id method for season ids.

Add get best id method for season ids.


using System;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Mindscape.Raygun4Net
{
  public static class RaygunExceptionFilterAttacher
  {
    public static void AttachExceptionFilter(HttpApplication context, RaygunHttpModule module)
    {
      if (GlobalFilters.Filters.Count == 0) return;

      Filter filter = GlobalFilters.Filters.FirstOrDefault(f => f.Instance.GetType().FullName.Equals("System.Web.Mvc.HandleErrorAttribute"));
      if (filter != null)
      {
        GlobalFilters.Filters.Add(new RaygunExceptionFilterAttribute(context, module));
      }
    }
  }
}

using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Mindscape.Raygun4Net
{
  public static class RaygunExceptionFilterAttacher
  {
    public static void AttachExceptionFilter(HttpApplication context, RaygunHttpModule module)
    {
      if (GlobalFilters.Filters.Count == 0) return;

      Filter filter = GlobalFilters.Filters.FirstOrDefault(f => f.Instance.GetType().FullName.Equals("System.Web.Mvc.HandleErrorAttribute"));
      if (filter != null)
      {
        if (GlobalFilters.Filters.Any(f => f.Instance.GetType() == typeof(RaygunExceptionFilterAttribute))) return;

        GlobalFilters.Filters.Add(new RaygunExceptionFilterAttribute(context, module));
      }
    }
  }
}

Make sure the RaygunExceptionFilterAttribute hasn't already been added before we add it to the GlobalFilters list


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

namespace System.Web.OData.Design.Scaffolding
{
    internal static class ScaffolderVersions
    {
        public static readonly Version WebApiODataScaffolderVersion = new Version(1, 0, 0, 0);
    }
}

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

namespace System.Web.OData.Design.Scaffolding
{
    internal static class ScaffolderVersions
    {
        public static readonly Version WebApiODataScaffolderVersion = new Version(0, 1, 0, 0);
    }
}

Fix Version Problem for Scaffolding

Fix Version Problem for Scaffolding


using System.Linq;
using NUnit.Framework;

namespace LastPass.Test
{
    [TestFixture]
    class VaultTest
    {
        [Test]
        public void Create_returns_vault_with_correct_accounts()
        {
            var vault = Vault.Create(new Blob(TestData.Blob, 1));
            Assert.AreEqual(TestData.Accounts.Length, vault.EncryptedAccounts.Length);
            Assert.AreEqual(TestData.Accounts.Select(i => i.Url), vault.EncryptedAccounts.Select(i => i.Url));
        }

        [Test]
        public void DecryptAccount_decrypts_account()
        {
            var vault = Vault.Create(new Blob(TestData.Blob, 1));
            var account = vault.DecryptAccount(vault.EncryptedAccounts[0], "p8utF7ZB8yD06SrtrD4hsdvEOiBU1Y19cr2dhG9DWZg=".Decode64());
            Assert.AreEqual(TestData.Accounts[0].Name, account.Name);
            Assert.AreEqual(TestData.Accounts[0].Username, account.Username);
            Assert.AreEqual(TestData.Accounts[0].Password, account.Password);
            Assert.AreEqual(TestData.Accounts[0].Url, account.Url);
        }
    }
}

using System.Linq;
using NUnit.Framework;

namespace LastPass.Test
{
    [TestFixture]
    class VaultTest
    {
        [Test]
        public void Create_returns_vault_with_correct_accounts()
        {
            var vault = Vault.Create(new Blob(TestData.Blob, 1));
            Assert.AreEqual(TestData.Accounts.Length, vault.EncryptedAccounts.Length);
            Assert.AreEqual(TestData.Accounts.Select(i => i.Url), vault.EncryptedAccounts.Select(i => i.Url));
        }

        [Test]
        public void DecryptAccount_decrypts_accounts()
        {
            var vault = Vault.Create(new Blob(TestData.Blob, 1));
            for (var i = 0; i < vault.EncryptedAccounts.Length; ++i)
            {
                var account = vault.DecryptAccount(vault.EncryptedAccounts[i],
                                                   "p8utF7ZB8yD06SrtrD4hsdvEOiBU1Y19cr2dhG9DWZg=".Decode64());
                var expectedAccount = TestData.Accounts[i];
                Assert.AreEqual(expectedAccount.Name, account.Name);
                Assert.AreEqual(expectedAccount.Username, account.Username);
                Assert.AreEqual(expectedAccount.Password, account.Password);
                Assert.AreEqual(expectedAccount.Url, account.Url);
            }
        }
    }
}

Test that all accounts decrypt correctly


using Urho.Gui;
using Urho.Resources;

namespace Urho.Portable
{
	//TODO: generate this class using T4 from CoreData folder
	public static class CoreAssets
	{
		public static ResourceCache Cache => Application.Current.ResourceCache;

		public static class Models
		{
			public static Model Box => Cache.GetModel("Models/Box.mdl");
			public static Model Cone => Cache.GetModel("Models/Cone.mdl");
			public static Model Cylinder => Cache.GetModel("Models/Cylinder.mdl");
			public static Model Plane => Cache.GetModel("Models/Plane.mdl");
			public static Model Pyramid => Cache.GetModel("Models/Pyramid.mdl");
			public static Model Sphere => Cache.GetModel("Models/Sphere.mdl");
			public static Model Torus => Cache.GetModel("Models/Torus.mdl");
		}

		public static class Materials
		{
			public static Material DefaultGrey => Cache.GetMaterial("Materials/DefaultGrey.xml");
		}

		public static class Fonts
		{
			public static Font AnonymousPro => Cache.GetFont("Fonts/Anonymous Pro.ttf");
		}

		public static class RenderPaths
		{
		}

		public static class Shaders
		{
		}

		public static class Techniques
		{
		}
	}
}

using Urho.Gui;
using Urho.Resources;

namespace Urho
{
	//TODO: generate this class using T4 from CoreData folder
	public static class CoreAssets
	{
		public static ResourceCache Cache => Application.Current.ResourceCache;

		public static class Models
		{
			public static Model Box => Cache.GetModel("Models/Box.mdl");
			public static Model Cone => Cache.GetModel("Models/Cone.mdl");
			public static Model Cylinder => Cache.GetModel("Models/Cylinder.mdl");
			public static Model Plane => Cache.GetModel("Models/Plane.mdl");
			public static Model Pyramid => Cache.GetModel("Models/Pyramid.mdl");
			public static Model Sphere => Cache.GetModel("Models/Sphere.mdl");
			public static Model Torus => Cache.GetModel("Models/Torus.mdl");
		}

		public static class Materials
		{
			public static Material DefaultGrey => Cache.GetMaterial("Materials/DefaultGrey.xml");
		}

		public static class Fonts
		{
			public static Font AnonymousPro => Cache.GetFont("Fonts/Anonymous Pro.ttf");
		}

		public static class RenderPaths
		{
		}

		public static class Shaders
		{
		}

		public static class Techniques
		{
		}
	}
}

Remove "Portable" from namespace name in CoreAssets


using System;
using Microsoft.EntityFrameworkCore;
using SupportManager.Telegram.DAL;
using Topshelf;

namespace SupportManager.Telegram
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length == 2 && args[0].Equals("migrate", StringComparison.InvariantCultureIgnoreCase))
            {
                var filename = args[1];
                var builder = new DbContextOptionsBuilder<UserDbContext>();
                builder.UseSqlite($"Data Source={filename}");

                var db = new UserDbContext(builder.Options);
                db.Database.Migrate();

                return;
            }

            var config = new Configuration();
            var exitCode = HostFactory.Run(cfg =>
            {
                cfg.AddCommandLineDefinition("db", v => config.DbFileName = v);
                cfg.AddCommandLineDefinition("botkey", v => config.BotKey = v);
                cfg.AddCommandLineDefinition("url", v => config.SupportManagerUri = new Uri(v));
                cfg.AddCommandLineDefinition("hostUrl", v => config.HostUri = new Uri(v));

                cfg.Service<Service>(svc =>
                {
                    svc.ConstructUsing(() => new Service(config));
                    svc.WhenStarted((s, h) => s.Start(h));
                    svc.WhenStopped((s, h) => s.Stop(h));
                });

                cfg.SetServiceName("SupportManager.Telegram");
                cfg.SetDisplayName("SupportManager.Telegram");
                cfg.SetDescription("SupportManager Telegram bot");

                cfg.RunAsNetworkService();

                cfg.StartAutomatically();
            });
        }
    }
}

using System;
using Microsoft.EntityFrameworkCore;
using SupportManager.Telegram;
using SupportManager.Telegram.Infrastructure;
using Topshelf;

if (args.Length == 2 && args[0].Equals("migrate", StringComparison.InvariantCultureIgnoreCase))
{
    var db = DbContextFactory.Create(args[1]);
    db.Database.Migrate();

    return;
}

HostFactory.Run(cfg =>
{
    var config = new Configuration();

    cfg.AddCommandLineDefinition("db", v => config.DbFileName = v);
    cfg.AddCommandLineDefinition("botkey", v => config.BotKey = v);
    cfg.AddCommandLineDefinition("url", v => config.SupportManagerUri = new Uri(v));
    cfg.AddCommandLineDefinition("hostUrl", v => config.HostUri = new Uri(v));

    cfg.Service<Service>(svc =>
    {
        svc.ConstructUsing(() => new Service(config));
        svc.WhenStarted((s, h) => s.Start(h));
        svc.WhenStopped((s, h) => s.Stop(h));
    });

    cfg.SetServiceName("SupportManager.Telegram");
    cfg.SetDisplayName("SupportManager.Telegram");
    cfg.SetDescription("SupportManager Telegram bot");

    cfg.RunAsNetworkService();

    cfg.StartAutomatically();
});

Replace main with top-level statements

telegram: Replace main with top-level statements


using System;
using System.Collections.Generic;

namespace LazyStorage
{
    public class StorableObject : IEquatable<StorableObject>
    {
        public int LazyStorageInternalId { get; set; }
        public Dictionary<string, string> Info { get; }

        public StorableObject()
        {
            Info = new Dictionary<string, string>();
        }

        public bool Equals(StorableObject other)
        {
            return (other.LazyStorageInternalId == LazyStorageInternalId);
        }
    }
}

using System;
using System.Collections.Generic;

namespace LazyStorage
{
    public class StorableObject
    {
        public Dictionary<string, string> Info { get; }

        public StorableObject()
        {
            Info = new Dictionary<string, string>();
        }
    }
}

Remove Id from storable object

Remove Id from storable object


using System;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Core.DomainModel;
using Core.DomainServices;
using Presentation.Web.Models;

namespace Presentation.Web.Controllers.API
{
    public class PasswordResetRequestController : BaseApiController
    {
        private readonly IUserService _userService;
        private readonly IUserRepository _userRepository;

        public PasswordResetRequestController(IUserService userService, IUserRepository userRepository)
        {
            _userService = userService;
            _userRepository = userRepository;
        }

        // POST api/PasswordResetRequest
        public HttpResponseMessage Post([FromBody] UserDTO input)
        {
            try
            {
                var user = _userRepository.GetByEmail(input.Email);
                var request = _userService.IssuePasswordReset(user, null, null);

                return Ok();
            }
            catch (Exception e)
            {
                return CreateResponse(HttpStatusCode.InternalServerError, e);
            }
        }

        // GET api/PasswordResetRequest
        public HttpResponseMessage Get(string requestId)
        {
            try
            {
                var request = _userService.GetPasswordReset(requestId);
                if (request == null) return NotFound();
                var dto = AutoMapper.Mapper.Map<PasswordResetRequest, PasswordResetRequestDTO>(request);

                var msg = CreateResponse(HttpStatusCode.OK, dto);
                return msg;
            }
            catch (Exception e)
            {
                return CreateResponse(HttpStatusCode.InternalServerError, e);
            }
        }
    }
}

using System;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Core.DomainModel;
using Core.DomainServices;
using Presentation.Web.Models;

namespace Presentation.Web.Controllers.API
{
    [AllowAnonymous]
    public class PasswordResetRequestController : BaseApiController
    {
        private readonly IUserService _userService;
        private readonly IUserRepository _userRepository;

        public PasswordResetRequestController(IUserService userService, IUserRepository userRepository)
        {
            _userService = userService;
            _userRepository = userRepository;
        }

        // POST api/PasswordResetRequest
        public HttpResponseMessage Post([FromBody] UserDTO input)
        {
            try
            {
                var user = _userRepository.GetByEmail(input.Email);
                var request = _userService.IssuePasswordReset(user, null, null);

                return Ok();
            }
            catch (Exception e)
            {
                return CreateResponse(HttpStatusCode.InternalServerError, e);
            }
        }

        // GET api/PasswordResetRequest
        public HttpResponseMessage Get(string requestId)
        {
            try
            {
                var request = _userService.GetPasswordReset(requestId);
                if (request == null) return NotFound();
                var dto = AutoMapper.Mapper.Map<PasswordResetRequest, PasswordResetRequestDTO>(request);

                var msg = CreateResponse(HttpStatusCode.OK, dto);
                return msg;
            }
            catch (Exception e)
            {
                return CreateResponse(HttpStatusCode.InternalServerError, e);
            }
        }
    }
}

Allow anonymous on password reset requests


using System;
using System.Web;
using System.Web.Hosting;

namespace NuGet.Server.Infrastructure {
    public class PackageUtility {
        internal static string PackagePhysicalPath = HostingEnvironment.MapPath("~/Packages");

        public static Uri GetPackageUrl(string path, Uri baseUri) {
            return new Uri(baseUri, GetPackageDownloadUrl(path));
        }

        private static string GetPackageDownloadUrl(string path) {
            return VirtualPathUtility.ToAbsolute("~/Packages/" + path);
        }
    }
}

using System;
using System.Web;
using System.Web.Hosting;
using System.Configuration;

namespace NuGet.Server.Infrastructure
{
    public class PackageUtility
    {

        internal static string PackagePhysicalPath;
        private static string DefaultPackagePhysicalPath = HostingEnvironment.MapPath("~/Packages");

        static PackageUtility()
        {
            string packagePath = ConfigurationManager.AppSettings["NuGetPackagePath"];
            if (string.IsNullOrEmpty(packagePath))
            {
                PackagePhysicalPath = DefaultPackagePhysicalPath;
            }
            else
            {
                PackagePhysicalPath = packagePath;
            }
        }

        public static Uri GetPackageUrl(string path, Uri baseUri)
        {
            return new Uri(baseUri, GetPackageDownloadUrl(path));
        }

        private static string GetPackageDownloadUrl(string path)
        {
            return VirtualPathUtility.ToAbsolute("~/Packages/" + path);
        }
    }
}

Use the AppSettings 'NuGetPackagePath' if exists and the default ~/Packages otherwise


using System;
using System.Collections.Generic;

namespace NFleet.Data
{
    public class RouteEventData : IResponseData, IVersioned
    {
        public static string MIMEType = "application/vnd.jyu.nfleet.routeevent";
        public static string MIMEVersion = "2.0";

        int IVersioned.VersionNumber { get; set; }

        public string State { get; set; }

        public double WaitingTimeBefore { get; set; }

        public DateTime? ArrivalTime { get; set; }

        public DateTime? DepartureTime { get; set; }

        public List<Link> Meta { get; set; }

        public string DataState { get; set; }

        public string FeasibilityState { get; set; }

        public int TaskEventId { get; set; }

        public KPIData KPIs { get; set; }

        public string Type { get; set; }

        public LocationData Location { get; set; }
    }
}

using System;
using System.Collections.Generic;

namespace NFleet.Data
{
    public class RouteEventData : IResponseData, IVersioned
    {
        public static string MIMEType = "application/vnd.jyu.nfleet.routeevent";
        public static string MIMEVersion = "2.0";

        int IVersioned.VersionNumber { get; set; }

        public string State { get; set; }

        public double WaitingTimeBefore { get; set; }

        public DateTime? ArrivalTime { get; set; }

        public DateTime? DepartureTime { get; set; }

        public List<Link> Meta { get; set; }

        public string DataState { get; set; }

        public string FeasibilityState { get; set; }

        public int TaskEventId { get; set; }

        public KPIData KPIs { get; set; }

        public string Type { get; set; }

        public LocationData Location { get; set; }

        public List<CapacityData> Capacities { get; set; }

        public List<TimeWindowData> TimeWindows { get; set; }
    }
}

Add capacity and time window data to route events.


using System;
using System.Linq;
using System.Text;

namespace SCPI
{
    public class IDN : ICommand
    {
        public string Description => "Query the ID string of the instrument";

        public string Manufacturer { get; private set; }
        public string Model { get; private set; }
        public string SerialNumber { get; private set; }
        public string SoftwareVersion { get; private set; }

        public string HelpMessage()
        {
            return nameof(IDN);
        }

        public string Command(params string[] parameters)
        {
            return "*IDN?";
        }

        public bool Parse(byte[] data)
        {
            // RIGOL TECHNOLOGIES,<model>,<serial number>,<software version>
            var id = Encoding.ASCII.GetString(data).Split(',').Select(f => f.Trim());

            // According to IEEE 488.2 there are four fields in the response
            if (id.Count() == 4)
            {
                Manufacturer = id.ElementAt(0);
                Model = id.ElementAt(1);
                SerialNumber = id.ElementAt(2);
                SoftwareVersion = id.ElementAt(3);

                return true;
            }

            return false;
        }
    }
}

using System.Linq;
using System.Text;

namespace SCPI
{
    public class IDN : ICommand
    {
        public string Description => "Query the ID string of the instrument";

        public string Manufacturer { get; private set; }
        public string Model { get; private set; }
        public string SerialNumber { get; private set; }
        public string SoftwareVersion { get; private set; }

        public string HelpMessage() => nameof(IDN);

        public string Command(params string[] parameters) => "*IDN?";

        public bool Parse(byte[] data)
        {
            // RIGOL TECHNOLOGIES,<model>,<serial number>,<software version>
            var id = Encoding.ASCII.GetString(data).Split(',').Select(f => f.Trim());

            // According to IEEE 488.2 there are four fields in the response
            if (id.Count() == 4)
            {
                Manufacturer = id.ElementAt(0);
                Model = id.ElementAt(1);
                SerialNumber = id.ElementAt(2);
                SoftwareVersion = id.ElementAt(3);

                return true;
            }

            return false;
        }
    }
}

Change the method to expression body definition


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

namespace osu.Framework.Graphics.Cursor
{
    /// <summary>
    /// Implementing this interface allows the implementing <see cref="Drawable"/> to display a custom tooltip if it is the child of a <see cref="TooltipContainer"/>.
    /// Keep in mind that tooltips can only be displayed by a <see cref="TooltipContainer"/> if the <see cref="Drawable"/> implementing <see cref="IHasCustomTooltip"/> has <see cref="Drawable.HandlePositionalInput"/> set to true.
    /// </summary>
    public interface IHasCustomTooltip : ITooltipContentProvider
    {
        /// <summary>
        /// The custom tooltip that should be displayed.
        /// </summary>
        /// <returns>The custom tooltip that should be displayed.</returns>
        ITooltip GetCustomTooltip();

        /// <summary>
        /// Tooltip text that shows when hovering the drawable.
        /// </summary>
        object TooltipContent { get; }
    }

    /// <inheritdoc />
    public interface IHasCustomTooltip<TContent> : IHasCustomTooltip
    {
        ITooltip IHasCustomTooltip.GetCustomTooltip() => GetCustomTooltip();

        /// <inheritdoc cref="IHasCustomTooltip.GetCustomTooltip"/>
        new ITooltip<TContent> GetCustomTooltip();

        object IHasCustomTooltip.TooltipContent => TooltipContent;

        /// <inheritdoc cref="IHasCustomTooltip.TooltipContent"/>
        new TContent TooltipContent { get; }
    }
}

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

namespace osu.Framework.Graphics.Cursor
{
    /// <summary>
    /// Implementing this interface allows the implementing <see cref="Drawable"/> to display a custom tooltip if it is the child of a <see cref="TooltipContainer"/>.
    /// Keep in mind that tooltips can only be displayed by a <see cref="TooltipContainer"/> if the <see cref="Drawable"/> implementing <see cref="IHasCustomTooltip"/> has <see cref="Drawable.HandlePositionalInput"/> set to true.
    /// </summary>
    public interface IHasCustomTooltip : ITooltipContentProvider
    {
        /// <summary>
        /// The custom tooltip that should be displayed.
        /// </summary>
        /// <remarks>
        /// A tooltip may be reused between different drawables with different content if they share the same tooltip type.
        /// Therefore it is recommended for all displayed content in the tooltip to be provided by <see cref="TooltipContent"/> instead.
        /// </remarks>
        /// <returns>The custom tooltip that should be displayed.</returns>
        ITooltip GetCustomTooltip();

        /// <summary>
        /// Tooltip text that shows when hovering the drawable.
        /// </summary>
        object TooltipContent { get; }
    }

    /// <inheritdoc />
    public interface IHasCustomTooltip<TContent> : IHasCustomTooltip
    {
        ITooltip IHasCustomTooltip.GetCustomTooltip() => GetCustomTooltip();

        /// <inheritdoc cref="IHasCustomTooltip.GetCustomTooltip"/>
        new ITooltip<TContent> GetCustomTooltip();

        object IHasCustomTooltip.TooltipContent => TooltipContent;

        /// <inheritdoc cref="IHasCustomTooltip.TooltipContent"/>
        new TContent TooltipContent { get; }
    }
}

Add note about reusing of tooltips and the new behaviour


using NPoco;
using System;

namespace Dalian.Models
{
    [PrimaryKey("SiteId")]
    public class Sites
    {
        public string SiteId { get; set; }
        public string Name { get; set; }
        public string Url { get; set; }
        public string Note { get; set; }
        public string Source { get; set; }
        public DateTime DateTime { get; set; }
        public bool Active { get; set; }
        public string MetaTitle { get; set; }
        public string MetaDescription { get; set; }
        public string MetaKeywords { get; set; }
        public int Status { get; set; }
        public bool Bookmarklet { get; set; }
        public bool ReadItLater { get; set; }
        public bool Clipped { get; set; }
        public string ArchiveUrl { get; set; }
        public bool Highlight { get; set; }
        public bool PersonalHighlight { get; set; }
    }
}

using NPoco;
using System;

namespace Dalian.Models
{
    [PrimaryKey("SiteId", AutoIncrement = false)]
    public class Sites
    {
        public string SiteId { get; set; }
        public string Name { get; set; }
        public string Url { get; set; }
        public string Note { get; set; }
        public string Source { get; set; }
        public DateTime DateTime { get; set; }
        public bool Active { get; set; }
        public string MetaTitle { get; set; }
        public string MetaDescription { get; set; }
        public string MetaKeywords { get; set; }
        public int Status { get; set; }
        public bool Bookmarklet { get; set; }
        public bool ReadItLater { get; set; }
        public bool Clipped { get; set; }
        public string ArchiveUrl { get; set; }
        public bool Highlight { get; set; }
        public bool PersonalHighlight { get; set; }
    }
}

Fix not null constraint failed exception


using System;
using System.Collections.Generic;
using Autofac;
using Autofac.Core;

namespace ServiceStack.DependencyInjection
{
    public class DependencyResolver : IDisposable
    {
        private readonly ILifetimeScope _lifetimeScope;

        public DependencyResolver(ILifetimeScope lifetimeScope)
        {
            _lifetimeScope = lifetimeScope;
        }

        public T Resolve<T>()
        {
            return _lifetimeScope.Resolve<T>();
        }

        public object Resolve(Type type)
        {
            return _lifetimeScope.Resolve(type);
        }

        public T TryResolve<T>()
        {
            try
            {
                return _lifetimeScope.Resolve<T>();
            }
            catch (DependencyResolutionException unusedException)
            {
                return default(T);
            }
        }

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

using System;
using System.Collections.Generic;
using Autofac;
using Autofac.Core;

namespace ServiceStack.DependencyInjection
{
    public class DependencyResolver : IDisposable
    {
        private readonly ILifetimeScope _lifetimeScope;

        public DependencyResolver(ILifetimeScope lifetimeScope)
        {
            _lifetimeScope = lifetimeScope;
        }

        public T Resolve<T>()
        {
            return _lifetimeScope.Resolve<T>();
        }

        public object Resolve(Type type)
        {
            return _lifetimeScope.Resolve(type);
        }

        public T TryResolve<T>()
        {
            if (_lifetimeScope.IsRegistered<T>())
            {
                try
                {
                    return _lifetimeScope.Resolve<T>();
                }
                catch (DependencyResolutionException unusedException)
                {
                    return default(T);
                }
            }
            else
            {
                return default (T);
            }
        }

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

Check if registered before trying.

Check if registered before trying.


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

using System;
using osu.Framework.Input.Events;
using osu.Framework.Utils;
using osu.Game.Graphics.Containers;

namespace osu.Game.Beatmaps.Drawables.Cards
{
    public class ExpandedContentScrollContainer : OsuScrollContainer
    {
        public const float HEIGHT = 400;

        public ExpandedContentScrollContainer()
        {
            ScrollbarVisible = false;
        }

        protected override void Update()
        {
            base.Update();

            Height = Math.Min(Content.DrawHeight, HEIGHT);
        }

        private bool allowScroll => !Precision.AlmostEquals(DrawSize, Content.DrawSize);

        protected override bool OnDragStart(DragStartEvent e)
        {
            if (!allowScroll)
                return false;

            return base.OnDragStart(e);
        }

        protected override void OnDrag(DragEvent e)
        {
            if (!allowScroll)
                return;

            base.OnDrag(e);
        }

        protected override void OnDragEnd(DragEndEvent e)
        {
            if (!allowScroll)
                return;

            base.OnDragEnd(e);
        }

        protected override bool OnScroll(ScrollEvent e)
        {
            if (!allowScroll)
                return false;

            return base.OnScroll(e);
        }
    }
}

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

using System;
using osu.Framework.Input.Events;
using osu.Framework.Utils;
using osu.Game.Graphics.Containers;

namespace osu.Game.Beatmaps.Drawables.Cards
{
    public class ExpandedContentScrollContainer : OsuScrollContainer
    {
        public const float HEIGHT = 200;

        public ExpandedContentScrollContainer()
        {
            ScrollbarVisible = false;
        }

        protected override void Update()
        {
            base.Update();

            Height = Math.Min(Content.DrawHeight, HEIGHT);
        }

        private bool allowScroll => !Precision.AlmostEquals(DrawSize, Content.DrawSize);

        protected override bool OnDragStart(DragStartEvent e)
        {
            if (!allowScroll)
                return false;

            return base.OnDragStart(e);
        }

        protected override void OnDrag(DragEvent e)
        {
            if (!allowScroll)
                return;

            base.OnDrag(e);
        }

        protected override void OnDragEnd(DragEndEvent e)
        {
            if (!allowScroll)
                return;

            base.OnDragEnd(e);
        }

        protected override bool OnScroll(ScrollEvent e)
        {
            if (!allowScroll)
                return false;

            return base.OnScroll(e);
        }
    }
}

Change expanded card content height to 200


@model dynamic

@{
    ViewBag.Title = "Регистрация успешна";
}

@ViewBag.Title

Остался всего один клик! Проверьте свою почту, там лежит письмо от нас с просьбой подтвердить email...

Change message in register success

Change message in register success


using System;
using Ooui;

namespace Samples
{
    class Program
    {
        static void Main (string[] args)
        {
            new ButtonSample ().Publish ();
            new TodoSample ().Publish ();

            Console.ReadLine ();
        }
    }
}

using System;
using Ooui;

namespace Samples
{
    class Program
    {
        static void Main (string[] args)
        {
            for (var i = 0; i < args.Length; i++) {
                var a = args[i];
                switch (args[i]) {
                    case "-p" when i + 1 < args.Length:
                    case "--port" when i + 1 < args.Length:
                        {
                            int p;
                            if (int.TryParse (args[i + 1], out p)) {
                                UI.Port = p;
                            }
                            i++;
                        }
                        break;
                }
            }

            new ButtonSample ().Publish ();
            new TodoSample ().Publish ();

            Console.ReadLine ();
        }
    }
}

Add --port option to samples

Add --port option to samples

Fixes #6


using Hangfire.Common;
using Hangfire.Console.Serialization;
using Hangfire.Console.Storage;
using Hangfire.Server;
using Hangfire.States;
using System;

namespace Hangfire.Console.Server
{
    /// <summary>
    /// Server filter to initialize and cleanup console environment.
    /// </summary>
    internal class ConsoleServerFilter : IServerFilter
    {
        private readonly ConsoleOptions _options;

        public ConsoleServerFilter(ConsoleOptions options)
        {
            if (options == null)
                throw new ArgumentNullException(nameof(options));

            _options = options;
        }

        public void OnPerforming(PerformingContext context)
        {
            var state = context.Connection.GetStateData(context.BackgroundJob.Id);

            if (state == null)
            {
                // State for job not found?
                return;
            }

            if (!string.Equals(state.Name, ProcessingState.StateName, StringComparison.OrdinalIgnoreCase))
            {
                // Not in Processing state? Something is really off...
                return;
            }

            var startedAt = JobHelper.DeserializeDateTime(state.Data["StartedAt"]);

            context.Items["ConsoleContext"] = new ConsoleContext(
                new ConsoleId(context.BackgroundJob.Id, startedAt),
                new ConsoleStorage(context.Connection));
        }

        public void OnPerformed(PerformedContext context)
        {
            if (context.Canceled)
            {
                // Processing was been cancelled by one of the job filters
                // There's nothing to do here, as processing hasn't started
                return;
            }

            ConsoleContext.FromPerformContext(context)?.Expire(_options.ExpireIn);
        }
    }
}

using Hangfire.Common;
using Hangfire.Console.Serialization;
using Hangfire.Console.Storage;
using Hangfire.Server;
using Hangfire.States;
using System;

namespace Hangfire.Console.Server
{
    /// <summary>
    /// Server filter to initialize and cleanup console environment.
    /// </summary>
    internal class ConsoleServerFilter : IServerFilter
    {
        private readonly ConsoleOptions _options;

        public ConsoleServerFilter(ConsoleOptions options)
        {
            if (options == null)
                throw new ArgumentNullException(nameof(options));

            _options = options;
        }

        public void OnPerforming(PerformingContext filterContext)
        {
            var state = filterContext.Connection.GetStateData(filterContext.BackgroundJob.Id);

            if (state == null)
            {
                // State for job not found?
                return;
            }

            if (!string.Equals(state.Name, ProcessingState.StateName, StringComparison.OrdinalIgnoreCase))
            {
                // Not in Processing state? Something is really off...
                return;
            }

            var startedAt = JobHelper.DeserializeDateTime(state.Data["StartedAt"]);

            filterContext.Items["ConsoleContext"] = new ConsoleContext(
                new ConsoleId(filterContext.BackgroundJob.Id, startedAt),
                new ConsoleStorage(filterContext.Connection));
        }

        public void OnPerformed(PerformedContext filterContext)
        {
            if (filterContext.Canceled)
            {
                // Processing was been cancelled by one of the job filters
                // There's nothing to do here, as processing hasn't started
                return;
            }

            ConsoleContext.FromPerformContext(filterContext)?.Expire(_options.ExpireIn);
        }
    }
}

Rename arguments to match base names

Rename arguments to match base names


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

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Osu.Mods
{
    public class OsuModTouchDevice : Mod
    {
        public override string Name => "Touch Device";
        public override string Acronym => "TD";
        public override double ScoreMultiplier => 1;
    }
}

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

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Osu.Mods
{
    public class OsuModTouchDevice : Mod
    {
        public override string Name => "Touch Device";
        public override string Acronym => "TD";
        public override double ScoreMultiplier => 1;

        public override bool Ranked => true;
    }
}

Fix TD mod not being ranked

Fix TD mod not being ranked


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DarkRoomObstacleEnable : MonoBehaviour
{
    [SerializeField]
    private float maxXDistance = 11f;

	void Start ()
    {

	}

	void Update ()
    {
        for (int i = 0; i < transform.childCount; i++)
        {
            var child = transform.GetChild(i);
            var shouldEnable = Mathf.Abs(MainCameraSingleton.instance.transform.position.x - child.position.x) <= maxXDistance;
            if (shouldEnable != child.gameObject.activeInHierarchy)
                child.gameObject.SetActive(shouldEnable);
        }
	}
}

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

public class DarkRoomObstacleEnable : MonoBehaviour
{
    [SerializeField]
    private float maxXDistance = 11f;

	void Start ()
    {
        for (int i = 0; i < transform.childCount; i++)
        {
            var child = transform.GetChild(i);
            if (!child.gameObject.activeInHierarchy)
                Destroy(child.gameObject);
        }
    }

	void Update ()
    {
        for (int i = 0; i < transform.childCount; i++)
        {
            var child = transform.GetChild(i);
            var shouldEnable = Mathf.Abs(MainCameraSingleton.instance.transform.position.x - child.position.x) <= maxXDistance;
            if (shouldEnable != child.gameObject.activeInHierarchy)
                child.gameObject.SetActive(shouldEnable);
        }
	}
}

DarkRoom: Destroy obstacles disabled at scene start


using System;

namespace clipr
{
    /// <summary>
    /// Mark the property as a subcommand. (cf. 'svn checkout')
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
    public class VerbAttribute : Attribute
    {
        /// <summary>
        /// Name of the subcommand. If provided as an argument, it
        /// will trigger parsing of the subcommand.
        /// </summary>
        public string Name { get; private set; }

        /// <summary>
        /// Description of the subcommand, suitable for help pages.
        /// </summary>
        public string Description { get; private set; }

        /// <summary>
        /// Create a new subcommand.
        /// </summary>
        /// <param name="name"></param>
        public VerbAttribute(string name)
        {
            Name = name;
        }

        /// <summary>
        /// Create a new subcommand.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="description"></param>
        public VerbAttribute(string name, string description)
        {
            Name = name;
            Description = description;
        }
    }
}

using System;

namespace clipr
{
    /// <summary>
    /// Mark the property as a subcommand. (cf. 'svn checkout')
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
    public class VerbAttribute : Attribute
    {
        /// <summary>
        /// Name of the subcommand. If provided as an argument, it
        /// will trigger parsing of the subcommand.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Description of the subcommand, suitable for help pages.
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Create a new subcommand.
        /// </summary>
        public VerbAttribute()
        {

        }

        /// <summary>
        /// Create a new subcommand.
        /// </summary>
        /// <param name="name"></param>
        public VerbAttribute(string name)
        {
            Name = name;
        }

        /// <summary>
        /// Create a new subcommand.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="description"></param>
        public VerbAttribute(string name, string description)
        {
            Name = name;
            Description = description;
        }
    }
}

Allow verb name to be optional.

Allow verb name to be optional.


#tool nuget:?package=XamarinComponent&version=1.1.0.32

#addin nuget:?package=Cake.Xamarin.Build&version=1.0.14.0
#addin nuget:?package=Cake.Xamarin
#addin nuget:?package=Cake.XCode

#tool nuget:?package=XamarinComponent&version=1.1.0.32

#addin nuget:?package=Cake.Xamarin.Build
#addin nuget:?package=Cake.Xamarin
#addin nuget:?package=Cake.XCode

Remove explicit build addin dependency version


using System;
using System.Threading.Tasks;
using KafkaNet;
using KafkaNet.Model;
using KafkaNet.Protocol;
using System.Collections.Generic;

namespace TestHarness
{
    class Program
    {
        static void Main(string[] args)
        {
            var options = new KafkaOptions(new Uri("http://CSDKAFKA01:9092"), new Uri("http://CSDKAFKA02:9092"))
                {
                    Log = new ConsoleLog()
                };
            var router = new BrokerRouter(options);
            var client = new Producer(router);

            Task.Factory.StartNew(() =>
                {
                    var consumer = new Consumer(new ConsumerOptions("TestHarness", router));
                    foreach (var data in consumer.Consume())
                    {
                        Console.WriteLine("Response: P{0},O{1} : {2}", data.Meta.PartitionId, data.Meta.Offset, data.Value);
                    }
                });

            Console.WriteLine("Type a message and press enter...");
            while (true)
            {
                var message = Console.ReadLine();
                if (message == "quit") break;
                client.SendMessageAsync("TestHarness", new[] { new Message(message) });
            }

            using (client)
            using (router)
            {

            }
        }
    }
}

using System;
using System.Threading.Tasks;
using KafkaNet;
using KafkaNet.Common;
using KafkaNet.Model;
using KafkaNet.Protocol;
using System.Collections.Generic;

namespace TestHarness
{
    class Program
    {
        static void Main(string[] args)
        {
            //create an options file that sets up driver preferences
            var options = new KafkaOptions(new Uri("http://CSDKAFKA01:9092"), new Uri("http://CSDKAFKA02:9092"))
                {
                    Log = new ConsoleLog()
                };

            //start an out of process thread that runs a consumer that will write all received messages to the console
            Task.Factory.StartNew(() =>
                {
                    var consumer = new Consumer(new ConsumerOptions("TestHarness", new BrokerRouter(options)));
                    foreach (var data in consumer.Consume())
                    {
                        Console.WriteLine("Response: P{0},O{1} : {2}", data.Meta.PartitionId, data.Meta.Offset, data.Value.ToUTF8String());
                    }
                });

            //create a producer to send messages with
            var producer = new Producer(new BrokerRouter(options));

            Console.WriteLine("Type a message and press enter...");
            while (true)
            {
                var message = Console.ReadLine();
                if (message == "quit") break;
                if (string.IsNullOrEmpty(message))
                {
                    //special case, send multi messages quickly
                    for (int i = 0; i < 20; i++)
                    {
                        producer.SendMessageAsync("TestHarness", new[] { new Message(i.ToString()) })
                            .ContinueWith(t =>
                            {
                                t.Result.ForEach(x => Console.WriteLine("Complete: {0}, Offset: {1}", x.PartitionId, x.Offset));
                            });
                    }
                }
                else
                {
                    producer.SendMessageAsync("TestHarness", new[] { new Message(message) });
                }
            }

            using (producer)
            {

            }
        }
    }
}

Clean up TestHarness to be more instructive


using System;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;

namespace TweetDuck.Video.Controls{
    sealed class LabelTooltip : Label{
        public LabelTooltip(){
            Visible = false;
        }

        public void AttachTooltip(Control control, bool followCursor, string tooltip){
            AttachTooltip(control, followCursor, args => tooltip);
        }

        public void AttachTooltip(Control control, bool followCursor, Func<MouseEventArgs, string> tooltipFunc){
            control.MouseEnter += control_MouseEnter;
            control.MouseLeave += control_MouseLeave;

            control.MouseMove += (sender, args) => {
                Form form = control.FindForm();
                Debug.Assert(form != null);

                Text = tooltipFunc(args);
                Location = form.PointToClient(control.Parent.PointToScreen(new Point(control.Location.X-Width/2+(followCursor ? args.X : control.Width/2), -Height+Margin.Top-Margin.Bottom)));;
            };
        }

        private void control_MouseEnter(object sender, EventArgs e){
            Visible = true;
        }

        private void control_MouseLeave(object sender, EventArgs e){
            Visible = false;
        }
    }
}

using System;
using System.Drawing;
using System.Windows.Forms;

namespace TweetDuck.Video.Controls{
    sealed class LabelTooltip : Label{
        public LabelTooltip(){
            Visible = false;
        }

        public void AttachTooltip(Control control, bool followCursor, string tooltip){
            AttachTooltip(control, followCursor, args => tooltip);
        }

        public void AttachTooltip(Control control, bool followCursor, Func<MouseEventArgs, string> tooltipFunc){
            control.MouseEnter += control_MouseEnter;
            control.MouseLeave += control_MouseLeave;

            control.MouseMove += (sender, args) => {
                Form form = control.FindForm();
                System.Diagnostics.Debug.Assert(form != null);

                Text = tooltipFunc(args);

                Point loc = form.PointToClient(control.Parent.PointToScreen(new Point(control.Location.X+(followCursor ? args.X : control.Width/2), 0)));
                loc.X = Math.Max(0, Math.Min(form.Width-Width, loc.X-Width/2));
                loc.Y -= Height-Margin.Top+Margin.Bottom;
                Location = loc;
            };
        }

        private void control_MouseEnter(object sender, EventArgs e){
            Visible = true;
        }

        private void control_MouseLeave(object sender, EventArgs e){
            Visible = false;
        }
    }
}

Fix video player tooltip going outside Form bounds


// Licensed under the GPL License, Version 3.0. See LICENSE in the git repository root for license information.

using Newtonsoft.Json;

namespace Ecwid.Models
{
    /// <summary>
    /// </summary>
    public class TaxRule
    {
        /// <summary>
        /// Gets or sets the tax in %.
        /// </summary>
        /// <value>
        /// The tax.
        /// </value>
        [JsonProperty("tax")]
        public int Tax { get; set; }

        /// <summary>
        /// Gets or sets the destination zone identifier.
        /// </summary>
        /// <value>
        /// The zone identifier.
        /// </value>
        [JsonProperty("zoneId")]
        public string ZoneId { get; set; }
    }
}

// Licensed under the GPL License, Version 3.0. See LICENSE in the git repository root for license information.

using Newtonsoft.Json;

namespace Ecwid.Models
{
    /// <summary>
    /// </summary>
    public class TaxRule
    {
        /// <summary>
        /// Gets or sets the tax in %.
        /// </summary>
        /// <value>
        /// The tax.
        /// </value>
        [JsonProperty("tax")]
        public double Tax { get; set; }

        /// <summary>
        /// Gets or sets the destination zone identifier.
        /// </summary>
        /// <value>
        /// The zone identifier.
        /// </value>
        [JsonProperty("zoneId")]
        public string ZoneId { get; set; }
    }
}

Fix tax rule to be double not int

Fix tax rule to be double not int


using System;
using System.Data;
using System.Data.Common;

namespace Rebus.AdoNet.Dialects
{
	public class PostgreSql82Dialect : PostgreSqlDialect
	{
		protected override Version MinimumDatabaseVersion => new Version("8.2");
		public override ushort Priority => 82;

		public override bool SupportsReturningClause => true;
		public override bool SupportsSelectForWithNoWait => true;
		public override string SelectForNoWaitClause => "NOWAIT";

		public override bool IsSelectForNoWaitLockingException(DbException ex)
		{
			if (ex != null && ex.GetType().Name == "NpgsqlException")
			{
				var psqlex = new PostgreSqlExceptionAdapter(ex);
				return psqlex.Code == "55P03";
			}

			return false;
		}
	}
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
namespace Rebus.AdoNet.Dialects
{
	public class PostgreSql82Dialect : PostgreSqlDialect
	{
		private static readonly IEnumerable<string> _postgresExceptionNames = new[] { "NpgsqlException", "PostgresException" };

		protected override Version MinimumDatabaseVersion => new Version("8.2");
		public override ushort Priority => 82;

		public override bool SupportsReturningClause => true;
		public override bool SupportsSelectForWithNoWait => true;
		public override string SelectForNoWaitClause => "NOWAIT";

		public override bool IsSelectForNoWaitLockingException(DbException ex)
		{
			if (ex != null && _postgresExceptionNames.Contains(ex.GetType().Name))
			{
				var psqlex = new PostgreSqlExceptionAdapter(ex);
				return psqlex.Code == "55P03";
			}

			return false;
		}
	}
}

Add PostgresException on postgresExceptionNames fixing select for NoWait locking exceptions


using UnityEditor;
using UnityEngine;

namespace Tactosy.Unity
{
    [CustomEditor(typeof(Manager_Tactosy))]
    public class TactosyEditor : Editor
    {

        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            Manager_Tactosy tactosyManager = (Manager_Tactosy) target;

            foreach (var mappings in tactosyManager.FeedbackMappings)
            {
                var key = mappings.Key;
                if (GUILayout.Button(key))
                {
                    tactosyManager.Play(key);
                }
            }

            if (GUILayout.Button("Turn Off"))
            {
                tactosyManager.TurnOff();
            }
        }
    }
}

#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;

namespace Tactosy.Unity
{
#if UNITY_EDITOR
    [CustomEditor(typeof(Manager_Tactosy))]
    public class TactosyEditor : Editor
    {

        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            Manager_Tactosy tactosyManager = (Manager_Tactosy) target;

            foreach (var mappings in tactosyManager.FeedbackMappings)
            {
                var key = mappings.Key;
                if (GUILayout.Button(key))
                {
                    tactosyManager.Play(key);
                }
            }

            if (GUILayout.Button("Turn Off"))
            {
                tactosyManager.TurnOff();
            }
        }
    }
#endif
}

Add preprocessor to prevent compilation error


//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;

namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
    public class SignatureHelpRequest
    {
        public static readonly
            RequestType<TextDocumentPositionParams, SignatureHelp, object, object> Type =
            RequestType<TextDocumentPositionParams, SignatureHelp, object, object>.Create("textDocument/signatureHelp");
    }

    public class ParameterInformation
    {
        public string Label { get; set; }

        public string Documentation { get; set; }
    }

    public class SignatureInformation
    {
        public string Label { get; set; }

        public string Documentation { get; set; }

        public ParameterInformation[] Parameters { get; set; }
    }

    public class SignatureHelp
    {
        public SignatureInformation[] Signatures { get; set; }

        public int? ActiveSignature { get; set; }

        public int? ActiveParameter { get; set; }
    }
}

//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;

namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
    public class SignatureHelpRequest
    {
        public static readonly
            RequestType<TextDocumentPositionParams, SignatureHelp, object, SignatureHelpRegistrationOptions> Type =
            RequestType<TextDocumentPositionParams, SignatureHelp, object, SignatureHelpRegistrationOptions>.Create("textDocument/signatureHelp");
    }

    public class SignatureHelpRegistrationOptions : TextDocumentRegistrationOptions
    {
        // We duplicate the properties of SignatureHelpOptions class here because
        // we cannot derive from two classes. One way to get around this situation
        // is to use define SignatureHelpOptions as an interface instead of a class.
        public string[] TriggerCharacters { get; set; }
    }

    public class ParameterInformation
    {
        public string Label { get; set; }

        public string Documentation { get; set; }
    }

    public class SignatureInformation
    {
        public string Label { get; set; }

        public string Documentation { get; set; }

        public ParameterInformation[] Parameters { get; set; }
    }

    public class SignatureHelp
    {
        public SignatureInformation[] Signatures { get; set; }

        public int? ActiveSignature { get; set; }

        public int? ActiveParameter { get; set; }
    }
}

Add registration options for signaturehelp request


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

namespace Biggy.SqlCe.Tests {
  [Trait("SQL CE Compact column mapping", "")]
  public class SqlCEColumnMapping {
    public string _connectionStringName = "chinook";

    [Fact(DisplayName = "Maps Pk if specified by attribute")]
    public void MapingSpecifiedPk() {
      var db = new SqlCeStore<Album>(_connectionStringName);  //, "Album"

        var pkMap = db.TableMapping.PrimaryKeyMapping;
      Assert.Single(pkMap);
      Assert.Equal("Id", pkMap[0].PropertyName);
      Assert.Equal("AlbumId", pkMap[0].ColumnName);
      Assert.True(pkMap[0].IsAutoIncementing);
    }

    [Fact(DisplayName = "Maps Pk even if wasn't specified by attribute")]
    public void MapingNotSpecifiedPk() {
      var db = new SqlCeStore<Genre>(_connectionStringName);  //, "Genre"

      var pkMap = db.TableMapping.PrimaryKeyMapping;
      Assert.Single(pkMap);
      Assert.Equal("Id", pkMap[0].PropertyName);
      Assert.Equal("GenreId", pkMap[0].ColumnName);
      Assert.True(pkMap[0].IsAutoIncementing);
    }
  }
}

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

namespace Biggy.SqlCe.Tests {
  [Trait("SQL CE Compact column mapping", "")]
  public class SqlCEColumnMapping {
    public string _connectionStringName = "chinook";

    [Fact(DisplayName = "Maps Pk if specified by attribute")]
    public void MapingSpecifiedPk() {
      var db = new SqlCeStore<Album>(_connectionStringName);  //, "Album"

        var pkMap = db.TableMapping.PrimaryKeyMapping;
      Assert.Single(pkMap);
      Assert.Equal("Id", pkMap[0].PropertyName);
      Assert.Equal("AlbumId", pkMap[0].ColumnName);
      Assert.True(pkMap[0].IsAutoIncementing);
    }

    [Fact(DisplayName = "Maps Pk even if wasn't specified by attribute")]
    public void MapingNotSpecifiedPk() {
      var db = new SqlCeStore<Genre>(_connectionStringName);  //, "Genre"

      var pkMap = db.TableMapping.PrimaryKeyMapping;
      Assert.Single(pkMap);
      Assert.Equal("Id", pkMap[0].PropertyName);
      Assert.Equal("GenreId", pkMap[0].ColumnName);
      Assert.True(pkMap[0].IsAutoIncementing);
    }

    [Fact(DisplayName = "Properly maps Pk when is not auto incrementing")]
    public void MapingNotAutoIncPk()
    {
        var db = new SqlCeDocumentStore<MonkeyDocument>(_connectionStringName);

        var pkMap = db.TableMapping.PrimaryKeyMapping;
        Assert.Single(pkMap);
        Assert.Equal("Name", pkMap[0].PropertyName);
        Assert.Equal("Name", pkMap[0].ColumnName);
        Assert.Equal(typeof(string), pkMap[0].DataType);
        Assert.False(pkMap[0].IsAutoIncementing);
    }
  }
}

Add another mapping test, non-auto inc Pk