Some fixes to the buttons enabled/disabled and hotslogs dequeing

--- HeroesParserData/ViewModels/ReplaysViewModel.cs
+++ HeroesParserData/ViewModels/ReplaysViewModel.cs
@@ -308,15 +308,7 @@

         public bool IsHotsLogsUploaderEnabled
         {
-            get
-            {
-                bool enabled = UserSettings.Default.IsHotsLogsUploaderEnabled;
-                if (enabled)
-                    AreHotsLogsUploaderButtonsEnabled = true;
-                else
-                    AreHotsLogsUploaderButtonsEnabled = false;
-                return enabled;
-            }
+            get { return UserSettings.Default.IsHotsLogsUploaderEnabled; }
             set
             {
                 UserSettings.Default.IsHotsLogsUploaderEnabled = value;
@@ -479,9 +471,9 @@
         private void StartProcessing()
         {
             IsProcessSelected = true;
+            if (IsHotsLogsUploaderEnabled) IsHotsLogsStopButtonEnabled = true;
+            IsHotsLogsUploaderQueueOn = true;
             AreProcessButtonsEnabled = false;
-            IsHotsLogsStopButtonEnabled = true;
-            IsHotsLogsUploaderQueueOn = true;

             if (IsProcessWatchChecked)
                 InitReplayWatcher();
@@ -490,7 +482,6 @@
                 ReplayHotsLogsUploadQueue.Clear();

             InitProcessing(IsAutoScanChecked);
-
         }

         private void StopProcessing()
@@ -1028,12 +1019,18 @@
                         {
                             currentReplayFile.HotsLogsStatus = ReplayHotsLogStatus.FileNotFound;
                             HotsLogsLog.Log(LogLevel.Info, $"File does not exists: {currentReplayFile.FilePath}");
+
+                            // remove it before we continue
+                            ReplayHotsLogsUploadQueue.Dequeue();
                             continue;
                         }

                         if (currentReplayFile.ReplayId == 0)
                         {
                             WarningLog.Log(LogLevel.Info, "HOTS Logs Queue: A replayId of 0 was detected");
+
+                            // remove it before we continue
+                            ReplayHotsLogsUploadQueue.Dequeue();
                             continue;
                         }

@@ -1051,6 +1048,9 @@
                             {
                                 // already added, so its a duplicate
                                 currentReplayFile.HotsLogsStatus = ReplayHotsLogStatus.Duplicate;
+
+                                // remove it before we continue
+                                ReplayHotsLogsUploadQueue.Dequeue();
                                 continue;
                             }
                         }
@@ -1093,12 +1093,12 @@
                         currentReplayFile.HotsLogsStatus = ReplayHotsLogStatus.Maintenance;
                         HotsLogsMaintenance = true;
                     }
-                    catch (AmazonS3Exception ex)
+                    catch (AmazonS3Exception ex) // note: the replay is still in front of the queue
                     {
                         currentReplayFile.HotsLogsStatus = ReplayHotsLogStatus.UploadError;
                         HotsLogsLog.Log(LogLevel.Error, ex);
                     }
