尝试加入渲染但是没有被调用

尝试加入渲染但是没有被调用

--- LightTextEditorPlus/TextEditorPlus/Layout/TextView.cs
+++ LightTextEditorPlus/TextEditorPlus/Layout/TextView.cs
@@ -27,6 +27,17 @@
         /// <inheritdoc />
         protected override Visual GetVisualChild(int index) => _layers[index];

+        protected override void OnRender(DrawingContext drawingContext)
+        {
+            drawingContext.DrawRectangle(Brushes.Black, null, new Rect(10, 10, 100, 100));
+            base.OnRender(drawingContext);
+        }
+
+        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
+        {
+            base.OnRenderSizeChanged(sizeInfo);
+        }
+
         #endregion

         private readonly RenderManager _renderManager;


Fixed warning message on ZipFile.

Fixed warning message on ZipFile.

--- MarkerMetro.Unity.WinLegacyUnity/System/IO/ZipFile.cs
+++ MarkerMetro.Unity.WinLegacyUnity/System/IO/ZipFile.cs
@@ -6,7 +6,6 @@
 using System.Text;

 #if NETFX_CORE
-using System.IO;
 using System.IO.Compression;
 using Windows.Storage;
 using Windows.ApplicationModel;


Added directory check

Added directory check

--- flood.cs
+++ flood.cs
@@ -199,6 +199,10 @@
             string[] strings = Console.ReadLine().Split(' ');
             foreach(string str in strings) {
                 int sel = 0;
+                if(!Directory.Exists(SAVE_DIR)) {
+                    Console.Error.WriteLine("ERROR: Save directory disappeared!");
+                    return;
+                }
                 if(!int.TryParse(str, out sel) || sel > files.Length) {
                     Console.WriteLine("Invalid number: {0}", str);
                     continue;


Removed unnecessary creation of task and awaiting it

--- src/WebServer/Executors/RestMethodExecutor.cs
+++ src/WebServer/Executors/RestMethodExecutor.cs
@@ -1,11 +1,10 @@
-using Devkoes.Restup.WebServer.Models.Schemas;
+using Devkoes.Restup.WebServer.Factories;
 using Devkoes.Restup.WebServer.Http;
+using Devkoes.Restup.WebServer.InstanceCreators;
 using Devkoes.Restup.WebServer.Models.Contracts;
+using Devkoes.Restup.WebServer.Models.Schemas;
+using System;
 using System.Linq;
-using Devkoes.Restup.WebServer.InstanceCreators;
-using System.Collections.Generic;
-using System;
-using Devkoes.Restup.WebServer.Factories;
 using System.Threading.Tasks;

 namespace Devkoes.Restup.WebServer.Executors
@@ -24,7 +23,7 @@
             var methodInvokeResult = ExecuteAnonymousMethod(info, request);

             if (!info.IsAsync)
-                return await Task.Run(() => (IRestResponse)methodInvokeResult);
+                return (IRestResponse)methodInvokeResult;

             return await (dynamic)methodInvokeResult;
         }


Fix tabs

Fix tabs

--- MonoTouch/Xamarin.Mobile/Media/MediaPickerDelegate.cs
+++ MonoTouch/Xamarin.Mobile/Media/MediaPickerDelegate.cs
@@ -99,7 +99,7 @@
 			if (this.orientation == null)
 			{
 				if (IsValidInterfaceOrientation (UIDevice.CurrentDevice.Orientation))
-				    this.orientation = UIDevice.CurrentDevice.Orientation;
+					this.orientation = UIDevice.CurrentDevice.Orientation;
 				else
 					this.orientation = GetDeviceOrientation (this.viewController.InterfaceOrientation);
 			}
@@ -298,7 +298,7 @@

 			Func<Stream> streamGetter = () =>
 			{
-			    return File.OpenRead (path);
+				return File.OpenRead (path);
 				//switch (this.options.Location)
 				//{
 				//    case MediaFileStoreLocation.CameraRoll:


Fixed nullref in repeatrunner

Fixed nullref in repeatrunner

--- NadekoBot.Core/Modules/Utility/Common/RepeatRunner.cs
+++ NadekoBot.Core/Modules/Utility/Common/RepeatRunner.cs
@@ -47,7 +47,8 @@
                     InitialInterval += TimeSpan.FromDays(1);
             }

-            _t = new Timer(async (_) => {
+            _t = new Timer(async (_) =>
+            {

                 try { await Trigger().ConfigureAwait(false); } catch { }

@@ -56,6 +57,13 @@

         public async Task Trigger()
         {
+            async Task ChannelMissingError()
+            {
+                _log.Warn("Channel not found. Repeater stopped. ChannelId : {0}", Channel?.Id);
+                Stop();
+                await _mrs.RemoveRepeater(Repeater);
+            }
+
             var toSend = "🔄 " + Repeater.Message;

             if (oldMsg != null && !Repeater.NoRedundant)
@@ -73,8 +81,13 @@

             try
             {
+                Channel = Channel ?? Guild.GetTextChannel(Repeater.ChannelId);
+
                 if (Channel == null)
-                    Channel = Guild.GetTextChannel(Repeater.ChannelId);
+                {
+                    await ChannelMissingError().ConfigureAwait(false);
+                    return;
+                }

                 if (Repeater.NoRedundant)
@@ -95,16 +108,14 @@
             }
             catch (HttpException ex) when (ex.HttpCode == System.Net.HttpStatusCode.NotFound)
             {
-                _log.Warn("Channel not found. Repeater stopped. ChannelId : {0}", Channel?.Id);
-                Stop();
-                await _mrs.RemoveRepeater(Repeater);
+                await ChannelMissingError().ConfigureAwait(false);
                 return;
             }
             catch (Exception ex)
             {
                 _log.Warn(ex);
                 Stop();
-                await _mrs.RemoveRepeater(Repeater);
+                await _mrs.RemoveRepeater(Repeater).ConfigureAwait(false);
             }
         }


Handle Map block requests on a separate thread rather than the main packet handling thread.

This prevents a slow grid information network call from holding up the main packet handling thread.
There's no obvious race condition reason for not doing this asynchronously.

--- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5321,7 +5321,7 @@
             AddLocalPacketHandler(PacketType.MoveTaskInventory, HandleMoveTaskInventory);
             AddLocalPacketHandler(PacketType.RezScript, HandleRezScript);
             AddLocalPacketHandler(PacketType.MapLayerRequest, HandleMapLayerRequest);
-            AddLocalPacketHandler(PacketType.MapBlockRequest, HandleMapBlockRequest, false);
+            AddLocalPacketHandler(PacketType.MapBlockRequest, HandleMapBlockRequest);
             AddLocalPacketHandler(PacketType.MapNameRequest, HandleMapNameRequest);
             AddLocalPacketHandler(PacketType.TeleportLandmarkRequest, HandleTeleportLandmarkRequest);
             AddLocalPacketHandler(PacketType.TeleportCancel, HandleTeleportCancel);


HG Landmarks bug fix: pull landmark asset data from user's asset server when user is traveling.

--- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -8308,10 +8308,18 @@
                 if (lma == null)
                 {
                     // Failed to find landmark
-                    TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
-                    tpCancel.Info.SessionID = tpReq.Info.SessionID;
-                    tpCancel.Info.AgentID = tpReq.Info.AgentID;
-                    OutPacket(tpCancel, ThrottleOutPacketType.Task);
+
+                    // Let's try to search in the user's home asset server
+                    lma = FindAssetInUserAssetServer(lmid.ToString());
+
+                    if (lma == null)
+                    {
+                        // Really doesn't exist
+                        TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
+                        tpCancel.Info.SessionID = tpReq.Info.SessionID;
+                        tpCancel.Info.AgentID = tpReq.Info.AgentID;
+                        OutPacket(tpCancel, ThrottleOutPacketType.Task);
+                    }
                 }

                 try
@@ -8354,6 +8362,18 @@

             }
             return true;
+        }
+
+        private AssetBase FindAssetInUserAssetServer(string id)
+        {
+            AgentCircuitData aCircuit = ((Scene)Scene).AuthenticateHandler.GetAgentCircuitData(CircuitCode);
+            if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
+            {
+                string assetServer = aCircuit.ServiceURLs["AssetServerURI"].ToString();
+                return ((Scene)Scene).AssetService.Get(assetServer + "/" + id);
+            }
+
+            return null;
         }

         private bool HandleTeleportLocationRequest(IClientAPI sender, Packet Pack)


wiring in new fields (for import)

wiring in new fields (for import)

--- Packager/Models/PodMetadataModels/DigitalAudioFile.cs
+++ Packager/Models/PodMetadataModels/DigitalAudioFile.cs
@@ -9,11 +9,21 @@
     {
         [Required]
         public string SpeedUsed { get; set; }
-
+        public string TapeFluxivity { get; set; }
+        public string AnalogOutputVoltage { get; set; }
+        public string Peak { get; set; }
+        public string StylusSize { get; set; }
+        public string TurnOver { get; set; }
+
         public override void ImportFromXml(XElement element, ILookupsProvider lookupsProvider)
         {
             base.ImportFromXml(element, lookupsProvider);
             SpeedUsed = element.ToStringValue("speed_used");
+            TapeFluxivity = element.ToStringValue("tape_fluxivity");
+            AnalogOutputVoltage = element.ToStringValue("analog_output_voltage");
+            Peak = element.ToStringValue("peak");
+            StylusSize = element.ToStringValue("stylus_size");
+            TurnOver = element.ToStringValue("turnover");
         }
     }
 }


la inn en sjekk for om oppkoblingen mot databasen virker

--- Prosjekt_Programmering_3/awsmSeeSharpGame/MainForm.cs
+++ Prosjekt_Programmering_3/awsmSeeSharpGame/MainForm.cs
@@ -16,6 +16,7 @@
 using NAudio;
 using NAudio.Wave;
 using System.Diagnostics;
+using System.Net.Sockets;

 namespace awsmSeeSharpGame
 {
@@ -61,6 +62,26 @@
 			InitializeComponent();

             //startSpill();
+
+            //Sjekker om spillet får kontakt med databasen
+            TcpClient tcpClient = new TcpClient();
+            try
+            {
+                tcpClient.Connect("ljauk6mone.database.windows.net", 1433);
+                using (Context context = new Context())
+                {
+                    if (!context.Database.Exists())
+                    {
+                        MessageBox.Show("Får ikke kontakt med databasen. Spill som anonym bruker");
+                    }
+                }
+            }
+            catch (Exception)
+            {
+                MessageBox.Show("Får ikke kontakt med databasen. Sjekk at brannmuren din ikke stenger for port 1433");
+            }
+
+

 			//Instansierer de forskjellige panelene
 			login = new LoginControl();


A number of properties changed to read/write

--- Psycho/src/Core/Psycho.Core/Psycho.Core.Data/Topic.cs
+++ Psycho/src/Core/Psycho.Core/Psycho.Core.Data/Topic.cs
@@ -30,10 +30,6 @@
 	public class Topic : MapItem, ITopic
 	{
 		private TopicList<ITopic> subtopicList;
-		private int totalCount;
-		private string path;
-		private string number;
-		private int level;

 		public Topic()
 		{
@@ -46,28 +42,16 @@
 		[XmlElement] public bool IsExpanded { get; set;}

 		public Topic Parent { get; set;}
+		public int TotalCount { get; set;}
+		public string Path { get; set;}
+		public string Number { get; set;}
+		public int Level { get; set;}

 		public bool HasNote {
 			get {
 				return (Note != null &&
 				        !string.IsNullOrEmpty(Note.Text));
 			}
-		}
-
-		public int TotalCount {
-			get { return totalCount; }
-		}
-
-		public string Path {
-			get { return path; }
-		}
-
-		public string Number {
-			get { return number; }
-		}
-
-		public int Level {
-			get { return level; }
 		}

 		[XmlElement ("Subtopics")]


fix handling of md5 hash object. Improve logging message.

--- RelhaxModpack/RelhaxModpack/Common/DownloadManager.cs
+++ RelhaxModpack/RelhaxModpack/Common/DownloadManager.cs
@@ -43,7 +43,6 @@
         public DownloadManager()
         {
             webClient = new WebClient();
-            md5Hash = MD5.Create();
             databaseManager = new Md5DatabaseManager();
         }

@@ -116,6 +115,7 @@
                         Logging.Debug(LogOptions.ClassName, "Opening download stream and file write stream for {0}", package.ZipFile);
                         using (stream = webClient.OpenRead(downloadUrl))
                         using (filestream = new FileStream(downloadLocation, FileMode.Create, FileAccess.Write))
+                        using (md5Hash = MD5.Create())
                         {
                             byte[] buffer = new byte[BYTE_CHUNKS];
                             ThrowIfCancellationRequested();
@@ -162,7 +162,7 @@
                                         }
                                         else
                                         {
-                                            Logging.Warning("The file download hash failed to match. Downloaded = {0}, Database = {1}, try {2} of {3}", Hash, package.CRC, failCount, RetryCount);
+                                            Logging.Warning("The file download hash for zip file {0} failed to match. Downloaded = {1}, Database = {2}, try {3} of {4}", package.ZipFile, Hash, package.CRC, failCount, RetryCount);
                                         }
                                     }
                                     else
@@ -247,7 +247,7 @@
         public void Dispose()
         {
             ((IDisposable)webClient).Dispose();
-            ((IDisposable)md5Hash).Dispose();
+            ((IDisposable)md5Hash)?.Dispose();
             ((IDisposable)stream)?.Dispose();
             ((IDisposable)filestream)?.Dispose();
         }


#22 renamed appsettings

#22 renamed appsettings

--- Source/Our.Umbraco.Nexu.Core/Constants/AppSettings.cs
+++ Source/Our.Umbraco.Nexu.Core/Constants/AppSettings.cs
@@ -8,11 +8,11 @@
         /// <summary>
         /// Allow delete app setting
         /// </summary>
-        public const string AllowDelete = "nexu:AllowDelete";
+        public const string AllowDelete = "nexu:PreventDelete";

         /// <summary>
         /// Allow unpublish app setting
         /// </summary>
-        public const string AllowUnPublish = "nexu:AllowUnPublish";
+        public const string AllowUnPublish = "nexu:PreventUnPublish";
     }
 }


Play 1 million game for better comparison

--- Source/Tests/Santase.Tests.GameSimulations/Program.cs
+++ Source/Tests/Santase.Tests.GameSimulations/Program.cs
@@ -14,7 +14,7 @@
 #if DEBUG
             Console.Write(", Mode=Debug");
 #elif RELEASE
-            Console.Write(", Mode=Release");
+            Console.Write(", Mode=Release");
 #endif
             Console.WriteLine();
             Console.WriteLine(new string('=', 75));
@@ -22,7 +22,7 @@
             // For easier debugging start a single game:
             //// new SantaseGame(new SmartPlayer(), new SmartPlayerOld()).Start();

-            SimulateGames(new SmartPlayersGameSimulator(), 200000);
+            SimulateGames(new SmartPlayersGameSimulator(), 1000000);

             SimulateGames(new SmartAndBestExternalPlayerGameSimulator());


Remove a couple of blank lines

Remove a couple of blank lines

--- PortFxCop/src/Tools/FileIssues/Program.cs
+++ PortFxCop/src/Tools/FileIssues/Program.cs
@@ -31,7 +31,6 @@
         private Program(FileIssuesOptions options)
         {
             _options = options;
-
         }

         private async Task<int> Run()
@@ -127,7 +126,6 @@
                 $"**Title:** {ruleToPort.Title}\n\n" +
                 $"**Description:**\n\n{ruleToPort.Description}\n\n" +
                 $"**Notes:**\n\n{ruleToPort.Notes}";
-
         }
     }
 }


