Add comments

Add comments

--- StackCalc/StackCalc/Calculator.cs
+++ StackCalc/StackCalc/Calculator.cs
@@ -12,16 +12,32 @@
     /// </summary>
     public class Calculator
     {
+        /// <summary>
+        /// check does char is number
+        /// </summary>
+        /// <param name="inputChar">input char</param>
+        /// <returns>does number</returns>
         private static bool IsNumber(char inputChar)
         {
             return inputChar >= '0' && inputChar <= '9';
         }

+        /// <summary>
+        /// check does char is operation
+        /// </summary>
+        /// <param name="inputChar">input char</param>
+        /// <returns>does operation</returns>
         private static bool IsOperation(char inputChar)
         {
             return inputChar == '+' || inputChar == '-' || inputChar == '*' || inputChar == '/';
         }

+        /// <summary>
+        /// main calculator method
+        /// </summary>
+        /// <param name="inputStack">input stack</param>
+        /// <param name="inputString">input string</param>
+        /// <returns>calculated number</returns>
         public static int CalculatorMethod(StackInterface inputStack, string inputString)
         {
             for (var i = 0; i < inputString.Length; i++)


Remove old variable

Remove old variable

--- StardewValleyMP/MultiplayerMod.cs
+++ StardewValleyMP/MultiplayerMod.cs
@@ -45,8 +45,6 @@
                 // We need our load menu to be able to do things
                 if (Game1.activeClickableMenu is TitleMenu)
                 {
-                    TitleMenu title = (TitleMenu)Game1.activeClickableMenu;
-
                     if (TitleMenu.subMenu != null && (TitleMenu.subMenu.GetType() == typeof(LoadGameMenu)))
                     {
                         TitleMenu.subMenu = new NewLoadMenu();


Closes NUCATSAM-400 Verbatim tag inserted at wrong position

--- StatTag/Models/DocumentManager.cs
+++ StatTag/Models/DocumentManager.cs
@@ -637,7 +637,13 @@
             if (result != null)
             {
                 var range = selection.Range;
-                var shape = selection.Document.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, 0, 0, 100, 100, range);
+                // When creating the textbox with the range as the anchor (last parameter), we need to be sure to
+                // specify the right top/left starting position based on the selection's position relative to the page.
+                // Otherwise the verbatim control always shows up at the top (at least in Word 2016, this doesn't seem
+                // to be an issue in Word 2010).
+                var shape = selection.Document.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal,
+                    (float)selection.Information[WdInformation.wdHorizontalPositionRelativeToPage],
+                    (float)selection.Information[WdInformation.wdVerticalPositionRelativeToPage], 100, 100, range);
                 var textFrame = shape.TextFrame;
                 textFrame.TextRange.Text = result.VerbatimResult;
                 textFrame.AutoSize = -1;


Fix null reference bug

Fix null reference bug

--- MonoDevelop.VersionControl.TFS/TFSClient.cs
+++ MonoDevelop.VersionControl.TFS/TFSClient.cs
@@ -88,7 +88,8 @@
                 }
             }
             var repository = GetRepository(path, id);
-            repositoriesCache.Add(path, repository);
+            if (repository != null)
+                repositoriesCache.Add(path, repository);
             return repository;
         }


Gave the FtpClient.Disconnect() method the same exception handling treatment for SocketException, IOException and FtpCommandExceptions. They are logged with FtpTrace for debugging purposes should the need for the information arise in the future.

--- System.Net.FtpClient/FtpClient.cs
+++ System.Net.FtpClient/FtpClient.cs
@@ -937,8 +937,14 @@
                     try {
                         Execute("QUIT");
                     }
-                    catch (IOException e) {
-                        FtpTrace.WriteLine("IOException thrown and discarded when closing control connection: " + e.Message);
+                    catch (System.Net.Sockets.SocketException sockex) {
+                        FtpTrace.WriteLine("SocketException caught and discarded while closing control connection: {0}", sockex.ToString());
+                    }
+                    catch (IOException ioex) {
+                        FtpTrace.WriteLine("IOException caught and discarded while closing control connection: {0}", ioex.ToString());
+                    }
+                    catch (FtpCommandException cmdex) {
+                        FtpTrace.WriteLine("FtpCommandException caught and discarded while closing control connection: {0}", cmdex.ToString());
                     }
                     finally {
                         m_stream.Close();


Changed filename to fileinfo handling

Changed filename to fileinfo handling

--- TTPClient/TTPClient/SendDialog.cs
+++ TTPClient/TTPClient/SendDialog.cs
@@ -16,21 +16,21 @@
     public partial class SendDialog : Form
     {
         private string ip;
-        private string fileName; //TODO: extract actual filename/store in file obj?
+        private FileInfo file;
         private string email = "test@email.com";
         public SendDialog(string ip, string fileName)
         {
             InitializeComponent();
             MyResource.StartTransmission += MyResource_StartTransmission;
             this.ip = ip;
-            this.fileName = fileName;
+            this.file = new FileInfo(fileName);

             progressLabel.Text += ip;

             var client = new RESTClient("http://" + ip + ":6555");
             var req = new RESTRequest("/notify/");
             JObject data = new JObject();
-            data.Add("fileName", fileName);
+            data.Add("fileName", file.Name); //TODO: two names at once?! send guid?
             data.Add("email", email);
             req.Method = Grapevine.HttpMethod.POST;
             req.ContentType = Grapevine.ContentType.JSON; //TODO: async and await
@@ -43,7 +43,7 @@

         private void MyResource_StartTransmission(object sender, NotifyRequest addrSender, NotifyArgs callbackArgs)
         {
-            if (addrSender.fileName != fileName)
+            if (addrSender.fileName != file.Name)
                 return;
             callbackArgs.hasSet = true; //TODO: check filename and dispatch another thread which updates progress, maybe have a positive event firing
             this.Invoke((MethodInvoker) delegate
@@ -74,7 +74,7 @@

         private void timer2_Tick()
         {
-            progressLabel.Text = "Sending " + fileName;
+            progressLabel.Text = "Sending " + file.Name;
             progressBar1.Style = ProgressBarStyle.Continuous;
             progressBar1.Value = 25;


Print type name, not friendly tab name.

Print type name, not friendly tab name.

--- Tabster/Forms/MainForm.Library.cs
+++ Tabster/Forms/MainForm.Library.cs
@@ -640,7 +640,7 @@
                                 {
                                     tab.TabData.Title,
                                     tab.TabData.Artist,
-                                    tab.TabData.ToFriendlyName(),
+                                    tab.TabData.Type.ToFriendlyString(),
                                     tab.TabData.Created,
                                     tab.FileInfo.LastWriteTime,
                                     string.Format("{0:0.##} KB", tab.FileInfo.Length/1024d),


StringifyHelper: add To<T>()

StringifyHelper: add To<T>()

- public static T To<T>(this string text) where T : IStringify<T>, new()

--- TakeAshUtility/StringifyHelper.cs
+++ TakeAshUtility/StringifyHelper.cs
@@ -70,4 +70,13 @@
             return base.ConvertFrom(context, culture, value);
         }
     }
+
+    public static class StringifyHelper {
+
+        public static T To<T>(this string text)
+            where T : IStringify<T>, new() {
+
+            return (new T()).FromString(text);
+        }
+    }
 }


Enable SpriteSheet loading by ContentManager

--- Sharpex.GameLibrary/Framework/Content/ContentManager.cs
+++ Sharpex.GameLibrary/Framework/Content/ContentManager.cs
@@ -6,6 +6,7 @@
 using SharpexGL.Framework.Media.Sound;
 using SharpexGL.Framework.Rendering;
 using SharpexGL.Framework.Rendering.Font;
+using SharpexGL.Framework.Rendering.Sprites;

 namespace SharpexGL.Framework.Content
 {
@@ -90,14 +91,10 @@
                     return (T)(Object)SGL.Implementations.Get<SpriteFontSerializer>().Read(new BinaryReader(fileStream));
                 }
             }
-            /*/if (typeof(T) == typeof(Sound)) Sound isn't realy a asset, so it can not be loaded from ContentManager.
+            if (typeof (T) == typeof (SpriteSheet))
             {
-                using (var fileStream = FileSystem.Open(FileSystem.ConnectPath(ContentPath, asset)))
-                {
-                    return (T)(Object)SGL.GetImplementation<SpriteFontSerializer>().Read(new BinaryReader(fileStream));
-                }
-            }/*/
-            //Enable non-assetLoader:rawloader
+                return (T)(Object)SpriteSheet.Factory.Create(FileSystem.ConnectPath(ContentPath, asset));
+            }
             if (typeof(T) == typeof(Sound))
             {
                 return (T) (Object) Sound.Factory.Create(FileSystem.ConnectPath(ContentPath, asset));


Removed Cryptography

Removed Cryptography

--- Sharpex2D/Framework/Common/Cryptography/HashProvider.cs
+++ Sharpex2D/Framework/Common/Cryptography/HashProvider.cs
@@ -1,63 +0,0 @@
-using System.IO;
-using System.Security.Cryptography;
-using System.Text;
-
-namespace Sharpex2D.Framework.Common.Cryptography
-{
-    [Developer("ThuCommix", "developer@sharpex2d.de")]
-    [Copyright("©Sharpex2D 2013 - 2014")]
-    [TestState(TestState.Tested)]
-    public class HashProvider
-    {
-        /// <summary>
-        ///     Computes a hash from the given ByteArray.
-        /// </summary>
-        /// <param name="hashAlgorithm">The Algorithm.</param>
-        /// <param name="data">The Data.</param>
-        /// <returns>String</returns>
-        public string ComputeHash(HashAlgorithm hashAlgorithm, byte[] data)
-        {
-            byte[] result = hashAlgorithm.ComputeHash(data);
-            var sb = new StringBuilder();
-            foreach (byte t in result)
-            {
-                sb.Append(t.ToString("X2"));
-            }
-            return sb.ToString();
-        }
-
-        /// <summary>
-        ///     Computes a hash from the given String.
-        /// </summary>
-        /// <param name="hashAlgorithm">The Algorithm.</param>
-        /// <param name="data">The Data.</param>
-        /// <returns>String</returns>
-        public string ComputeHash(HashAlgorithm hashAlgorithm, string data)
-        {
-            byte[] result = hashAlgorithm.ComputeHash(Encoding.ASCII.GetBytes(data));
-            var sb = new StringBuilder();
-            foreach (byte t in result)
-            {
-                sb.Append(t.ToString("X2"));
-            }
-            return sb.ToString();
-        }
-
-        /// <summary>
-        ///     Computes a hash from the given Stream
-        /// </summary>
-        /// <param name="hashAlgorithm">The Algorithm.</param>
-        /// <param name="stream">The Stream.</param>
-        /// <returns>String</returns>
-        public string ComputeHash(HashAlgorithm hashAlgorithm, Stream stream)
-        {
-            byte[] result = hashAlgorithm.ComputeHash(stream);
-            var sb = new StringBuilder();
-            foreach (byte t in result)
-            {
-                sb.Append(t.ToString("X2"));
-            }
-            return sb.ToString();
-        }
-    }
-}


Fixes an exception related to Durango generator.

* Fixes an exception in Sharpmake::Durango::GlobalSettings::get_EnableLegacyXdkHeaders when side-by-side XDK is not used.

--- Sharpmake.Platforms/Sharpmake.Durango/GlobalSettings.cs
+++ Sharpmake.Platforms/Sharpmake.Durango/GlobalSettings.cs
@@ -122,7 +122,7 @@
                     if (s_enableLegacyXdkHeaders == null)
                     {
                         int xdkEdition;
-                        s_enableLegacyXdkHeaders = Util.TryParseXdkEditionTarget(XdkEditionTarget, out xdkEdition) && xdkEdition < _feb2018XdkEditionTarget;
+                        s_enableLegacyXdkHeaders = Util.IsDurangoSideBySideXDK() && Util.TryParseXdkEditionTarget(XdkEditionTarget, out xdkEdition) && xdkEdition < _feb2018XdkEditionTarget;
                     }

                     return s_enableLegacyXdkHeaders.Value;


SemiStructuralEqualityComparer for EmailTemplate

--- Signum.Engine.Extensions/Mailing/EmailTemplateParser.cs
+++ Signum.Engine.Extensions/Mailing/EmailTemplateParser.cs
@@ -18,6 +18,7 @@
 using Signum.Engine.Basics;
 using Signum.Engine.Maps;
 using Signum.Utilities.DataStructures;
+using System.Collections.Concurrent;

 namespace Signum.Engine.Mailing
@@ -32,11 +33,74 @@

     public static partial class EmailTemplateParser
     {
+        class SemiStructuralEqualityComparer : IEqualityComparer<object>
+        {
+            public static readonly SemiStructuralEqualityComparer Comparer = new SemiStructuralEqualityComparer();
+
+            ConcurrentDictionary<Type, List<Func<object, object>>> Cache = new ConcurrentDictionary<Type, List<Func<object, object>>>();
+
+            public List<Func<object, object>> GetFieldGetters(Type type)
+            {
+                return Cache.GetOrAdd(type, t =>
+                    t.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
+                    .Where(f => !f.HasAttribute<IgnoreAttribute>())
+                    .Select(fi => Signum.Utilities.Reflection.ReflectionTools.CreateGetterUntyped(t, fi)).ToList());
+            }
+
+            public bool Equals(object x, object y)
+            {
+                if (x == null || y == null)
+                    return x == null && y == null;
+
+                Type t = x.GetType();
+
+                if (IsSimple(t))
+                    return x.Equals(y);
+
+                var fields = GetFieldGetters(t);
+                for (int i = 0; i < fields.Count; i++)
+                {
+                    var f = fields[i];
+                    if (!Equals(x, y))
+                        return false;
+                }
+
+
+                return true;
+            }
+
+            public int GetHashCode(object obj)
+            {
+                if (obj == null)
+                    return 0;
+
+                Type t = obj.GetType();
+
+                if (IsSimple(t))
+                    return obj.GetHashCode();
+
+                int result = 1;
+
+                var fields = GetFieldGetters(t);
+                for (int i = 0; i < fields.Count; i++)
+                    result += GetHashCode(fields[i](obj)) >> (i % 8);
+
+                return result;
+            }
+
+            static bool IsSimple(Type t)
+            {
+                return t == typeof(string) || Type.GetTypeCode(t) >= TypeCode.Boolean ||
+                    typeof(IIdentifiable).IsAssignableFrom(t) || typeof(Lite<IIdentifiable>).IsAssignableFrom(t) ||
+                    typeof(IEquatable<>).MakeGenericType(t).IsAssignableFrom(t);
+            }
+        }
+
         public static Dictionary<string, Func<GlobalVarContext, object>> GlobalVariables = new Dictionary<string, Func<GlobalVarContext, object>>();

         public static object DistinctSingle(this IEnumerable<ResultRow> rows, ResultColumn column)
         {
-            return rows.Select(r => r[column]).Distinct().SingleEx(
+            return rows.Select(r => r[column]).Distinct(SemiStructuralEqualityComparer.Comparer).SingleEx(
                 () =>"No values for column {0}".Formato(column.Column.Token.FullKey()),
                 () =>"Multiple values for column {0}".Formato(column.Column.Token.FullKey()));
         }


Update for consistency with other samples

--- TodoListClient/MainWindow.xaml.cs
+++ TodoListClient/MainWindow.xaml.cs
@@ -33,6 +33,7 @@
         // The Client ID is used by the application to uniquely identify itself to Azure AD.
         // The Tenant is the name of the Azure AD tenant in which this application is registered.
         // The AAD Instance is the instance of Azure, for example public Azure or Azure China.
+        // The Redirect URI is the URI where Azure AD will return OAuth responses.
         // The Authority is the sign-in URL of the tenant.
         //
         const string aadInstance = "https://login.windows.net/{0}";
@@ -50,7 +51,7 @@
         const string todoListBaseAddress = "https://localhost:44321";

         private HttpClient httpClient = new HttpClient();
-        private AuthenticationContext authContext = new AuthenticationContext(authority);
+        private AuthenticationContext authContext = null;

         public MainWindow()
         {
@@ -125,7 +126,7 @@
             // Once the token has been returned by ADAL, add it to the http authorization header, before making the call to access the To Do list service.
             httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", result.AccessToken);

-            // Call the To Do list web api
+            // Call the To Do list service.
             HttpResponseMessage response = await httpClient.GetAsync(todoListBaseAddress + "/api/todolist");

             if (response.IsSuccessStatusCode)


fix JsonSerializerExtensions in string values

--- Signum.React/JsonConverters/JsonSerializerExtensions.cs
+++ Signum.React/JsonConverters/JsonSerializerExtensions.cs
@@ -1,4 +1,4 @@
-using Newtonsoft.Json;
+using Newtonsoft.Json;
 using Signum.Entities;
 using Signum.Utilities;
 using System;
@@ -17,6 +17,9 @@
                 if (conv != null)
                     return conv.ReadJson(reader, valueType, oldValue, serializer);
             }
+
+            if (valueType == typeof(string)) // string with valid iso datetime get converted otherwise
+                return reader.Value;

             return serializer.Deserialize(reader, valueType);
         }
@@ -44,4 +47,4 @@
             return new Disposable(() => { currentPropertyRoute.Value = old; });
         }
     }
-}+}


Timing sequence length fix.

Timing sequence length fix.

--- Training/DataGenerator/Program.cs
+++ Training/DataGenerator/Program.cs
@@ -148,20 +148,19 @@
                             timingList.Insert(i, (time, beatLength, sectionLength, kiai));
                     }
                 }