-                    catch (Exception ex)
+                    catch (Exception ex) // note: the replay is still in front of the queue
                     {
                         currentReplayFile.HotsLogsStatus = ReplayHotsLogStatus.UploadError;
                         ExceptionLog.Log(LogLevel.Error, ex);


Minor optimization in the mapped file system

--- src/Framework/N2/Edit/FileSystem/MappedFileSystem.cs
+++ src/Framework/N2/Edit/FileSystem/MappedFileSystem.cs
@@ -21,12 +21,17 @@
 				yield break;
 			foreach (var file in new DirectoryInfo(path).GetFiles())
 				if(!file.Name.StartsWith("."))
-					yield return GetFile(N2.Web.Url.Combine(parentVirtualPath, file.Name));
+					yield return GetFile(N2.Web.Url.Combine(parentVirtualPath, file.Name), file);
 		}

 		public FileData GetFile(string virtualPath)
 		{
 			FileInfo info = new FileInfo(MapPath(virtualPath));
+			return GetFile(virtualPath, info);
+		}
+
+		private static FileData GetFile(string virtualPath, FileInfo info)
+		{
 			return new FileData
 			{
 				Name = info.Name,
@@ -44,18 +49,23 @@
 				yield break;
 			foreach (var dir in new DirectoryInfo(path).GetDirectories())
 				if (!dir.Name.StartsWith("."))
-					yield return GetDirectory(N2.Web.Url.Combine(parentVirtualPath, dir.Name));
+					yield return GetDirectory(N2.Web.Url.Combine(parentVirtualPath, dir.Name), dir);
 		}

 		public DirectoryData GetDirectory(string virtualPath)
 		{
 			DirectoryInfo info = new DirectoryInfo(MapPath(virtualPath));
-			return new DirectoryData
-			{
+			return GetDirectory(virtualPath, info);
+		}
+
+		private static DirectoryData GetDirectory(string virtualPath, DirectoryInfo info)
+		{
+			return new DirectoryData
+			{
 				Name = info.Name,
 				Created = GetSafely(info, i => i.CreationTime),
-				Updated = GetSafely(info, i => i.LastWriteTime),
-				VirtualPath = virtualPath
+				Updated = GetSafely(info, i => i.LastWriteTime),
+				VirtualPath = virtualPath
 			};
 		}


Fix for network.

Fix for network.

--- Holojam/Assets/Holojam/Server/HolojamNetwork.cs
+++ Holojam/Assets/Holojam/Server/HolojamNetwork.cs
@@ -30,6 +30,7 @@

 		void Start() {
 			sendThread = new HolojamSendThread(BLACK_BOX_SERVER_PORT);
+			receiveThreads = new List<HolojamThread> ();
 			receiveThreads.Add(new HolojamRecieveThread(HOLOJAM_MOTIVE_PORT));
 			receiveThreads.Add(new HolojamRecieveThread(HOLOJAM_NONMOTIVE_PORT));


Avoid leaking resources at design time

Avoid leaking resources at design time

--- src/GitHub.UI/Helpers/SharedDictionaryManagerBase.cs
+++ src/GitHub.UI/Helpers/SharedDictionaryManagerBase.cs
@@ -7,10 +7,13 @@
     public class SharedDictionaryManagerBase : ResourceDictionary
     {
         static IDictionary<Uri, ResourceDictionary> sharedDictionaries;
+        static IList<IDisposable> disposables;

         static SharedDictionaryManagerBase()
         {
-            sharedDictionaries = new Dictionary<Uri, ResourceDictionary>();
+            // Avoid leaking resources at design time.
+            sharedDictionaries = GetAppDomainSharedDictionaries();
+            disposables = GetAppDomainDisposables();
         }

         public virtual new Uri Source
@@ -22,6 +25,13 @@
                 var rd = GetResourceDictionary(value);
                 MergedDictionaries.Clear();
                 MergedDictionaries.Add(rd);
+
+                // Remember dictionaries that need disposing of.
+                var disposable = this as IDisposable;
+                if (disposable != null && !disposables.Contains(disposable))
+                {
+                    disposables.Add(disposable);
+                }
             }
         }

@@ -47,14 +57,14 @@
             var url = inUri.ToString();
             var assemblyPrefix = "/src/";
             var assemblyIndex = url.LastIndexOf(assemblyPrefix);
-            if(assemblyIndex == -1)
+            if (assemblyIndex == -1)
             {
                 return inUri;
             }

             assemblyIndex += assemblyPrefix.Length;
             var pathIndex = url.IndexOf('/', assemblyIndex);
-            if(pathIndex == -1)
+            if (pathIndex == -1)
             {
                 return inUri;
             }
@@ -64,5 +74,39 @@

             return new Uri($"pack://application:,,,/{assemblyName};component/{path}");
         }
+
+        static IDictionary<Uri, ResourceDictionary> GetAppDomainSharedDictionaries()
+        {
+            var name = typeof(SharedDictionaryManagerBase).FullName + ".SharedDictionaries";
+            var sharedDictionaries = GetAppDomainData<Dictionary<Uri, ResourceDictionary>>(name);
+
+            sharedDictionaries.Clear();
+            return sharedDictionaries;
+        }
+
+        static IList<IDisposable> GetAppDomainDisposables()
+        {
+            var name = typeof(SharedDictionaryManagerBase).FullName + ".Disposables";
+            var disposables = GetAppDomainData<List<IDisposable>>(name);
+            foreach (var disposable in disposables)
+            {
+                disposable.Dispose();
+            }
+
+            disposables.Clear();
+            return disposables;
+        }
+
+        static T GetAppDomainData<T>(string name) where T : new()
+        {
+            var data = (T)AppDomain.CurrentDomain.GetData(name);
+            if (data == null)
+            {
+                data = new T();
+                AppDomain.CurrentDomain.SetData(name, data);
+            }
+
+            return data;
+        }
     }
 }


Fixed a potential regex-related bug in old functionality

--- Joinrpg/Models/TargetedSearchResultViewModel.cs
+++ Joinrpg/Models/TargetedSearchResultViewModel.cs
@@ -23,7 +23,7 @@

       descriptionToShow = Regex.Replace(
           descriptionToShow,
-          SearchTarget,
+          Regex.Escape(SearchTarget),
           match => "" + match.Value + "", RegexOptions.IgnoreCase);

       return new HtmlString(descriptionToShow);


Fixed streamingasset for Android

Fixed streamingasset for Android

--- Sources/Silphid.Loadzup/Sources/Loaders/StreamingAsset/StreamingAssetLoader.cs
+++ Sources/Silphid.Loadzup/Sources/Loaders/StreamingAsset/StreamingAssetLoader.cs
@@ -17,7 +17,7 @@
             _converter = converter;
         }

-        public bool Supports<T>(Uri uri) =>
+        public bool Supports<T>(Uri uri) =>
             uri.Scheme == Scheme.StreamingAsset;

         public IObservable<T> Load<T>(Uri uri, Options options = null)
@@ -26,7 +26,9 @@
             var path = uri.GetPathAndContentType(ref contentType, _pathSeparator, true);

             return LoadFile(uri, options, path, contentType)
-                .ContinueWith(x => _converter.Convert<T>(x.Bytes, options?.ContentType ?? x.ContentType ?? contentType, x.Encoding));
+                .ContinueWith(
+                    x =>
+                        _converter.Convert<T>(x.Bytes, options?.ContentType ?? x.ContentType ?? contentType, x.Encoding));
         }

         private IObservable<Response> LoadFile(Uri uri, Options options, string path, ContentType contentType)