registered organization event handler so that name changes propagate to the readmodels

--- Presentation.Web/Ninject/KernelBuilder.cs
+++ Presentation.Web/Ninject/KernelBuilder.cs
@@ -33,6 +33,7 @@
 using Core.DomainModel.ItSystem.DomainEvents;
 using Core.DomainModel.ItSystemUsage;
 using Core.DomainModel.LocalOptions;
+using Core.DomainModel.Organization;
 using Core.DomainModel.Organization.DomainEvents;
 using Core.DomainServices;
 using Core.DomainServices.Context;
@@ -233,6 +234,7 @@
             RegisterDomainEvent<EntityCreatedEvent<ExternalReference>, BuildDataProcessingRegistrationReadModelOnChangesHandler>(kernel);
             RegisterDomainEvent<EntityUpdatedEvent<ExternalReference>, BuildDataProcessingRegistrationReadModelOnChangesHandler>(kernel);
             RegisterDomainEvent<EntityUpdatedEvent<User>, BuildDataProcessingRegistrationReadModelOnChangesHandler>(kernel);
+            RegisterDomainEvent<EntityUpdatedEvent<Organization>, BuildDataProcessingRegistrationReadModelOnChangesHandler>(kernel);
             RegisterDomainEvent<EnabledStatusChanged<ItSystem>, BuildDataProcessingRegistrationReadModelOnChangesHandler>(kernel);
         }


Changed a few commands ProgramLog to sender.sendMessage

--- Terraria_Server/Commands/Commands.cs
+++ Terraria_Server/Commands/Commands.cs
@@ -1334,7 +1334,7 @@
 			Program.properties.AllowExplosions = Server.AllowExplosions;
 			Program.properties.Save();

-			sender.sendMessage(Languages.ExplosionsAreNow + ((Server.AllowExplosions) ? "allowed" : "disabled") + "!");
+			sender.sendMessage(Languages.ExplosionsAreNow + (Server.AllowExplosions ? "allowed" : "disabled") + "!");
 		}

 		/// <summary>
@@ -1427,7 +1427,7 @@
 			if (Main.hardMode)
 				throw new CommandError(Languages.HardModeAlreadyEnabled);

-			ProgramLog.Log(Languages.StartingHardMode);
+			sender.sendMessage(Languages.StartingHardMode);
 			WorldModify.StartHardMode();
 		}

@@ -1440,8 +1440,8 @@
 		{
 			args.ParseNone();

-			ProgramLog.Log("Reloading Language File...");
-			ProgramLog.Log("Reloading " + (Languages.LoadClass(Collections.Registries.LANGUAGE_FILE) ? "Succeeded" : "Failed"));
+			sender.sendMessage("Reloading Language File...");
+			sender.sendMessage("Reloading " + (Languages.LoadClass(Collections.Registries.LANGUAGE_FILE) ? "Succeeded" : "Failed"));
 		}
 	}
 }


Update Paths.cs

Update Paths.cs

--- source/Cosmos.Build.Installer/Paths.cs
+++ source/Cosmos.Build.Installer/Paths.cs
@@ -59,9 +59,6 @@
             string vsVersionCode;
             switch (VsVersion)
             {
-                case VsVersion.Vs2013:
-                    vsVersionCode = "12.0";
-                    break;
                 case VsVersion.Vs2015:
                     vsVersionCode = "14.0";
                     break;
@@ -78,4 +75,4 @@
         }

     }
-}+}


Fix the rat for now.

Fix the rat for now.

--- source/Cosmos.Core.Memory/HeapSmall.cs
+++ source/Cosmos.Core.Memory/HeapSmall.cs
@@ -51,9 +51,9 @@

       var xPtr = (Native*)RAT.Alloc(RAT.PageType.HeapSmall);
       *xPtr = 0;
-      for (void** p = mSMT + aItemSize; ; p--) {
-      // TODO - Make a free list, put a ptr in item header and first page header - how to keep compact?
-      }
+      //for (void** p = mSMT + aItemSize; ; p--) {
+      //// TODO - Make a free list, put a ptr in item header and first page header - how to keep compact?
+      //}
       // Header
       // Ptr to next page of same size


Fixed another crash connected with faulty TreeViewMS behavior,
still it's not 100% because the component has many other problems.

For now it's possible to create a new final node and immediately make a
multiselect backwards, which formerly crashed window edit if the new node
has been a part of a subwindow. :)

--- src/asm/ControlsNew/ControlsNew/TreeViewMS.cs
+++ src/asm/ControlsNew/ControlsNew/TreeViewMS.cs
@@ -598,6 +598,51 @@
 			return blnSelected;
 		}