-            if (audioFile?.EndsWith(".mp3") != true) return;
             if (timingList.Count == 0) return;

             float[] audiodata;
             using (var reader = new BinaryReader(archive.OpenFile(audioFile)))
                 try
                 {
-                    audiodata = MusicProcesser.ProcessData(reader.ReadBytes((int)reader.BaseStream.Length)).AsArray();
+                    audiodata = MusicProcesser.ProcessData(reader.ReadBytes((int)reader.BaseStream.Length)).ToArray();
                 }
                 catch (MusicProcessException) { return; }

             (archive as IDisposable)?.Dispose();

-            int sampleCount = audiodata.GetUpperBound(0) + 1;
+            int sampleCount = audiodata.Length + 1;
             byte[] data = new byte[sampleCount];
             timingList.Add((double.MaxValue, double.NaN, 0, false)); //fence item

@@ -180,7 +179,7 @@

                 for (double time = thisPoint.time; time < nextTime; time += length)
                 {
-                    int sample = (int)(time * 44.1 / 256);
+                    int sample = (int)(time * 44.1);
                     if (sample >= data.Length) break;
                     if (sample < 0) continue;


Prevent calling IPropertySelectionBehavior.SelectProperty on properties of the self-registered Container instance.

--- SimpleServiceLocator/SimpleInjector.NET/Registration.cs
+++ SimpleServiceLocator/SimpleInjector.NET/Registration.cs
@@ -436,6 +436,7 @@

             return (
                 from property in candidates
+                where serviceType != typeof(Container)
                 where propertySelector.SelectProperty(serviceType, property)
                 select property)
                 .ToArray();


#129 a little up front refactoring

#129 a little up front refactoring

--- Source/FakeItEasy/Creation/DummyValueCreationSession.cs
+++ Source/FakeItEasy/Creation/DummyValueCreationSession.cs
@@ -7,12 +7,11 @@
     using System.Reflection;
     using FakeItEasy.Core;

-    internal class DummyValueCreationSession
-        : IDummyValueCreationSession
+    internal class DummyValueCreationSession : IDummyValueCreationSession
     {
-        private readonly ResolveStrategy[] availableStrategies;
-        private readonly HashSet<Type> isInProcessOfResolving;
-        private readonly Dictionary<Type, ResolveStrategy> strategyToUseForType;
+        private readonly ResolveStrategy[] strategies;
+        private readonly HashSet<Type> typesCurrentlyBeingResolved;
+        private readonly Dictionary<Type, ResolveStrategy> strategyCache;

         /// <summary>
         /// Initializes a new instance of the <see cref="DummyValueCreationSession"/> class.
@@ -21,23 +20,22 @@
         /// <param name="fakeObjectCreator">The fake object creator.</param>
         public DummyValueCreationSession(IFakeObjectContainer container, IFakeObjectCreator fakeObjectCreator)
         {
-            this.isInProcessOfResolving = new HashSet<Type>();
-            this.strategyToUseForType = new Dictionary<Type, ResolveStrategy>();
-
-            this.availableStrategies = new ResolveStrategy[]
-                                           {
-                                               new ResolveFromContainerSrategy { Container = container },
-                                               new ResolveByCreatingFakeStrategy { FakeCreator = fakeObjectCreator, Session = this },
-                                               new ResolveByActivatingValueTypeStrategy(),
-                                               new ResolveByInstantiatingClassUsingDummyValuesAsConstructorArgumentsStrategy { Session = this }
-                                           };
+            this.typesCurrentlyBeingResolved = new HashSet<Type>();
+            this.strategyCache = new Dictionary<Type, ResolveStrategy>();
+            this.strategies = new ResolveStrategy[]
+                {
+                    new ResolveFromContainerSrategy { Container = container },
+                    new ResolveByCreatingFakeStrategy { FakeCreator = fakeObjectCreator, Session = this },
+                    new ResolveByActivatingValueTypeStrategy(),
+                    new ResolveByInstantiatingClassUsingDummyValuesAsConstructorArgumentsStrategy { Session = this }
+                };
         }

         public bool TryResolveDummyValue(Type typeOfDummy, out object result)
         {
+            result = default(object);
             if (!this.EnsureThatResolvedTypeIsNotRecursive(typeOfDummy))
             {
-                result = null;
                 return false;
             }

@@ -47,66 +45,65 @@
                 return true;
             }

-            result = null;
             return false;
         }

         private bool EnsureThatResolvedTypeIsNotRecursive(Type typeOfDummy)
         {
-            if (this.isInProcessOfResolving.Contains(typeOfDummy))
-            {
-                return false;
-            }
-
-            this.isInProcessOfResolving.Add(typeOfDummy);
+            if (this.typesCurrentlyBeingResolved.Contains(typeOfDummy))
+            {
+                return false;
+            }
+
+            this.typesCurrentlyBeingResolved.Add(typeOfDummy);
             return true;
         }

         private void OnSuccessfulResolve(Type typeOfDummy)
         {
-            this.isInProcessOfResolving.Remove(typeOfDummy);
+            this.typesCurrentlyBeingResolved.Remove(typeOfDummy);
         }

         private bool TryResolveDummyValueWithAllAvailableStrategies(Type typeOfDummy, out object result)
         {
+            result = default(object);
+
             ResolveStrategy cachedStrategy;
-            if (this.strategyToUseForType.TryGetValue(typeOfDummy, out cachedStrategy))
+            if (this.strategyCache.TryGetValue(typeOfDummy, out cachedStrategy))
             {
                 return cachedStrategy.TryCreateDummyValue(typeOfDummy, out result);
             }

-            for (var i = 0; i < this.availableStrategies.Length; i++)
-            {
-                if (this.availableStrategies[i].TryCreateDummyValue(typeOfDummy, out result))
-                {
-                    this.strategyToUseForType.Add(typeOfDummy, this.availableStrategies[i]);
+            foreach (var strategy in this.strategies)
+            {
+                if (strategy.TryCreateDummyValue(typeOfDummy, out result))
+                {
+                    this.strategyCache.Add(typeOfDummy, strategy);
                     return true;
                 }
             }

-            this.strategyToUseForType.Add(typeOfDummy, new UnableToResolveStrategy());
-            result = null;
+            this.strategyCache.Add(typeOfDummy, new UnableToResolveStrategy());
             return false;
         }

-        private class ResolveByActivatingValueTypeStrategy
-            : ResolveStrategy
-        {
-            public override bool TryCreateDummyValue(Type typeOfDummy, out object result)
-            {
+        private class ResolveByActivatingValueTypeStrategy : ResolveStrategy
+        {
+            public override bool TryCreateDummyValue(Type typeOfDummy, out object result)
+            {
+                result = default(object);
+
                 if (typeOfDummy.IsValueType && !typeOfDummy.Equals(typeof(void)))
                 {
                     result = Activator.CreateInstance(typeOfDummy);
                     return true;
                 }

-                result = null;
-                return false;
-            }
-        }
-
-        private class ResolveByCreatingFakeStrategy
-            : ResolveStrategy
+                return false;
+            }
+        }
+
+        private class ResolveByCreatingFakeStrategy : ResolveStrategy
         {
             public IFakeObjectCreator FakeCreator { get; set; }

@@ -118,24 +115,23 @@
             }
         }

-        private class ResolveByInstantiatingClassUsingDummyValuesAsConstructorArgumentsStrategy
-            : ResolveStrategy
+        private class ResolveByInstantiatingClassUsingDummyValuesAsConstructorArgumentsStrategy : ResolveStrategy
         {
             public DummyValueCreationSession Session { get; set; }

             [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Appropriate in try method.")]
             public override bool TryCreateDummyValue(Type typeOfDummy, out object result)
             {
+                result = default(object);
                 if (typeof(Delegate).IsAssignableFrom(typeOfDummy))
                 {
-                    result = null;
                     return false;
                 }

                 foreach (var constructor in GetConstructorsInOrder(typeOfDummy))
                 {
-                    var argumentTypes = constructor.GetParameters().Select(x => x.ParameterType);
-                    var resolvedArguments = this.ResolveAllTypes(argumentTypes);
+                    var parameterTypes = constructor.GetParameters().Select(x => x.ParameterType);
+                    var resolvedArguments = this.ResolveAllTypes(parameterTypes);

                     if (resolvedArguments != null)
                     {
@@ -150,7 +146,6 @@
                     }
                 }

-                result = null;
                 return false;
             }

@@ -179,8 +174,7 @@
             }
         }

-        private class ResolveFromContainerSrategy
-            : ResolveStrategy
+        private class ResolveFromContainerSrategy : ResolveStrategy
         {
             public IFakeObjectContainer Container { get; set; }

@@ -195,12 +189,11 @@
             public abstract bool TryCreateDummyValue(Type typeOfDummy, out object result);
         }

-        private class UnableToResolveStrategy
-            : ResolveStrategy
-        {
-            public override bool TryCreateDummyValue(Type typeOfDummy, out object result)
-            {
-                result = null;
+        private class UnableToResolveStrategy : ResolveStrategy
+        {
+            public override bool TryCreateDummyValue(Type typeOfDummy, out object result)
+            {
+                result = default(object);
                 return false;
             }
         }


Update AppPoolController.cs

Update AppPoolController.cs

--- Source/MSBuild.Community.Tasks/IIS/AppPoolController.cs
+++ Source/MSBuild.Community.Tasks/IIS/AppPoolController.cs
@@ -1,6 +1,6 @@
-#region Copyright  2005 Paul Welter. All rights reserved.
+#region Copyright © 2005 Paul Welter. All rights reserved.
 /*
-Copyright  2005 Paul Welter. All rights reserved.
+Copyright © 2005 Paul Welter. All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
@@ -35,6 +35,8 @@
 using Microsoft.Build.Utilities;
 using Microsoft.Build.Framework;
 using System.Management;
+using Microsoft.Web.Administration;
+using System.Linq;

 namespace MSBuild.Community.Tasks.IIS
 {
@@ -141,35 +143,42 @@
 			string path;
 			try
 			{
-				switch (mIISVersion)
+                Log.LogMessage(MessageImportance.Normal, "IIS Version {0} on \"{1}\"", mIISVersion, ServerName);
+
+                switch (mIISVersion)
 				{
 					case IISVersion.Six:
 						{
 							VerifyIISRoot();
 							scopePath = @"\\" + ServerName + "\\root\\MicrosoftIISv2";
 							path = @"IIsApplicationPool='W3SVC/AppPools/" + ApplicationPoolName + "'";
-							break;
+                            ExecuteAppPoolAction(scopePath, path);
+                            break;
 						}
 					case IISVersion.SevenFive:
 						{
 							scopePath = @"\\" + ServerName + "\\root\\webadministration";
 							path = "ApplicationPool.Name='" + ApplicationPoolName + "'";
-							break;
+                            ExecuteAppPoolAction(scopePath, path);
+                            break;
 						}
+                    case IISVersion.Eight:
+                    case IISVersion.EightFive:
+                    case IISVersion.Ten:
+                        ExecuteAppPoolAction();
+                        break;
 					default:
-						Log.LogError("Application Pools are only available in IIS 6 and 7.5.");
+						Log.LogError("Application Pools are not available in IIS Version", mIISVersion);
 						return bSuccess;
 				}

-				ExecuteAppPoolAction(scopePath, path);
-
 				bSuccess = true;
-				Log.LogMessage(MessageImportance.Normal, "{0} \"{1}\" on \"{2}\"", GetActionFinish(), ApplicationPoolName, ServerName);
 			}
 			catch (Exception ex)
 			{
 				Log.LogErrorFromException(ex);
-				Log.LogError("Failed {0} application pool \"{1}\" on \"{2}\".", GetActionInProgress(), ApplicationPoolName, ServerName);
+                Log.LogError(ex.StackTrace);
+                Log.LogError("Failed {0} application pool \"{1}\" on \"{2}\".", GetActionInProgress(), ApplicationPoolName, ServerName);
 			}

 			return bSuccess;
@@ -222,7 +231,50 @@
 				this.Log.LogMessage(MessageImportance.Normal, "Recycling \"{0}\" on \"{1}\"...", this.ApplicationPoolName, this.ServerName);
 				managementObject.InvokeMethod("Recycle", new object[0]);
 			}
-		}
+
+            Log.LogMessage(MessageImportance.Normal, "{0} \"{1}\" on \"{2}\"", GetActionFinish(), ApplicationPoolName, ServerName);
+        }
+
+        private void ExecuteAppPoolAction()
+        {
+            ServerManager server = ServerManager.OpenRemote(ServerName);
+            ApplicationPool pool;
+
+            pool = server.ApplicationPools.Where(obj => obj.Name == ApplicationPoolName).FirstOrDefault();
+            if (server != null && (pool = server.ApplicationPools.Where(obj => obj.Name == ApplicationPoolName).FirstOrDefault()) != null)
+            {
+                if (Action == "Stop" || Action == "Restart")
+                {
+                    if (pool.State == ObjectState.Stopped || pool.State == ObjectState.Stopping)
+                        Log.LogMessage(MessageImportance.Normal, "Already stopped or stopping \"{0}\" on \"{1}\".", ApplicationPoolName, ServerName);
+                    else
+                    {
+                        Log.LogMessage(MessageImportance.Normal, "Stopping \"{0}\" on \"{1}\"...", ApplicationPoolName, ServerName);
+                        pool.Stop();
+                        Log.LogMessage(MessageImportance.Normal, "{0} \"{1}\" on \"{2}\"", pool.State, ApplicationPoolName, ServerName);
+                    }
+
+                }
+
+                if (Action == "Start" || Action == "Restart")
+                {
+                    if (pool.State == ObjectState.Started || pool.State == ObjectState.Starting)
+                        Log.LogMessage(MessageImportance.Normal, "Already started or starting \"{0}\" on \"{1}\".", ApplicationPoolName, ServerName);
+                    else
+                    {
+                        Log.LogMessage(MessageImportance.Normal, "Starting \"{0}\" on \"{1}\"...", ApplicationPoolName, ServerName);
+                        pool.Start();
+                        Log.LogMessage(MessageImportance.Normal, "{0} \"{1}\" on \"{2}\"", pool.State, ApplicationPoolName, ServerName);
+                    }
+                }
+
+                if (Action == "Recycle")
+                {
+                    Log.LogMessage(MessageImportance.Normal, "Recycling \"{0}\" on \"{1}\"...", ApplicationPoolName, ServerName);
+                    pool.Recycle();
+                }
+            }
+        }

 		private IIS7ApplicationPoolState GetAppPoolState(ManagementObject managementObject)
 		{


Added more tests for setter with matchers

--- UnitTests/ExtensibilityFixture.cs
+++ UnitTests/ExtensibilityFixture.cs
@@ -70,6 +70,10 @@
 			{
 				Console.WriteLine(me.Message);
 			}
+
+			mock.Object.Value = 25;
+
+			mock.VerifySet(repo => repo.Value = It.IsInRange(10, 25, Range.Inclusive));
 		}
 	}


UnitSystem: Add ctor flag whether to load default abbreviations

Useful when testing specific unit abbreviations and do not want
default abbreviations in .json files to affect the test.
Defaults to true (backwards compatible).

--- UnitsNet/CustomCode/UnitSystem.cs
+++ UnitsNet/CustomCode/UnitSystem.cs
@@ -97,13 +97,18 @@
         ///     If null is specified, the default English US culture will be used.
         /// </summary>
         /// <param name="cultureInfo"></param>
-        // Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
-#if WINDOWS_UWP
-        internal
-#else
-        public
-#endif
-            UnitSystem([CanBeNull] IFormatProvider cultureInfo)
+        /// <param name="loadDefaultAbbreviations">
+        ///     If <c>true</c> (default), loads abbreviations per unit defined in
+        ///     /UnitsNet/UnitDefinitions/*.json files. Otherwise, creates an empty instance.
+        /// </param>
+
+        // Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
+#if WINDOWS_UWP
+        internal
+#else
+        public
+#endif
+            UnitSystem([CanBeNull] IFormatProvider cultureInfo, bool loadDefaultAbbreviations = true)
         {
             if (cultureInfo == null)
                 cultureInfo = DefaultCulture;
@@ -112,7 +117,8 @@
             _unitTypeToUnitValueToAbbrevs = new Dictionary<Type, Dictionary<int, List<string>>>();
             _unitTypeToAbbrevToUnitValue = new Dictionary<Type, AbbreviationMap>();

-            LoadDefaultAbbreviations(cultureInfo);
+            if (loadDefaultAbbreviations)
+                LoadDefaultAbbreviations(cultureInfo);
         }

         /// <summary>


Cicero: Added test

Cicero: Added test

--- Spa/NakedObjects.Spa.Selenium.Test/tests/CiceroTests.cs
+++ Spa/NakedObjects.Spa.Selenium.Test/tests/CiceroTests.cs
@@ -239,11 +239,6 @@
         }
         public virtual void Enter()
         {
-           //Invalid context
-            CiceroUrl("home");
-            EnterCommand("enter");
-            WaitForOutput("The command: enter is not available in the current context");
-
             //Entering fields (into dialogs)
             CiceroUrl("home?menu1=CustomerRepository&dialog1=FindIndividualCustomerByName&field1_firstName=%2522%2522&field1_lastName=%2522%2522");
             WaitForOutput("Customers menu\r\nAction dialog: Find Individual Customer By Name\r\nFirst Name: empty\r\nLast Name: empty");
@@ -251,6 +246,20 @@
             WaitForOutput("Customers menu\r\nAction dialog: Find Individual Customer By Name\r\nFirst Name: Arthur G\r\nLast Name: empty");
             EnterCommand("enter last, Fenton-Jones III");
             WaitForOutput("Customers menu\r\nAction dialog: Find Individual Customer By Name\r\nFirst Name: Arthur G\r\nLast Name: Fenton-Jones III");
+
+            //Different types (bool, date, number)
+            CiceroUrl("object?object1=AdventureWorksModel.Product-897&actions1=open&dialog1=BestSpecialOffer&field1_quantity=%2522%2522");
+            WaitForOutputContaining("Action dialog: Best Special Offer");
+            EnterCommand("enter quantity,25");
+            WaitForOutputContaining("Quantity: 25");
+            CiceroUrl("home?menu1=PurchaseOrderRepository&dialog1=ListPurchaseOrders&field1_vendor=null&field1_fromDate=%2522%2522&field1_toDate=%2522%2522");
+            WaitForOutputContaining("Action dialog: List Purchase Orders");
+            EnterCommand("enter from, 1 Jan 2016");
+            WaitForOutputContaining("From Date: 1 Jan 2016");
+            CiceroUrl("object?object1=AdventureWorksModel.Customer-140&actions1=open&dialog1=CreateNewOrder&field1_copyHeaderFromLastOrder=false");
+            WaitForOutputContaining("Action dialog: Create New Order");
+            EnterCommand("enter copy,true");
+            WaitForOutputContaining("Copy Header From Last Order: true");

             //Todo: test selections
             CiceroUrl("home?menu1=ProductRepository&dialog1=ListProductsBySubCategory");
@@ -262,8 +271,6 @@
             EnterCommand("enter cat, frame");
             WaitForOutput("Multiple matches:\r\nMountain Frames\r\nRoad Frames\r\nTouring Frames");

-
-
             //Then property entries
             CiceroUrl("object?object1=AdventureWorksModel.Product-871&edit1=true");
             WaitForOutput("Editing Product: Mountain Bottle Cage");
@@ -294,63 +301,10 @@
             EnterCommand("enter end date,");
             WaitForOutputContaining("End Date: empty");

-        }
-        public virtual void Property()
-        {
-            CiceroUrl("object?object1=AdventureWorksModel.Product-758");
-            WaitForOutput("Product: Road-450 Red, 52");
-            EnterCommand("prop num");
-            WaitForOutput("Product Number: BK-R68R-52");
-            EnterCommand("pr product");
-            WaitForOutputStarting("Product Number: BK-R68R-52");
-            var actual = WaitForCss(".output").Text;
-            //Note that spacing of Road-450 and  Line: R is different to how it appears on screen!
-            var expected = "Product Number: BK-R68R-52\r\nProduct Model: Road-450\r\nProduct Category: Bikes\r\nProduct Subcategory: Road Bikes\r\nProduct Line: R \r\nProduct Inventory (collection): 2 items\r\nProduct Reviews (collection): empty";
-            Assert.AreEqual(expected, actual);
-
-            //No argument
-            EnterCommand("pr ");
-            WaitForOutputStarting("Name: Road-450 Red, 52\r\nProduct Number: BK-R68R-52\r\nColor: Red\r\nPhoto: empty\r\nProduct Model: Road-450\r\nList Price: 1457.99");
-            //No match
-            EnterCommand("pr x");
-            WaitForOutput("x does not match any properties");
-
             //Invalid context
             CiceroUrl("home");
-            EnterCommand("prop");
-            WaitForOutput("The command: property is not available in the current context");
-
-            //Multi-clause match
-            CiceroUrl("object?object1=AdventureWorksModel.SalesPerson-284");
-            WaitForOutput("Sales Person: Tete Mensa-Annan");
-            EnterCommand("pr sales a");
-            WaitForOutput("Sales Territory: Northwest\r\nSales Quota: 300000\r\nSales YTD: 1576562.1966\r\nSales Last Year: 0");
-            EnterCommand("pr ter ory");
-            WaitForOutput("Sales Territory: Northwest\r\nTerritory History (collection): 1 item");
-            EnterCommand("pr sales z");
-            WaitForOutput("sales z does not match any properties");
-
-            //No fields
-            CiceroUrl("object?object1=AdventureWorksModel.AddressType-2");
-            WaitForOutput("Address Type: Home");
-            EnterCommand("prop");
-            WaitForOutput("No visible properties");
-
-            //To many args
-            EnterCommand("prop num,x");
-            WaitForOutput("Too many arguments provided");
-
-            //Reading properties in edit mode
-            CiceroUrl("object?object1=AdventureWorksModel.Product-369&edit1=true&prop1_Style=%2522U%2520%2522&prop1_ListPrice=%2522500%2522");
-            WaitForOutputStarting("Editing");
-            EnterCommand("prop");
-            WaitForOutputContaining("List Price: 500 (modified)");
-            WaitForOutputContaining("Style: U  (modified)");
-
-            //exact match takes priority over partial match
-            //TODO: Need example from properties, not action params -  transfer this to Enter test
-            //EnterCommand("field product category"); //which would also match product subcategory
-            //WaitForOutput("Product Category: Bikes");
+            EnterCommand("enter");
+            WaitForOutput("The command: enter is not available in the current context");
         }
         public virtual void Gemini()
         {
@@ -638,6 +592,63 @@
             WaitForOutput("Sales Order Header: SO51131");
             EnterCommand("page 1");
             WaitForOutput("The command: page is not available in the current context");
+        }
+        public virtual void Property()
+        {
+            CiceroUrl("object?object1=AdventureWorksModel.Product-758");
+            WaitForOutput("Product: Road-450 Red, 52");
+            EnterCommand("prop num");
+            WaitForOutput("Product Number: BK-R68R-52");
+            EnterCommand("pr product");
+            WaitForOutputStarting("Product Number: BK-R68R-52");
+            var actual = WaitForCss(".output").Text;
+            //Note that spacing of Road-450 and  Line: R is different to how it appears on screen!
+            var expected = "Product Number: BK-R68R-52\r\nProduct Model: Road-450\r\nProduct Category: Bikes\r\nProduct Subcategory: Road Bikes\r\nProduct Line: R \r\nProduct Inventory (collection): 2 items\r\nProduct Reviews (collection): empty";
+            Assert.AreEqual(expected, actual);
+
+            //No argument
+            EnterCommand("pr ");
+            WaitForOutputStarting("Name: Road-450 Red, 52\r\nProduct Number: BK-R68R-52\r\nColor: Red\r\nPhoto: empty\r\nProduct Model: Road-450\r\nList Price: 1457.99");
+            //No match
+            EnterCommand("pr x");
+            WaitForOutput("x does not match any properties");
+
+            //Invalid context
+            CiceroUrl("home");
+            EnterCommand("prop");
+            WaitForOutput("The command: property is not available in the current context");
+
+            //Multi-clause match
+            CiceroUrl("object?object1=AdventureWorksModel.SalesPerson-284");
+            WaitForOutput("Sales Person: Tete Mensa-Annan");
+            EnterCommand("pr sales a");
+            WaitForOutput("Sales Territory: Northwest\r\nSales Quota: 300000\r\nSales YTD: 1576562.1966\r\nSales Last Year: 0");
+            EnterCommand("pr ter ory");
+            WaitForOutput("Sales Territory: Northwest\r\nTerritory History (collection): 1 item");
+            EnterCommand("pr sales z");
+            WaitForOutput("sales z does not match any properties");
+
+            //No fields
+            CiceroUrl("object?object1=AdventureWorksModel.AddressType-2");
+            WaitForOutput("Address Type: Home");
+            EnterCommand("prop");
+            WaitForOutput("No visible properties");
+
+            //To many args
+            EnterCommand("prop num,x");
+            WaitForOutput("Too many arguments provided");
+
+            //Reading properties in edit mode
+            CiceroUrl("object?object1=AdventureWorksModel.Product-369&edit1=true&prop1_Style=%2522U%2520%2522&prop1_ListPrice=%2522500%2522");
+            WaitForOutputStarting("Editing");
+            EnterCommand("prop");
+            WaitForOutputContaining("List Price: 500 (modified)");
+            WaitForOutputContaining("Style: U  (modified)");
+
+            //exact match takes priority over partial match
+            //TODO: Need example from properties, not action params -  transfer this to Enter test
+            //EnterCommand("field product category"); //which would also match product subcategory
+            //WaitForOutput("Product Category: Bikes");
         }
         public virtual void Root()
         {
@@ -1080,7 +1091,7 @@
         }
     }

-   // [TestClass] //Comment out if MegaTest is commented in
+    //[TestClass] //Comment out if MegaTest is commented in
     public class CiceroTestsFirefox : CiceroTests
     {
         [ClassInitialize]


audio

audio

--- VkNet/Categories/AudioCategory.cs
+++ VkNet/Categories/AudioCategory.cs
@@ -136,7 +136,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.get"/>.
 		/// </remarks>
 		[Pure]
-		[ApiVersion("5.40")]
+		[ApiVersion("5.44")]
 		[Obsolete("Данный метод устарел. Используйте Get(out User user, AudioGetParams @params)")]
 		public ReadOnlyCollection<Audio> GetFromGroup(long gid, long? albumId = null, IEnumerable<long> aids = null, uint? count = null, uint? offset = null)
 		{
@@ -161,9 +161,9 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.get"/>.
 		/// </remarks>
 		[Pure]
-		[ApiVersion("5.40")]
+		[ApiVersion("5.44")]
 		[Obsolete("Данный метод устарел. Используйте Get(out User user, AudioGetParams @params)")]
-		public ReadOnlyCollection<Audio> Get(ulong uid, out User user, long? albumId = null, IEnumerable<long> aids = null, uint? count = null, uint? offset = null)
+		public ReadOnlyCollection<Audio> Get(long uid, out User user, long? albumId = null, IEnumerable<long> aids = null, uint? count = null, uint? offset = null)
 		{
 			return InternalGet("uid", (long)uid, out user, albumId, aids, true, count, offset);
 		}
@@ -182,9 +182,9 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.get"/>.
 		/// </remarks>
 		[Pure]
-		[ApiVersion("5.40")]
+		[ApiVersion("5.44")]
 		[Obsolete("Данный метод устарел. Используйте Get(out User user, AudioGetParams @params)")]
-		public ReadOnlyCollection<Audio> Get(ulong uid, long? albumId = null, IEnumerable<long> aids = null, uint? count = null, uint? offset = null)
+		public ReadOnlyCollection<Audio> Get(long uid, long? albumId = null, IEnumerable<long> aids = null, uint? count = null, uint? offset = null)
 		{
 			User user;
 			return InternalGet("uid", (long)uid, out user, albumId, aids, false, count, offset);
@@ -203,7 +203,7 @@
 		/// <param name="offset">Смещение относительно первой найденной аудиозаписи (для выборки определенного подмножества).</param>
 		/// <returns></returns>
 		[Pure]
-		[ApiVersion("5.40")]
+		[ApiVersion("5.44")]
 		[Obsolete("Данный метод устарел. Используйте Get(out User user, AudioGetParams @params)")]
 		private ReadOnlyCollection<Audio> InternalGet(
 			string paramId,
@@ -294,7 +294,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.search"/>.
 		/// </remarks>
 		[Pure]
-		[Obsolete("Данный метод устарел. Используйте Search(AudioSearchParams @params, out ulong totalCount)")]
+		[Obsolete("Данный метод устарел. Используйте Search(AudioSearchParams @params, out long totalCount)")]
 		public ReadOnlyCollection<Audio> Search(
 			string query,
 			out long totalCount,
@@ -356,7 +356,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.add" />.
 		/// </remarks>
 		[ApiVersion("5.44")]
-		public ulong Add(long audioId, long ownerId, long? groupId = null, long? albumId = null)
+		public long Add(long audioId, long ownerId, long? groupId = null, long? albumId = null)
 		{
 			var parameters = new VkParameters {
 				{ "audio_id", audioId },
@@ -380,7 +380,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.delete" />.
 		/// </remarks>
 		[ApiVersion("5.44")]
-		public bool Delete(ulong audioId, long ownerId)
+		public bool Delete(long audioId, long ownerId)
 		{
 			var parameters = new VkParameters
 			{
@@ -476,7 +476,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.restore" />.
 		/// </remarks>
 		[ApiVersion("5.44")]
-		public Audio Restore(ulong audioId, long? ownerId = null)
+		public Audio Restore(long audioId, long? ownerId = null)
 		{
 			var parameters = new VkParameters
 			{
@@ -525,7 +525,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.addAlbum" />.
 		/// </remarks>
 		[ApiVersion("5.44")]
-		public ulong AddAlbum(string title, ulong? groupId = null)
+		public long AddAlbum(string title, long? groupId = null)
 		{
 			VkErrors.ThrowIfNullOrEmpty(() => title);

@@ -551,7 +551,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.editAlbum" />.
 		/// </remarks>
 		[ApiVersion("5.44")]
-		public bool EditAlbum(string title, ulong albumId, ulong? groupId = null)
+		public bool EditAlbum(string title, long albumId, long? groupId = null)
 		{
 			VkErrors.ThrowIfNullOrEmpty(() => title);

@@ -577,7 +577,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.deleteAlbum" />.
 		/// </remarks>
 		[ApiVersion("5.44")]
-		public bool DeleteAlbum(ulong albumId, ulong? groupId = null)
+		public bool DeleteAlbum(long albumId, long? groupId = null)
 		{
 			var parameters = new VkParameters {
 				{ "group_id", groupId },
@@ -662,7 +662,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.moveToAlbum" />.
 		/// </remarks>
 		[ApiVersion("5.44")]
-		public bool MoveToAlbum(ulong albumId, IEnumerable<ulong> audioIds, ulong? groupId = null)
+		public bool MoveToAlbum(long albumId, IEnumerable<long> audioIds, long? groupId = null)
 		{
 			var parameters = new VkParameters
 			{
@@ -689,7 +689,7 @@
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/audio.getRecommendations" />.
 		/// </remarks>
 		[ApiVersion("5.44")]
-		public ReadOnlyCollection<Audio> GetRecommendations(ulong? userId = null, uint? count = null, uint? offset = null, bool shuffle = true, string targetAudio = "")
+		public ReadOnlyCollection<Audio> GetRecommendations(long? userId = null, uint? count = null, uint? offset = null, bool shuffle = true, string targetAudio = "")
 		{
 			var parameters = new VkParameters
 			{


temp ignore cicero tests

temp ignore cicero tests

--- Spa/NakedObjects.Spa.Selenium.Test/tests/CiceroTests.cs
+++ Spa/NakedObjects.Spa.Selenium.Test/tests/CiceroTests.cs
@@ -1552,7 +1552,7 @@
         }
     }

-    [TestClass]
+    //[TestClass]
     public class MegaCiceroTestsChrome : MegaCiceroTestsRoot {
         [ClassInitialize]
         public new static void InitialiseClass(TestContext context) {


Комментирование pages

Комментирование pages

--- VkNet/Categories/PagesCategory.cs
+++ VkNet/Categories/PagesCategory.cs
@@ -207,9 +207,19 @@

 		/// <summary>
-		/// getHistory
-		/// </summary>
-		/// <returns>Возвращает результат выполнения метода.</returns>
+		/// Возвращает список всех старых версий вики-страницы.
+		/// </summary>
+		/// <param name="pageId">Идентификатор вики-страницы.</param>
+		/// <param name="groupId">Идентификатор сообщества, которому принадлежит вики-страница. </param>
+		/// <param name="userId">Идентификатор пользователя, создавшего вики-страницу.</param>
+		/// <returns>
+		/// Возвращает массив объектов page_version, имеющих следующую структуру.
+		/// id — идентификатор версии страницы;
+		/// length длина версии страницы в байтах;
+		/// edited — дата редактирования страницы;
+		/// editor_id — идентификатор редактора;
+		/// editor_name — имя редактора.
+		/// </returns>
 		/// <remarks>
 		/// Страница документации ВКонтакте <see href="https://vk.com/dev/pages.getHistory" />.
 		/// </remarks>
@@ -229,9 +239,12 @@

 		/// <summary>
-		/// getTitles
-		/// </summary>
-		/// <returns>Возвращает результат выполнения метода.</returns>
+		/// Возвращает список вики-страниц в группе.
+		/// </summary>
+		/// <param name="groupId">Идентификатор сообщества, которому принадлежит вики-страница.</param>
+		/// <returns>
+		/// Возвращает массив объектов вики-страниц.
+		/// </returns>
 		/// <remarks>
 		/// Страница документации ВКонтакте <see href="https://vk.com/dev/pages.getTitles" />.
 		/// </remarks>
@@ -249,9 +262,15 @@

 		/// <summary>
-		/// getVersion
-		/// </summary>
-		/// <returns>Возвращает результат выполнения метода.</returns>
+		/// Возвращает текст одной из старых версий страницы.
+		/// </summary>
+		/// <param name="versionId">Идентификатор версии. </param>
+		/// <param name="groupId">Идентификатор сообщества, которому принадлежит вики-страница.</param>
+		/// <param name="needHtml">Определяет, требуется ли в ответе html-представление вики-страницы.</param>
+		/// <param name="userId">Идентификатор пользователя, который создал страницу.</param>
+		/// <returns>
+		/// Возвращает объект вики-страницы.
+		/// </returns>
 		/// <remarks>
 		/// Страница документации ВКонтакте <see href="https://vk.com/dev/pages.getVersion" />.
 		/// </remarks>
@@ -271,9 +290,13 @@

 		/// <summary>
-		/// parseWiki
-		/// </summary>
-		/// <returns>Возвращает результат выполнения метода.</returns>
+		/// Возвращает html-представление вики-разметки.
+		/// </summary>
+		/// <param name="text">Текст в вики-формате.</param>
+		/// <param name="groupId">Идентификатор группы, в контексте которой интерпретируется данная страница.</param>
+		/// <returns>
+		/// В случае успеха возвращает экранированный html, соответствующий вики-разметке.
+		/// </returns>
 		/// <remarks>
 		/// Страница документации ВКонтакте <see href="https://vk.com/dev/pages.parseWiki" />.
 		/// </remarks>
@@ -291,9 +314,14 @@

 		/// <summary>
-		/// clearCache
-		/// </summary>
-		/// <returns>Возвращает результат выполнения метода.</returns>
+		/// Позволяет очистить кеш отдельных внешних страниц, которые могут быть прикреплены к записям ВКонтакте.
+		/// После очистки кеша при последующем прикреплении ссылки к записи, данные о странице будут обновлены.
+		/// Внешние страницы – страницы которые прикрепляются к записям вместе с ссылкой и доступные по кнопке "Предпросмотр".
+		/// </summary>
+		/// <param name="url">URL.</param>
+		/// <returns>
+		/// При удачной очистке кеша – метод возвращает <c>true</c>.
+		/// </returns>
 		/// <remarks>
 		/// Страница документации ВКонтакте <see href="https://vk.com/dev/pages.clearCache" />.
 		/// </remarks>


Added: alphabetical sorting of decks

Added: alphabetical sorting of decks

--- StudyBox/StudyBox.Core/ViewModels/DecksListViewModel.cs
+++ StudyBox/StudyBox.Core/ViewModels/DecksListViewModel.cs
@@ -89,6 +89,7 @@
                 List<Deck> _deckLists = new List<Deck>();
                 IsDataLoading = true;
                 _deckLists = await _restService.GetDecks();
+                _deckLists.Sort((x, y) => string.Compare(y.Name, x.Name));
                 _deckLists.ForEach(x => DecksCollection.Add(x));
                 IsDataLoading = false;
             }


Downgrade ClientVersion

Downgrade ClientVersion

--- WalletWasabi/Helpers/Constants.cs
+++ WalletWasabi/Helpers/Constants.cs
@@ -7,7 +7,7 @@
 {
 	public static class Constants
 	{
-		public static readonly Version ClientVersion = new Version(1, 1, 6);
+		public static readonly Version ClientVersion = new Version(1, 1, 5);
 		public const string BackendMajorVersion = "3";
 		public static readonly VersionsResponse VersionsResponse = new VersionsResponse { ClientVersion = ClientVersion.ToString(), BackendMajorVersion = BackendMajorVersion };


detail table

detail table

--- Web/Views/Dashboard/Detail.cshtml
+++ Web/Views/Dashboard/Detail.cshtml
@@ -71,15 +71,15 @@
         }
         /* eof leaf */
     </style>
-
+

 }

-
Object

+

+
+

+

+        Type
+        Message
+        Ip
+        Host
+        Url
+        ApplicationName
+        Id
+        ThreadId
+        TimeStamp
+

+

+        @Model.Type
+        @Model.Message
+        @Model.Ip
+        @Model.Host
+        @Model.Url
+        @Model.ApplicationName
+        @Model.Id
+        @Model.ThreadId
+        @Model.TimeStamp
+

+

+
+

+
+Expand ALL
+

+
Object

     @Model.ObjectJson

-
-
Type

-

-    @Model.Type
-

-
Message

-

-    @Model.Message
-

-
Ip

-

-    @Model.Ip
-

-
Host

-

-    @Model.Host
-

-
-
Url

-

-    @Model.Url
-

-
-
App.Name

-

-    @Model.ApplicationName
-

-
-
Id

-

-    @Model.Id
-

-
-
ThreadId

-

-    @Model.ThreadId
-

-
TimeStamp

-

-    @Model.TimeStamp
-

-


Quotations: comment added in print format

--- Web/Views/Quotations/Print.cshtml
+++ Web/Views/Quotations/Print.cshtml
@@ -30,6 +30,14 @@

@Html.DisplayFor(x => x.Contact.Name)

+

+            }
+             @if (Model.Comment != null) {
+

+
@Resources.Comment

+

+

+
@Html.DisplayFor(x => x.Comment)

             }
             @if (Model.ShipTo != null) {


Add one unit test

Add one unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
@@ -3137,6 +3137,15 @@
     public void TestMethod_IsPrime_2203()
     {
       const int source = 2203;
+      const bool expected = true;
+      bool result = FunctionsMath.IsPrime(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_IsPrime_2207()
+    {
+      const int source = 2207;
       const bool expected = true;
       bool result = FunctionsMath.IsPrime(source);
       Assert.AreEqual(result, expected);


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
@@ -1805,6 +1805,15 @@
     public void TestMethod_IsPrime_1063()
     {
       const int source = 1063;
+      const bool expected = true;
+      bool result = FunctionsMath.IsPrime(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_IsPrime_1069()
+    {
+      const int source = 1069;
       const bool expected = true;
       bool result = FunctionsMath.IsPrime(source);
       Assert.AreEqual(result, expected);


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
@@ -1931,6 +1931,15 @@
         public void TestMethod_IsPrime_1181()
         {
             const int source = 1181;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_1187()
+        {
+            const int source = 1187;
             const bool expected = true;
             bool result = FunctionsMath.IsPrime(source);
             Assert.AreEqual(result, expected);


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestNumberOfOccurrences.cs
+++ UnitTestUsefullFunctions/UnitTestNumberOfOccurrences.cs
@@ -195,5 +195,15 @@
       int result = StringFunc.NumberOfOccurrences(source1, source2);
       Assert.AreEqual(result, expected);
     }
+
+    [TestMethod]
+    public void TestMethod_NumberOfOccurrences_brown_fox_f_1()
+    {
+      const string source1 = "f";
+      const string source2 = "The quick brown fox jumps over the lazy dog";
+      const int expected = 1;
+      int result = StringFunc.NumberOfOccurrences(source1, source2);
+      Assert.AreEqual(result, expected);
+    }
   }
 }


Move comment and add minor clarification

--- osu.Framework/Graphics/UserInterface/SliderBar.cs
+++ osu.Framework/Graphics/UserInterface/SliderBar.cs
@@ -126,12 +126,13 @@
                 float val = currentNumberInstantaneous.Value.ToSingle(NumberFormatInfo.InvariantInfo);

                 relativeValueAtMouseDown = (val - min) / (max - min);
+
+                // Click shouldn't be handled if relative dragging is happening (i.e. while holding a nub).
+                // This is generally an expectation by most OSes and UIs.
                 handleClick = false;
             }
             else
             {
-                // Click shouldn't be handled if relative movement is happening.
-                // This is generally an expectation by most OSes and UIs.
                 handleClick = true;
                 relativeValueAtMouseDown = null;
             }


added merging feature

added merging feature

--- osu.Game.Rulesets.Osu/Edit/OsuSelectionHandler.cs
+++ osu.Game.Rulesets.Osu/Edit/OsuSelectionHandler.cs
@@ -6,13 +6,16 @@
 using osu.Framework.Allocation;
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.Primitives;
+using osu.Framework.Graphics.UserInterface;
 using osu.Framework.Utils;
 using osu.Game.Extensions;
+using osu.Game.Graphics.UserInterface;
 using osu.Game.Rulesets.Edit;
 using osu.Game.Rulesets.Objects;
 using osu.Game.Rulesets.Objects.Types;
 using osu.Game.Rulesets.Osu.Objects;
 using osu.Game.Rulesets.Osu.UI;
+using osu.Game.Screens.Edit;
 using osu.Game.Screens.Edit.Compose.Components;
 using osuTK;

@@ -22,6 +25,12 @@
     {
         [Resolved(CanBeNull = true)]
         private IDistanceSnapProvider? snapProvider { get; set; }
+
+        [Resolved(CanBeNull = true)]
+        private EditorBeatmap? editorBeatmap { get; set; }
+
+        [Resolved(CanBeNull = true)]
+        private IEditorChangeHandler? changeHandler { get; set; }

         /// <summary>
         /// During a transform, the initial origin is stored so it can be used throughout the operation.
@@ -322,5 +331,105 @@
         private OsuHitObject[] selectedMovableObjects => SelectedItems.OfType<OsuHitObject>()
                                                                       .Where(h => !(h is Spinner))
                                                                       .ToArray();
+
+        /// <summary>
+        /// All osu! hitobjects which can be merged.
+        /// </summary>
+        private OsuHitObject[] selectedMergeableObjects => SelectedItems.OfType<OsuHitObject>()
+                                                                        .Where(h => h is HitCircle or Slider)
+                                                                        .OrderBy(h => h.StartTime)
+                                                                        .ToArray();
+
+        private void mergeSelection()
+        {
+            if (editorBeatmap == null || changeHandler == null || selectedMergeableObjects.Length < 2)
+                return;
+
+            changeHandler.BeginChange();
+
+            // Have an initial slider object.
+            var firstHitObject = selectedMergeableObjects[0];
+            var mergedHitObject = firstHitObject as Slider ?? new Slider
+            {
+                StartTime = firstHitObject.StartTime,
+                Position = firstHitObject.Position,
+                NewCombo = firstHitObject.NewCombo,
+                SampleControlPoint = firstHitObject.SampleControlPoint,
+            };
+
+            if (mergedHitObject.Path.ControlPoints.Count == 0)
+            {
+                mergedHitObject.Path.ControlPoints.Add(new PathControlPoint(Vector2.Zero, PathType.Linear));
+            }
+
+            // Merge all the selected hit objects into one slider path.
+            bool lastCircle = firstHitObject is HitCircle;
+
+            foreach (var selectedMergeableObject in selectedMergeableObjects.Skip(1))
+            {
+                if (selectedMergeableObject is IHasPath hasPath)
+                {
+                    var offset = lastCircle ? selectedMergeableObject.Position - mergedHitObject.Position : mergedHitObject.Path.ControlPoints[^1].Position;
+                    float distanceToLastControlPoint = Vector2.Distance(mergedHitObject.Path.ControlPoints[^1].Position, offset);
+
+                    // Calculate the distance required to travel to the expected distance of the merging slider.
+                    mergedHitObject.Path.ExpectedDistance.Value = mergedHitObject.Path.CalculatedDistance + distanceToLastControlPoint + hasPath.Path.Distance;
+
+                    // Remove the last control point if it sits exactly on the start of the next control point.
+                    if (Precision.AlmostEquals(distanceToLastControlPoint, 0))
+                    {
+                        mergedHitObject.Path.ControlPoints.RemoveAt(mergedHitObject.Path.ControlPoints.Count - 1);
+                    }
+
+                    mergedHitObject.Path.ControlPoints.AddRange(hasPath.Path.ControlPoints.Select(o => new PathControlPoint(o.Position + offset, o.Type)));
+                    lastCircle = false;
+                }
+                else
+                {
+                    // Turn the last control point into a linear type if this is the first merging circle in a sequence, so the subsequent control points can be inherited path type.
+                    if (!lastCircle)
+                    {
+                        mergedHitObject.Path.ControlPoints.Last().Type = PathType.Linear;
+                    }
+
+                    mergedHitObject.Path.ControlPoints.Add(new PathControlPoint(selectedMergeableObject.Position - mergedHitObject.Position));
+                    mergedHitObject.Path.ExpectedDistance.Value = null;
+                    lastCircle = true;
+                }
+            }
+
+            // Make sure only the merged hit object is in the beatmap.
+            if (firstHitObject is Slider)
+            {
+                foreach (var selectedMergeableObject in selectedMergeableObjects.Skip(1))
+                {
+                    editorBeatmap.Remove(selectedMergeableObject);
+                }
+            }
+            else
+            {
+                foreach (var selectedMergeableObject in selectedMergeableObjects)
+                {
+                    editorBeatmap.Remove(selectedMergeableObject);
+                }
+
+                editorBeatmap.Add(mergedHitObject);
+            }
+
+            // Make sure the merged hitobject is selected.
+            SelectedItems.Clear();
+            SelectedItems.Add(mergedHitObject);
+
+            changeHandler.EndChange();
+        }
+
+        protected override IEnumerable<MenuItem> GetContextMenuItemsForSelection(IEnumerable<SelectionBlueprint<HitObject>> selection)
+        {
+            foreach (var item in base.GetContextMenuItemsForSelection(selection))
+                yield return item;
+
+            if (selection.Count() > 1 && selection.All(o => o.Item is HitCircle or Slider))
+                yield return new OsuMenuItem("Merge selection", MenuItemType.Destructive, mergeSelection);
+        }
     }
 }


Use semibold font weight for `ChannelListItemFlow` label

--- osu.Game/Overlays/Chat/ChannelList/ChannelList.cs
+++ osu.Game/Overlays/Chat/ChannelList/ChannelList.cs
@@ -127,7 +127,7 @@
                 {
                     Text = label,
                     Margin = new MarginPadding { Left = 18, Bottom = 5 },
-                    Font = OsuFont.Torus.With(size: 12),
+                    Font = OsuFont.Torus.With(size: 12, weight: FontWeight.SemiBold),
                 });
             }
         }


Reverting previous commit

Reverting previous commit

--- Web/Infrastructure/DependencyInjection/RavenDbModule.cs
+++ Web/Infrastructure/DependencyInjection/RavenDbModule.cs
@@ -9,7 +9,7 @@
     {
         protected override void Load(ContainerBuilder builder)
         {
-            builder.Register(c => new DocumentStore { ConnectionStringName = "RAVENHQ_CONNECTION_STRING" }.Initialize())
+            builder.Register(c => new DocumentStore { ConnectionStringName = "RavenDB" }.Initialize())
                    .As<IDocumentStore>()
                    .SingleInstance();


Fixed logging

Fixed logging

--- pMixins.VisualStudio/VisualStudioCodeGenerator.cs
+++ pMixins.VisualStudio/VisualStudioCodeGenerator.cs
@@ -100,7 +100,8 @@

                 var generatedCode = response.GeneratedCodeSyntaxTree.GetText();

-                Log.InfoFormat("Generated Code for File [{0}]: {1}{2}{1}",
+                Log.DebugFormat("Generated Code for File [{0}]: {1}{2}{1}",
+                    context.Source.FileName,
                     Environment.NewLine,
                     generatedCode);


fix a bug

fix a bug

--- Wodsoft.ComBoost.Mvc/Web/Mvc/EntityControllerFactory.cs
+++ Wodsoft.ComBoost.Mvc/Web/Mvc/EntityControllerFactory.cs
@@ -124,22 +124,21 @@
         /// <returns>The controller type.</returns>
         protected override Type GetControllerType(Routing.RequestContext requestContext, string controllerName)
         {
-            Type type = base.GetControllerType(requestContext, controllerName);
+            Type type = null;
+            string areaString = requestContext.RouteData.DataTokens["Area"] as string;
+            ControllerItem[] items;
+            items = _Items.Where(t => t.Controller == controllerName.ToLower()).ToArray();
+            if (items.Length > 1 && areaString != null)
+                items = items.Where(t => t.Area == areaString.ToLower()).ToArray();
+            if (items.Length > 0)
+                type = typeof(EntityController<>).MakeGenericType(items[0].EntityType);
+            if (type != null &&
+                ((areaString != null && items[0].Area == null) ||
+                (areaString != null && items[0].Area != areaString.ToLower()) ||
+                (areaString == null && items[0].Area != null)))
+                type = null;
             if (type == null)
-            {
-                string areaString = requestContext.RouteData.DataTokens["Area"] as string;
-                ControllerItem[] items;
-                items = _Items.Where(t => t.Controller == controllerName.ToLower()).ToArray();
-                if (items.Length > 1 && areaString != null)
-                    items = items.Where(t => t.Area == areaString.ToLower()).ToArray();
-                if (items.Length > 0)
-                    type = typeof(EntityController<>).MakeGenericType(items[0].EntityType);
-                if (type != null &&
-                    ((areaString != null && items[0].Area == null) ||
-                    (areaString != null && items[0].Area != areaString.ToLower()) ||
-                    (areaString == null && items[0].Area != null)))
-                    type = null;
-            }
+                type = base.GetControllerType(requestContext, controllerName);
             return type;
         }


Crashes handler dialog

Crashes handler dialog

--- Xamarin/Dirigent.Net/Main/Main.cs
+++ Xamarin/Dirigent.Net/Main/Main.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Threading;
 using Foundation;
 using UIKit;

@@ -51,14 +52,24 @@

 			Console.WriteLine(exceptionString);

-			var alert = new UIAlertView(errorTitle, e.Message, null, "  :(  ");
+			var alert = new UIAlertView(errorTitle, e.Message, null, "  :(  ") {
+				WeakDelegate = new AlertViewDelegate()
+			};
 			alert.Show();

 			while (true) {
 				NSRunLoop.Main.RunUntil(NSRunLoopMode.UITracking, NSDate.DistantFuture);
 			}
+		}

-			throw e;
+		internal sealed class AlertViewDelegate : UIAlertViewDelegate {
+			public override void Clicked(UIAlertView alertview, nint buttonIndex) {
+				Thread.CurrentThread.Abort();
+			}
+
+			public override void Dismissed(UIAlertView alertView, nint buttonIndex) {
+				Thread.CurrentThread.Abort();
+			}
 		}
 	}
 }


Fixed minor bug/annoyance with new config create

The project list is updated on save now.

--- Forms/KeyCaptureConfig.cs
+++ Forms/KeyCaptureConfig.cs
@@ -222,6 +222,8 @@
                 listConfigs.Add((RemapEntry) zItem.Tag);
             }
             m_zConfigFileManager.SaveFile(listConfigs, sFileName);
+            // on save the project list should be updated
+            UpdateProjectsList(sFileName);
             return true;
         }


Fixed: deadlock in TestClient that occurs often on FreeBSD.

--- src/EventStore/EventStore.TestClient/Client.cs
+++ src/EventStore/EventStore.TestClient/Client.cs
@@ -187,7 +187,7 @@
                                               bool failContextOnError = true,
                                               IPEndPoint tcpEndPoint = null)
         {
-            var connectionCreatedEvent = new AutoResetEvent(false);
+            var connectionCreatedEvent = new ManualResetEventSlim(false);
             Connection typedConnection = null;

             var connection = _connector.ConnectTo(
@@ -195,13 +195,19 @@
                 tcpEndPoint ?? TcpEndpoint,
                 conn =>
                 {
-                    if (!InteractiveMode)
-                        Log.Info("Connected to [{0}, L{1}].", conn.RemoteEndPoint, conn.LocalEndPoint);
-                    if (connectionEstablished != null)
-                    {
-                        connectionCreatedEvent.WaitOne(500);
-                        connectionEstablished(typedConnection);
-                    }
+                    // we execute callback on ThreadPool because on FreeBSD it can be called synchronously
+                    // causing deadlock
+                    ThreadPool.QueueUserWorkItem(_ =>
+                    {
+                        if (!InteractiveMode)
+                            Log.Info("Connected to [{0}, L{1}].", conn.RemoteEndPoint, conn.LocalEndPoint);
+                        if (connectionEstablished != null)
+                        {
+                            if (!connectionCreatedEvent.Wait(10000))
+                                throw new Exception("TcpTypedConnection creation took too long!");
+                            connectionEstablished(typedConnection);
+                        }
+                    });
                 },
                 (conn, error) =>
                 {


integrated opensim git 6c4eed5539ac0d8d6bab9166a8e320aeb12c3cd6.

 Fix bug where calling PUTGROUP on the core groups service without specifying a ServiceLocation would set the group name to an empty string instead of setting ServiceLocation to an empty string.

Signed-off-by: ft <d352dbdf6170085acaf7ed62197a4de1452a0073@noemail>

--- OpenSim/Addons/Groups/GroupsExtendedData.cs
+++ OpenSim/Addons/Groups/GroupsExtendedData.cs
@@ -173,7 +173,7 @@
             if (dict.ContainsKey("ServiceLocation") && dict["ServiceLocation"] != null)
                 grec.ServiceLocation = dict["ServiceLocation"].ToString();
             else
-                grec.GroupName = string.Empty;
+                grec.ServiceLocation = string.Empty;

             if (dict.ContainsKey("ShownInList") && dict["ShownInList"] != null)
                 grec.ShowInList = bool.Parse(dict["ShownInList"].ToString());


Don't include hyperlinks as neighbors, even if grid operators have done the mistake of placing them as neighbors. This will not prevent further mess ups coming from that unsupported action.

--- OpenSim/Services/GridService/GridService.cs
+++ OpenSim/Services/GridService/GridService.cs
@@ -278,7 +278,11 @@

                 foreach (RegionData rdata in rdatas)
                     if (rdata.RegionID != regionID)
-                        rinfos.Add(RegionData2RegionInfo(rdata));
+                    {
+                        int flags = Convert.ToInt32(rdata.Data["flags"]);
+                        if ((flags & (int)Data.RegionFlags.Hyperlink) == 0) // no hyperlinks as neighbours
+                            rinfos.Add(RegionData2RegionInfo(rdata));
+                    }

             }
             m_log.DebugFormat("[GRID SERVICE]: region {0} has {1} neighours", region.RegionName, rinfos.Count);


Fix eOS ports

Fix eOS ports

--- PathfinderAPI/Replacements/ContentLoader.cs
+++ PathfinderAPI/Replacements/ContentLoader.cs
@@ -760,7 +760,7 @@
                     portsNeededForCrack = 2
                 };

-                ComputerLoader.loadPortsIntoComputer("22,3659", eos);
+                PortManager.LoadPortsFromStringVanilla(eos, "22,3659");
                 eos.setAdminPassword(info.Attributes.GetString("passOverride", "alpine"));

                 EOSComp.GenerateEOSFilesystem(eos);


Adding test to verify that PlaxioClient.download will throw an exception on error.

--- Phaxio.Tests/UnitTests/PhaxioClientTests.cs
+++ Phaxio.Tests/UnitTests/PhaxioClientTests.cs
@@ -1,6 +1,7 @@
 using NUnit.Framework;
 using Phaxio.Entities;
 using Phaxio.Errors.V2;
+using Phaxio.Resources.V2;
 using Phaxio.Tests.Helpers;
 using System;

@@ -28,6 +29,30 @@
             var phaxio = new PhaxioClient(RestClientBuilder.TEST_KEY, RestClientBuilder.TEST_SECRET, restClient);

             Assert.Throws(typeof(ServiceException), () => Console.Write(phaxio.Account.Status.Balance));
+        }
+
+        [Test]
+        public void UnitTests_V2_FileDownloadThrowsError()
+        {
+            var requestAsserts = new RequestAsserts()
+                .Auth()
+                .Get()
+                .Resource("faxes/123456/file")
+                .Build();
+
+            var restClient = new RestClientBuilder()
+                .WithRequestAsserts(requestAsserts)
+                .AsJson()
+                .Content(JsonResponseFixtures.FromFile("V2/error_rate_limited"))
+                .RateLimited()
+                .Build();
+
+            var phaxio = new PhaxioClient(RestClientBuilder.TEST_KEY, RestClientBuilder.TEST_SECRET, restClient);
+
+            var fax = new FaxFile(123456);
+            fax.PhaxioClient = phaxio;
+
+            Assert.Throws(typeof(RateLimitException), () => Console.Write(fax.Pdf.Bytes));
         }

         [Test]