@@ -35,8 +37,11 @@

             if (filePath.Contains("://"))
             {
+                if (options == null)
+                    options = new Options();
+
                 options.ContentType = contentType;
-                return _requester.Request(uri, options);
+                return _requester.Request(new Uri(filePath), options);
             }

             return Observable.Return(System.IO.File.ReadAllBytes(filePath))


Fix tests

Fix tests

--- Tests/Serilog.Exceptions.Test/Destructurers/ReflectionBasedDestructurerTest.cs
+++ Tests/Serilog.Exceptions.Test/Destructurers/ReflectionBasedDestructurerTest.cs
@@ -21,7 +21,7 @@
             var propertiesBag = new ExceptionPropertiesBag(exception);

             // Act
-            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, null);
+            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, EmptyDestructurer());

             // Assert
             var properties = propertiesBag.GetResultDictionary();
@@ -47,7 +47,7 @@
             var exception = new UriException("test", new Uri(uriValue));

             var propertiesBag = new ExceptionPropertiesBag(exception);
-            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, null);
+            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, EmptyDestructurer());

             var properties = propertiesBag.GetResultDictionary();
             var uriPropertyValue = properties[nameof(UriException.Uri)];
@@ -68,7 +68,7 @@
             };

             var propertiesBag = new ExceptionPropertiesBag(exception);
-            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, null);
+            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, EmptyDestructurer());

             var properties = propertiesBag.GetResultDictionary();
             var data = (IDictionary)properties[nameof(Exception.Data)];
@@ -84,7 +84,7 @@
             var exception = new TaskCanceledException(task);

             var propertiesBag = new ExceptionPropertiesBag(exception);
-            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, null);
+            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, EmptyDestructurer());

             var properties = propertiesBag.GetResultDictionary();
             var destructuredTaskObject = (IDictionary)properties[nameof(TaskCanceledException.Task)];
@@ -107,7 +107,7 @@
             var exception = new TaskException("TASK EXCEPTION MESSAGE", task);

             var propertiesBag = new ExceptionPropertiesBag(exception);
-            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, InnerDestructure(CreateReflectionBasedDestructurer()));
+            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, InnerDestructurer(CreateReflectionBasedDestructurer()));

             var properties = propertiesBag.GetResultDictionary();
             var destructuredTaskObject = (IDictionary)properties[nameof(TaskCanceledException.Task)];
@@ -147,7 +147,7 @@
             var propertiesBag = new ExceptionPropertiesBag(exception);

             // Act
-            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, null);
+            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, EmptyDestructurer());

             // Assert
             var properties = propertiesBag.GetResultDictionary();
@@ -169,7 +169,7 @@
             var propertiesBag = new ExceptionPropertiesBag(exception);

             // Act
-            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, null);
+            CreateReflectionBasedDestructurer().Destructure(exception, propertiesBag, EmptyDestructurer());

             // Assert
             var properties = propertiesBag.GetResultDictionary();
@@ -203,7 +203,7 @@

             // Act
             var propertiesBag = new ExceptionPropertiesBag(exception);
-            destructurer.Destructure(exception, propertiesBag, null);
+            destructurer.Destructure(exception, propertiesBag, EmptyDestructurer());

             // Assert
             // Parent is depth 1
@@ -236,7 +236,7 @@
             // Act
             var result = new ExceptionPropertiesBag(new Exception());
             var destructurer = new ReflectionBasedDestructurer(10);
-            destructurer.Destructure(exception, result, null);
+            destructurer.Destructure(exception, result, EmptyDestructurer());

             // Assert
             var myObject = (Dictionary<string, object>)result.GetResultDictionary()["MyObject"];
@@ -266,7 +266,7 @@
             // Act
             var result = new ExceptionPropertiesBag(new Exception());
             var destructurer = new ReflectionBasedDestructurer(10);
-            destructurer.Destructure(exception, result, null);
+            destructurer.Destructure(exception, result, EmptyDestructurer());

             // Assert
             var myObject = (List<object>)result.GetResultDictionary()["MyObjectEnumerable"];
@@ -297,7 +297,7 @@
             // Act
             var result = new ExceptionPropertiesBag(new Exception());
             var destructurer = new ReflectionBasedDestructurer(10);
-            destructurer.Destructure(exception, result, null);
+            destructurer.Destructure(exception, result, EmptyDestructurer());

             // Assert
             var myObject = (Dictionary<string, object>)result.GetResultDictionary()["MyObjectDict"];
@@ -324,7 +324,7 @@
             // Act
             var result = new ExceptionPropertiesBag(exception);
             var destructurer = CreateReflectionBasedDestructurer();
-            destructurer.Destructure(exception, result, InnerDestructure(destructurer));
+            destructurer.Destructure(exception, result, InnerDestructurer(destructurer));

             // Assert
             var resultsDictionary = result.GetResultDictionary();
@@ -360,8 +360,8 @@
             var reflectionBasedDestructurer = CreateReflectionBasedDestructurer();

             // Act