+        /// <summary>
+        /// A proper way how to get an item index - recursive traversal of the tree
+        /// </summary>
+        /// <param name="startNode">the recursive root node</param>
+        /// <param name="compareNode">target node</param>
+        /// <param name="index">global index</param>
+        /// <returns>true on found</returns>
+        private bool RecursiveSort(TreeNode startNode, TreeNode compareNode, ref int index)
+        {
+
+            if (startNode == compareNode) return true;
+            index++;
+
+            foreach (TreeNode node in startNode.Nodes)
+            {
+                if (node == compareNode) return true;
+
+                index++;
+
+                if (RecursiveSort(node, compareNode, ref index)) return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// This method switches an order of TreeNodes in case the startNode is further in the tree than the endNode
+        /// </summary>
+        /// <param name="startNode"></param>
+        /// <param name="endNode"></param>
+        private void SortNodes(ref TreeNode startNode,ref TreeNode endNode)
+        {
+            var srt1 = 0;
+            var srt2 = 0;
+
+            RecursiveSort(this.TopNode, startNode, ref srt1);
+            RecursiveSort(this.TopNode, endNode, ref srt2);
+
+            if (srt2 >= srt1) return;
+
+            var tmp = endNode;
+            endNode = startNode;
+            startNode = tmp;
+        }
+
+
 		/// <summary>
 		/// Selects nodes within the specified range.
 		/// </summary>
@@ -609,19 +654,34 @@
 			// Calculate start node and end node
 			TreeNode firstNode = null;
 			TreeNode lastNode = null;
-			if (startNode.Bounds.Y < endNode.Bounds.Y)
-			{
-				firstNode = startNode;
-				lastNode = endNode;
+
+            SortNodes(ref startNode, ref endNode);
+
+            firstNode = startNode;
+    		lastNode = endNode;
+
+
+            //This was a terrible idea, whoever came up with it...
+            // Bounds are not updated always and it's not fixable as it's part of .NET framework.
+            // Much better is to rely on a real index in a tree model
+/*
+
+            if (startNode.Bounds.Y < endNode.Bounds.Y)
+			{
+                firstNode = startNode;
+    		    lastNode = endNode;
 			}
 			else
 			{
 				firstNode = endNode;
 				lastNode = startNode;
 			}
+*/
+

 			// Select each node in range
-			SelectNode(firstNode, true, tva);
+
+            SelectNode(firstNode, true, tva);
 			TreeNode tnTemp = firstNode;
 			while (tnTemp != lastNode)
 			{


Added verification of the returned ID in the CaptureTests

--- src/tests/SharpRaven.UnitTests/Integration/CaptureTests.cs
+++ src/tests/SharpRaven.UnitTests/Integration/CaptureTests.cs
@@ -107,7 +107,7 @@

         [Test]
-        public void CaptureWithStacktrace()
+        public void CaptureWithStacktrace_ReturnsValidId()
         {
             Console.WriteLine("Causing division by zero exception.");
             try
@@ -124,17 +124,22 @@
                 extras["extra"] = "EXTRA1";

                 var id = this.ravenClient.CaptureException(e, tags, extras);
+
                 Console.WriteLine("Sent packet: " + id);
+
+                Assert.That(id, Is.Not.Null.Or.Empty);
             }
         }

         [Test]
-        public void CaptureWithoutStacktrace()
+        public void CaptureWithoutStacktrace_ReturnsValidId()
         {
             Console.WriteLine("Send exception without stacktrace.");
             var id = this.ravenClient.CaptureException(new Exception("Test without a stacktrace."));
             Console.WriteLine("Sent packet: " + id);
+
+            Assert.That(id, Is.Not.Null.Or.Empty);
         }
     }
 }


[Modify] Rename it

[Modify] Rename it

--- websocket-sharp/Server/WebSocketServer.cs
+++ websocket-sharp/Server/WebSocketServer.cs
@@ -67,7 +67,7 @@
     private bool                               _dnsStyle;
     private string                             _hostname;
     private TcpListener                        _listener;
-    private Logger                             _logger;
+    private Logger                             _log;
     private int                                _port;
     private string                             _realm;
     private string                             _realmInUse;
@@ -341,13 +341,13 @@
       set {
         string msg;
         if (!canSet (out msg)) {
-          _logger.Warn (msg);
+          _log.Warn (msg);
           return;
         }

         lock (_sync) {
           if (!canSet (out msg)) {
-            _logger.Warn (msg);
+            _log.Warn (msg);
             return;
           }

@@ -377,13 +377,13 @@
       set {
         string msg;
         if (!canSet (out msg)) {
-          _logger.Warn (msg);
+          _log.Warn (msg);
           return;
         }

         lock (_sync) {
           if (!canSet (out msg)) {
-            _logger.Warn (msg);
+            _log.Warn (msg);
             return;
           }

@@ -437,13 +437,13 @@
       set {
         string msg;
         if (!canSet (out msg)) {
-          _logger.Warn (msg);
+          _log.Warn (msg);
           return;
         }

         lock (_sync) {
           if (!canSet (out msg)) {
-            _logger.Warn (msg);
+            _log.Warn (msg);
             return;
           }

@@ -470,7 +470,7 @@
     /// </value>
     public Logger Log {
       get {
-        return _logger;
+        return _log;
       }
     }

@@ -512,13 +512,13 @@
       set {
         string msg;
         if (!canSet (out msg)) {
-          _logger.Warn (msg);
+          _log.Warn (msg);
           return;
         }

         lock (_sync) {
           if (!canSet (out msg)) {
-            _logger.Warn (msg);
+            _log.Warn (msg);
             return;
           }

@@ -554,13 +554,13 @@
       set {
         string msg;
         if (!canSet (out msg)) {
-          _logger.Warn (msg);
+          _log.Warn (msg);
           return;
         }

         lock (_sync) {
           if (!canSet (out msg)) {
-            _logger.Warn (msg);
+            _log.Warn (msg);
             return;
           }

@@ -610,13 +610,13 @@
       set {
         string msg;
         if (!canSet (out msg)) {
-          _logger.Warn (msg);
+          _log.Warn (msg);
           return;
         }

         lock (_sync) {
           if (!canSet (out msg)) {
-            _logger.Warn (msg);
+            _log.Warn (msg);
             return;
           }

@@ -651,13 +651,13 @@
           throw new ArgumentException (msg, "value");

         if (!canSet (out msg)) {
-          _logger.Warn (msg);
+          _log.Warn (msg);
           return;
         }

         lock (_sync) {
           if (!canSet (out msg)) {
-            _logger.Warn (msg);
+            _log.Warn (msg);
             return;
           }

@@ -813,8 +813,8 @@
       _authSchemes = AuthenticationSchemes.Anonymous;
       _dnsStyle = Uri.CheckHostName (hostname) == UriHostNameType.Dns;
       _listener = new TcpListener (address, port);
-      _logger = new Logger ();
-      _services = new WebSocketServiceManager (_logger);
+      _log = new Logger ();
+      _services = new WebSocketServiceManager (_log);
       _sync = new object ();
     }

@@ -857,7 +857,7 @@
             state => {
               try {
                 var ctx =
-                  cl.GetWebSocketContext (null, _secure, _sslConfigInUse, _logger);
+                  cl.GetWebSocketContext (null, _secure, _sslConfigInUse, _log);

                 if (!ctx.Authenticate (_authSchemes, _realmInUse, _userCredFinder))
                   return;
@@ -865,7 +865,7 @@
                 processRequest (ctx);
               }
               catch (Exception ex) {
-                _logger.Fatal (ex.ToString ());
+                _log.Fatal (ex.ToString ());
                 cl.Close ();
               }
             }
@@ -873,15 +873,15 @@
         }
         catch (SocketException ex) {
           if (_state == ServerState.ShuttingDown) {
-            _logger.Info ("The receiving is stopped.");
+            _log.Info ("The receiving is stopped.");
             break;
           }

-          _logger.Fatal (ex.ToString ());
+          _log.Fatal (ex.ToString ());
           break;
         }
         catch (Exception ex) {
-          _logger.Fatal (ex.ToString ());
+          _log.Fatal (ex.ToString ());
           if (cl != null)
             cl.Close ();

@@ -896,23 +896,23 @@
     private void start (ServerSslConfiguration sslConfig)
     {
       if (_state == ServerState.Start) {
-        _logger.Info ("The server has already started.");
+        _log.Info ("The server has already started.");
         return;
       }

       if (_state == ServerState.ShuttingDown) {
-        _logger.Warn ("The server is shutting down.");
+        _log.Warn ("The server is shutting down.");
         return;
       }

       lock (_sync) {
         if (_state == ServerState.Start) {
-          _logger.Info ("The server has already started.");
+          _log.Info ("The server has already started.");
           return;
         }

         if (_state == ServerState.ShuttingDown) {
-          _logger.Warn ("The server is shutting down.");
+          _log.Warn ("The server is shutting down.");
           return;
         }

@@ -949,28 +949,28 @@
     private void stop (ushort code, string reason)
     {
       if (_state == ServerState.Ready) {
-        _logger.Info ("The server is not started.");
+        _log.Info ("The server is not started.");
         return;
       }

       if (_state == ServerState.ShuttingDown) {
-        _logger.Info ("The server is shutting down.");
+        _log.Info ("The server is shutting down.");
         return;
       }

       if (_state == ServerState.Stop) {
-        _logger.Info ("The server has already stopped.");
+        _log.Info ("The server has already stopped.");
         return;
       }

       lock (_sync) {
         if (_state == ServerState.ShuttingDown) {
-          _logger.Info ("The server is shutting down.");
+          _log.Info ("The server is shutting down.");
           return;
         }

         if (_state == ServerState.Stop) {
-          _logger.Info ("The server has already stopped.");
+          _log.Info ("The server has already stopped.");
           return;
         }

@@ -1054,12 +1054,12 @@
     {
       string msg;
       if (!checkServicePath (path, out msg)) {
-        _logger.Error (msg);
+        _log.Error (msg);
         return;
       }

       if (initializer == null) {
-        _logger.Error ("'initializer' is null.");
+        _log.Error ("'initializer' is null.");
         return;
       }

@@ -1085,7 +1085,7 @@
     {
       string msg;
       if (!checkServicePath (path, out msg)) {
-        _logger.Error (msg);
+        _log.Error (msg);
         return;
       }

@@ -1108,7 +1108,7 @@
     {
       string msg;
       if (!checkServicePath (path, out msg)) {
-        _logger.Error (msg);
+        _log.Error (msg);
         return false;
       }

@@ -1187,7 +1187,7 @@
     {
       string msg;
       if (!WebSocket.CheckParametersForClose (code, reason, false, out msg)) {
-        _logger.Error (msg);
+        _log.Error (msg);
         return;
       }

@@ -1219,7 +1219,7 @@
     {
       string msg;
       if (!WebSocket.CheckParametersForClose (code, reason, false, out msg)) {
-        _logger.Error (msg);
+        _log.Error (msg);
         return;
       }


[Modify] Replace it

[Modify] Replace it

--- websocket-sharp/Server/WebSocketServer.cs
+++ websocket-sharp/Server/WebSocketServer.cs
@@ -906,11 +906,19 @@
     /// </param>
     public void Stop (CloseStatusCode code, string reason)
     {
+      string msg;
+      if (!checkIfAvailable (false, true, false, false, out msg)) {
+        _logger.Error (msg);
+        return;
+      }
+
+      if (!WebSocket.CheckParametersForClose (code, reason, false, out msg)) {
+        _logger.Error (msg);
+        return;
+      }
+
       lock (_sync) {
-        var msg = _state.CheckIfAvailable (false, true, false) ??
-                  WebSocket.CheckCloseParameters (code, reason, false);
-
-        if (msg != null) {
+        if (!checkIfAvailable (false, true, false, false, out msg)) {
           _logger.Error (msg);
           return;
         }
@@ -919,6 +927,7 @@
       }

       stopReceiving (5000);
+
       if (code == CloseStatusCode.NoStatus) {
         _services.Stop (new CloseEventArgs (), true, true);
       }


fix speed

fix speed

* Original /40 is due to documentation error.

Co-Authored-By: clayton <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@clayton.cc>

--- osu.Game.Rulesets.Osu/Mods/OsuModSpunOut.cs
+++ osu.Game.Rulesets.Osu/Mods/OsuModSpunOut.cs
@@ -40,7 +40,7 @@
             if (drawable is DrawableSpinner spinner)
             {
                 if (spinner.Disc.Valid)
-                    spinner.Disc.Rotate(180 / MathF.PI * (float)spinner.Clock.ElapsedFrameTime / 40);
+                    spinner.Disc.Rotate(180 / MathF.PI * (float)spinner.Clock.ElapsedFrameTime * 0.03f);
                 if (!spinner.SpmCounter.IsPresent)
                     spinner.SpmCounter.FadeIn(spinner.HitObject.TimeFadeIn);
             }


Move variable outside of if block

Move variable outside of if block

--- osu.Game/Rulesets/Edit/HitObjectComposer.cs
+++ osu.Game/Rulesets/Edit/HitObjectComposer.cs
@@ -217,9 +217,9 @@
             {
                 distanceSnapGridContainer.Child = distanceSnapGrid;
                 distanceSnapGridContainer.Show();
-
-                lastGridUpdateTime = EditorClock.CurrentTime;
-            }
+            }
+
+            lastGridUpdateTime = EditorClock.CurrentTime;
         }

         private ScheduledDelegate scheduledUpdate;


Fix disposal logic

Fix disposal logic

--- osu.Game/Rulesets/UI/FallbackSampleStore.cs
+++ osu.Game/Rulesets/UI/FallbackSampleStore.cs
@@ -21,12 +21,6 @@
         {
             this.primary = primary;
             this.secondary = secondary;
-        }
-
-        public void Dispose()
-        {
-            primary.Dispose();
-            secondary.Dispose();
         }

         public SampleChannel Get(string name) => primary.Get(name) ?? secondary.Get(name);
@@ -58,7 +52,15 @@
         public int PlaybackConcurrency
         {
             get => primary.PlaybackConcurrency;
-            set => primary.PlaybackConcurrency = value;
+            set
+            {
+                primary.PlaybackConcurrency = value;
+                secondary.PlaybackConcurrency = value;
+            }
+        }
+
+        public void Dispose()
+        {
         }
     }
 }


Add note about missing expiration logic

Add note about missing expiration logic

--- osu.Game/Scoring/ScorePerformanceManager.cs
+++ osu.Game/Scoring/ScorePerformanceManager.cs
@@ -17,6 +17,8 @@
     /// </summary>
     public class ScorePerformanceManager : Component
     {
+        // this cache will grow indefinitely per session and should be considered temporary.
+        // this whole component should likely be replaced with database persistence.
         private readonly ConcurrentDictionary<PerformanceCacheLookup, double> performanceCache = new ConcurrentDictionary<PerformanceCacheLookup, double>();

         [Resolved]


Fix skinnable test scene still not working with dynamic compilation

--- osu.Game/Tests/Visual/SkinnableTestScene.cs
+++ osu.Game/Tests/Visual/SkinnableTestScene.cs
@@ -35,12 +35,12 @@
         }

         [BackgroundDependencyLoader]
-        private void load(AudioManager audio, SkinManager skinManager)
+        private void load(AudioManager audio, SkinManager skinManager, OsuGameBase game)
         {
             var dllStore = new DllResourceStore(DynamicCompilationOriginal.GetType().Assembly);

             metricsSkin = new TestLegacySkin(new SkinInfo { Name = "metrics-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/metrics_skin"), audio, true);
-            defaultSkin = skinManager.GetSkin(DefaultLegacySkin.Info);
+            defaultSkin = new DefaultLegacySkin(new NamespacedResourceStore<byte[]>(game.Resources, "Skins/Legacy"), audio);
             specialSkin = new TestLegacySkin(new SkinInfo { Name = "special-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/special_skin"), audio, true);
             oldSkin = new TestLegacySkin(new SkinInfo { Name = "old-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/old_skin"), audio, true);
         }


[050dev] Reminder to add a CharacterSet compiler option.

--- packages/C/dev/Scripts/ICCompilerOptions.cs
+++ packages/C/dev/Scripts/ICCompilerOptions.cs
@@ -5,6 +5,7 @@
 // <author>Mark Final</author>
 namespace C
 {
+    // TODO: reminder to add a CharacterSet option to this
     public interface ICCompilerOptions
     {
         C.ToolchainOptionCollection ToolchainOptionCollection


[packages,Python,3.5.1] Adding PREFIX and PYTHONPATH for hard coded checks, although probably too extensively set

--- packages/Python-3.5.1/bam/Scripts/Python.cs
+++ packages/Python-3.5.1/bam/Scripts/Python.cs
@@ -18,6 +18,8 @@
                 {
                     var compiler = settings as C.ICommonCompilerSettings;
                     compiler.PreprocessorDefines.Add("VERSION", "\\\"3.5\\\"");
+                    compiler.PreprocessorDefines.Add("PREFIX", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1\\\"");
+                    compiler.PreprocessorDefines.Add("PYTHONPATH", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1/Lib\\\"");
                     if (Bam.Core.EConfiguration.Debug == this.BuildEnvironment.Configuration)
                     {
                         compiler.PreprocessorDefines.Add("Py_DEBUG");
@@ -243,6 +245,8 @@
                 {
                     var compiler = settings as C.ICommonCompilerSettings;
                     compiler.PreprocessorDefines.Add("VERSION", "\\\"3.5\\\"");
+                    compiler.PreprocessorDefines.Add("PREFIX", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1\\\"");
+                    compiler.PreprocessorDefines.Add("PYTHONPATH", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1/Lib\\\"");
                     if (Bam.Core.EConfiguration.Debug == this.BuildEnvironment.Configuration)
                     {
                         compiler.PreprocessorDefines.Add("Py_DEBUG");
@@ -263,6 +267,8 @@
                 {
                     var compiler = settings as C.ICommonCompilerSettings;
                     compiler.PreprocessorDefines.Add("VERSION", "\\\"3.5\\\"");
+                    compiler.PreprocessorDefines.Add("PREFIX", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1\\\"");
+                    compiler.PreprocessorDefines.Add("PYTHONPATH", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1/Lib\\\"");
                     if (Bam.Core.EConfiguration.Debug == this.BuildEnvironment.Configuration)
                     {
                         compiler.PreprocessorDefines.Add("Py_DEBUG");
@@ -305,6 +311,8 @@
                 {
                     var compiler = settings as C.ICommonCompilerSettings;
                     compiler.PreprocessorDefines.Add("VERSION", "\\\"3.5\\\"");
+                    compiler.PreprocessorDefines.Add("PREFIX", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1\\\"");
+                    compiler.PreprocessorDefines.Add("PYTHONPATH", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1/Lib\\\"");
                     if (Bam.Core.EConfiguration.Debug == this.BuildEnvironment.Configuration)
                     {
                         compiler.PreprocessorDefines.Add("Py_DEBUG");
@@ -413,6 +421,8 @@
                 {
                     var compiler = settings as C.ICommonCompilerSettings;
                     compiler.PreprocessorDefines.Add("VERSION", "\\\"3.5\\\"");
+                    compiler.PreprocessorDefines.Add("PREFIX", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1\\\"");
+                    compiler.PreprocessorDefines.Add("PYTHONPATH", "\\\"/home/mark/dev/bam-python/packages/Python-3.5.1/Lib\\\"");
                     if (Bam.Core.EConfiguration.Debug == this.BuildEnvironment.Configuration)
                     {
                         compiler.PreprocessorDefines.Add("Py_DEBUG");


[packages,Python,3.5.1] Python interpreter shell does not need Py_BUILD_CORE

--- packages/Python-3.5.1/bam/Scripts/Python.cs
+++ packages/Python-3.5.1/bam/Scripts/Python.cs
@@ -14,11 +14,6 @@
             this.Macros["OutputName"] = Bam.Core.TokenizedString.CreateVerbatim("python");

             var source = this.CreateCSourceContainer("$(packagedir)/Programs/python.c");
-            source.PrivatePatch(settings =>
-                {
-                    var compiler = settings as C.ICommonCompilerSettings;
-                    compiler.PreprocessorDefines.Add("Py_BUILD_CORE");
-                });
             if (this.BuildEnvironment.Platform.Includes(Bam.Core.EPlatform.Windows))
             {
                 this.CompilePubliclyAndLinkAgainst<WindowsSDK.WindowsSDK>(source);


Fixed multipart decoding

Fixed multipart decoding

--- test/FubarDev.WebDavServer.Tests/Handlers/GetRangeTests.cs
+++ test/FubarDev.WebDavServer.Tests/Handlers/GetRangeTests.cs
@@ -3,6 +3,7 @@
 // </copyright>

 using System;
+using System.IO;
 using System.Net;
 using System.Net.Http;
 using System.Net.Http.Headers;
@@ -13,21 +14,29 @@
 using FubarDev.WebDavServer.FileSystem;
 using FubarDev.WebDavServer.Model;

+using MimeKit;
+using MimeKit.IO;
+
+using Portable.Text;
+
 using Xunit;
+
+using Encoding = System.Text.Encoding;

 namespace FubarDev.WebDavServer.Tests.Handlers
 {
     public class GetRangeTests : ServerTestsBase
     {
-        private static readonly Lazy<byte[]> _testBlock = new Lazy<byte[]>(() =>
+        private static readonly Lazy<string> _testText = new Lazy<string>(() =>
         {
             var testTextBuilder = new StringBuilder();
             for (var i = 0; i != 7000; ++i)
                 testTextBuilder.Append("1234567890");
             var testText = testTextBuilder.ToString();
-            var testData = Encoding.UTF8.GetBytes(testText);
-            return testData;
+            return testText;
         });
+
+        private static readonly Lazy<byte[]> _testBlock = new Lazy<byte[]>(() => Encoding.UTF8.GetBytes(_testText.Value));

         public GetRangeTests()
             : base(RecursiveProcessingMode.PreferFastest)
@@ -36,6 +45,32 @@

         [Fact]
         public async Task GetWithoutRangeTest()
+        {
+            var ct = CancellationToken.None;
+            var root = await FileSystem.Root;
+            var testFile = await root.CreateDocumentAsync("test1.txt", ct).ConfigureAwait(false);
+            await FillAsync(testFile, int.MaxValue, ct).ConfigureAwait(false);
+
+            using (var client = Server.CreateClient())
+            {
+                using (var response = await client.GetAsync("test1.txt", ct).ConfigureAwait(false))
+                {
+                    var content = response
+                        .EnsureSuccessStatusCode().Content;
+
+                    Assert.Equal(HttpStatusCode.OK, response.StatusCode);
+                    Assert.Equal(_testBlock.Value.Length, content.Headers.ContentLength);
+
+                    var data = await content
+                        .ReadAsByteArrayAsync().ConfigureAwait(false);
+                    var s = Encoding.UTF8.GetString(data);
+                    Assert.Equal(_testText.Value, s);
+                }
+            }
+        }
+
+        [Fact]
+        public async Task GetWithSingleRangeTest()
         {
             var ct = CancellationToken.None;
             var root = await FileSystem.Root;
@@ -71,18 +106,83 @@
                         .ReadAsByteArrayAsync().ConfigureAwait(false);
                     var s = Encoding.UTF8.GetString(data);
                     Assert.Equal("12", s);
+                }
+            }
+        }
+
+        [Fact]
+        public async Task GetWithTwoRangesTest()
+        {
+            var ct = CancellationToken.None;
+            var root = await FileSystem.Root;
+            var testFile = await root.CreateDocumentAsync("test1.txt", ct).ConfigureAwait(false);
+            await FillAsync(testFile, int.MaxValue, ct).ConfigureAwait(false);
+
+            using (var client = Server.CreateClient())
+            {
+                var range = new Range("bytes", new RangeItem(0, 1), new RangeItem(3, 4));
+                var request = new HttpRequestMessage(HttpMethod.Get, "test1.txt")
+                {
+                    Headers =
+                    {
+                        Range = RangeHeaderValue.Parse(range.ToString()),
+                    },
+                };
+
+                using (var response = await client.SendAsync(request, ct).ConfigureAwait(false))
+                {
+                    var content = response
+                        .EnsureSuccessStatusCode().Content;
+
+                    Assert.Equal(HttpStatusCode.PartialContent, response.StatusCode);
+
+                    var multipart = await ReadMultipartAsync(content, ct).ConfigureAwait(false);
+                    Assert.Equal(2, multipart.Count);
+                    Assert.All(multipart, entity => Assert.True(entity.ContentType.IsMimeType("text", "plain")));
                     /*
-                    var responseStream = await response
-                        .EnsureSuccessStatusCode().Content
-                        .ReadAsStreamAsync().ConfigureAwait(false);
+                    Assert.Collection(
+                        multipart,
+                        entity =>
+                        {
+
+                        },
+                        entity =>
+                        {

-                    var opt = new MimeKit.ParserOptions()
-                    {
-                        RespectContentLength = true,
-                    };
-                    var parser = new MimeKit.MimeParser(opt, responseStream);
-                    */
+                        });*/
                 }
+            }
+        }
+
+        private static async Task<Multipart> ReadMultipartAsync(HttpContent content, CancellationToken ct)
+        {
+            var responseStream = await content
+                .ReadAsStreamAsync().ConfigureAwait(false);
+
+            var headerStream = new MemoryStream();
+            using (var headerWriter = new StreamWriter(headerStream, new System.Text.UTF8Encoding(false), 1000, true)
+            {
+                NewLine = "\r\n",
+            })
+            {
+                foreach (var contentHeader in content.Headers)
+                {
+                    var line = $"{contentHeader.Key}: {string.Join(", ", contentHeader.Value)}";
+                    await headerWriter.WriteLineAsync(line).ConfigureAwait(false);
+                }
+
+                await headerWriter.WriteLineAsync().ConfigureAwait(false);
+            }
+
+            headerStream.Position = 0;
+
+            using (var input = new ChainedStream())
+            {
+                input.Add(headerStream);
+                input.Add(responseStream, true);
+
+                var multipart = MimeEntity.Load(input, ct);
+                return Assert.IsType<Multipart>(multipart);
             }
         }


WindowSpace: bugfix

WindowSpace: bugfix

--- Assets/Plugins/Ebis/WindowSpace.cs
+++ Assets/Plugins/Ebis/WindowSpace.cs
@@ -48,11 +48,10 @@
 		public void Close(Window child, Promise<CUnit> closeTransition) {
 			Debug.Assert (Contains (child));

-			var wasTop = IsTopWindow (child);
-
 			child.NotifyOnClosing ();

 			closeTransition.Done (_ => {
+				var wasTop = IsTopWindow (child);
 				RemoveWindow (child);
 				AfterWindowRemoved (wasTop);


Twitter sharing added

Twitter sharing added

--- Assets/Scripts/GUI/LevelOverGUI.cs
+++ Assets/Scripts/GUI/LevelOverGUI.cs
@@ -6,14 +6,14 @@

 public class LevelOverGUI : MonoBehaviour
 {
-	private float _actualWindowSize;
-	private float _actualButtonSize;
-
-	public float windowSize = 0.55f;
-	public float widthRatio = 2.1f;
+    private float _actualWindowSize;
+    private float _actualButtonSize;
+
+    public float windowSize = 0.55f;
+    public float widthRatio = 2.1f;
     public float buttonSize = 0.2f;

-	private static System.Random _rnd;
+    private static System.Random _rnd;

     Rect guiWindow;

@@ -23,7 +23,7 @@

     static LevelOverGUI()
     {
-		_rnd = new System.Random();
+        _rnd = new System.Random();
         overTitleSet = new Dictionary<GameWorld.LevelOverReason, string[]>();
         overMessageSet = new Dictionary<GameWorld.LevelOverReason, string[]>();

@@ -61,7 +61,7 @@
             "In retrospect, treating a patient with filthy hands was more harmful than helpful",
             "I am appalled at your unsanitary medical practices. Are you a real doctor?"
         };
-
+
         overTitleSet[GameWorld.LevelOverReason.PlayerInfected] = new[]
         {
 			"Hand on a minute.",
@@ -82,10 +82,10 @@
 			"Soap and water are your friends. Don't forget your friends."
 		};

-		overTitleSet[GameWorld.LevelOverReason.Squashed] = new[] {
+        overTitleSet[GameWorld.LevelOverReason.Squashed] = new[] {
 			"Squashed!",
 		};
-		overMessageSet[GameWorld.LevelOverReason.Squashed] = new[] {
+        overMessageSet[GameWorld.LevelOverReason.Squashed] = new[] {
 			""
 		};

@@ -144,34 +144,37 @@
 		};
     }

-	float windowWidth;
-	float windowHeight;
-
-	void ResetSize() {
-		_actualButtonSize = buttonSize * Screen.height;
-		_actualWindowSize = windowSize * Screen.height;
-		windowHeight = _actualWindowSize;
-		windowWidth = windowHeight * widthRatio;
-		guiWindow = new Rect(Screen.width / 2.0f - windowWidth / 2.0f, Screen.height / 2.0f - windowHeight / 2.0f, windowWidth, windowHeight);
-	}
+    float windowWidth;
+    float windowHeight;
+
+    void ResetSize()
+    {
+        _actualButtonSize = buttonSize * Screen.height;
+        _actualWindowSize = windowSize * Screen.height;
+        windowHeight = _actualWindowSize;
+        windowWidth = windowHeight * widthRatio;
+        guiWindow = new Rect(Screen.width / 2.0f - windowWidth / 2.0f, Screen.height / 2.0f - windowHeight / 2.0f, windowWidth, windowHeight);
+    }

     // Use this for initialization
     void Start()
     {
         GroupManager.main.group["Level Over"].Add(this);
         GroupManager.main.group["Level Over"].Add(this, new GroupDelegator(null, Enter, null));
-		ResetSize();
-    }
-
-	void OnEnable() {
-		//	ResetSize();
-	}
+        ResetSize();
+    }
+
+    void OnEnable()
+    {
+        //	ResetSize();
+    }

     void Update()
     {
-		if (GUIManager.ScreenResized) {
-			ResetSize();
-		}
+        if (GUIManager.ScreenResized)
+        {
+            ResetSize();
+        }
         if (Input.GetKeyDown(KeyCode.Escape))
         {
             if (!GameWorld.success)
@@ -179,15 +182,16 @@

             FadeToMainMenu();
         }
-        if (Input.GetKeyDown(KeyCode.Return))
+        if (Input.GetKeyDown(KeyCode.Return))
         {
             if (!GameWorld.success)
             {
                 LevelManager.Instance.Level--;
                 FadeToLevelStart();
             }
-            else{
-				FadeToLevelStart();
+            else
+            {
+                FadeToLevelStart();
             }
         }
     }
@@ -197,86 +201,48 @@
     {
         GUI.skin = GUIManager.GetSkin();

-		var style = GUI.skin.GetStyle("over title");
-		float extra = style.CalcHeight(new GUIContent(overMessage), windowWidth);
-		var rectIn = (new Rect(0, 0, windowWidth, windowHeight + extra)).Centered();
-
-		var rect = GUI.Window(1, rectIn, DoWindow, GUIContent.none, GUI.skin.GetStyle("over window"));
-		float backSize = _actualButtonSize / 2.0f;
-
-
-				var backRec = new Rect((rect.xMin - backSize*0.25f), (rect.y - backSize * 0.25f), backSize, backSize);
-		GUI.Window(2, backRec, DoMenuButtonWindow, "", GUIStyle.none);
-		GUI.BringWindowToFront(2);
-    }
-
-	void DoWindow(int windowID) {
-
-		GUILayout.Label(overTitle, GUI.skin.GetStyle("over title"));
-
-		GUILayout.BeginVertical();
-		//GUILayout.FlexibleSpace();
-		GUILayout.Label(overMessage, GUI.skin.GetStyle("over message"));
-		GUILayout.FlexibleSpace();
-		GUILayout.BeginHorizontal();
-		GUILayout.FlexibleSpace();
-		if (GUILayout.Button("Restart", GUI.skin.GetStyle("restart over"), GUILayout.Width(_actualButtonSize), GUILayout.Height(_actualButtonSize)))
-		{
-			LevelManager.Instance.Level--;
-
-			FadeToLevelStart();
-		}
-		GUILayout.FlexibleSpace();
-		if (GameWorld.success)
-		{
-			if (GUILayout.Button("Next Level", GUI.skin.GetStyle("continue"), GUILayout.Width(_actualButtonSize), GUILayout.Height(_actualButtonSize)))
-			{
-				FadeToLevelStart();
-			}
-
-			GUILayout.FlexibleSpace();
-		}
-		GUILayout.EndHorizontal();
-		GUILayout.FlexibleSpace();
-		GUILayout.EndVertical();
-		//GUILayout.FlexibleSpace();
-
-		//GUILayout.BeginHorizontal();
-		//GUILayout.FlexibleSpace();
-	}
-
-	void DoMenuButtonWindow(int windowID) {
-		if (GUILayout.Button("Menu", GUI.skin.GetStyle("menu"), GUILayout.Width(_actualButtonSize / 2.0f), GUILayout.Height(_actualButtonSize / 2.0f))) {
-			if (!GameWorld.success) {
-				LevelManager.Instance.Level--;
-			}
-			FadeToMainMenu();
-		}
-	}
-
-    void DoGameOverWindow(int windowID)
-    {
-        // Info
+        var style = GUI.skin.GetStyle("over title");
+        float extra = style.CalcHeight(new GUIContent(overMessage), windowWidth);
+        var rectIn = (new Rect(0, 0, windowWidth, windowHeight + extra)).Centered();
+
+        var rect = GUI.Window(1, rectIn, DoWindow, GUIContent.none, GUI.skin.GetStyle("over window"));
+        float backSize = _actualButtonSize / 2.0f;
+
+
+        var backRec = new Rect((rect.xMin - backSize * 0.25f), (rect.y - backSize * 0.25f), backSize, backSize);
+        GUI.Window(2, backRec, DoMenuButtonWindow, "", GUIStyle.none);
+        GUI.BringWindowToFront(2);
+    }
+
+    void DoWindow(int windowID)
+    {
+
+        GUILayout.Label(overTitle, GUI.skin.GetStyle("over title"));
+
         GUILayout.BeginVertical();
-        GUILayout.Label(overTitle, GUI.skin.GetStyle("over title"));
-		//GUILayout.Label(overMessage, GUI.skin.GetStyle("over message"));
+        //GUILayout.FlexibleSpace();
+        GUILayout.Label(overMessage, GUI.skin.GetStyle("over message"));
+        GUILayout.FlexibleSpace();
+
+        if (GUILayout.Button("Twitter"))
+        {
+            ShareToTwitter("I, #HandyMD, just cured a patient with clean hands!", "http://handymd-game.appspot.com");
+        }

         GUILayout.FlexibleSpace();

         GUILayout.BeginHorizontal();
         GUILayout.FlexibleSpace();
-        // Restart
-		if (GUILayout.Button("Restart", GUI.skin.GetStyle("restart over"), GUILayout.Width(_actualButtonSize), GUILayout.Height(_actualButtonSize)))
+        if (GUILayout.Button("Restart", GUI.skin.GetStyle("restart over"), GUILayout.Width(_actualButtonSize), GUILayout.Height(_actualButtonSize)))
         {
             LevelManager.Instance.Level--;

             FadeToLevelStart();
         }
         GUILayout.FlexibleSpace();
-        // Next Level
         if (GameWorld.success)
         {
-			if (GUILayout.Button("Next Level", GUI.skin.GetStyle("continue"), GUILayout.Width(_actualButtonSize), GUILayout.Height(_actualButtonSize)))
+            if (GUILayout.Button("Next Level", GUI.skin.GetStyle("continue"), GUILayout.Width(_actualButtonSize), GUILayout.Height(_actualButtonSize)))
             {
                 FadeToLevelStart();
             }
@@ -286,27 +252,33 @@
         GUILayout.EndHorizontal();

         GUILayout.FlexibleSpace();
-
-        // Go Back To Menu
-        GUILayout.BeginHorizontal();
-        GUILayout.FlexibleSpace();
-
-        GUILayout.FlexibleSpace();
-        GUILayout.EndHorizontal();
-
-        GUILayout.FlexibleSpace();
-
         GUILayout.EndVertical();
+        //GUILayout.FlexibleSpace();
+
+        //GUILayout.BeginHorizontal();
+        //GUILayout.FlexibleSpace();
+    }
+
+    void DoMenuButtonWindow(int windowID)
+    {
+        if (GUILayout.Button("Menu", GUI.skin.GetStyle("menu"), GUILayout.Width(_actualButtonSize / 2.0f), GUILayout.Height(_actualButtonSize / 2.0f)))
+        {
+            if (!GameWorld.success)
+            {
+                LevelManager.Instance.Level--;
+            }
+            FadeToMainMenu();
+        }
     }

     void Enter()
     {
-		ResetSize();
+        ResetSize();
         var overTitles = overTitleSet[GameWorld.levelOverReason];
         var overMessages = overMessageSet[GameWorld.levelOverReason];

-		overTitle = overTitles[_rnd.Next(0, overTitles.Length)];
-		overMessage = overMessages[_rnd.Next(0, overMessages.Length)];
+        overTitle = overTitles[_rnd.Next(0, overTitles.Length)];
+        overMessage = overMessages[_rnd.Next(0, overMessages.Length)];
     }

     void FadeToLevelStart()
@@ -319,7 +291,7 @@

     void FadeToMainMenu()
     {
-		ScreenFader.QueueEvent(BackgroundRenderer.instance.SetSunBackground);
+        ScreenFader.QueueEvent(BackgroundRenderer.instance.SetSunBackground);
         ScreenFader.StartFade(Color.clear, Color.black, 1.0f, delegate()
         {
             // Clear resources
@@ -327,11 +299,17 @@

             ScreenFader.StartFade(Color.black, Color.clear, 0.5f, delegate()
             {
-
+
                 GroupManager.main.activeGroup = GroupManager.main.group["Level Select"];

                 AudioManager.PlaySFX("Menu Next");
             });
         });
     }
+
+    void ShareToTwitter(string textToDisplay, string urlToDisplay)
+    {
+        Application.OpenURL("http://twitter.com/intent/tweet?text=" + WWW.EscapeURL(textToDisplay) + "&url=" + WWW.EscapeURL(urlToDisplay) + "&lang=en");
+    }
+
 }


1.0.8.547 修正Unity在.net4下反射Dictionary Bug

--- Assets/ToLua/Editor/ToLuaExport.cs
+++ Assets/ToLua/Editor/ToLuaExport.cs
@@ -161,8 +161,10 @@
         "UIWidget.showHandlesWithMoveTool",
         "UIWidget.showHandles",
         "Input.IsJoystickPreconfigured",
-        "UIDrawCall.isActive"
-    };
+        "UIDrawCall.isActive",
+		"Dictionary.TryAdd",
+		"KeyValuePair.Deconstruct"
+	};

     class _MethodBase
     {
@@ -633,11 +635,29 @@
 	public static List<MemberInfo> memberInfoFilter = new List<MemberInfo>
 	{
         //可精确查找一个函数
-		//Type.GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers);
+		//Type.GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers);
     };

     public static bool IsMemberFilter(MemberInfo mi)
     {
+		if (type.IsGenericType)
+		{
+			Type genericType = type.GetGenericTypeDefinition();
+
+			if (genericType == typeof(Dictionary<,>) && mi.Name == "Remove")
+			{
+				MethodBase mb = (MethodBase)mi;
+				return mb.GetParameters().Length == 2;
+			}
+
+			if (genericType == typeof(Dictionary<,>) || genericType == typeof(KeyValuePair<,>))
+			{
+				string str = genericType.Name;
+				str = str.Substring(0, str.IndexOf("`"));
+				return memberFilter.Contains(str + "." + mi.Name);
+			}
+		}
+
 		return memberInfoFilter.Contains(mi) || memberFilter.Contains(type.Name + "." + mi.Name);
     }

@@ -1720,41 +1740,54 @@
         return count;
     }

-    static void InitCtorList()
-    {
-        if (isStaticClass || type.IsAbstract || typeof(MonoBehaviour).IsAssignableFrom(type))
-        {
-            return;
-        }
-
-        ConstructorInfo[] constructors = type.GetConstructors(BindingFlags.Instance | binding);
-
-        if (extendType != null)
-        {
-            ConstructorInfo[] ctorExtends = extendType.GetConstructors(BindingFlags.Instance | binding);
-
-            if (HasAttribute(ctorExtends[0], typeof(UseDefinedAttribute)))
-            {
-                ctorExtList.AddRange(ctorExtends);
-            }
-        }
-
-        if (constructors.Length == 0)
-        {
-            return;
-        }
-
-        for (int i = 0; i < constructors.Length; i++)
-        {
-            if (IsObsolete(constructors[i]))
-            {
-                continue;
-            }
-
-            int count = GetDefalutParamCount(constructors[i]);
-            int length = constructors[i].GetParameters().Length;
-
-            for (int j = 0; j < count + 1; j++)
+	static void InitCtorList()
+	{
+		if (isStaticClass || type.IsAbstract || typeof(MonoBehaviour).IsAssignableFrom(type))
+		{
+			return;
+		}
+
+		ConstructorInfo[] constructors = type.GetConstructors(BindingFlags.Instance | binding);
+
+		if (extendType != null)
+		{
+			ConstructorInfo[] ctorExtends = extendType.GetConstructors(BindingFlags.Instance | binding);
+
+			if (HasAttribute(ctorExtends[0], typeof(UseDefinedAttribute)))
+			{
+				ctorExtList.AddRange(ctorExtends);
+			}
+		}
+
+		if (constructors.Length == 0)
+		{
+			return;
+		}
+
+		Type genericType = type.GetGenericTypeDefinition();
+		Type dictType = typeof(Dictionary<,>);
+
+		for (int i = 0; i < constructors.Length; i++)
+		{
+			if (IsObsolete(constructors[i]))
+			{
+				continue;
+			}
+
+			int count = GetDefalutParamCount(constructors[i]);
+			int length = constructors[i].GetParameters().Length;
+
+			if (genericType == dictType && length >= 1)
+			{
+				Type pt = constructors[i].GetParameters()[0].ParameterType;
+
+				if (pt.IsGenericType && pt.GetGenericTypeDefinition() == typeof(System.Collections.Generic.IEnumerable<>))
+				{
+					continue;
+				}
+			}
+
+			for (int j = 0; j < count + 1; j++)
             {
                 _MethodBase r = new _MethodBase(constructors[i], length - j);
                 int index = ctorList.FindIndex((p) => { return CompareMethod(p, r) >= 0; });


Added a disclaimer to the submit section if present

--- Purchasing.Web/Views/Order/_Submit.cshtml
+++ Purchasing.Web/Views/Order/_Submit.cshtml
@@ -1,7 +1,14 @@
-

+@model OrderModifyModel
+
+

-
+        @if (!string.IsNullOrWhiteSpace(Model.Workgroup.Disclaimer))
+        {
+

+
Disclaimer: @Model.Workgroup.Disclaimer

+

+        }


Fixed a typo in an exception.

Fixed a typo in an exception.

--- Assets/UnityIO/Editor/Directory.cs
+++ Assets/UnityIO/Editor/Directory.cs
@@ -51,7 +51,7 @@
                 }
                 else
                 {
-                    throw  new DirectoryNotFoundException("UnityUI: A directory was not found at " + directoryPath);
+                    throw  new DirectoryNotFoundException("UnityIO: A directory was not found at " + directoryPath);
                 }
             }
         }


Added setup instructions as initial log message.

--- AutoPan/AutoPan/MainWindow.xaml.cs
+++ AutoPan/AutoPan/MainWindow.xaml.cs
@@ -102,7 +102,8 @@
         public MainWindow()
         {
             InitializeComponent();
-            OnLogMessage(this, new LogMessageEventArgs(LogSeverity.Info, "Auto Pan", "Thanks for using Auto Pan! This is version 1 – Keep an eye out for new updates at:\nallenwp.github.io/autopan", null));
+            OnLogMessage(this, new LogMessageEventArgs(LogSeverity.Info, "Auto Pan", "Thanks for using Auto Pan! Here's how to set it up: \n\n- Auto Pan requires a secondary Discord user account that has access to the server and voice channel you are using with your primary account. Use this second account to log in above. I recommend adding \"[Auto Pan]\" to the secondary account's username.\n\n- Use Discord normally with your primary account for transmitting your voice.\n\n- Auto Pan will output panned audio from the connected voice channel.\n\n- Mute each individual user in Discord to prevent duplicate audio/echo.\n\nThis is version 1 – Keep an eye out for new updates at: allenwp.github.io/autopan", null));
+            logScrollViewer.ScrollToTop();
         }

         private async void OnLogin(object sender, RoutedEventArgs e)


Updates builtins test.

Updates builtins test.

--- Python/Tests/Analysis/AstAnalysisTests.cs
+++ Python/Tests/Analysis/AstAnalysisTests.cs
@@ -202,9 +202,8 @@
                 var fact = (AstPythonInterpreterFactory)analysis.Analyzer.InterpreterFactory;
                 var interp = (AstPythonInterpreter)analysis.Analyzer.Interpreter;

-                // Builtin module must be a scraped Python module
                 var mod = interp.ImportModule(interp.BuiltinModuleName);
-                Assert.IsInstanceOfType(mod, typeof(AstScrapedPythonModule));
+                Assert.IsInstanceOfType(mod, typeof(AstBuiltinsPythonModule));

                 // Ensure we can get all the builtin types
                 foreach (BuiltinTypeId v in Enum.GetValues(typeof(BuiltinTypeId))) {


Added response to mentions when others mention the discord bot. Untested, since I have no interwebs to test with right now...

--- AutoPan/AutoPan/MainWindow.xaml.cs
+++ AutoPan/AutoPan/MainWindow.xaml.cs
@@ -259,6 +259,7 @@
             .AddService<HttpService>();

             client.UserUpdated += Client_UserUpdated;
+            client.MessageReceived += Client_MessageReceived;

             // The only way I know how to get the audioService right now to subscribe to the userIsSpeakingUpdated thingy
             AudioService audioService = null;
@@ -395,6 +396,15 @@
             }
         }

+        private void Client_MessageReceived(object sender, MessageEventArgs e)
+        {
+            if(e.Message.IsMentioningMe())
+            {
+                // We were mentioned! Let them know about Auto Pan:
+                e.Message.Channel.SendMessage("Hi there, I'm an Auto Pan bot! Auto Pan is a tool that performs an automatic stereo spread of user's voices in a Discord voice channel. Find out more at http://allenwp.github.io/autopan");
+            }
+        }
+
         private async void OnConnect(object sender, RoutedEventArgs e)
         {
             State = UIState.Connecting;


fixed gragas

fixed gragas

--- AutoSharpporting/Plugins/Gragas.cs
+++ AutoSharpporting/Plugins/Gragas.cs
@@ -74,10 +74,10 @@

         }

-        private void ThrowBarrel(Obj_AI_Hero tar, bool packet)
+        private void ThrowBarrel(Obj_AI_Hero tar)
         {
             if (BarrelIsCast) return;
-            if (Q.Cast(tar, packet) == Spell.CastStates.SuccessfullyCasted)
+            if (Q.Cast(tar) == Spell.CastStates.SuccessfullyCasted)
             {
                 BarrelIsCast = true;
                 CurrentQTarget = tar;


Fixed time zone conversion error when picking Local timezone.

--- QDMSServer/Windows/DataEditWindow.xaml.cs
+++ QDMSServer/Windows/DataEditWindow.xaml.cs
@@ -90,7 +90,7 @@
                     }
                     else if (TimezoneComboBox.Text == "Local")
                     {
-                        b.DT = TimeZoneInfo.ConvertTime(b.DT, TimeZoneInfo.Local, tzInfo);
+                        b.DT = TimeZoneInfo.ConvertTime(b.DT, _tzInfo, TimeZoneInfo.Local);
                     }
                     Data.Add(b);
                 }


changed the color and weight of story narrative

--- Bddify/Reporters/HtmlReport.cshtml
+++ Bddify/Reporters/HtmlReport.cshtml
@@ -261,10 +261,11 @@

       ul.storyNarrative
       {
-          font-weight:normal;
-          font-style:italic;
-          margin:0px 0px 0px 20px;
-          padding-top:0px;
+        font-style:italic;
+        font-weight:bold;
+        margin: 0px 0px 0px 20px;
+        padding-top: 0px;
+        color: #122F4B;
       }

 			table.namespace


add benchmarks

add benchmarks

--- Bench/BtreeBench03/BtreeBench03.cs
+++ Bench/BtreeBench03/BtreeBench03.cs
@@ -15,16 +15,23 @@
 {
     public class BtreeBench03
     {
-        static int reps = 50000000;
-        static BtreeDictionary<Guid,int> tree = new BtreeDictionary<Guid,int> (128);
+        static BtreeDictionary<Guid,int> tree;

         static void Main (string[] args)
         {
-            for (int ii = 0; ii < reps; ++ii)
-                tree.Add (Guid.NewGuid(), ii);
+            foreach (var reps in new int[] { 100, 1000, 10000, 100000, 1000000, 10000000, 20000000, 40000000 })
+            {
+                tree = new BtreeDictionary<Guid,int> (128);

-            Console.WriteLine (reps);
-            Console.WriteLine (tree.GetTreeStatsText());
+                for (int ii = 0; ii < reps; ++ii)
+                    tree.Add (Guid.NewGuid(), ii);
+
+                Console.WriteLine (reps);
+#if DEBUG
+                Console.WriteLine (tree.GetTreeStatsText());
+#endif
+            }
+
         }
     }
 }


Revert "Tratamento da instrução de protesto (CodigoProtesto) - Bradesco - remessa CNAB 400"

--- Boleto2.Net/Banco/BancoBradesco.cs
+++ Boleto2.Net/Banco/BancoBradesco.cs
@@ -839,24 +839,8 @@
                 reg.Adicionar(TTiposDadoEDI.ediNumericoSemSeparador_, 0148, 002, 0, AjustaEspecieCnab400(boleto.EspecieDocumento), '0');
                 reg.Adicionar(TTiposDadoEDI.ediAlphaAliEsquerda_____, 0150, 001, 0, boleto.Aceite, ' ');
                 reg.Adicionar(TTiposDadoEDI.ediDataDDMMAA___________, 0151, 006, 0, boleto.DataEmissao, ' ');
-
-                //Instrues de protesto
-                string vInstrucao1 = "";
-                string vInstrucao2 = "";
-                switch (boleto.CodigoProtesto)
-                {
-                    case TipoCodigoProtesto.NaoProtestar:
-                        vInstrucao1 = "00";
-                        vInstrucao2 = "0";
-                        break;
-                    case TipoCodigoProtesto.ProtestarDiasCorridos:
-                        vInstrucao1 = "06";
-                        vInstrucao2 = boleto.DiasProtesto.ToString();
-                        break;
-                }
-                reg.Adicionar(TTiposDadoEDI.ediInteiro______________, 0157, 002, 0, vInstrucao1, '0');                                           //157-158
-                reg.Adicionar(TTiposDadoEDI.ediInteiro______________, 0159, 002, 0, vInstrucao2, '0');                                           //159-160
-
+                reg.Adicionar(TTiposDadoEDI.ediNumericoSemSeparador_, 0157, 002, 0, boleto.CodigoInstrucao1, '0');
+                reg.Adicionar(TTiposDadoEDI.ediNumericoSemSeparador_, 0159, 002, 0, boleto.CodigoInstrucao2, '0');
                 reg.Adicionar(TTiposDadoEDI.ediNumericoSemSeparador_, 0161, 013, 2, boleto.ValorJurosDia, '0');

                 if (boleto.ValorDesconto == 0)


Suppress incorrect 'variable declared but never used' warnings due to DI.

--- VrPlayer/Models/Plugins/DynamicPluginManager.cs
+++ VrPlayer/Models/Plugins/DynamicPluginManager.cs
@@ -18,6 +18,7 @@
 {
     public class DynamicPluginManager : IPluginManager
     {
+#pragma warning disable 0649
         [ImportMany]
         private IEnumerable<IPlugin<IMedia>> _medias;
         public IEnumerable<IPlugin<IMedia>> Medias
@@ -96,6 +97,7 @@
                     .Concat(_stabilizers.Where(stabilizers => stabilizers.Content != null));
             }
         }
+#pragma warning restore 0649

         public DynamicPluginManager(string path, IEnumerable<string> folders)
         {


remove reference to "beta" chunked upload (#520)

--- Box.V2/Managers/BoxFilesManager.cs
+++ Box.V2/Managers/BoxFilesManager.cs
@@ -462,7 +462,6 @@

         /// <summary>
         /// Upload a large file by splitting them up and uploads in a session.
-        /// This method is in BETA, not ready for production use yet, but welcome to try and give us feedback.
         /// </summary>
         /// <param name="stream">The file stream.</param>
         /// <param name="fileName">Name of the remote file name.</param>


try sending token as string...

try sending token as string...

--- WebApp-B2C-DotNet/Controllers/HomeController.cs
+++ WebApp-B2C-DotNet/Controllers/HomeController.cs
@@ -86,7 +86,10 @@

             HttpRequestMessage msg = new HttpRequestMessage(HttpMethod.Post, OIDC_baseUrl + "userinfo");

-            msg.Headers.Authorization = new AuthenticationHeaderValue("Bearer",Convert.ToBase64String(Encoding.UTF8.GetBytes(token)));
+            // msg.Headers.Authorization = new AuthenticationHeaderValue("Bearer",Convert.ToBase64String(Encoding.UTF8.GetBytes(token)));
+
+            msg.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
+
             var response = await (new HttpClient()).SendAsync(msg,HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);

             throw new Exception("Token: "+ token + "\nResponse: " + response);


promotions changes

promotions changes

--- WebService/Promotions/PromotionAccessService.cs
+++ WebService/Promotions/PromotionAccessService.cs
@@ -102,6 +102,7 @@
 			{

 				DateTime date = DateTime.ParseExact(expirationTime, "dd/mm/yyyy",System.Globalization.CultureInfo.InvariantCulture);
+				int identifier = int.Parse(id);
 				List<string> attributes = new List<string>
 				{
 					"id",


missed removing one block of mrc related code

--- WindowsDevicePortalWrapper/TestAppHL/Program.cs
+++ WindowsDevicePortalWrapper/TestAppHL/Program.cs
@@ -105,21 +105,6 @@
             activeSchemeTask.Wait();
             Console.WriteLine("Active power scheme id: " + activeSchemeTask.Result.ToString());

-            Task<MrcFileList> fileListTask = portal.GetMrcFileList();
-            fileListTask.Wait();
-            MrcFileList mrcFileList = fileListTask.Result;
-            Console.WriteLine(string.Format("Found {0} MRC files on your device", mrcFileList.Files.Count));
-            foreach (MrcFileInformation fileInfo in mrcFileList.Files)
-            {
-                Console.WriteLine(string.Format("{0} : {1} {2} bytes", fileInfo.FileName, fileInfo.Created, fileInfo.FileSize));
-
-                //// TODO: Save the thumbnail
-                //// TODO: Download / save the file
-
-                Task deleteTask = portal.DeleteMrcFile(fileInfo.FileName);
-                deleteTask.Wait();
-            }
-
             while (true)
             {
                 System.Threading.Thread.Sleep(0);


Resolve #78 - Implement recursive directory creation

--- CSF/IO/FileSystemInfoExtensions.cs
+++ CSF/IO/FileSystemInfoExtensions.cs
@@ -112,8 +112,27 @@
     /// <param name="info">Info.</param>
     public static void CreateRecursive(this DirectoryInfo info)
     {
-      // TODO: Write this implementation
-      throw new NotImplementedException();
+      if(info == null)
+      {
+        throw new ArgumentNullException("info");
+      }
+
+      if(info == info.Root)
+      {
+        var message = String.Format("Cannot create the root of a file system: {0}", info.Root.FullName);
+        throw new IOException(message);
+      }
+
+      if(!info.Exists)
+      {
+        if(info.Parent != info.Root)
+        {
+          info.Parent.CreateRecursive();
+        }
+
+        info.Create();
+        info.Refresh();
+      }
     }

     #endregion


(GH-356) Added ability to upload all coverage files to coveralls

--- Cake.Recipe/Content/coveralls.cake
+++ Cake.Recipe/Content/coveralls.cake
@@ -3,17 +3,25 @@
 ///////////////////////////////////////////////////////////////////////////////

 BuildParameters.Tasks.UploadCoverallsReportTask = Task("Upload-Coveralls-Report")
-    .WithCriteria(() => FileExists(BuildParameters.Paths.Files.TestCoverageOutputFilePath))
     .WithCriteria(() => !BuildParameters.IsLocalBuild)
     .WithCriteria(() => !BuildParameters.IsPullRequest)
     .WithCriteria(() => BuildParameters.IsMainRepository)
     .Does(() => RequireTool(ToolSettings.CoverallsTool, () => {
         if (BuildParameters.CanPublishToCoveralls)
         {
-            CoverallsIo(BuildParameters.Paths.Files.TestCoverageOutputFilePath, new CoverallsIoSettings()
+            var coverageFiles = GetFiles(BuildParameters.Paths.Directories.TestCoverage + "/coverlet/*.xml");
+            if (FileExists(BuildParameters.Paths.Files.TestCoverageOutputFilePath))
             {
-                RepoToken = BuildParameters.Coveralls.RepoToken
-            });
+                coverageFiles += BuildParameters.Paths.Files.TestCoverageOutputFilePath;
+            }
+
+            foreach(var coverageFile in coverageFiles)
+            {
+                CoverallsIo(BuildParameters.Paths.Files.TestCoverageOutputFilePath, new CoverallsIoSettings()
+                {
+                    RepoToken = BuildParameters.Coveralls.RepoToken
+                });
+            }
         }
         else
         {


Fixed #743: Forward state of Ctrl, Alt and Shift keys

--- CefSharp.Wpf/ChromiumWebBrowser.cs
+++ CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -626,8 +626,13 @@
                         return IntPtr.Zero;
                     }

-                    handled = managedCefBrowserAdapter.SendKeyEvent(message, wParam.ToInt32(), lParam);
-
+                    const CefEventFlags modifiers = 0;
+
+                    if (managedCefBrowserAdapter.SendKeyEvent(message, wParam.ToInt32(), (IntPtr) AddKeyboardModifiers(modifiers)))
+                    {
+                        handled = true;
+                    }
+
                     break;
                 }
             }
@@ -754,59 +759,64 @@
                 modifiers |= CefEventFlags.RightMouseButton;
             }

-            if (Keyboard.IsKeyDown(Key.LeftCtrl))
-            {
-                modifiers |= CefEventFlags.ControlDown | CefEventFlags.IsLeft;
-            }
-
-            if (Keyboard.IsKeyDown(Key.RightCtrl))
-            {
-                modifiers |= CefEventFlags.ControlDown | CefEventFlags.IsRight;
-            }
-
-            if (Keyboard.IsKeyDown(Key.LeftShift))
-            {
-                modifiers |= CefEventFlags.ShiftDown | CefEventFlags.IsLeft;
-            }
-
-            if (Keyboard.IsKeyDown(Key.RightShift))
-            {
-                modifiers |= CefEventFlags.ShiftDown | CefEventFlags.IsRight;
-            }
-
-            if (Keyboard.IsKeyDown(Key.LeftAlt))
-            {
-                modifiers |= CefEventFlags.AltDown| CefEventFlags.IsLeft;
-            }
-
-            if (Keyboard.IsKeyDown(Key.RightAlt))
-            {
-                modifiers |= CefEventFlags.AltDown | CefEventFlags.IsRight;
+            return AddKeyboardModifiers(modifiers);
+        }
+
+        private static CefEventFlags GetModifiers(KeyEventArgs e)
+        {
+            CefEventFlags modifiers = 0;
+
+            if (e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Shift))
+            {
+                modifiers |= CefEventFlags.ShiftDown;
+            }
+
+            if (e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Alt))
+            {
+                modifiers |= CefEventFlags.AltDown;
+            }
+
+            if (e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Control))
+            {
+                modifiers |= CefEventFlags.ControlDown;
             }

             return modifiers;
         }

-        private static CefEventFlags GetModifiers(KeyEventArgs e)
-        {
-            CefEventFlags modifiers = 0;
-
-            if (e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Shift))
-            {
-                modifiers |= CefEventFlags.ShiftDown;
-            }
-
-            if (e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Alt))
-            {
-                modifiers |= CefEventFlags.AltDown;
-            }
-
-            if (e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Control))
-            {
-                modifiers |= CefEventFlags.ControlDown;
-            }
-
-            return modifiers;
+        private static CefEventFlags AddKeyboardModifiers(CefEventFlags modifiers)
+        {
+          if (Keyboard.IsKeyDown(Key.LeftCtrl))
+          {
+            modifiers |= CefEventFlags.ControlDown | CefEventFlags.IsLeft;
+          }
+
+          if (Keyboard.IsKeyDown(Key.RightCtrl))
+          {
+            modifiers |= CefEventFlags.ControlDown | CefEventFlags.IsRight;
+          }
+
+          if (Keyboard.IsKeyDown(Key.LeftShift))
+          {
+            modifiers |= CefEventFlags.ShiftDown | CefEventFlags.IsLeft;
+          }
+
+          if (Keyboard.IsKeyDown(Key.RightShift))
+          {
+            modifiers |= CefEventFlags.ShiftDown | CefEventFlags.IsRight;
+          }
+
+          if (Keyboard.IsKeyDown(Key.LeftAlt))
+          {
+            modifiers |= CefEventFlags.AltDown | CefEventFlags.IsLeft;
+          }
+
+          if (Keyboard.IsKeyDown(Key.RightAlt))
+          {
+            modifiers |= CefEventFlags.AltDown | CefEventFlags.IsRight;
+          }
+
+          return modifiers;
         }

         private void SetPopupSizeAndPositionImpl(int width, int height, int x, int y)


Remove unused code

Remove unused code

Follow up to #2239

--- CefSharp.Wpf/ChromiumWebBrowser.cs
+++ CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -1844,61 +1844,6 @@
             }
         }

-        /// <summary>
-        /// Creates the image.
-        /// </summary>
-        /// <returns>Image.</returns>
-        private Image CreateImage()
-        {
-            var img = new Image();
-
-            BindingOperations.SetBinding(img, RenderOptions.BitmapScalingModeProperty, new Binding
-            {
-                Path = new PropertyPath(RenderOptions.BitmapScalingModeProperty),
-                Source = this,
-            });
-
-            img.Stretch = Stretch.None;
-            img.HorizontalAlignment = HorizontalAlignment.Left;
-            img.VerticalAlignment = VerticalAlignment.Top;
-
-            return img;
-        }
-
-        /// <summary>
-        /// Creates the popup.
-        /// </summary>
-        /// <returns>Popup.</returns>
-        private Popup CreatePopup()
-        {
-            var newPopup = new Popup
-            {
-                Child = popupImage = CreateImage(),
-                PlacementTarget = this,
-                Placement = PlacementMode.Absolute,
-                //Needs to allow transparency or only ScaleTransforms are allowed
-                //https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/Primitives/Popup.cs,1713
-                AllowsTransparency = true
-            };
-
-            BindingOperations.SetBinding(newPopup, LayoutTransformProperty, new Binding
-            {
-                Path = new PropertyPath(LayoutTransformProperty),
-                Source = this,
-            });
-
-            BindingOperations.SetBinding(newPopup, RenderTransformProperty, new Binding
-            {
-                Path = new PropertyPath(RenderTransformProperty),
-                Source = this,
-            });
-
-            newPopup.Opened += PopupOpened;
-            newPopup.Closed += PopupClosed;
-
-            return newPopup;
-        }
-
         /// Converts a .NET Drag event to a CefSharp MouseEvent
         /// </summary>
         /// <param name="e">The <see cref="DragEventArgs"/> instance containing the event data.</param>
@@ -2093,32 +2038,6 @@
             }

             base.OnMouseWheel(e);
-        }
-
-        /// <summary>
-        /// Captures the mouse when the popup is opened.
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
-        private void PopupOpened(object sender, EventArgs e)
-        {
-            if (Mouse.Captured != this)
-            {
-                Mouse.Capture(this);
-            }
-        }
-
-        /// <summary>
-        /// Releases mouse capture when the popup is closed.
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
-        private void PopupClosed(object sender, EventArgs e)
-        {
-            if (Mouse.Captured == this)
-            {
-                Mouse.Capture(null);
-            }
         }

         /// <summary>


Switch to GitCDN for update.xml check

Switch to GitCDN for update.xml check

--- Chordious.WPF/Utils/UpdateUtils.cs
+++ Chordious.WPF/Utils/UpdateUtils.cs
@@ -281,7 +281,7 @@
             }
         }

-        private const string _updateUrl = "http://update.chordious.com";
+        private const string _updateUrl = "https://gitcdn.link/repo/jonthysell/Chordious/master/update.xml";
         private const string _userAgent = "Mozilla/5.0";
     }


Removed obsolete property

Removed obsolete property

--- Sachiel/Messages/Packets/PacketHandler.cs
+++ Sachiel/Messages/Packets/PacketHandler.cs
@@ -10,6 +10,5 @@
         /// </summary>
         public abstract void HandlePacket(Consumer consumer, Packet packet);

-        protected abstract string SyncKey { get; set; }
     }
 }


Fixed issue in creation of user document on first time login.

--- ScampApi/Infrastructure/SecurityHelper.cs
+++ ScampApi/Infrastructure/SecurityHelper.cs
@@ -62,7 +62,7 @@
                     Name =
                         string.Format("{0} {1}", Context.User.FindFirst(ClaimTypes.GivenName).Value,
                             Context.User.FindFirst(ClaimTypes.Surname).Value).Trim(),
-                    isSystemAdmin = tmpUser.isSystemAdmin,
+                    isSystemAdmin = false, // default to non-admin
 					// get email address
 					email = Context.User.Claims.FirstOrDefault(c => c.Type.Contains("email") || c.Type.Contains("upn")).Value
                 };


added test with level>=LogLevel.Info

added test with level>=LogLevel.Info

--- tests/NLog.UnitTests/LayoutRenderers/Wrappers/WhenTests.cs
+++ tests/NLog.UnitTests/LayoutRenderers/Wrappers/WhenTests.cs
@@ -128,5 +128,55 @@
             }
         }

+        [Fact]
+        public void WhenLogLevelConditionTestLayoutRenderer()
+        {
+            //else cannot be invoked ambiently. First param is inner
+            SimpleLayout l = @"${when:when=level<=LogLevel.Info:inner=Good:else=Bad}";
+
+            {
+                var le = LogEventInfo.Create(LogLevel.Debug, "logger", "message");
+                Assert.Equal("Good", l.Render(le));
+            }
+            {
+                var le = LogEventInfo.Create(LogLevel.Error, "logger1", "message");
+                Assert.Equal("Bad", l.Render(le));
+            }
+
+        }
+
+        [Fact]
+        public void WhenLogLevelConditionTest()
+        {
+            LogManager.Configuration = CreateConfigurationFromString(@"
+            <nlog throwExceptions='true'>
+                <targets><target name='debug' type='Debug' layout='${message}' /></targets>
+                <rules>
+                    <logger name='*' minlevel='Trace' writeTo='debug'>
+                    <filters>
+                        <when condition=""level>=LogLevel.Info"" action=""Log""></when>
+                        <when condition='true' action='Ignore' />
+                    </filters>
+                    </logger>
+                </rules>
+            </nlog>");
+
+            ILogger logger = LogManager.GetLogger("A");
+            logger.Trace("Test");
+
+            AssertDebugCounter("debug", 0);
+            logger.Debug("Test");
+            AssertDebugCounter("debug", 0);
+            logger.Info("Test");
+            AssertDebugCounter("debug", 1);
+            logger.Warn("Test");
+            AssertDebugCounter("debug", 2);
+            logger.Error("Test");
+            AssertDebugCounter("debug", 3);
+            logger.Fatal("Test");
+            AssertDebugCounter("debug", 4);
+
+        }
+
     }
 }


workaround for 500 if HydraSpecs folder doesn't exist. This is until #28 is fixed

--- Controllers/OperationController.cs
+++ Controllers/OperationController.cs
@@ -28,14 +28,15 @@
             var watch = new Stopwatch();
             watch.Start();

-            var specs =
-                Directory.GetFiles(HostingEnvironment.MapPath("~/App_Data/HydraSpecs"))
-                .Select(Assembly.LoadFile)
-                .Select(assembly => assembly.GetTypes())
-                .SelectMany(t => t)
-                .Where(type => type.IsSubclassOf(typeof(BaseClient)) && !type.IsAbstract )
-                .Select(client => HyakUtils.GetOperationsAsync(hidden, client))
-                .SelectMany(j => j);
+            var specs = Directory.Exists(HostingEnvironment.MapPath("~/App_Data/HydraSpecs"))
+                ? Directory.GetFiles(HostingEnvironment.MapPath("~/App_Data/HydraSpecs"))
+                  .Select(Assembly.LoadFile)
+                  .Select(assembly => assembly.GetTypes())
+                  .SelectMany(t => t)
+                  .Where(type => type.IsSubclassOf(typeof(BaseClient)) && !type.IsAbstract)
+                  .Select(client => HyakUtils.GetOperationsAsync(hidden, client))
+                  .SelectMany(j => j)
+                : Enumerable.Empty<MetadataObject>();

             var speclessCsmApis = await HyakUtils.GetSpeclessCsmOperationsAsync();


Switched bar chart x-axis to an ordinal scale

--- D3Demos/Views/TagDemos/Walk.cshtml
+++ D3Demos/Views/TagDemos/Walk.cshtml
@@ -30,7 +30,10 @@

-
+

+

+

+

 @Scripts.Render("~/bundles/d3")
 @section Scripts{
@@ -45,10 +48,6 @@
         });

         function buildVisualization(dataSet) {
-            debugger;
-
-            var prettyColors = ['teal', 'aqua', 'blue', 'navy' ];
-
             // Overall dimensions of the SVG
             var height = 500;
             var width = 900;
@@ -56,7 +55,6 @@
             // Padding...
             var leftPadding = 50;
             var bottomPadding = 20;
-            var barPadding = 1;

             // Actual space for the bars
             var chartWidth = width - leftPadding;
@@ -75,21 +73,15 @@

             //Building the scale for the bar locations
             var xScale = d3.scale
-               .linear()
-               .range([leftPadding, width])
-               .domain([0, dataSet.Length]);
+               .ordinal()
+               .domain(d3.range(dataSet.Length))
+               .rangeRoundBands([leftPadding, chartWidth], 0.05);

             //Building a Y axis
             var yAxis = d3.svg.axis()
                           .scale(yAxisScale)
                           .orient("left");

-            // Building an X axis
-            var xAxis = d3.svg.axis()
-                          .scale(xScale)
-                          .orient("bottom");
-
-
             // Build the overall SVG container
             var svg = d3.select("#chartContainer")
                         .append("svg")
@@ -102,12 +94,7 @@
                .attr("class", "axis")
                .attr("transform", "translate(" + leftPadding + ",0)")
                .call(yAxis);
-
-            svg.append("g")
-               .attr("class", "axis")
-               .attr("transform", "translate(0," + chartHeight + ")")
-               .call(xAxis);
-
+
             // Build bars for each item
             // Example "rect" element: <rect x="200" y="400" width="300" height="100" style="" class="" />
             svg.selectAll("rect")
@@ -115,7 +102,7 @@
                .enter()
                .append("rect")
                .attr("x", function (item, i) { return xScale(i)})
-               .attr("width", function (item) { return chartWidth / dataSet.Length - barPadding })
+               .attr("width", function (item) { return xScale.rangeBand() })
                .attr("y", function (item, i) { return chartHeight - yScale(item.Rate) })
                .attr("height", function (item) { return yScale(item.Rate) })
                .attr("fill", "teal");


(TFS CS 5861)

(TFS CS 5861)

--- Signum.Web/LineHelpers/ValueLineHelper.cs
+++ Signum.Web/LineHelpers/ValueLineHelper.cs
@@ -158,7 +158,7 @@
             }

             //valueLine.ValueHtmlProps["size"] = (valueLine.Format == "d") ? 10 : 20;
-            valueLine.ValueHtmlProps["size"] = CalendarHelper.FormatToString(valueLine.Format ?? "g").Length;
+            valueLine.ValueHtmlProps["size"] = CalendarHelper.FormatToString(valueLine.Format ?? "g").Length + 1;   //time is often rendered with two digits as hours, but format is represented as "H"

             if (valueLine.DatePickerOptions.Format == null)
                 valueLine.DatePickerOptions.Format = valueLine.Format;


Clean Up

Clean Up

--- DCComics/Views/Person/Index.cshtml
+++ DCComics/Views/Person/Index.cshtml
@@ -6,27 +6,7 @@

Index

-    @*

-

-            @Html.DisplayNameFor(model => model.FirstName)
-

-

-            @Html.DisplayNameFor(model => model.LastName)
-

-

-            @Html.DisplayNameFor(model => model.Birthday)
-

-

-            @Html.DisplayNameFor(model => model.Address)
-

-

-    @foreach (var item in Model)
-    {
-        @Html.Partial("_PersonInList", item);
-
-    }*@
-
-
+

@@ -48,13 +28,6 @@

-
-
-
-
-
-
-

             <button type="button" class="btn btn-success" data-toggle="modal" data-target="#popUpCreatePerson">Create New Person</button>
@@ -74,7 +47,7 @@

-                @**@
+
                 @Html.Partial("Create", new DCComics.Model.Person())

@@ -165,28 +138,7 @@
      @Scripts.Render("~/bundles/jqueryval")


added IsCurrentClient to DiscordUser

added IsCurrentClient to DiscordUser

--- DSharpPlus/Entities/DiscordUser.cs
+++ DSharpPlus/Entities/DiscordUser.cs
@@ -87,6 +87,12 @@
         public string Mention => Formatter.Mention(this, this is DiscordMember);

         /// <summary>
+        /// Gets whether this user is the Client which created this object.
+        /// </summary>
+        [JsonIgnore]
+        public bool IsCurrentClient => this.Id == this.Discord.CurrentUser.Id;
+
+        /// <summary>
         /// Gets this user's presence.
         /// </summary>
         [JsonIgnore]


fix blog and releases mention

fix blog and releases mention

--- DiscordBot/Services/FeedService.cs
+++ DiscordBot/Services/FeedService.cs
@@ -53,9 +53,9 @@
                         await role.ModifyAsync(properties => { properties.Mentionable = true; });
                         string message =
                             $"{role.Mention} New unity **beta **release !** {item.Title.Text}** \n <{item.Links[0].Uri.ToString().Replace("/fr/", "/")}>";
-                        await role.ModifyAsync(properties => { properties.Mentionable = false; });

                         await channel.SendMessageAsync(message);
+                        await role.ModifyAsync(properties => { properties.Mentionable = false; });
                     }
                 }
             }
@@ -91,9 +91,9 @@
                         await role.ModifyAsync(properties => { properties.Mentionable = true; });
                         string message =
                             $"{role.Mention} New unity release ! **{item.Title.Text}** \n <{item.Links[0].Uri.ToString().Replace("/fr/", "/")}>";
-                        await role.ModifyAsync(properties => { properties.Mentionable = false; });

                         await channel.SendMessageAsync(message);
+                        await role.ModifyAsync(properties => { properties.Mentionable = false; });
                     }
                 }
             }
@@ -128,9 +128,9 @@
                         await role.ModifyAsync(properties => { properties.Mentionable = true; });
                         string message =
                             $"New unity blog post ! **{item.Title.Text}**\n{item.Links[0].Uri.ToString().Replace("/fr/", "/")}";
-                        await role.ModifyAsync(properties => { properties.Mentionable = false; });

                         await channel.SendMessageAsync(message);
+                        await role.ModifyAsync(properties => { properties.Mentionable = false; });
                     }
                 }
             }


Additional debugging information for Travis debug

--- Duplicati/UnitTest/PurgeTesting.cs
+++ Duplicati/UnitTest/PurgeTesting.cs
@@ -135,11 +135,19 @@
             using (var c = new Library.Main.Controller("file://" + TARGETFOLDER, testopts, null))
             {
                 var listinfo = c.List("*");
-                var filecount = listinfo.Files.Count();
+                var files = listinfo.Files.ToArray();
+                var filecount = files.Length;
                 listinfo = c.List();
-                var filesets = listinfo.Filesets.Count();
+                var filesets = listinfo.Filesets.ToArray();

-                Assert.AreEqual(4, filesets, "Incorrect number of filesets after final backup");
+                Console.WriteLine("Listing final version information");
+
+                Console.WriteLine("Versions:");
+                Console.WriteLine("  " + string.Join(Environment.NewLine + "  ", filesets.Select(x => string.Format("{0}: {1}, {2} {3}", x.Version, x.Time, x.FileCount, x.FileSizes))));
+                Console.WriteLine("Files:");
+                Console.WriteLine("  " + string.Join(Environment.NewLine + "  ", files.Select(x => string.Format("{0}: {1}", x.Path, string.Join(" - ", x.Sizes.Select(y => y.ToString()))))));
+
+                Assert.AreEqual(4, filesets.Length, "Incorrect number of filesets after final backup");
                 Assert.AreEqual(filenames.Count + 1, filecount, "Incorrect number of files after final backup");
             }


Check the table control is not null before resizing

--- EDDiscovery/Forms/SummaryPopOut.cs
+++ EDDiscovery/Forms/SummaryPopOut.cs
@@ -655,7 +655,7 @@

         private void SummaryPopOut_Resize(object sender, EventArgs e)
         {
-            if (!bodyScanShowing) lt.SetDisplaySize(hideall ? 0 : this.ClientRectangle.Height);
+            if (!bodyScanShowing && lt != null) lt.SetDisplaySize(hideall ? 0 : this.ClientRectangle.Height);
         }

         void FadeOut(object sender, EventArgs e)            // hiding


web/TeamMemberFilter: Restrict team admin access

--- SupportManager.Web/Infrastructure/TeamMemberFilter.cs
+++ SupportManager.Web/Infrastructure/TeamMemberFilter.cs
@@ -19,9 +19,18 @@
             return;
         }

-        if (context.HttpContext.User.HasClaim(SupportManagerClaimTypes.TeamMember, teamId.ToString())) return;
+        if (!context.HttpContext.User.HasClaim(SupportManagerClaimTypes.TeamMember, teamId.ToString()))
+        {
+            context.Result = new NotFoundResult();
+            return;
+        }

-        context.Result = new NotFoundResult();
+        if (context.ActionDescriptor.ViewEnginePath.StartsWith("/Admin") &&
+            !context.HttpContext.User.HasClaim(SupportManagerClaimTypes.TeamAdmin, teamId.ToString()))
+        {
+            context.Result = new ForbidResult();
+            return;
+        }
     }

     public void OnPageHandlerExecuted(PageHandlerExecutedContext context)


Fixed unit test

Fixed unit test

--- Tailviewer.Test/Ui/AbstractDataSourceViewModelTest.cs
+++ Tailviewer.Test/Ui/AbstractDataSourceViewModelTest.cs
@@ -137,7 +137,9 @@
 			_viewModel.Update();

 			_viewModel.NewLogLineCount.Should().Be(4);
-			changes.Should().Equal(new[] {"TotalCount", "LastWrittenAge", "NewLogLineCount"});
+			changes.Count.Should().BeInRange(2, 3);
+			changes.Should().Contain("TotalCount");
+			changes.Should().Contain("NewLogLineCount");
 		}
 	}
 }