bump version to 0.6.1

bump version to 0.6.1

--- src/LookingGlass.Framework/LookingGlassBase.cs
+++ src/LookingGlass.Framework/LookingGlassBase.cs
@@ -35,7 +35,7 @@
     // static things that are accessed very early (mostly by logger)
     private static string m_applicationName = "LookingGlass";
     public static string ApplicationName { get { return m_applicationName; } }
-    private static string m_applicationVersion = "V0.6.0";
+    private static string m_applicationVersion = "V0.6.1";
     public static string ApplicationVersion { get { return m_applicationVersion; } }

     ILog m_log = LogManager.GetLogger("LookingGlassBase");


Lucene.Net.Core.Index.TieredMergePolicy: Added Arrays.ToString() to verbose logging of eligible list.

--- src/Lucene.Net.Core/Index/TieredMergePolicy.cs
+++ src/Lucene.Net.Core/Index/TieredMergePolicy.cs
@@ -645,7 +645,7 @@

             if (Verbose())
             {
-                Message("eligible=" + eligible);
+                Message("eligible=" + Arrays.ToString(eligible));
                 Message("forceMergeRunning=" + forceMergeRunning);
             }

@@ -711,7 +711,7 @@

             if (Verbose())
             {
-                Message("eligible=" + eligible);
+                Message("eligible=" + Arrays.ToString(eligible));
             }

             int start = 0;