-            reflectionBasedDestructurer.Destructure(exception, reflectionBasedResult, InnerDestructure(reflectionBasedDestructurer));
-            customDestructurer.Destructure(exception, customBasedResult, InnerDestructure(new ArgumentExceptionDestructurer()));
+            reflectionBasedDestructurer.Destructure(exception, reflectionBasedResult, InnerDestructurer(reflectionBasedDestructurer));
+            customDestructurer.Destructure(exception, customBasedResult, InnerDestructurer(new ArgumentExceptionDestructurer()));

             // Assert
             var reflectionBasedDictionary = (Dictionary<string, object>)reflectionBasedResult.GetResultDictionary();
@@ -370,14 +370,19 @@
             reflectionBasedDictionary.Should().BeEquivalentTo(customBasedDictionary);
         }

-        private static Func<Exception, IReadOnlyDictionary<string, object>> InnerDestructure(IExceptionDestructurer destructurer) => (ex) =>
-        {
-            var resultsBag = new ExceptionPropertiesBag(ex);
-
-            destructurer.Destructure(ex, resultsBag, InnerDestructure(destructurer));
-
-            return resultsBag.GetResultDictionary();
-        };
+        private static Func<Exception, IReadOnlyDictionary<string, object>> EmptyDestructurer() =>
+            (ex) => new ExceptionPropertiesBag(ex).GetResultDictionary();
+
+        private static Func<Exception, IReadOnlyDictionary<string, object>> InnerDestructurer(
+            IExceptionDestructurer destructurer) =>
+            (ex) =>
+            {
+                var resultsBag = new ExceptionPropertiesBag(ex);
+
+                destructurer.Destructure(ex, resultsBag, InnerDestructurer(destructurer));
+
+                return resultsBag.GetResultDictionary();
+            };

         private static Exception ThrowAndCatchException(Action throwingAction)
         {


Remove unnecessary hover handling in Dropdown (#2578)

Remove unnecessary hover handling in Dropdown

Co-authored-by: Dan Balasescu <33cdcfbdaf25d4400f3c7a702f45acedfb7c759e@users.noreply.github.com>

--- osu.Framework/Graphics/UserInterface/Dropdown.cs
+++ osu.Framework/Graphics/UserInterface/Dropdown.cs
@@ -10,7 +10,6 @@
 using osuTK.Graphics;
 using osu.Framework.Extensions.IEnumerableExtensions;
 using osu.Framework.Graphics.Sprites;
-using osu.Framework.Input.Events;

 namespace osu.Framework.Graphics.UserInterface
 {
@@ -287,8 +286,6 @@

         private void updateHeaderVisibility() => Header.Alpha = Menu.AnyPresent ? 1 : 0;

-        protected override bool OnHover(HoverEvent e) => true;
-
         /// <summary>
         /// Creates the menu body.
         /// </summary>


Executed a trick to prevent false positives

--- DeadByDaylightBackup.Logging/LoggerFactory.cs
+++ DeadByDaylightBackup.Logging/LoggerFactory.cs
@@ -98,22 +98,34 @@
         /// </summary>
         private static void LoadAllDirectoryAssemblies()
         {
-            string binPath = System.AppDomain.CurrentDomain.BaseDirectory;
+            string binPath = AppDomain.CurrentDomain.BaseDirectory;
+            var assemblies = AppDomain.CurrentDomain.GetAssemblies()
+                .Where(x => !x.FullName.StartsWith("Microsoft"))
+                .Where(x => !x.FullName.StartsWith("System"))
+                .Where(x => !x.FullName.StartsWith("WindowsBase"))
+                .Where(x => !x.FullName.StartsWith("PresentationCore"))
+                .Where(x => !x.FullName.StartsWith("PresentationFramework"))
+                .Select(x=>x.Location).Distinct().ToArray();
+            var files = Directory.GetFiles(binPath, "*.dll", SearchOption.AllDirectories).Where(x => File.Exists(x));
+            var filesToActivate = files.Where(x => !assemblies.Any(y => y.Equals(x, StringComparison.OrdinalIgnoreCase)))
+                .ToArray();

-            foreach (string dll in Directory.GetFiles(binPath, "*.dll", SearchOption.AllDirectories))
+            foreach (string dll in filesToActivate)
             {
-                try
-                {
-                    Assembly loadedAssembly = Assembly.LoadFile(dll);
-                }
-                catch (BadImageFormatException)
-                {
-                    // If a BadImageFormatException exception is thrown, the file is not an assembly.
-                }
-                catch (FileLoadException)
-                {
-                    // The Assembly has already been loaded.
-                }
+                //Dirty trick to prevent the direct use of Load, so that we could wordk around a false positive
+                    try {
+                        typeof(Assembly).GetMethod("Load", new[] { typeof(string) }).Invoke(null, new object[] { dll });
+                    }
+                    catch(TargetInvocationException ex)
+                    {
+                        if (!(ex.InnerException is BadImageFormatException) && !(ex.InnerException is FileLoadException))
+                        {
+                            throw ex.InnerException ?? ex;
+                        }
+                    }
+                    //Assembly loadedAssembly = Assembly.LoadFile(dll);
+
+
             }
         }
     }


Deployment of DevKitSample v5.25.0.32703 to PROD:MAIN by GitHub Deployment Plugin

--- DeveloperKitSample/Properties/AssemblyInfo.cs
+++ DeveloperKitSample/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@
 //
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
-// [assembly: AssemblyVersion("5.23.0.0")]
-[assembly: AssemblyVersion("5.23.0.0")]
-[assembly: AssemblyFileVersion("5.23.0.30811")]
+// [assembly: AssemblyVersion("5.25.0.0")]
+[assembly: AssemblyVersion("5.25.0.0")]
+[assembly: AssemblyFileVersion("5.25.0.32703")]


Fix a mistake in a previous commit

Fix a mistake in a previous commit


test comparison fix

test comparison fix

--- EFCore.BulkExtensions.Tests/EFCoreBulkTest.cs
+++ EFCore.BulkExtensions.Tests/EFCoreBulkTest.cs
@@ -14,7 +14,7 @@
         [Theory]
         //[InlineData(true)]
         [InlineData(true, true)]
-        //[InlineData(false)] // for speed comparison with Regular EF CUD operations
+        //[InlineData(false, true)] // for speed comparison with Regular EF CUD operations
         public void OperationsTest(bool isBulkOperation, bool insertTo2Tables = false)
         {
             // Test can be run individually by commenting others and running each separately in order one after another
@@ -39,7 +39,7 @@
                 {
                     entities.Add(new Item
                     {
-                        ItemId = i,
+                        ItemId = isBulkOperation ? i : 0,
                         Name = "name " + i,
                         Description = "info " + Guid.NewGuid().ToString().Substring(0, 3),
                         Quantity = i % 10,
@@ -47,36 +47,44 @@
                         TimeUpdated = DateTime.Now
                     });
                 }
-                if (isBulkOperation)
-                {
-                    if (insertTo2Tables)
+                if (insertTo2Tables)
+                {
+                    foreach (var entity in entities)
+                    {
+                        subEntities.Add(new ItemHistory
+                        {
+                            ItemHistoryId = SeqGuid.Create(),
+                            ItemId = entity.ItemId,
+                            Remark = "some more info"
+                        });
+                    }
+                }
+
+                if (isBulkOperation)
+                {
+                    if (!insertTo2Tables)
+                    {
+                        context.BulkInsert(entities);
+                    }
+                    else
                     {
                         using (var transaction = context.Database.BeginTransaction())
                         {
                             context.BulkInsert(entities, new BulkConfig { PreserveInsertOrder = true, SetOutputIdentity = true, BatchSize = 4000 }, (a) => WriteProgress(a));
-
-                            foreach (var entity in entities)
-                            {
-                                subEntities.Add(new ItemHistory
-                                {
-                                    ItemHistoryId = SeqGuid.Create(),
-                                    ItemId = entity.ItemId,
-                                    Remark = "some more info"
-                                });
-                            }
                             context.BulkInsert(subEntities);
-
                             transaction.Commit();
                         }
                     }
-                    else
-                    {
-                        context.BulkInsert(entities);
-                    }
                 }
                 else
                 {
                     context.Items.AddRange(entities);
+
+                    if (insertTo2Tables)
+                    {
+                        context.ItemHistories.AddRange(subEntities);
+                    }
+
                     context.SaveChanges();
                 }
             }
@@ -101,7 +109,7 @@
                 {
                     entities.Add(new Item
                     {
-                        ItemId = i,
+                        ItemId = isBulkOperation ? i : 0,
                         Name = "name InsertOrUpdate " + i,
                         Description = "info",
                         Quantity = i,
@@ -115,7 +123,7 @@
                 }
                 else
                 {
-                    context.Items.AddRange(entities);
+                    context.Items.Add(entities[entities.Count - 1]);
                     context.SaveChanges();
                 }
             }


simpify logic

simpify logic

--- EFSqlTranslator.Translation/LinqTranslator.cs
+++ EFSqlTranslator.Translation/LinqTranslator.cs
@@ -364,14 +364,6 @@
                     fromColumn.Name = alias;
                     fromColumn.Alias = string.Empty;

-                    // if the query refered by fromRef is not the same as the query referred by refCol
-                    // we need to add the join key on the select that referred by fromRef
-                    if (!ReferenceEquals(refCol.Ref, fromRef))
-                    {
-                        var keyColumn = _dbFactory.BuildColumn(refCol.Ref, fromKey.Name, fromKey.ValType, alias);
-                        fromSelect.Selection.Add(keyColumn);
-                    }
-
                     // try to recursively add the join key to all connected sub select.
                     refCol.RefTo?.AddToReferedSelect(_dbFactory, fromKey.Name, fromKey.ValType, alias);
                 }


たぶんEqualsのサンプルを書いてる途中

たぶんEqualsのサンプルを書いてる途中

--- EffectiveCSharp4/EffectiveCSharp4/Chapter1.cs
+++ EffectiveCSharp4/EffectiveCSharp4/Chapter1.cs
@@ -177,5 +177,11 @@

 namespace EffectiveCSharp4.Chapter1.Topic6
 {
-
+	public class B
+	{
+		public override bool Equals(object obj)
+		{
+			return base.Equals(obj);
+		}
+	}
 }


-added more spell effects

-added more spell effects

--- SpellParser.cs
+++ SpellParser.cs
@@ -26,6 +26,9 @@
         WIS = 8,
         INT = 9,
         CHA = 10,
+        Lycanthropy = 44,
+        Rune = 55,
+        Damage_Shield = 59,
         HP = 69
     }

@@ -103,9 +106,23 @@
         Frenzy = 74
     }

+    public enum SpellResist
+    {
+        Unresistable = 0, // only for detrimental spells
+        Magic = 1,
+        Fire = 2,
+        Cold = 3,
+        Poison = 4,
+        Disease = 5,
+        Lowest = 6, // Chromatic/lowest
+        Average = 7, // Prismatic/average
+        Physical = 8,
+        Corruption = 9
+    }
+
     public enum SpellIllusion
     {
-        Humanoid = 1,
+        Human = 1,
         Barbarian = 2,
         Erudite = 3,
         Wood_Elf = 4,
@@ -117,8 +134,14 @@
         Ogre = 10,
         Halfling = 11,
         Gnome = 12,
+        Aviak = 13,
         Werewolf = 14,
-        Froglock = 27,
+        Brownie = 15,
+        Centaur = 16,
+        Golem = 17,
+        Froglok = 26,
+        Froglok_Ghoul = 27,
+        Gargoyle = 29,
         Wolf = 42,
         Bear = 43,
         Imp = 46,
@@ -135,6 +158,8 @@
         public string[] Slots;
         public int[] Levels;
         public string Skill;
+        public string ResistType;
+        public int ResistValue;

         public string DebugEffectList;
@@ -184,7 +209,9 @@
             Spell spell = new Spell();
             spell.ID = Convert.ToInt32(fields[0]);
             spell.Name = fields[1];
-            spell.Skill = ((SpellSkill)ParseInt(fields[100])).ToString().Replace("_", " ").Trim();
+            spell.Skill = TrimEnum((SpellSkill)ParseInt(fields[100]));
+            spell.ResistType = TrimEnum((SpellResist)ParseInt(fields[85]));
+            spell.ResistValue = ParseInt(fields[147]);

             int dur = ParseInt(fields[17]);
             int durcalc = ParseInt(fields[16]);
@@ -223,12 +250,23 @@
             return (int)Single.Parse(s);
         }

+        static string TrimEnum(object o)
+        {
+            return o.ToString().Replace("_", " ").Trim();
+        }
+
         /// <summary>
         /// Parses a spell effect slot. Each slot has a series of attributes associated with it.
+        /// EQEmu has already parsed almost all of these
+        /// http://code.google.com/p/projecteqemu/source/browse/trunk/EQEmuServer/zone/spdat.h
         /// </summary>
         /// <returns>A description of the slot effect</returns>
         static string ParseSlot(Spell spell, int type, int value, int value2, int max, int calc)
         {
+            // type 10 is sometimes used in empty slots
+            if (type == 10 && (value == 0 || value > 255))
+                return null;
+
             int level = MaxLevel;
             int minlevel = 255;
             string repeating = !String.IsNullOrEmpty(spell.Duration) ? " per tick" : null;
@@ -238,10 +276,8 @@
                     minlevel = spell.Levels[i];
             if (minlevel > MaxLevel)
                 minlevel = 0;
-            //if (minlevel == 0)
-            //    minlevel = 1;
-
-            // negate level for calculations
+
+            // negate calculations if spell effect is negative
             if (value < 0)
                 level = -level;

@@ -325,6 +361,9 @@
             }

+            // TODO: Protection of the Paw Rk. III - i don't think the block value2 calc is correct
+            // TODO: Reprehend - some of the damage is based on target type
+            // TODO: Lycanthropy spells - what is the base value for

             switch (type)
             {
@@ -350,10 +389,7 @@
                 case 9:
                     return FormatCount("WIS", value);
                 case 10:
-                    // 10 is also used as a magic value for unused slots
-                    if (value > 0)
-                        return FormatCount("CHA", value);
-                    return null;
+                    return FormatCount("CHA", value);
                 case 11:
                     // haste is given as a factor of 100. so 85 = 15% slow, 130 = 30% haste
                     if (value < 100)
@@ -362,7 +398,7 @@
                         value = value - 100;
                     return FormatPercent("Melee Haste", value);
                 case 12:
-                    return "Invisibility (Unstable)";
+                    return "Invisible (Unstable)";
                 case 13:
                     if (value > 1)
                         return "See Invisible (Enhanced)";
@@ -390,22 +426,28 @@
                 case 26:
                     return "Gate";
                 case 27:
-                    return String.Format("Cancel Magic ({0})", value);
-
-
+                    return String.Format("Dispell ({0})", value);
+                case 28:
+                    return "Invisible to Undead (Unstable)";
+                case 29:
+                    return "Invisible to Animals (Unstable)";
                 case 30:
                     return String.Format("Decrease Aggro Radius up to level {0}", max);
                 case 31:
                     return String.Format("Mesmerize up to level {0}", max);
                 case 32:
-                    // item references are made with angle brackets
-                    return String.Format("Summon Item: <{0}>", value);
-
+                    return String.Format("Summon: [Item {0}]", value);
                 case 35:
                     return FormatCount("Disease Counter", value);
                 case 36:
                     return FormatCount("Poison Counter", value);
-
+                case 40:
+                    return "Invulnerability";
+                case 42:
+                    return "Shadowstep";
+                case 44:
+                    return "Lycanthropy";
+                    //return String.Format("Lycanthropy Effect: [{0}]", value);
                 case 46:
                     return FormatCount("Fire Resist", value);
                 case 47:
@@ -416,15 +458,16 @@
                     return FormatCount("Disease Resist", value);
                 case 50:
                     return FormatCount("Magic Resist", value);
-
                 case 55:
-                    return FormatCount("Rune", value);
-
+                    return FormatCount("Mitigate Damage", value);
                 case 58:
-                    return String.Format("Illusion: {0}", ((SpellIllusion)value).ToString().Replace("_", " ").Trim());
-
-
-
+                    return String.Format("Illusion: {0}", TrimEnum((SpellIllusion)value));
+                case 59:
+                    return FormatCount("Damage Shield", value);
+                case 61:
+                    return "Identify Item";
+                case 63:
+                    return String.Format("Memory Blur ({0})", value);
                 case 64:
                     return "SpinStun";
                 case 65:
@@ -436,48 +479,141 @@
                 case 69:
                     // max hp
                     return FormatCount("HP", value);
+                case 74:
+                    return "Feign Death";
                 case 79:
                     // delta hp for heal/nuke, non repeating
                     return FormatCount("Current HP", value);
-
+                case 81:
+                    return String.Format("Resurrection: {0}%", value);
+                case 82:
+                    return "Call of Hero";
+                case 85:
+                    return String.Format("Add Proc: [{0}] RateMod: {1}%", value, value2);
                 case 86:
                     return String.Format("Decrease Assist Radius up to level {0}", max);
-
+                case 87:
+                    return FormatPercent("Magnification", value);
+                case 89:
+                    return FormatPercent("Player Size", value - 100);
                 case 91:
                     return String.Format("Summon Corpse up to level {0}", value);
+                case 92:
+                    return FormatCount("Hate", value);
                 case 96:
                     return "Silence";
-
-
-                case 109:
-                    // item references are made with angle brackets
-                    return String.Format("Summon Item: <{0}>", value);
-
+                case 98:
+                    // yet another super turbo haste. only on 3 bard songs
+                    return FormatPercent("Melee Haste v2", value - 100);
+                case 100:
+                    // heal over time
+                   return FormatCount("Current HP", value) + repeating;
+                case 109:
+                    return String.Format("Summon: [Item {0}]", value);
+                case 114:
+                    return FormatPercent("Aggro Multiplier", value);
+                case 115:
+                    return "Feed Hunger";
+                case 116:
+                    return FormatCount("Curse Counter", value);
+                case 119:
+                    return FormatPercent("Melee Haste v3", value);
+                case 121:
+                    return FormatCount("Reverse Damage Shield", value);
+                case 123:
+                    return "Screech";
                 case 148:
                     return String.Format("Block new spell if slot {0} is '{1}' and < {2}", calc % 100, (SpellEffect)value, max);
                 case 149:
                     return String.Format("Overwrite existing spell if slot {0} is '{1}' and < {2}", calc % 100, (SpellEffect)value, max);
-
+                case 153:
+                    return String.Format("Balance Group HP ({0}% penalty)", value);
+                case 154:
+                    return String.Format("Remove Detrimental ({0})", value);
+                case 161:
+                    return String.Format("Mitigate Spell Damage by {0}% for {1}", value, max);
+                case 162:
+                    return String.Format("Mitigate Melee Damage by {0}% for {1}", value, max);
+                case 169:
+                    return FormatPercent("Chance to Critical Hit with " + TrimEnum((SpellSkill)value2), value);
+                case 172:
+                    return FormatPercent("Chance to Avoid Melee", value);
+                case 173:
+                    return FormatPercent("Chance to Riposte", value);
+                case 174:
+                    return FormatPercent("Chance to Dodge", value);
+                case 175:
+                    return FormatPercent("Chance to Parry", value);
+                case 176:
+                    return FormatPercent("Chance to Dual Wield", value);
+                case 177:
+                    return FormatPercent("Chance to Double Attack", value);
+                case 182:
+                    return FormatPercent("Weapon Delay", value);
+                case 183:
+                    return FormatPercent("Skill Check for " + TrimEnum((SpellSkill)value2), value);
+                case 184:
+                    return FormatPercent("Chance to Hit with " + TrimEnum((SpellSkill)value2), value);
                 case 185:
-                    return FormatPercent(((SpellSkill)value2).ToString().Replace("_", " ").Trim() + " Damage Modifier", value);
-
+                    return FormatPercent("Damage Modifier for " + TrimEnum((SpellSkill)value2), value);
+                case 186:
+                    return FormatPercent("Min Damage Modifier for " + TrimEnum((SpellSkill)value2), value);
+                case 188:
+                    return FormatPercent("Chance to Block", value);
+                case 189:
+                    return FormatCount("Current Endurance", value);
                 case 193:
                     return String.Format("{0} Attack for {1}", spell.Skill, value);
-
+                case 200:
+                    return FormatPercent("Proc Rate", value);
+                case 206:
+                    return "AE Taunt";
+                case 209:
+                    return String.Format("Dispell Beneficial ({0})", value);
+                case 216:
+                    return FormatPercent("Accuracy", value);

                 case 254:
                     // 254 is used for unused slots
                     return null;

                 case 262:
-                    return FormatCount((SpellSkillCap)value2 + " Cap", value);
+                    return FormatCount((SpellSkillCap)value2 + " Cap", value);
+                case 273:
+                    return FormatPercent("Chance to Critical DoT", value);
+                case 274:
+                    return FormatPercent("Chance to Critical Heal", value);
+                case 289:
+                    // how is this different than 373?
+                    return String.Format("Cast on Fade: [{0}]", value);
+                case 294:
+                    return FormatPercent("Chance to Critical Nuke", value);
+

                 case 314:
-                    return "Invisibility (Permanent)";
-
-                case 374:
-                    // spell references are made with square brackets
-                    return String.Format("Added Effect: [{0}]", value2);
+                    return "Invisible (Permanent)";
+                case 315:
+                    return "Invisible to Undead (Permanent)";
+                case 323:
+                    return String.Format("Add Defensive Proc: [{0}] RateMod: {1}%", value, value2);
+                case 340:
+                    return String.Format("Cast: [{0}] Chance: {1}%", value2, value);
+                case 351:
+                    return String.Format("Aura Effect: [{0}]", spell.ID + value);
+                case 360:
+                    return String.Format("Cast on Killshot: [{0}] Chance: {1}%", value2, value);
+                case 369:
+                    return FormatCount("Corruption Counter", value);
+                case 370:
+                    return FormatCount("Corruption Resist", value);
+                case 373:
+                    return String.Format("Cast on Fade: [{0}]", value);
+                case 374:
+                    return String.Format("Cast: [{0}]", value2);
+
+                case 385:
+                    return String.Format("Limit: [Group {0}]", value);
+
             }

             return String.Format("Unknown Effect: {0} Val={1} Val2={2} Max={3} Calc={4}", type, value, value2, max, calc);


범위의 최소값이 음수이고 최대값이 양수인 그래프의 눈금의 위치를 테스트

범위의 최소값이 음수이고 최대값이 양수인 그래프의 눈금의 위치를 테스트

--- TransformationTest/TransformationTest.cs
+++ TransformationTest/TransformationTest.cs
@@ -244,7 +244,7 @@
             float Min = 0;
             float Max = 0;
             float Data = 0;
-            int expectedResult = 0;
+            double expectedResult = 0;
             double actualResult = 0;

             Min = -100;
@@ -274,6 +274,34 @@
             expectedResult = 429;
             actualResult = logTrans.ValueToLogGraph(true, Data, Min, Max);
             Assert.AreEqual(expectedResult, actualResult);
+
+            Min = -1000;
+            Max = 2990;
+            Data = 1000;
+            expectedResult = 385.375;
+            actualResult = logTrans.ValueToLogGraph(true, Data, Min, Max);
+            Assert.AreEqual(expectedResult, actualResult);
+
+            Min = -1000;
+            Max = 2990;
+            Data = -1000;
+            expectedResult = 80;
+            actualResult = logTrans.ValueToLogGraph(true, Data, Min, Max);
+            Assert.AreEqual(expectedResult, actualResult);
+
+            Min = -1000;
+            Max = 2990;
+            Data = 10000;
+            expectedResult = 429;
+            actualResult = logTrans.ValueToLogGraph(true, Data, Min, Max);
+            Assert.AreEqual(expectedResult, actualResult);
+
+            Min = -1000;
+            Max = 2990;
+            Data = 1;
+            expectedResult = 254.5;
+            actualResult = logTrans.ValueToLogGraph(true, Data, Min, Max);
+            Assert.AreEqual(expectedResult, actualResult);
         }

         [TestMethod]