Added handling for mac application icon.

--- PlatformWin32/win32/WindowsFormsAbstract.cs
+++ PlatformWin32/win32/WindowsFormsAbstract.cs
@@ -81,7 +81,21 @@
 						throw;
 					}
 				}
-            }
+			}
+			else if (File.Exists("../MonoBundle/StaticData/application.ico"))
+			{
+				try
+				{
+					this.Icon = new System.Drawing.Icon("../MonoBundle/StaticData/application.ico");
+				}
+				catch(System.ComponentModel.Win32Exception ex)
+				{
+					if (ex.NativeErrorCode != 0)
+					{
+						throw;
+					}
+				}
+			}
         }

         List<string> GetDroppedFiles(DragEventArgs drgevent)


Add a null check for Id in BreakingChange.GetHashCode (#410)

--- src/Microsoft.Fx.Portability/BreakingChange.cs
+++ src/Microsoft.Fx.Portability/BreakingChange.cs
@@ -87,7 +87,7 @@

         public override int GetHashCode()
         {
-            return Id.GetHashCode();
+            return Id?.GetHashCode() ?? 0;
         }

         public override bool Equals(object obj)


Split serialization and deserialization microbenches

--- Funsafe.Runner/Program.cs
+++ Funsafe.Runner/Program.cs
@@ -12,34 +12,48 @@
         {
             const int warmupBatchCount = 100;
             const int warmupBatchSize = 10;
-
-            BenchBinarySerialization(warmupBatchCount, warmupBatchSize);
-            BenchUnsafeSerialization(warmupBatchCount, warmupBatchSize);
+
+            BenchBinarySerialization(warmupBatchCount, warmupBatchSize, 1);
+            BenchBinaryDeserialization(warmupBatchCount, warmupBatchSize, 1);
+
+            BenchUnsafeSerialization(warmupBatchCount, warmupBatchSize, 1);
+            BenchUnsafeDeserialization(warmupBatchCount, warmupBatchSize, 1);

             const int batchCount = 100*1000;
             const int batchSize = 100;

-            Measure("Binary serialization", () => BenchBinarySerialization(batchCount, batchSize), batchCount*batchSize);
-            Measure("Unsafe binary serialization", () => BenchUnsafeSerialization(batchCount, batchSize), batchCount*batchSize);
+            for (var i = 0; i <= 10; i += 2)
+            {
+                var messagePartCount = i;
+                var operationCount = batchCount*batchSize;
+
+                Console.WriteLine("# {0} message parts", messagePartCount);
+                Console.WriteLine();
+                Measure("Binary serialization", () => BenchBinarySerialization(batchCount, batchSize, messagePartCount), operationCount);
+                Measure("Binary deserialization", () => BenchBinaryDeserialization(batchCount, batchSize, messagePartCount), operationCount);
+                Console.WriteLine();
+                Measure("Unsafe serialization", () => BenchUnsafeSerialization(batchCount, batchSize, messagePartCount), operationCount);
+                Measure("Unsafe deserialization", () => BenchUnsafeDeserialization(batchCount, batchSize, messagePartCount), operationCount);
+                Console.WriteLine();
+            }
         }

         private static void Measure(string actionName, Action action, int operationCount)
         {
-            Console.WriteLine("{0} - Starting measure...", actionName);
             GC.Collect();
             var gcCount = GC.CollectionCount(0);
             var stopwatch = Stopwatch.StartNew();
             action();
             stopwatch.Stop();
             gcCount = GC.CollectionCount(0) - gcCount;
-            Console.WriteLine("Completed in {0:N0}ms ({1:N0} ops/s) - GC count: {2}", stopwatch.ElapsedMilliseconds, operationCount/stopwatch.Elapsed.TotalSeconds, gcCount);
+            Console.WriteLine("{0}\t{1,10:N0}ms\t{2,12:N0} ops/s\t{3}GC", actionName, stopwatch.ElapsedMilliseconds, operationCount/stopwatch.Elapsed.TotalSeconds, gcCount);
         }

-        private static void BenchUnsafeSerialization(int batchCount, int batchSize)
+        private static void BenchUnsafeSerialization(int batchCount, int batchSize, int messagePartCount)
         {
             using (var wrapper = new UnsafeBufferWrapper(new byte[1024*100]))
             {
-                var message = CreateMessage();
+                var message = CreateMessage(messagePartCount);

                 for (var i = 0; i < batchCount; i++)
                 {
@@ -49,7 +63,23 @@
                     {
                         UnsafeMessageSerializer.Serialize(message, wrapper);
                     }
+                }
+            }
+        }

+        private static void BenchUnsafeDeserialization(int batchCount, int batchSize, int messagePartCount)
+        {
+            using (var wrapper = new UnsafeBufferWrapper(new byte[1024*100]))
+            {
+                var message = CreateMessage(messagePartCount);
+
+                for (var j = 0; j < batchSize; j++)
+                {
+                    UnsafeMessageSerializer.Serialize(message, wrapper);
+                }
+
+                for (var i = 0; i < batchCount; i++)
+                {
                     wrapper.ResetCursor();

                     for (var j = 0; j < batchSize; j++)
@@ -60,13 +90,12 @@
             }
         }

-        private static void BenchBinarySerialization(int batchCount, int batchSize)
+        private static void BenchBinarySerialization(int batchCount, int batchSize, int messagePartCount)
         {
             using (var memoryStream = new MemoryStream(new byte[1024*100]))
             using (var binaryWriter = new BinaryWriter(memoryStream))
-            using (var binaryReader = new BinaryReader(memoryStream))
             {
-                var message = CreateMessage();
+                var message = CreateMessage(messagePartCount);

                 for (var i = 0; i < batchCount; i++)
                 {
@@ -76,7 +105,25 @@
                     {
                         BinaryMessageSerializer.Serialize(message, binaryWriter);
                     }
+                }
+            }
+        }

+        private static void BenchBinaryDeserialization(int batchCount, int batchSize, int messagePartCount)
+        {
+            using (var memoryStream = new MemoryStream(new byte[1024*100]))
+            using (var binaryWriter = new BinaryWriter(memoryStream))
+            using (var binaryReader = new BinaryReader(memoryStream))
+            {
+                var message = CreateMessage(messagePartCount);
+
+                for (var j = 0; j < batchSize; j++)
+                {
+                    BinaryMessageSerializer.Serialize(message, binaryWriter);
+                }
+
+                for (var i = 0; i < batchCount; i++)
+                {
                     memoryStream.Position = 0;

                     for (var j = 0; j < batchSize; j++)
@@ -87,7 +134,7 @@
             }
         }

-        private static Message CreateMessage()
+        private static Message CreateMessage(int messagePartCount)
         {
             var message = new Message
             {
@@ -99,7 +146,7 @@
                     Timestamp = DateTime.UtcNow
                 },
                 Id = 123,
-                PartCount = 12
+                PartCount = messagePartCount
             };

             for (var i = 0; i < message.PartCount; i++)


NH-3893 - isolating left()/right() failure in a dedicated test for all dialects.

--- src/NHibernate.Test/Legacy/SQLFunctionsTest.cs
+++ src/NHibernate.Test/Legacy/SQLFunctionsTest.cs
@@ -20,7 +20,7 @@

 		protected override IList Mappings
 		{
-			get { return new string[] {"Simple.hbm.xml", "Blobber.hbm.xml", "Broken.hbm.xml"}; }
+			get { return new string[] { "Simple.hbm.xml", "Blobber.hbm.xml", "Broken.hbm.xml" }; }
 		}

 		[Test]
@@ -33,7 +33,7 @@
 				.GetEnumerator();

 			if (Dialect is MySQLDialect
-			    // Added two dialects below for NH
+				// Added two dialects below for NH
 				|| Dialect is MsSql2000Dialect
 				|| Dialect is PostgreSQLDialect)
 			{
@@ -50,20 +50,20 @@

 			// Test to make sure allocating an specified object operates correctly.
 			Assert.AreEqual(1,
-			                s.CreateQuery("select new S(s.Count, s.Address) from s in class Simple").List()
-			                	.Count);
+							s.CreateQuery("select new S(s.Count, s.Address) from s in class Simple").List()
+								.Count);

 			// Quick check the base dialect functions operate correctly
 			Assert.AreEqual(1,
-			                s.CreateQuery("select max(s.Count) from s in class Simple").List().Count);
+							s.CreateQuery("select max(s.Count) from s in class Simple").List().Count);
 			Assert.AreEqual(1,
-			                s.CreateQuery("select count(*) from s in class Simple").List().Count);
+							s.CreateQuery("select count(*) from s in class Simple").List().Count);

 			if (Dialect is Oracle8iDialect)
 			{
 				// Check Oracle Dialect mix of dialect functions - no args (no parenthesis and single arg functions
 				IList rset = s.CreateQuery("select s.Name, sysdate, trunc(s.Pay), round(s.Pay) from s in class Simple").List();
-				object[] row = (object[]) rset[0];
+				object[] row = (object[])rset[0];
 				Assert.IsNotNull(row[0], "Name string should have been returned");
 				Assert.IsNotNull(row[1], "Todays Date should have been returned");
 				Assert.AreEqual(45f, row[2], "trunc(45.8) result was incorrect");
@@ -75,14 +75,6 @@
 				// Test type conversions while using nested functions (Float to Int).
 				rset = s.CreateQuery("select abs(round(s.Pay)) from s in class Simple").List();
 				Assert.AreEqual(46f, rset[0], "abs(round(-45.8)) result was incorrect");
-
-				/* As of NH-3893, left and right functions are broken. Seemed confused with join keyword, and not
-				   supported on Hibernate side.
-				rset = s.CreateQuery("select left('abc', 2), right('abc', 2) from s in class Simple").List();
-				row = (object[]) rset[0];
-				Assert.AreEqual("ab", row[0], "Left function is broken.");
-				Assert.AreEqual("bc", row[1], "Right function is broken.");
-				*/

 				// Test a larger depth 3 function example - Not a useful combo other than for testing
 				Assert.AreEqual(1,
@@ -113,13 +105,30 @@
 		}

 		[Test]
+		[Ignore("NH-3893 is not fixed")]
+		public void LeftAndRight()
+		{
+			// As of NH-3893, left and right functions are broken. Seemed confused with join keyword, and not
+			// supported on Hibernate side.
+			using (var s = OpenSession())
+			using (var t = s.BeginTransaction())
+			{
+				var rset = s.CreateQuery("select left('abc', 2), right('abc', 2) from s in class Simple").List<object[]>();
+				var row = rset[0];
+				Assert.AreEqual("ab", row[0], "Left function is broken.");
+				Assert.AreEqual("bc", row[1], "Right function is broken.");
+				t.Commit();
+			}
+		}
+
+		[Test]
 		public void SetProperties()
 		{
 			ISession s = OpenSession();
 			ITransaction t = s.BeginTransaction();
 			Simple simple = new Simple();
 			simple.Name = "Simple 1";
-			s.Save(simple, (long) 10);
+			s.Save(simple, (long)10);
 			IQuery q = s.CreateQuery("from s in class Simple where s.Name=:Name and s.Count=:Count");
 			q.SetProperties(simple);
 			Assert.AreEqual(simple, q.List()[0]);
@@ -155,7 +164,7 @@

 			s = OpenSession();
 			t = s.BeginTransaction();
-			b = (Broken) s.Load(typeof(Broken), b);
+			b = (Broken)s.Load(typeof(Broken), b);
 			t.Commit();
 			s.Close();

@@ -173,19 +182,19 @@
 			ITransaction t = s.BeginTransaction();
 			Simple simple = new Simple();
 			simple.Name = "Simple 1";
-			s.Save(simple, (long) 10);
-			t.Commit();
-			s.Close();
-
-			s = OpenSession();
-			t = s.BeginTransaction();
-			s.Update(simple, (long) 10);
-			t.Commit();
-			s.Close();
-
-			s = OpenSession();
-			t = s.BeginTransaction();
-			s.Update(simple, (long) 10);
+			s.Save(simple, (long)10);
+			t.Commit();
+			s.Close();
+
+			s = OpenSession();
+			t = s.BeginTransaction();
+			s.Update(simple, (long)10);
+			t.Commit();
+			s.Close();
+
+			s = OpenSession();
+			t = s.BeginTransaction();
+			s.Update(simple, (long)10);
 			s.Delete(simple);
 			t.Commit();
 			s.Close();
@@ -218,7 +227,7 @@
 			q.SetString("name", "Simple 1");
 			Assert.AreEqual(1, q.List().Count);

-			simple = (Simple) q.List()[0];
+			simple = (Simple)q.List()[0];

 			q.SetString("name", "Simple 2");
 			Assert.AreEqual(0, q.List().Count);
@@ -296,7 +305,7 @@
 			t = s.BeginTransaction();
 			IList result = s.CreateQuery(query).List();
 			Assert.IsTrue(result[0] is Simple,
-			              "Unexpected result type [" + result[0].GetType().Name + "]");
+						  "Unexpected result type [" + result[0].GetType().Name + "]");
 			s.Delete(result[0]);
 			t.Commit();
 			s.Close();
@@ -384,7 +393,7 @@
 			q.SetCacheable(true);
 			q.SetString("name", "Simple 1");
 			Assert.AreEqual(1, q.List().Count);
-			simple = (Simple) q.List()[0];
+			simple = (Simple)q.List()[0];

 			q.SetString("name", "Simple 2");
 			Assert.AreEqual(0, q.List().Count);
@@ -422,7 +431,7 @@
 				ITransaction t = s.BeginTransaction();
 				Simple simple = new Simple();
 				simple.Name = "Simple 1";
-				s.Save(simple, (long) 10);
+				s.Save(simple, (long)10);

 				if (Dialect is DB2Dialect)
 				{
@@ -433,23 +442,23 @@

 				Assert.AreEqual(1, s.CreateQuery("from s in class Simple where upper(s.Name) = 'SIMPLE 1'").List().Count);
 				Assert.AreEqual(1,
-				                s.CreateQuery(
-				                	"from s in class Simple where not( upper(s.Name)='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar')")
-				                	.List().Count);
+								s.CreateQuery(
+									"from s in class Simple where not( upper(s.Name)='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar')")
+									.List().Count);

 				if (!(Dialect is MySQLDialect) && !(Dialect is MsSql2000Dialect))
 				{
 					// Dialect.MckoiDialect and Dialect.InterbaseDialect also included
 					// My Sql has a funny concatenation operator
 					Assert.AreEqual(1,
-					                s.CreateQuery("from s in class Simple where lower(s.Name || ' foo')='simple 1 foo'").List().Count);
+									s.CreateQuery("from s in class Simple where lower(s.Name || ' foo')='simple 1 foo'").List().Count);
 				}

 				if ((Dialect is MsSql2000Dialect))
 				{
 					Assert.AreEqual(1,
-					                s.CreateQuery("from s in class Simple where lower( s.Name + ' foo' ) = 'simple 1 foo'").List().
-					                	Count);
+									s.CreateQuery("from s in class Simple where lower( s.Name + ' foo' ) = 'simple 1 foo'").List().
+										Count);
 				}

 				/*
@@ -464,46 +473,46 @@
 				other.Name = "Simple 2";
 				other.Count = 12;
 				simple.Other = other;
-				s.Save(other, (long) 20);
+				s.Save(other, (long)20);
 				Assert.AreEqual(1, s.CreateQuery("from s in class Simple where upper( s.Other.Name )='SIMPLE 2'").List().Count);
 				Assert.AreEqual(0, s.CreateQuery("from s in class Simple where not (upper(s.Other.Name)='SIMPLE 2')").List().Count);
 				Assert.AreEqual(1,
-				                s.CreateQuery(
-				                	"select distinct s from s in class Simple where ( ( s.Other.Count + 3) = (15*2)/2 and s.Count = 69) or ( (s.Other.Count + 2) / 7 ) = 2")
-				                	.List().Count);
+								s.CreateQuery(
+									"select distinct s from s in class Simple where ( ( s.Other.Count + 3) = (15*2)/2 and s.Count = 69) or ( (s.Other.Count + 2) / 7 ) = 2")
+									.List().Count);
 				Assert.AreEqual(1,
-				                s.CreateQuery(
-				                	"select s from s in class Simple where ( ( s.Other.Count + 3) = (15*2)/2 and s.Count = 69) or ( (s.Other.Count + 2) / 7 ) = 2 order by s.Other.Count")
-				                	.List().Count);
+								s.CreateQuery(
+									"select s from s in class Simple where ( ( s.Other.Count + 3) = (15*2)/2 and s.Count = 69) or ( (s.Other.Count + 2) / 7 ) = 2 order by s.Other.Count")
+									.List().Count);

 				Simple min = new Simple();
 				min.Count = -1;

-				s.Save(min, (long) 30);
+				s.Save(min, (long)30);

 				if (Dialect.SupportsSubSelects && TestDialect.SupportsOperatorSome)
 				{
 					Assert.AreEqual(2,
-					                s.CreateQuery(
-					                	"from s in class Simple where s.Count > ( select min(sim.Count) from sim in class NHibernate.DomainModel.Simple )")
-					                	.List().Count);
+									s.CreateQuery(
+										"from s in class Simple where s.Count > ( select min(sim.Count) from sim in class NHibernate.DomainModel.Simple )")
+										.List().Count);
 					t.Commit();
 					t = s.BeginTransaction();
 					Assert.AreEqual(2,
-					                s.CreateQuery(
-					                	"from s in class Simple where s = some( select sim from sim in class NHibernate.DomainModel.Simple where sim.Count>=0) and s.Count >= 0")
-					                	.List().Count);
+									s.CreateQuery(
+										"from s in class Simple where s = some( select sim from sim in class NHibernate.DomainModel.Simple where sim.Count>=0) and s.Count >= 0")
+										.List().Count);
 					Assert.AreEqual(1,
-					                s.CreateQuery(
-					                	"from s in class Simple where s = some( select sim from sim in class NHibernate.DomainModel.Simple where sim.Other.Count=s.Other.Count ) and s.Other.Count > 0")
-					                	.List().Count);
+									s.CreateQuery(
+										"from s in class Simple where s = some( select sim from sim in class NHibernate.DomainModel.Simple where sim.Other.Count=s.Other.Count ) and s.Other.Count > 0")
+										.List().Count);
 				}

 				IEnumerator enumer =
 					s.CreateQuery("select sum(s.Count) from s in class Simple group by s.Count having sum(s.Count) > 10 ").Enumerable()
 						.GetEnumerator();
 				Assert.IsTrue(enumer.MoveNext());
-				Assert.AreEqual(12, (Int64) enumer.Current); // changed cast from Int32 to Int64 (H3.2)
+				Assert.AreEqual(12, (Int64)enumer.Current); // changed cast from Int32 to Int64 (H3.2)
 				Assert.IsFalse(enumer.MoveNext());

 				if (Dialect.SupportsSubSelects)
@@ -571,7 +580,7 @@
 				list.Add("Simple 1");
 				list.Add("foo");
 				q.SetParameterList("name_list", list);
-				q.SetParameter("count", (int) -1);
+				q.SetParameter("count", (int)-1);
 				Assert.AreEqual(1, q.List().Count);

 				s.Delete(other);