Update assembly info

Update assembly info

--- FactorioSupervisor/Properties/AssemblyInfo.cs
+++ FactorioSupervisor/Properties/AssemblyInfo.cs
@@ -11,8 +11,8 @@
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("FactorioSupervisor")]
-[assembly: AssemblyCopyright("Copyright ©  2017")]
+[assembly: AssemblyProduct("Factorio Supervisor")]
+[assembly: AssemblyCopyright("MIT")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -51,5 +51,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.0.1.0")]
+[assembly: AssemblyFileVersion("0.0.1.0")]


Enable normal tests again.

Enable normal tests again.

--- Users/Matthijs/DebugCompiler/MyEngine.cs
+++ Users/Matthijs/DebugCompiler/MyEngine.cs
@@ -12,7 +12,6 @@
         [TestCaseSource(typeof(MySource), nameof(MySource.ProvideData))]
         public void Test(Type kernelToRun)
         {
-            Assert.Fail();
             Environment.CurrentDirectory = Path.GetDirectoryName(typeof(RunKernels).Assembly.Location);

             var xEngine = new Engine();


Remove spam debug line

Remove spam debug line

--- LegendaryClient/Windows/ChampSelectPage.xaml.cs
+++ LegendaryClient/Windows/ChampSelectPage.xaml.cs
@@ -877,7 +877,6 @@
                 //Full opacity when not picking or banning
                 control.Opacity = 1;
             }
-            Client.Log(player.SummonerName + " - " + player.PickTurn + " - " + LatestDto.PickTurn);
             //If trading with this player is possible
             if (CanTradeWith != null && (CanTradeWith.PotentialTraders.Contains(player.SummonerInternalName) || DevMode))
             {


Fixed a Unity 5 compatability issue.

Fixed a Unity 5 compatability issue.

--- Splash/ParticleController.cs
+++ Splash/ParticleController.cs
@@ -28,7 +28,7 @@

         void Awake()
         {
-            particles = gameObject.particleSystem;
+            particles = gameObject.GetComponent<ParticleSystem>();
             affectors = new List<ParticleAffector>();
         }