Update demo

Update demo

--- ManagedNativeWifi.Demo/Program.cs
+++ ManagedNativeWifi.Demo/Program.cs
@@ -16,7 +16,7 @@

 			ShowInformation();

-			PerformUsage().Wait();
+			//PerformUsage().Wait();

 			//ShowRadioInformation();

@@ -26,63 +26,77 @@

 		private static void ShowInformation()
 		{
-			Trace.WriteLine("[Usable Interfaces]");
+			Trace.WriteLine("===== Usable Interfaces =====");
 			foreach (var interfaceInfo in NativeWifi.EnumerateInterfaces())
 			{
 				Trace.WriteLine($"Interface: {interfaceInfo.Description} ({interfaceInfo.Id})");
 			}

-			Trace.WriteLine("[Usable Interfaces (Extended)]");
-			foreach (var interfaceInfo in NativeWifi.EnumerateInterfacesExtended())
+			Trace.WriteLine("===== Usable Interface Connections =====");
+			foreach (var interfaceInfo in NativeWifi.EnumerateInterfaceConnections())
 			{
 				Trace.WriteLine($"{{Interface: {interfaceInfo.Description} ({interfaceInfo.Id})");
 				Trace.WriteLine($" Connection: {interfaceInfo.ConnectionMode}");
-				Trace.WriteLine($" Profile: {interfaceInfo.ProfileName}");
-				Trace.WriteLine($" AutoConfig: {interfaceInfo.IsAutoConfigEnabled}}}");
+				Trace.WriteLine($" RadioOn: {interfaceInfo.IsRadioOn}");
+				Trace.WriteLine($" Connected: {interfaceInfo.IsConnected}");
+				Trace.WriteLine($" Profile: {interfaceInfo.ProfileName}}}");
 			}

-			Trace.WriteLine("[Available Network SSIDs]");
+			Trace.WriteLine("===== Available Network SSIDs =====");
 			foreach (var ssid in NativeWifi.EnumerateAvailableNetworkSsids())
 			{
 				Trace.WriteLine($"SSID: {ssid}");
 			}

-			Trace.WriteLine("[Connected Network SSIDs]");
+			Trace.WriteLine("===== Connected Network SSIDs =====");
 			foreach (var ssid in NativeWifi.EnumerateConnectedNetworkSsids())
 			{
 				Trace.WriteLine($"SSID: {ssid}");
 			}

-			Trace.WriteLine("[Available Networks]");
+			Trace.WriteLine("===== Available Networks =====");
 			foreach (var network in NativeWifi.EnumerateAvailableNetworks())
 			{
 				Trace.WriteLine($"{{Interface: {network.Interface.Description} ({network.Interface.Id})");
 				Trace.WriteLine($" SSID: {network.Ssid}");
 				Trace.WriteLine($" BSS: {network.BssType}");
-				Trace.WriteLine($" Signal: {network.SignalQuality}");
+				Trace.WriteLine($" SignalQuality: {network.SignalQuality}");
 				Trace.WriteLine($" Security: {network.IsSecurityEnabled}}}");
 			}

-			Trace.WriteLine("[BSS Networks]");
+			Trace.WriteLine("===== Available Network Groups =====");
+			foreach (var network in NativeWifi.EnumerateAvailableNetworkGroups())
+			{
+				Trace.WriteLine($"{{Interface: {network.Interface.Description} ({network.Interface.Id})");
+				Trace.WriteLine($" SSID: {network.Ssid}");
+				Trace.WriteLine($" BssNetworks: {network.BssNetworks.Count}");
+				Trace.WriteLine($" SignalQuality: {network.SignalQuality}");
+				Trace.WriteLine($" LinkQuality: {network.LinkQuality}");
+				Trace.WriteLine($" Band: {network.Band} GHz");
+				Trace.WriteLine($" Channel: {network.Channel}}}");
+			}
+
+			Trace.WriteLine("===== BSS Networks =====");
 			foreach (var network in NativeWifi.EnumerateBssNetworks())
 			{
 				Trace.WriteLine($"{{Interface: {network.Interface.Description} ({network.Interface.Id})");
 				Trace.WriteLine($" SSID: {network.Ssid}");
 				Trace.WriteLine($" BSS: {network.BssType}");
 				Trace.WriteLine($" BSSID: {network.Bssid}");
-				Trace.WriteLine($" Signal: {network.SignalStrength}");
-				Trace.WriteLine($" Link: {network.LinkQuality}");
-				Trace.WriteLine($" Frequency: {network.Frequency}");
+				Trace.WriteLine($" SignalStrength: {network.SignalStrength}");
+				Trace.WriteLine($" LinkQuality: {network.LinkQuality}");
+				Trace.WriteLine($" Frequency: {network.Frequency} KHz");
+				Trace.WriteLine($" Band: {network.Band} GHz");
 				Trace.WriteLine($" Channel: {network.Channel}}}");
 			}

-			Trace.WriteLine("[Network Profile Names]");
+			Trace.WriteLine("===== Network Profile Names =====");
 			foreach (var name in NativeWifi.EnumerateProfileNames())
 			{
 				Trace.WriteLine($"Name: {name}");
 			}

-			Trace.WriteLine("[Network Profiles]");
+			Trace.WriteLine("===== Network Profiles =====");
 			foreach (var profile in NativeWifi.EnumerateProfiles())
 			{
 				Trace.WriteLine($"{{Name: {profile.Name}");
@@ -93,10 +107,21 @@
 				Trace.WriteLine($" Encryption: {profile.Document.Encryption}");
 				Trace.WriteLine($" AutoConnect: {profile.Document.IsAutoConnectEnabled}");
 				Trace.WriteLine($" AutoSwitch: {profile.Document.IsAutoSwitchEnabled}");
-				Trace.WriteLine($" Position: {profile.Position}");
+				Trace.WriteLine($" Position: {profile.Position}}}");
+			}
+
+			Trace.WriteLine("===== Network Profile Radios =====");
+			foreach (var profile in NativeWifi.EnumerateProfileRadios())
+			{
+				Trace.WriteLine($"{{Name: {profile.Name}");
+				Trace.WriteLine($" Interface: {profile.Interface.Description} ({profile.Interface.Id})");
+				Trace.WriteLine($" SSID: {profile.Document.Ssid}");
 				Trace.WriteLine($" RadioOn: {profile.IsRadioOn}");
-				Trace.WriteLine($" Signal: {profile.SignalQuality}");
-				Trace.WriteLine($" Connected: {profile.IsConnected}}}");
+				Trace.WriteLine($" Connected: {profile.IsConnected}");
+				Trace.WriteLine($" SignalQuality: {profile.SignalQuality}");
+				Trace.WriteLine($" LinkQuality: {profile.LinkQuality}");
+				Trace.WriteLine($" Band: {profile.Band} GHz");
+				Trace.WriteLine($" Channel: {profile.Channel}}}");
 			}
 		}


Centered zooming feature and improved it slightly. Not complete yet.

--- MangaReader/Events/ZoomManager.cs
+++ MangaReader/Events/ZoomManager.cs
@@ -12,32 +12,43 @@

     internal class ZoomManager {
-        private const int NUM_OF_ZOOM_PIXELS = 10;
+        private const int NUM_OF_ZOOM_PIXELS = 50;

         private int ThisPicWidth = 0;
         private int ThisPicHeight = 0;
         private Image ThisPic;
+        private int CurrentZoomFactor;

         public ZoomManager(Image pic, int picwidth, int picheight) {
            ThisPic = pic;
            ThisPicWidth = picwidth;
            ThisPicHeight = picheight;
+           CurrentZoomFactor = 1;
         }

-        public void setZoomedImage(PictureBox reader, ref int zoomFactor, int delta) {
-            if(reader.Image != null) {
-                zoomFactor += delta / 120;
+        public void setZoomedImage(PictureBox reader, int delta) {
+            int pixelTranslationNum = NUM_OF_ZOOM_PIXELS * (CurrentZoomFactor + delta / 120);
+            int newZoomWidth = ThisPicWidth + 3 * pixelTranslationNum;
+            int newZoomHeight = ThisPicHeight + 3 * pixelTranslationNum;

-                Bitmap newMap = new Bitmap(ThisPicWidth, ThisPicHeight, PixelFormat.Format24bppRgb);
+            if(reader.Image != null &&
+                newZoomWidth >= ThisPicWidth &&
+                newZoomHeight >= ThisPicHeight) {
+
+                CurrentZoomFactor += delta / 120;
+
+                Bitmap newMap = new Bitmap(newZoomWidth,
+                                           newZoomHeight,
+                                           PixelFormat.Format24bppRgb);
                 Graphics tempGraphics = Graphics.FromImage(newMap);

-                int pixelTranslationNum = NUM_OF_ZOOM_PIXELS*zoomFactor;
                 tempGraphics.DrawImage(ThisPic,
-                                       new Rectangle(0, 0, ThisPicWidth, ThisPicHeight),
+                                       new Rectangle(0, 0, newZoomWidth,
+                                                           newZoomHeight),
                                        new Rectangle(pixelTranslationNum,
                                                      pixelTranslationNum,
-                                                     ThisPicWidth - pixelTranslationNum,
-                                                     ThisPicHeight - pixelTranslationNum),
+                                                     ThisPicWidth - 2*pixelTranslationNum,
+                                                     ThisPicHeight - 2*pixelTranslationNum),
                                                      GraphicsUnit.Pixel);
                 tempGraphics.Dispose();


-Tests

-Tests

--- Src/Newtonsoft.Json.Tests/Utilities/ConvertUtilsTests.cs
+++ Src/Newtonsoft.Json.Tests/Utilities/ConvertUtilsTests.cs
@@ -59,7 +59,7 @@

             if (expectedValue != null)
             {
-                Assert.AreEqual(expectedValue.Value, d);
+                Assert.AreEqual(expectedValue.Value, d, "Input string: " + s);

                 Assert.AreEqual(expectedValue, d2, "DoubleTryParse result is not equal to double.Parse. Input string: " + s);
             }
@@ -69,7 +69,7 @@
         public void DoubleTryParse()
         {
             AssertDoubleTryParse("0.25e+5", ParseResult.Success, 25000d);
-            //AssertDoubleTryParse("0.25e-5", ParseResult.Success, 0.0000025d);
+            AssertDoubleTryParse("0.25e-5", ParseResult.Success, 0.0000025d);

             AssertDoubleTryParse("-123", ParseResult.Success, -123);
             AssertDoubleTryParse("0", ParseResult.Success, 0);


Implement ReadAsStreamAsync for net5 cancellation support

--- osu.Framework/IO/Network/WebRequest.cs
+++ osu.Framework/IO/Network/WebRequest.cs
@@ -300,9 +300,11 @@
                                 formData.Add(byteContent, p.Key, p.Key);
                             }

-                            // ReSharper disable once MethodSupportsCancellation
-                            // Does not compile for netstandard with CS1501: No overload for method 'ReadAsStreamAsync' takes 1 arguments
+#if NET5_0
+                            postContent = await formData.ReadAsStreamAsync(linkedToken.Token);
+#else
                             postContent = await formData.ReadAsStreamAsync();
+#endif
                         }

                         requestStream = new LengthTrackingStream(postContent);


Added test for free

Added test for free

--- Tests/Kernels/Cosmos.Compiler.Tests.TypeSystem/Kernel.cs
+++ Tests/Kernels/Cosmos.Compiler.Tests.TypeSystem/Kernel.cs
@@ -7,6 +7,7 @@
 using Cosmos.Core;
 using Cosmos.Debug.Kernel;
 using Cosmos.IL2CPU;
+using Cosmos.Core.Memory;

 namespace Cosmos.Compiler.Tests.TypeSystem
 {
@@ -69,9 +70,13 @@

         private void TestGarbageCollector()
         {
+            int allocated = HeapSmall.GetAllocatedObjectCount();
             object a = new object();
-
+            int nowAllocated = HeapSmall.GetAllocatedObjectCount();
             GCImplementation.Free(a);
+            int afterFree = HeapSmall.GetAllocatedObjectCount();
+            Assert.AreEqual(allocated + 1, nowAllocated, "NewObj causes one object to be allocated");
+            Assert.AreEqual(allocated, afterFree, "Free causes one object to be freed again");
         }

         protected override void Run()


Align shared buffer slices in PreservedBufferPool to next power of 2 of SizeOf<T>

--- src/Spreads.Core/Buffers/BufferPool.cs
+++ src/Spreads.Core/Buffers/BufferPool.cs
@@ -115,6 +115,9 @@
     /// <typeparam name="T"></typeparam>
     public class PreservedBufferPool<T>
     {
+        private static int _sizeOfT = BinarySerializer.Size<T>();
+        private static int _alignment = Math.Max(IntPtr.Size, BitUtil.FindNextPositivePowerOfTwo(BinarySerializer.Size<T>()));
+
         /// <summary>
         /// Constructs a new PreservedBufferPool instance.
         /// Keep in mind that every thread using this pool will have a thread-static
@@ -125,8 +128,7 @@
         /// <param name="smallTreshhold"></param>
         public PreservedBufferPool(int sharedBufferSize = 0)
         {
-            var typeSize = BinarySerializer.Size<T>();
-            if (typeSize <= 0)
+            if (_sizeOfT <= 0)
             {
                 throw new NotSupportedException("PreservedBufferPool only supports blittable types");
             }
@@ -136,8 +138,8 @@
             }
             else
             {
-                var bytesLength = BitUtil.FindNextPositivePowerOfTwo(sharedBufferSize * typeSize);
-                sharedBufferSize = bytesLength / typeSize;
+                var bytesLength = BitUtil.FindNextPositivePowerOfTwo(sharedBufferSize * _sizeOfT);
+                sharedBufferSize = bytesLength / _sizeOfT;
             }
             _sharedBufferSize = sharedBufferSize;
             _smallTreshhold = 16;
@@ -182,7 +184,7 @@
                 }
                 var buffer = _sharedBuffer.Buffer.Slice(_sharedBufferOffset, length);

-                _sharedBufferOffset = BitUtil.Align(newOffset, IntPtr.Size);
+                _sharedBufferOffset = BitUtil.Align(newOffset, _alignment);
                 return new PreservedBuffer<T>(buffer);
             }
             var ownedMemory = BufferPool<T>.RentBuffer(length, false);


Ensure text input is activated when multiple consumers activate it

Minor change, noticed in passing.

--- osu.Framework/Input/TextInputSource.cs
+++ osu.Framework/Input/TextInputSource.cs
@@ -34,6 +34,8 @@
         {
             if (Interlocked.Increment(ref activationCounter) == 1)
                 ActivateTextInput();
+            else
+                EnsureActivated();
         }

         /// <summary>


Fix test failure due to missing DI cached `IdleTracker`

--- osu.Game/Online/Chat/ChannelManager.cs
+++ osu.Game/Online/Chat/ChannelManager.cs
@@ -68,20 +68,21 @@

         public readonly BindableBool HighPollRate = new BindableBool();

-        private IBindable<bool> isIdle;
+        private readonly IBindable<bool> isIdle = new BindableBool();

         public ChannelManager()
         {
             CurrentChannel.ValueChanged += currentChannelChanged;
         }

-        [BackgroundDependencyLoader]
+        [BackgroundDependencyLoader(permitNulls: true)]
         private void load(IdleTracker idleTracker)
         {
             HighPollRate.BindValueChanged(updatePollRate);
-
-            isIdle = idleTracker.IsIdle.GetBoundCopy();
             isIdle.BindValueChanged(updatePollRate, true);
+
+            if (idleTracker != null)
+                isIdle.BindTo(idleTracker.IsIdle);
         }

         private void updatePollRate(ValueChangedEvent<bool> valueChangedEvent)


Ensure correct disabled beatmap callback scheduling in now playing overlay

--- osu.Game/Overlays/NowPlayingOverlay.cs
+++ osu.Game/Overlays/NowPlayingOverlay.cs
@@ -214,7 +214,8 @@
         {
             base.LoadComplete();

-            beatmap.BindDisabledChanged(beatmapDisabledChanged, true);
+            beatmap.BindDisabledChanged(_ => Scheduler.AddOnce(beatmapDisabledChanged));
+            beatmapDisabledChanged();

             musicController.TrackChanged += trackChanged;
             trackChanged(beatmap.Value);
@@ -318,8 +319,10 @@
             };
         }

-        private void beatmapDisabledChanged(bool disabled)
-        {
+        private void beatmapDisabledChanged()
+        {
+            bool disabled = beatmap.Disabled;
+
             if (disabled)
                 playlist?.Hide();


Fixed options menu screen hooking. It looks like you need to hook two different instances of it.

--- AdditionalKeyBindings/AdditionalKeyBindings/Main.cs
+++ AdditionalKeyBindings/AdditionalKeyBindings/Main.cs
@@ -12,11 +12,15 @@
 			//IUserMod.Enable() - called when mod is turned on or right after game start if it is already enabled
 			//IUserMod.Disable() - called when mod is uninstalled/ turned off/ deleted

+			SetupMainMenu();
+			DebugUtil.WriteLine("AdditionalKeyBindings: initialized.");
+		}
+
+		public static void SetupMainMenu()
+		{
 			var optionsPanel = UiUtil.GetUiElementLogged<OptionsPanel>(GameUiParts.OptionsPanel);
 			if (optionsPanel != null)
 				Try.Execute(() => new KeyBindingMenuInitializer().AddKeyBindings(optionsPanel, new KeyBindingMod().ActionDescriptions));
-
-			DebugUtil.WriteLine("AdditionalKeyBindings: initialized.");
 		}

 		public string Name
@@ -44,6 +48,8 @@

 		public void OnLevelLoaded(LoadMode mode)
 		{
+			//it looks like OptionsPanel instance from main menu screen is different than one from game screen.
+			ModEntryPoint.SetupMainMenu();
 			_mod.Start();
 		}


Rename RankChartLineGraph to UserLineGraph

--- osu.Game/Overlays/Profile/UserGraph.cs
+++ osu.Game/Overlays/Profile/UserGraph.cs
@@ -21,13 +21,13 @@
     {
         protected const float FADE_DURATION = 150;

-        protected readonly RankChartLineGraph Graph;
+        protected readonly UserLineGraph Graph;
         protected KeyValuePair<TKey, TValue>[] Data;
         protected int DataIndex;

         protected UserGraph()
         {
-            Add(Graph = new RankChartLineGraph
+            Add(Graph = new UserLineGraph
             {
                 RelativeSizeAxes = Axes.Both,
                 Alpha = 0
@@ -77,7 +77,7 @@

         protected abstract object GetTooltipContent();

-        protected class RankChartLineGraph : LineGraph
+        protected class UserLineGraph : LineGraph
         {
             private readonly CircularContainer movingBall;
             private readonly Container bar;
@@ -86,7 +86,7 @@

             public Action<int> OnBallMove;

-            public RankChartLineGraph()
+            public UserLineGraph()
             {
                 Add(bar = new Container
                 {


Fix alignment and size of mute button (#5809)

Fix alignment and size of mute button

Co-authored-by: Dean Herbert <1db828bcd41de75377dce59825af73ae7fca5651@ppy.sh>

--- osu.Game/Overlays/Volume/MuteButton.cs
+++ osu.Game/Overlays/Volume/MuteButton.cs
@@ -65,16 +65,15 @@
                 {
                     Anchor = Anchor.Centre,
                     Origin = Anchor.Centre,
-                    Size = new Vector2(20),
                 }
             });

-            Current.ValueChanged += muted =>
+            Current.BindValueChanged(muted =>
             {
                 icon.Icon = muted.NewValue ? FontAwesome.Solid.VolumeMute : FontAwesome.Solid.VolumeUp;
-            };
-
-            Current.TriggerChange();
+                icon.Size = new Vector2(muted.NewValue ? 18 : 20);
+                icon.Margin = new MarginPadding { Right = muted.NewValue ? 2 : 0 };
+            }, true);
         }

         protected override bool OnHover(HoverEvent e)


Fix scores container test failures

Fix scores container test failures

--- osu.Game/Tests/Beatmaps/TestBeatmap.cs
+++ osu.Game/Tests/Beatmaps/TestBeatmap.cs
@@ -35,6 +35,7 @@
             BeatmapInfo.Length = 75000;
             BeatmapInfo.OnlineInfo = new APIBeatmap();
             BeatmapInfo.OnlineID = Interlocked.Increment(ref onlineBeatmapID);
+            BeatmapInfo.Status = BeatmapOnlineStatus.Ranked;

             Debug.Assert(BeatmapInfo.BeatmapSet != null);


Build Tools now builds WSAUWPBuildType from user settings.

--- Assets/HoloToolkit/Build/Editor/BuildDeployTools.cs
+++ Assets/HoloToolkit/Build/Editor/BuildDeployTools.cs
@@ -31,7 +31,7 @@
                 Scenes = EditorBuildSettings.scenes.Where(scene => scene.enabled).Select(scene => scene.path),
                 BuildTarget = BuildTarget.WSAPlayer,
                 WSASdk = WSASDK.UWP,
-                WSAUWPBuildType = WSAUWPBuildType.D3D,
+                WSAUWPBuildType = EditorUserBuildSettings.wsaUWPBuildType,
                 WSAUwpSdk = EditorUserBuildSettings.wsaUWPSDK,

                 // Configure a post build action that will compile the generated solution


Fix: VersionInfo from inexisting file.

Fix: VersionInfo from inexisting file.

--- VirtualObjects/CodeGenerators/ReuseCompiledAssemblies.cs
+++ VirtualObjects/CodeGenerators/ReuseCompiledAssemblies.cs
@@ -7,7 +7,8 @@
 {
     abstract class ReuseCompiledAssemblies : CodeCompiler
     {
-        protected ReuseCompiledAssemblies(Type baseType) : base(baseType)
+        protected ReuseCompiledAssemblies(Type baseType)
+            : base(baseType)
         {

         }
@@ -16,16 +17,18 @@
         {
             var assemblyPath = Path.GetTempPath() + "VirtualObjects\\" + AssemblyName + ".dll";

-            var assemblyVersion = new Version(FileVersionInfo.GetVersionInfo(assemblyPath).FileVersion);
-
-            var currentVersion = new Version(FileVersionInfo.GetVersionInfo(BaseType.Assembly.Location).FileVersion);
+            if ( !IsDynamic && File.Exists(assemblyPath) )
+            {
+                var assemblyVersion = new Version(FileVersionInfo.GetVersionInfo(assemblyPath).FileVersion);
+                var currentVersion = new Version(FileVersionInfo.GetVersionInfo(BaseType.Assembly.Location).FileVersion);

-            if (!IsDynamic && File.Exists(assemblyPath) && assemblyVersion == currentVersion)
-            {
-                return new CompilerResults(new TempFileCollection())
+                if (assemblyVersion == currentVersion)
                 {
-                    CompiledAssembly = AppDomain.CurrentDomain.Load(File.ReadAllBytes(assemblyPath))
-                };
+                    return new CompilerResults(new TempFileCollection())
+                    {
+                        CompiledAssembly = AppDomain.CurrentDomain.Load(File.ReadAllBytes(assemblyPath))
+                    };
+                }
             }

             return base.Compile(References);


stylecop errors

stylecop errors

--- BalloonsPopTeamwork/src/BalloonsPop/Console/Game.cs
+++ BalloonsPopTeamwork/src/BalloonsPop/Console/Game.cs
@@ -4,10 +4,7 @@
 // <author>DimitarSD, alexizvely, fr0wsTyl</author>

 namespace BalloonsPop.Console
-{
-    /// <summary>
-    /// The facade for the game
-    /// </summary>
+{
     using BalloonsPop.Console.ConsoleIO.Printer;
     using BalloonsPop.Console.ConsoleIO.Printer.Contracts;
     using BalloonsPop.Console.ConsoleIO.Reader;
@@ -19,19 +16,16 @@
     using BalloonsPop.Game.Logic;
     using Wintellect.PowerCollections;

-    // Facade
+    /// <summary>
+    /// The facade for the game
+    /// </summary>
     public class Game
-    {
-        /// <summary>
-        /// Initializes a new instance of the <see cref="Game" /> class.
-        /// </summary>
+    {
         private IEngine engine;
         private Playfield playfield;
         private IPopStrategy popLogic;
-
         private int balloonsLeft;
         private int userMoves;
-
         private IPrinter menuPrinter = new MenuPrinter();
         private IPrinter playfieldPrinter = new PlayfieldPrinter();
         private BalloonColor colors = new BalloonColor();
@@ -40,6 +34,9 @@
         private IReader reader = new Reader();
         private OrderedMultiDictionary<int, string> statistics = new OrderedMultiDictionary<int, string>(true);

+        /// <summary>
+        /// Initializes a new instance of the <see cref="Game" /> class.
+        /// </summary>
         public Game()
         {
         }


Trigger APFT validation

Trigger APFT validation

--- Battery-Commander.Web/Controllers/APFTController.cs
+++ Battery-Commander.Web/Controllers/APFTController.cs
@@ -57,6 +57,11 @@
         [HttpPost, ValidateAntiForgeryToken]
         public async Task<IActionResult> Save(APFT model)
         {
+            if (!ModelState.IsValid)
+            {
+                return View("Edit", model);
+            }
+
             if (await db.APFTs.AnyAsync(apft => apft.Id == model.Id) == false)
             {
                 db.APFTs.Add(model);


Only ensure old behavior and no more magic

--- WalletWasabi/Blockchain/Transactions/TransactionStore.cs
+++ WalletWasabi/Blockchain/Transactions/TransactionStore.cs
@@ -15,7 +15,6 @@
 {
 	public class TransactionStore : IAsyncDisposable
 	{
-		private volatile bool _disposed;
 		public string WorkFolderPath { get; private set; }
 		public Network Network { get; private set; }

@@ -25,7 +24,6 @@
 		private AsyncLock TransactionsFileAsyncLock { get; } = new AsyncLock();
 		private List<ITxStoreOperation> Operations { get; } = new List<ITxStoreOperation>();
 		private object OperationsLock { get; } = new object();
-		public Task? CommitToFileTask { get; private set; }

 		public async Task InitializeAsync(string workFolderPath, Network network, string operationName)
 		{
@@ -113,12 +111,12 @@

 			if (ret.isAdded)
 			{
-				CommitToFileTask = TryAppendToFileAsync(tx);
+				_ = TryAppendToFileAsync(tx);
 			}

 			if (ret.isUpdated)
 			{
-				CommitToFileTask = TryUpdateFileAsync(tx);
+				_ = TryUpdateFileAsync(tx);
 			}

 			return ret;
@@ -184,7 +182,7 @@

 			if (isRemoved)
 			{
-				CommitToFileTask = TryRemoveFromFileAsync(hash);
+				_ = TryRemoveFromFileAsync(hash);
 			}

 			return isRemoved;
@@ -307,7 +305,6 @@
 					}
 				}

-				ThrowIfDisposed();
 				using (await TransactionsFileAsyncLock.LockAsync().ConfigureAwait(false))
 				{
 					foreach (ITxStoreOperation op in operationsToExecute)
@@ -396,36 +393,8 @@

 		#endregion Serialization

-		private void ThrowIfDisposed()
-		{
-			if (_disposed)
-			{
-				throw new ObjectDisposedException(nameof(TransactionStore));
-			}
-		}
-
 		public async ValueTask DisposeAsync()
 		{
-			if (_disposed)
-			{
-				return;
-			}
-
-			// Indicate that the object is disposed.
-			_disposed = true;
-
-			try
-			{
-				if (CommitToFileTask is { } task)
-				{
-					await task.ConfigureAwait(false);
-				}
-			}
-			catch (Exception ex)
-			{
-				Logger.LogDebug(ex);
-			}
-
 			using var _ = await TransactionsFileAsyncLock.LockAsync().ConfigureAwait(false);
 		}
 	}


Deleted empty rows

Deleted empty rows

--- C#OOP-Basics/06.Exam/Minedraft/Core/DraftManager.cs
+++ C#OOP-Basics/06.Exam/Minedraft/Core/DraftManager.cs
@@ -40,27 +40,6 @@
         }
     }

-    //private Harvester GetHarvester(List<string> arguments)
-    //{
-    //    string type = arguments[0];
-    //    string id = arguments[1];
-    //    double oreOutput = double.Parse(arguments[2]);
-    //    double energyRequirment = double.Parse(arguments[3]);
-
-    //    switch (type)
-    //    {
-    //        case "Hammer":
-    //            return new HammerHarvester(id, oreOutput, energyRequirment);
-    //            break;
-    //        case "Sonic":
-    //            return new SonicHarvester(id, oreOutput, energyRequirment, int.Parse(arguments[4]));
-    //            break;
-    //        default:
-    //            throw new ArgumentException("Harvester failed to be created.");
-    //            break;
-    //    }
-    //}
-
     public string RegisterProvider(List<string> arguments)
     {
         string type = arguments[0];
@@ -82,26 +61,6 @@
             return e.Message;
         }
     }
-
-    //private Provider GetProvider(List<string> arguments)
-    //{
-    //    var type = arguments[0];
-    //    var id = arguments[1];
-    //    var energy = double.Parse(arguments[2]);
-
-    //    switch (type)
-    //    {
-    //        case "Solar":
-    //            return new SolarProvider(id, energy);
-    //            break;
-    //        case "Pressure":
-    //            return new PressureProvider(id, energy);
-    //            break;
-    //        default:
-    //            throw new ArgumentException("Provider failed to be created.");
-    //            break;
-    //    }
-    //}

     public string Day()
     {


Made unit test for FileUtils.GetFilesRecursive() tolerate different ordering

--- src/UnitTests/Storage/FileUtilsTest.cs
+++ src/UnitTests/Storage/FileUtilsTest.cs
@@ -250,7 +250,7 @@
         Directory.CreateDirectory(sub);
         FileUtils.Touch(file2);

-        FileUtils.GetFilesRecursive(tempDir).Should().Equal(file1, file2);
+        FileUtils.GetFilesRecursive(tempDir).Should().BeEquivalentTo(file1, file2);
     }

     [Fact]


Copy List<CoinInformation> to prevent compounding profitability adjustments

--- MultiMiner.Engine/MiningEngine.cs
+++ MultiMiner.Engine/MiningEngine.cs
@@ -7,6 +7,7 @@
 using System.Linq;
 using System.Net.Sockets;
 using System.Threading;
+using System.Reflection;

 namespace MultiMiner.Engine
 {
@@ -93,13 +94,18 @@
         //update engineConfiguration.DeviceConfiguration based on mining strategy & coin info
         public void ApplyMiningStrategy(List<Device> devices, List<CoinInformation> coinInformation)
         {
+            //make a copy as we'll be modifying individual coin properties (profitability)
+            //if no copy is made this could lead to a compounding effect
+            List<CoinInformation> coinInformationCopy = CopyCoinInformation(coinInformation);
+
             if (engineConfiguration.StrategyConfiguration.MineProfitableCoins)
             {
                 //get a list of the coins that are configured
                 IEnumerable<string> configuredSymbols = engineConfiguration.CoinConfigurations.Select(c => c.Coin.Symbol);

                 //filter the coin info by that list
-                IEnumerable<CoinInformation> configuredProfitableCoins = coinInformation.Where(c => configuredSymbols.Contains(c.Symbol));
+                //use the copy here
+                IEnumerable<CoinInformation> configuredProfitableCoins = coinInformationCopy.Where(c => configuredSymbols.Contains(c.Symbol));

                 if (configuredProfitableCoins.Count() > 0)
                 {
@@ -123,6 +129,30 @@
                     if (configDifferent)
                         RestartMining();
                 }
+            }
+        }
+
+        private List<CoinInformation> CopyCoinInformation(List<CoinInformation> coinInformation)
+        {
+            List<CoinInformation> coinInformationCopy = new List<CoinInformation>();
+            foreach (CoinInformation realCoin in coinInformation)
+            {
+                CoinInformation coinCopy = new CoinInformation();
+                CopyPoco(realCoin, coinCopy);
+                coinInformationCopy.Add(coinCopy);
+            }
+            return coinInformationCopy;
+        }
+
+        private static void CopyPoco(object source, object destination)
+        {
+            Type destionationType = destination.GetType();
+            foreach (PropertyInfo sourceProperty in source.GetType().GetProperties())
+            {
+                MethodInfo sourcePropertyGetter = sourceProperty.GetGetMethod();
+                MethodInfo sourcePropertySetter = destionationType.GetProperty(sourceProperty.Name).GetSetMethod();
+                object valueToSet = sourcePropertyGetter.Invoke(source, null);
+                sourcePropertySetter.Invoke(destination, new[] { valueToSet });
             }
         }


Switch (back) to using a custom domain for MobileMiner API calls

--- MultiMiner.Win/Forms/MinerForm.cs
+++ MultiMiner.Win/Forms/MinerForm.cs
@@ -4050,14 +4050,12 @@
             if (!applicationConfiguration.MobileMinerUsesHttps)
                 prefix = "http://";

-            //deprecate api.mobileminerapp.com starting 11/28
-            //more expensive for no functional benefit
-            //string result = prefix + "api.mobileminerapp.com";
-
-            //if (!OSVersionPlatform.IsWindowsVistaOrHigher())
-            //    //SNI SSL not supported on XP
-
-            string result = prefix + "mobileminer.azurewebsites.net/api";
+            //custom domain makes it easier to migrate hosts if needed
+            string result = prefix + "api.mobileminerapp.com";
+
+            if (!OSVersionPlatform.IsWindowsVistaOrHigher())
+                //SNI SSL not supported on XP
+                result = prefix + "mobileminer.azurewebsites.net/api";

             return result;
         }


Publisher modes

Publisher modes

--- CodeSight.Server/CodeSight.Data.Models/Publisher.cs
+++ CodeSight.Server/CodeSight.Data.Models/Publisher.cs
@@ -6,6 +6,11 @@
 {
     public class Publisher
     {
-
+        public void Publish()
+        {
+            //switcher for picking
+            // - Publish to File or Azure or Database
+        }
+
     }
 }


Update Viktor.cs

Update Viktor.cs

--- AdEvade/AdEvade/Data/Spells/SpecialSpells/Viktor.cs
+++ AdEvade/AdEvade/Data/Spells/SpecialSpells/Viktor.cs
@@ -32,7 +32,7 @@
                 args.SData.Name != null && args.SData.Name == "ViktorDeathRay")

             {
-                  var endpoint = sender.GetWaypoints().Last();
+                  var endpoint = sender.Path.Last();
             //    var missileDist = End.To2D().Distance(args.Start.To2D());
               //  var delay = missileDist / 1.5f + 600;


Add a slight delay between each Network Device submission to MobileMiner

--- MultiMiner.Win/Forms/MinerForm.cs
+++ MultiMiner.Win/Forms/MinerForm.cs
@@ -2888,7 +2888,7 @@
                 //check for commands first so we can report mining activity after
                 CheckForMobileMinerCommands();
                 SubmitMobileMinerStatistics();
-                SubmitMobileMinerNetworkStatistics();
+                SubmitMobileMinerNetworkStatisticsAsync();
             }
         }

@@ -4167,11 +4167,33 @@
                 submitMiningStatisticsDelegate.BeginInvoke(statisticsList, Environment.MachineName, submitMiningStatisticsDelegate.EndInvoke, null);
             }
         }
-
+
         private void SubmitMobileMinerNetworkStatistics()
         {
             foreach (Data.Configuration.NetworkDevices.NetworkDevice networkDevice in networkDevicesConfiguration.Devices)
+            {
                 SubmitMobileMinerNetworkDeviceStatistics(networkDevice);
+                //this method is run async so we can add a slight delay so as not to spam MobileMiner
+                Thread.Sleep(500);
+            }
+        }
+
+        private void SubmitMobileMinerNetworkStatisticsAsync()
+        {
+            Action asyncAction = SubmitMobileMinerNetworkStatistics;
+            asyncAction.BeginInvoke(
+                ar =>
+                {
+                    asyncAction.EndInvoke(ar);
+
+                    ////code that doesn't update UI
+                    //
+                    //BeginInvoke((Action)(() =>
+                    //{
+                    //    //code to update UI
+                    //}));
+
+                }, null);
         }

         private void SubmitMobileMinerNetworkDeviceStatistics(NetworkDevices.NetworkDevice networkDevice)


Removes unused code

Removes unused code

--- Amplified.ValueObjects/ValueObjectTypeConverters.cs
+++ Amplified.ValueObjects/ValueObjectTypeConverters.cs
@@ -5,12 +5,6 @@

 namespace Amplified.ValueObjects
 {
-    public abstract class ValueObjectFactory<TValueObject, TValue>
-        where TValueObject : IValueObject<TValue>
-    {
-        public abstract TValueObject Create();
-    }
-
     public static class ValueObjectTypeConverters
     {
         /// <summary>


Fixed some logic in calculator

Fixed some logic in calculator

--- Core.ApplicationServices/ReimbursementCalculator.cs
+++ Core.ApplicationServices/ReimbursementCalculator.cs
@@ -56,15 +56,35 @@
             var homeWorkDistance = 0.0;

             var person = _personRepo.AsQueryable().First(x => x.Id == report.PersonId);
-
+
+            var homeAddress = GetHomeAddress(report);
+            var workAddress = GetWorkAddress(report);
+
+            //Check if drivereport starts at users home address.
+            if (homeAddress.StreetName == report.DriveReportPoints.First().StreetName
+                && homeAddress.StreetNumber == report.DriveReportPoints.First().StreetNumber
+                && homeAddress.ZipCode == report.DriveReportPoints.First().ZipCode
+                && homeAddress.Town == report.DriveReportPoints.First().Town)
+            {
+                report.StartsAtHome = true;
+            }
+
+            //Check if drivereport ends at users home address.
+            if (homeAddress.StreetName == report.DriveReportPoints.Last().StreetName
+                && homeAddress.StreetNumber == report.DriveReportPoints.Last().StreetNumber
+                && homeAddress.ZipCode == report.DriveReportPoints.Last().ZipCode
+                && homeAddress.Town == report.DriveReportPoints.Last().Town)
+            {
+                report.EndsAtHome = true;
+            }
+
+            //Check if user has overriden the distance between the users home and work address
             if (person.WorkDistanceOverride > 0)
             {
                 homeWorkDistance = person.WorkDistanceOverride;
             }
             else
-            {
-                var homeAddress = GetHomeAddress(report);
-                var workAddress = GetWorkAddress(report);
+            {
                 homeWorkDistance = _route.GetRoute(new List<Address>() { homeAddress, workAddress }).Length;
             }


Add TagHelperContent methods

Add TagHelperContent methods

--- AspNetCorePlayground/TagHelpers/MyFirstTagHelper.cs
+++ AspNetCorePlayground/TagHelpers/MyFirstTagHelper.cs
@@ -11,7 +11,15 @@
             var childContent = await output.GetChildContentAsync();
             var innerHtml = childContent.GetContent();

-            output.Content.Append(innerHtml);
+            output.Content.SetContent("Content.SetContent, "); // [replaces existing content]
+            output.Content.Append("Content.Append, "); // [append new content]
+            output.Content.AppendFormat("Content.AppendFormat {0} {1} {2}, ", "Foo", "Bar", "Baz");
+            output.Content.AppendHtml("Content.AppendHtml.");
+
+            output.PreContent.SetHtmlContent("
PreContent.SetHtmlContent
");
+            output.PostContent.SetHtmlContent("
PostContent.SetHtmlContent
");
+            output.PreElement.SetHtmlContent("
PreElement.SetHtmlContent
");
+            output.PostElement.SetHtmlContent("
PostElement.SetHtmlContent
");
         }
     }
 }


Updating AssemblyInfo after v1.13.0 release

--- CronExpressionDescriptor/Properties/AssemblyInfo.cs
+++ CronExpressionDescriptor/Properties/AssemblyInfo.cs
@@ -6,11 +6,11 @@
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("Cron Expression Descriptor")]
-[assembly: AssemblyDescription("A library that converts cron expressions into human readable strings.  Supports 11 languages: English, Brazillian, Spanish, Norwgian, Turkish, Dutch, Chinese Simplified, Russian, French, German, Italian and Ukrainian.")]
+[assembly: AssemblyDescription("A library that converts cron expressions into human readable strings.  Supports 12 languages: English, Brazillian, Spanish, Norwgian, Turkish, Dutch, Chinese Simplified, Russian, French, German, Ukrainian and Italian.")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Brady Holt")]
 [assembly: AssemblyProduct("CronExpressionDescriptor")]
-[assembly: AssemblyCopyright("Copyright 2014")]
+[assembly: AssemblyCopyright("Copyright 2015")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]


Disable resharper suggestions for return

--- Assets/HoloToolkit/Utilities/Scripts/CameraCache.cs
+++ Assets/HoloToolkit/Utilities/Scripts/CameraCache.cs
@@ -20,6 +20,7 @@
         {
             get
             {
+                // ReSharper disable once ConvertIfStatementToReturnStatement
                 if (cachedCamera == null)
                 {
                     return Refresh(Camera.main);


add UnaryExpression type check to run-time NameOf method (in some cases, an expression's body yields a UnaryExpression instead of an Expression)

--- NameOf.Fody/PatternInstruction.cs
+++ NameOf.Fody/PatternInstruction.cs
@@ -21,9 +21,10 @@
         private static String NameOf<T>(Expression<Func<T>> expression) {
             if (expression == null)
                 throw new ArgumentNullException(NameOf(() => expression));
-            var body = expression.Body as MemberExpression;
+            var unaryExpression = expression.Body as UnaryExpression;
+            var body = (unaryExpression != null ? unaryExpression.Operand : expression.Body) as MemberExpression;
             if (body == null)
-                throw new ArgumentException(NameOf(() => expression));
+                throw new ArgumentException(String.Format("'{0}' should be a member expression", NameOf(() => expression)));
             return body.Member.Name;
         }
         private static Boolean PredicateDummy(Instruction instruction, ILProcessor ilProcessor) { return true; }


difficult 靠上一点

difficult 靠上一点

--- Assets/Scenes/SelectMusic/Scripts/MenuController.cs
+++ Assets/Scenes/SelectMusic/Scripts/MenuController.cs
@@ -98,6 +98,7 @@

 			menuitem_tmp.transform.GetChild(0).GetComponent<GUIText>().text = difflist[Beatmap ["Title"]][0];
 			menuitem_tmp.transform.GetChild(0).GetComponent<GUIText>().color = diffcolormap[difflist[Beatmap ["Title"]][0]];
+			tpos.y+= ((tpos.y) / -83.5f * 5.0f);
 			menuitem_tmp.transform.GetChild(0).GetComponent<GUIText>().pixelOffset = tpos;
 			menuitem_tmp.transform.GetChild(0).GetComponent<GUIText>().fontSize = (int)((tpos.y) / -83.5f * 15.0f);


Update PlayerDie

Update PlayerDie

--- Assets/Scripts/SMB/Player/BattleBehaviour/DieSMB.cs
+++ Assets/Scripts/SMB/Player/BattleBehaviour/DieSMB.cs
@@ -11,6 +11,8 @@
         _respawner  = animator.GetComponent<PlayerRespawner>();
       }

+      _player.BodyCollider.enabled = false;
+
       Action action = () => { _player.StateTransfer.TransitTo("Idle", animator); };
       _respawner.Respawn(action);


Log when extension updates are complete.

--- AudioWorks/src/AudioWorks.Api/ExtensionInstaller.cs
+++ AudioWorks/src/AudioWorks.Api/ExtensionInstaller.cs
@@ -195,9 +195,11 @@
                     {
                         Directory.Delete(Path.Combine(_projectRoot, obsoleteExtension), true);

-                        logger.LogDebug("Deleted unlisted extension in '{0}'.",
+                        logger.LogDebug("Deleted unlisted or obsolete extension in '{0}'.",
                             obsoleteExtension);
                     }
+
+                    logger.LogInformation("Completed automatic extension updates.");
                 }
                 catch (Exception e)
                 {


Remove warning

Remove warning

--- BTCPayServer/Controllers/AuthorizationController.cs
+++ BTCPayServer/Controllers/AuthorizationController.cs
@@ -126,7 +126,7 @@
             {
                 var application = await _applicationManager.FindByClientIdAsync(request.ClientId);
                 var authorization = await _authorizationManager.CreateAsync(User, user.Id, application.Id,
-                                    type, principal.GetScopes().ToImmutableArray());
+                                    type, principal.GetScopes());
                 principal.SetInternalAuthorizationId(authorization.Id);
             }


spawner system now spawns same amount of stuff every time

--- BurglarsVsGuards/Assets/Scripts/SpawnPickupables.cs
+++ BurglarsVsGuards/Assets/Scripts/SpawnPickupables.cs
@@ -5,20 +5,42 @@
 {

     public GameObject[] SpawnPoints;
-    public GameObject[] Pickupables;
+    public GameObject[] DifferentTypesOfPickups;
+    public int[] NumberOfEach;
+
+    private int divider;

     // Use this for initialization
     private void Start()
     {
+        if (DifferentTypesOfPickups.Length != NumberOfEach.Length)
+            Debug.Log("ERROR - DifferentTypesOfPickups and NumberOfEach has to be same size!");
+
+        divider = SpawnPoints.Length/DifferentTypesOfPickups.Length;
+
+        for (int i = 0; i < DifferentTypesOfPickups.Length; i++)
+        {
+            NumberOfEach[i] = divider;
+        }
+
         for (int i = 0; i < SpawnPoints.Length; i++)
         {
-            int random = Random.Range(0, Pickupables.Length-1);
+            int random = Random.Range(0, DifferentTypesOfPickups.Length);
+            int counter = 0;

-            string path = "Prefabs/" + Pickupables[random].name;
+            while (NumberOfEach[random] <= 0 && counter < 500)
+            {
+                random = Random.Range(0, DifferentTypesOfPickups.Length);
+                counter++;
+
+            }
+
+            string path = "Prefabs/" + DifferentTypesOfPickups[random].name;
+            NumberOfEach[random]--;

             if (Network.connections.Length > 0)
             {
-                Connector.AddEntity(Pickupables[random].name, SpawnPoints[i].transform.position, Quaternion.identity, path,
+                Connector.AddEntity(DifferentTypesOfPickups[random].name, SpawnPoints[i].transform.position, Quaternion.identity, path,
                                     "Untagged",
                                     true);
             }


Fix leaky target constraint

Fix leaky target constraint

--- CSharpFunctionalExtensions/Maybe/MaybeExtensions.cs
+++ CSharpFunctionalExtensions/Maybe/MaybeExtensions.cs
@@ -377,7 +377,7 @@
             return Maybe<T>.None;
         }

-#if NET40
+#if !NETCORE || !NET45_OR_GREATER || !NETSTANDARD
         public static Maybe<V> TryFind<K, V>(this IDictionary<K, V> dict, K key)
         {
             if (dict.ContainsKey(key))


multi-core sample with castle facility

multi-core sample with castle facility

git-svn-id: d6bffa57a36fe0f3c7d18ef52cc0c4d4ff653ca6@440 66c3f25c-543c-0410-ae2e-6f2ca0bd8c61

--- Castle.Facilities.SolrNetIntegration.Tests/Tests.cs
+++ Castle.Facilities.SolrNetIntegration.Tests/Tests.cs
@@ -18,6 +18,7 @@
 using System.Reflection;
 using Castle.Core.Configuration;
 using Castle.MicroKernel.Facilities;
+using Castle.MicroKernel.Registration;
 using Castle.MicroKernel.SubSystems.Configuration;
 using Castle.Windsor;
 using MbUnit.Framework;
@@ -124,10 +125,44 @@
             var parsers = (ISolrResponseParser<Document>[]) field.GetValue(parser);
             Assert.AreEqual(7, parsers.Length);
             foreach (var t in parsers)
-                Console.WriteLine(t);
-
+                Console.WriteLine(t);
         }

+        [Test]
+        public void MultiCore() {
+            const string core0url = "http://localhost:8983/solr/core0";
+            const string core1url = "http://localhost:8983/solr/core1";
+            var solrFacility = new SolrNetFacility(core0url);
+            var container = new WindsorContainer();
+            container.AddFacility("solr", solrFacility);
+
+            // override core1 components
+            const string core1Connection = "core1.connection";
+            container.Register(Component.For<ISolrConnection>().ImplementedBy<SolrConnection>().Named(core1Connection)
+                                   .Parameters(Parameter.ForKey("serverURL").Eq(core1url)));
+            container.Register(Component.For(typeof (ISolrBasicOperations<Core1Entity>), typeof (ISolrBasicReadOnlyOperations<Core1Entity>))
+                                   .ImplementedBy<SolrBasicServer<Core1Entity>>()
+                                   .ServiceOverrides(ServiceOverride.ForKey("connection").Eq(core1Connection)));
+            container.Register(Component.For<ISolrQueryExecuter<Core1Entity>>().ImplementedBy<SolrQueryExecuter<Core1Entity>>()
+                                   .ServiceOverrides(ServiceOverride.ForKey("connection").Eq(core1Connection)));
+
+            // assert that everything is correctly wired
+            container.Kernel.DependencyResolving += (client, model, dep) => {
+                if (model.TargetType == typeof(ISolrConnection)) {
+                    if (client.Service == typeof(ISolrBasicOperations<Core1Entity>) || client.Service == typeof(ISolrQueryExecuter<Core1Entity>))
+                        Assert.AreEqual(core1url, ((ISolrConnection) dep).ServerURL);
+                    if (client.Service == typeof(ISolrBasicOperations<Document>) || client.Service == typeof(ISolrQueryExecuter<Document>))
+                        Assert.AreEqual(core0url, ((ISolrConnection) dep).ServerURL);
+                }
+            };
+
+            container.Resolve<ISolrOperations<Core1Entity>>();
+            container.Resolve<ISolrOperations<Document>>();
+        }
+
+
         public class Document {}
+
+        public class Core1Entity {}
     }
 }


Materialize the query in NdapiMetaObject.LoadProperties In my tests the metaproperties access is now ~20x faster

--- Ndapi/Metadata/NdapiMetaObject.cs
+++ Ndapi/Metadata/NdapiMetaObject.cs
@@ -27,9 +27,10 @@

         private IEnumerable<NdapiMetaProperty> LoadProperties()
         {
-            return from property in _type.GetProperties()
-                   from info in property.GetCustomAttributes(typeof(PropertyAttribute), false).Cast<PropertyAttribute>()
-                   select NdapiMetaProperty.GetOrCreate(info.PropertyId, property.Name, property.CanRead, property.CanWrite, property.PropertyType);
+            var properties = from property in _type.GetProperties()
+                             from info in property.GetCustomAttributes(typeof(PropertyAttribute), false).Cast<PropertyAttribute>()
+                             select NdapiMetaProperty.GetOrCreate(info.PropertyId, property.Name, property.CanRead, property.CanWrite, property.PropertyType);
+            return properties.ToList();
         }

         public static NdapiMetaObject GetOrCreate(Type type)


Moved try/catch outside dequeue loop to ensure OnCompleted not called after OnError

--- Obvs.RabbitMQ/RabbitExtensions.cs
+++ Obvs.RabbitMQ/RabbitExtensions.cs
@@ -33,9 +33,9 @@

                 var task = Task.Run(() =>
                 {
-                    while (!token.IsCancellationRequested)
+                    try
                     {
-                        try
+                        while (!token.IsCancellationRequested)
                         {
                             BasicDeliverEventArgs msg;
                             if (consumer.Queue.Dequeue(millisecondsTimeout, out msg))
@@ -43,12 +43,12 @@
                                 observer.OnNext(msg);
                             }
                         }
-                        catch (Exception exception)
-                        {
-                            observer.OnError(exception);
-                        }
+                        observer.OnCompleted();
                     }
-                    observer.OnCompleted();
+                    catch (Exception exception)
+                    {
+                        observer.OnError(exception);
+                    }
                 }, token);

                 return Disposable.Create(() =>


Flow Control width value fixed (relates to #65)

--- AlternateResourcePanel/ARPPartWindow.cs
+++ AlternateResourcePanel/ARPPartWindow.cs
@@ -58,7 +58,7 @@
         internal static Single WindowOffset = 200;
         internal static Single WindowSpaceOffset = 5;
         internal static Single WindowWidthForBars = 169;
-        internal static Single WindowWidthForFlowControl = 20;
+        internal static Single WindowWidthForFlowControl = 16;

         internal static Int32 Icon2BarOffset = 36;

@@ -79,8 +79,6 @@
         /// </summary>
         private void UpdateWindowSizeAndVariables()
         {
-            WindowWidthForFlowControl = mbARP.windowDebug.intTest1;
-
             Rect NewPosition = new Rect(WindowRect);
             NewPosition.width = WindowWidthForBars + WindowWidthForFlowControl;
             NewPosition.height = ((this.ResourceList.Count + 1 + this.TransfersCount ) * mbARP.windowMain.intLineHeight) + 1;


Make internals visible to Criteo.Diagnostic.UTest

Change-Id: Ic17dbbac7a9552d37bdf1eaa7b0a5614ca5486a6

--- Criteo.Profiling.Tracing/Properties/AssemblyInfo.cs
+++ Criteo.Profiling.Tracing/Properties/AssemblyInfo.cs
@@ -34,5 +34,6 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: InternalsVisibleTo("Criteo.Diagnostic.UTest")]
 [assembly: InternalsVisibleTo("Criteo.Profiling.Tracing.UTest")]
 [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]


Refactor

Refactor

--- Dev/Editor/Effekseer/GUI/Component/ParameterList.cs
+++ Dev/Editor/Effekseer/GUI/Component/ParameterList.cs
@@ -32,8 +32,6 @@

 		Utils.DelayedList<TypeRow> controlRows = new Utils.DelayedList<TypeRow>();

-		Dictionary<object, TypeRow> objToTypeRow = new Dictionary<object, TypeRow>();
-
 		bool isControlsChanged = false;

 		bool isFirstUpdate = true;
@@ -139,67 +137,6 @@
 			controlRows.Unlock();
 		}

-		/*
-		void AppendType(Type type, int selectorIndent, PropertyInfo[] props = null, TypeRow parentRow = null)
-		{
-			if (props == null)
-			{
-				props = new PropertyInfo[0];
-			}
-
-			var ps = type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
-
-			List<TypeRow> sameLayer = new List<TypeRow>();
-
-			for (int i = 0; i < ps.Length; i++)
-			{
-				var attributes = ps[i].GetCustomAttributes(false);
-
-				var list_props = new List<PropertyInfo>(props);
-				list_props.Add(ps[i]);
-
-				var row = new TypeRow(list_props.ToArray(), sameLayer, parentRow);
-
-				if (row.Control != null)
-				{
-					// visible values
-					typeRows.Add(row);
-					sameLayer.Add(row);
-
-					if (row.Selector != null)
-					{
-						row.SelectorIndent = selectorIndent + 1;
-					}
-					else
-					{
-						row.SelectorIndent = selectorIndent;
-					}
-				}
-				else
-				{
-					// value container
-
-					// protect looping
-					if (ps[i].PropertyType == typeof(Data.NodeBase)) continue;
-					if (ps[i].PropertyType == typeof(Data.NodeBase.ChildrenCollection)) continue;
-					if (ps[i].PropertyType == typeof(Data.Value.FCurve<float>)) continue;
-					if (ps[i].PropertyType == typeof(Data.Value.FCurve<byte>)) continue;
-
-					typeRows.Add(row);
-					sameLayer.Add(row);
-
-					var selectorIndentLocal = selectorIndent;
-					if (row.Selector != null)
-					{
-						selectorIndentLocal = selectorIndentLocal + 1;
-					}
-
-					AppendType(ps[i].PropertyType, selectorIndentLocal, list_props.ToArray(), row);
-				}
-			}
-		}
-		*/
-
 		public void SetValue(object value)
 		{
 			if (value != null)
@@ -223,6 +160,13 @@
 		void RegisterValue(object value)
 		{
 			List<TypeRow> newRows = new List<TypeRow>();
+
+			Dictionary<object, TypeRow> objToTypeRow = new Dictionary<object, TypeRow>();
+
+			foreach (var row in controlRows.Internal)
+			{
+				objToTypeRow.Add(row.BindingValue, row);
+			}

 			Action<object,int> parseObject = null;

@@ -355,8 +299,6 @@

 		void ResetValue()
 		{
-			objToTypeRow.Clear();
-
 			controlRows.Lock();
 			foreach (var row in controlRows.Internal)
 			{


Added a quick way to check for string null or empty.


Set timeouts for calls over WCF to infinite to address long-running queries timing out.

git-svn-id: 1b52f0a7ed2a8098cb721f3b9b4408691a7bfc16@1008 c93b7781-d36b-0e4d-be4f-9d94f2a838be

--- Dataphor/Common/Contracts/DataphorServiceUtility.cs
+++ Dataphor/Common/Contracts/DataphorServiceUtility.cs
@@ -75,7 +75,10 @@
 			LTransportElement.MaxBufferSize = CMaxMessageLength;
 			LTransportElement.MaxReceivedMessageSize = CMaxMessageLength;

-			return new CustomBinding(LMessageEncodingElement, LTransportElement);
+			var LBinding = new CustomBinding(LMessageEncodingElement, LTransportElement);
+			LBinding.SendTimeout = TimeSpan.MaxValue;
+			LBinding.ReceiveTimeout = TimeSpan.MaxValue;
+			return LBinding;
 		}
 	}
 }


improved comments

improved comments


Removed old todo item

Removed old todo item

--- Assets/Plugins/Profiler/CodeInjector.cs
+++ Assets/Plugins/Profiler/CodeInjector.cs
@@ -9,10 +9,6 @@
 using UnityEngine;

 // Based on: http://www.codersblock.org/blog//2014/06/integrating-monocecil-with-unity.html
-
-/* Todo:
- * Recursion bug - reboot editor, first time playing no results, seconds time proper results, 3rd time double results, 4th time triple results
- */

 [InitializeOnLoad]
 public static class AssemblyPostProcessor {


Change "Slideshow" "Max File Size" option default value

--- DesktopWidgets/Widgets/PictureSlideshow/Settings.cs
+++ DesktopWidgets/Widgets/PictureSlideshow/Settings.cs
@@ -18,7 +18,7 @@

         [Category("General")]
         [DisplayName("Maximum File Size (bytes)")]
-        public double FileFilterSize { get; set; } = 1048576;
+        public double FileFilterSize { get; set; } = 5242880;

         [Category("General")]
         [DisplayName("Next Image Interval")]


Adding movement changes for stupid bot. Velocity is zeroed out when movement in other direction is performed.

--- Assets/Scripts/Classes/Bot/StupidBot.cs
+++ Assets/Scripts/Classes/Bot/StupidBot.cs
@@ -16,25 +16,26 @@
     public override void PerformMovementLogic() {
         Vector2 movementStep = movementLogic.CalculateMovementStep();

-        // If moving right, but velocity is left direction, set to zero
+        // If moving left, but velocity is right direction, then set to zero
         if(movementLogic.movingLeft
             && !movementLogic.movingRight
             && rigidBody.velocity.x > 0) {
             rigidBody.velocity = new Vector2(0, rigidBody.velocity.y);
         }
+        // If moving right and not moving left, but velocity is left direction, then set to zero
         if(movementLogic.movingRight
-            && !movementLogic.movingRight
+            && !movementLogic.movingLeft
             && rigidBody.velocity.x < 0) {
+            rigidBody.velocity = new Vector2(0, rigidBody.velocity.y);
+        }
+        // resets velocity if not moving left or right so deceleration just a flat stop
+        if(!movementLogic.movingLeft
+            && !movementLogic.movingRight) {
             rigidBody.velocity = new Vector2(0, rigidBody.velocity.y);
         }

         rigidBody.AddForce(new Vector2(movementStep.x, movementStep.y));

-        // resets velocity if not moving left or right so deceleration just a flat stop
-        if(!movementLogic.movingLeft
-            && !movementLogic.movingRight) {
-            rigidBody.velocity = new Vector2(0, rigidBody.velocity.y);
-        }
     }

     public override void PerformJumpLogic() {


flying has been banned

flying has been banned

--- Assets/Scripts/PlayerCharacterScript.cs
+++ Assets/Scripts/PlayerCharacterScript.cs
@@ -76,21 +76,26 @@
             return;
         }

-        //******************************************************
-        // DEATH
+        // DEATH, updating score and altitude

         bool isDead = true;
         float deathPos = Camera.main.transform.position.y - Camera.main.orthographicSize;
+        _numOfAnchoredExtremities = 0;

         foreach (ExtremityScript extremity in _extremitiesList)
         {
             if (extremity.transform.position.y >= deathPos)
             {
                 isDead = false;
-                break;
-            }
-        }
-
+            }
+
+            if (extremity.IsAnchored)
+            {
+                _numOfAnchoredExtremities++;
+            }
+        }
+
+        //******************************************
         if (isDead)
         {
             Debug.Log("Player Died!");
@@ -98,20 +103,31 @@
             _isDead = true;

             Invoke("ReloadScene", 0.5f);
-        }
-
-        //******************************************************
-        // updating score and altitude
-
-        _numOfAnchoredExtremities = 0;
-        foreach (ExtremityScript extremity in _extremitiesList)
-        {
-            if (extremity.IsAnchored)
-            {
-                _numOfAnchoredExtremities++;
-            }
-        }
-
+            return;
+        }
+
+        //******************************************
+        if (_numOfAnchoredExtremities == 0)
+        {
+            _levitationTimer += Time.fixedDeltaTime;
+        }
+
+        if (_levitationTimer > 1f)
+        {
+            if (_isDragging)
+            {
+                _draggedExtremity.IsMoving = false;
+                _draggedExtremity = null;
+
+                _isDragging = false;
+            }
+
+            _anchoringAllowed = false;
+
+            Invoke("AllowAnchoring", 0.5f);
+        }
+
+        //******************************************
         UIManager.Instance.UpdateCombo(_numOfAnchoredExtremities);

         _altitude = _body.position.y - _originalYpos;
@@ -138,22 +154,8 @@
         {
             //**********************
             // mouse down AND dragging
-            if (_isDragging)
-            {
-                int numOfAnchoredExtremities = 0;
-                foreach (ExtremityScript extremity in _extremitiesList)
-                {
-                    if (extremity.IsAnchored)
-                    {
-                        numOfAnchoredExtremities++;
-                    }
-                }
-
-                if (numOfAnchoredExtremities == 0)
-                {
-                    _levitationTimer += Time.fixedDeltaTime;
-                }
-
+            if (_isDragging /*&& _anchoringAllowed*/)
+            {
                 Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
                 mousePos.z = 0;

@@ -165,14 +167,6 @@
                 }

                 _draggedExtremity.GetComponent<Rigidbody2D>().AddForce(force * _draggingMultiplyer);
-
-                if (_levitationTimer > 1f)
-                {
-                    _draggedExtremity.IsMoving = false;
-                    _draggedExtremity = null;
-
-                    _isDragging = false;
-                }
             }
             //**********************
             // mouse down AND NOT dragging
@@ -195,9 +189,8 @@

                             _isDragging = true;
                             _anchoringAllowed = false;
-                            _levitationTimer = 0f;
-
-                            Invoke("AllowAnchoring", 0.3f);
+
+                            Invoke("AllowAnchoring", 0.1f);

                             break;
                         }
@@ -235,6 +228,8 @@
                                 UIManager.Instance.AddScore(_grabScoreBonus);
                             }

+                            _levitationTimer = 0;
+
                             break;
                         }
                     }


added function to retrieve data from the mz view.

--- Atreyu/ViewModels/MzSpectraViewModel.cs
+++ Atreyu/ViewModels/MzSpectraViewModel.cs
@@ -174,6 +174,17 @@
         #endregion

         #region Public Methods and Operators
+
+        /// <summary>
+        /// The returns a dictionary of <m/z, intensity> data that is currently being displayed.
+        /// </summary>
+        /// <returns>
+        /// The <see cref="IDictionary"/>.
+        /// </returns>
+        public IDictionary<double, double> GetMzData()
+        {
+            return this.mzFrameData;
+        }

         /// <summary>
         /// TODO The get m/z image.


Removed .value which caused parse problems

Fixed some parse problems by dropping .value and using ?? instead.

--- BGGdotNET/BGGdotNET/Client/XMLParser.cs
+++ BGGdotNET/BGGdotNET/Client/XMLParser.cs
@@ -15,135 +15,135 @@
             var boardgames = (from data in input.Descendants("boardgame")
                              select new BoardGame
                              {
-                                 age = ParseUtils.stringToInt(data.Element("age").Value),
-                                 description = data.Element("description").Value ?? "",
-                                 imageThumnailURL = data.Element("thumbnail").Value ?? "",
-                                 imageURL = data.Element("image").Value ?? "",
-                                 maxPlayers = ParseUtils.stringToInt(data.Element("maxplayers").Value),
-                                 minPlayers = ParseUtils.stringToInt(data.Element("minplayers").Value),
-                                 ObjectID = ParseUtils.stringToInt(data.Attribute("objectid").Value),
-                                 yearPublished = ParseUtils.stringToInt(data.Element("yearpublished").Value),
-                                 playingTime = ParseUtils.stringToInt(data.Element("playingtime").Value),
+                                 age = (int?) data.Element("age") ?? 0,
+                                 description = (string) data.Element("description") ?? "",
+                                 imageThumnailURL = (string) data.Element("thumbnail") ?? "",
+                                 imageURL = (string) data.Element("image") ?? "",
+                                 maxPlayers = (int?) data.Element("maxplayers") ?? 0,
+                                 minPlayers = (int?) data.Element("minplayers") ?? 0,
+                                 ObjectID = (int?) data.Attribute("objectid") ?? 0,
+                                 yearPublished = (int?) data.Element("yearpublished") ?? 0,
+                                 playingTime = (int?) data.Element("playingtime") ?? 0,

                                  categories = (from cat in data.Elements("boardgamecategory")
                                                select new BoardGameGeekPair
                                                {
-                                                   value = cat.Value ?? "",
-                                                   objectID = ParseUtils.stringToInt(cat.Attribute("objectid").Value)
+                                                   value = (string) cat ?? "",
+                                                   objectID = (int?) cat.Attribute("objectid") ?? 0
                                                }).ToList(),

                                  designers = (from des in data.Elements("boardgamedesigner")
                                               select new BoardGameGeekPair
                                               {
-                                                  value = des.Value ?? "",
-                                                  objectID = ParseUtils.stringToInt(des.Attribute("objectid").Value)
+                                                  value = (string) des ?? "",
+                                                  objectID = (int?) des.Attribute("objectid") ?? 0
                                               }).ToList(),

                                  expansions = (from exp in data.Elements("boardgameexpansion")
                                                select new BoardGameGeekPair
                                                {
-                                                   value = exp.Value ?? "",
-                                                   objectID = ParseUtils.stringToInt(exp.Attribute("objectid").Value)
+                                                   value = (string) exp ?? "",
+                                                   objectID = (int?) exp.Attribute("objectid") ?? 0
                                                }).ToList(),

                                  honors = (from hon in data.Elements("boardgamehonor")
                                            select new BoardGameGeekPair
                                            {
-                                               value = hon.Value ?? "",
-                                               objectID = ParseUtils.stringToInt(hon.Attribute("objectid").Value)
+                                               value = (string) hon ?? "",
+                                               objectID = (int?) hon.Attribute("objectid") ?? 0
                                            }).ToList(),

                                  mechanics = (from mec in data.Elements("boardgamemechanic")
                                               select new BoardGameGeekPair
                                               {
-                                                  value = mec.Value ?? "",
-                                                  objectID = ParseUtils.stringToInt(mec.Attribute("objectid").Value)
+                                                  value = (string) mec ?? "",
+                                                  objectID = (int?) mec.Attribute("objectid") ?? 0
                                               }).ToList(),

                                  names = (from name in data.Elements("name")
                                           select new BoardGameName
                                           {
-                                              name = name.Value,
-                                              sortIndex = ParseUtils.stringToInt(name.Attribute("sortindex").Value),
-                                              isPrimary = (bool?)name.Attribute("primary") ?? false
+                                              name = (string) name ?? "",
+                                              sortIndex = (int?) name.Attribute("sortindex") ?? 0,
+                                              isPrimary = (bool?) name.Attribute("primary") ?? false
                                           }).ToList(),

                                  podcasts = (from pod in data.Elements("boardgamepodcastepisode")
                                              select new BoardGameGeekPair
                                              {
-                                                 value = pod.Value ?? "",
-                                                 objectID = ParseUtils.stringToInt(pod.Attribute("objectid").Value)
+                                                 value = (string) pod ?? "",
+                                                 objectID = (int?) pod.Attribute("objectid") ?? 0
                                              }).ToList(),

                                  publishers = (from pub in data.Elements("boardgamepublisher")
                                                select new BoardGameGeekPair
                                                {
-                                                   value = pub.Value ?? "",
-                                                   objectID = ParseUtils.stringToInt(pub.Attribute("objectid").Value)
+                                                   value = (string) pub ?? "",
+                                                   objectID = (int?) pub.Attribute("objectid") ?? 0
                                                }).ToList(),

                                  subdomains = (from sub in data.Elements("boardgamesubdomain")
                                                select new BoardGameGeekPair
                                                {
-                                                   value = sub.Value ?? "",
-                                                   objectID = ParseUtils.stringToInt(sub.Attribute("objectid").Value)
+                                                   value = (string) sub ?? "",
+                                                   objectID = (int?) sub.Attribute("objectid") ?? 0
                                                }).ToList(),

                                  versions = (from ver in data.Elements("boardgameversion")
                                              select new BoardGameGeekPair
                                              {
-                                                 value = ver.Value ?? "",
-                                                 objectID = ParseUtils.stringToInt(ver.Attribute("objectid").Value)
+                                                 value = (string) ver ?? "",
+                                                 objectID = (int?) ver.Attribute("objectid") ?? 0
                                              }).ToList(),

                                  comments = (from com in data.Elements("comment")
                                              select new BoardGameComment
                                              {
-                                                 username = com.Attribute("username").Value,
-                                                 comment = com.Value ?? "",
-                                                 rating = ParseUtils.setingToFloat(com.Attribute("rating").Value)
+                                                 username = (string) com.Attribute("username") ?? "",
+                                                 comment = (string) com ?? "",
+                                                 rating = (float?) com.Attribute("rating") ?? 0
                                              }).ToList(),

                                  statistics = (from stat in data.Element("statistics").Elements("ratings")
                                                select new BoardGameStats
                                                {
-                                                   statDate = DateTime.ParseExact(stat.Attribute("date").Value, "yyyyMMdd", null),
-                                                   average = ParseUtils.setingToFloat(stat.Element("average").Value),
-                                                   averageWeight = ParseUtils.setingToFloat(stat.Element("averageweight").Value),
-                                                   bayesAverage = ParseUtils.setingToFloat(stat.Element("bayesaverage").Value),
-                                                   median = ParseUtils.setingToFloat(stat.Element("median").Value),
-                                                   numComments = ParseUtils.stringToInt(stat.Element("numcomments").Value),
-                                                   numWeights = ParseUtils.stringToInt(stat.Element("numweights").Value),
-                                                   owned = ParseUtils.stringToInt(stat.Element("owned").Value),
-                                                   trading = ParseUtils.stringToInt(stat.Element("trading").Value),
-                                                   standardDeviation = ParseUtils.setingToFloat(stat.Element("stddev").Value),
-                                                   usersRated = ParseUtils.stringToInt(stat.Element("usersrated").Value),
-                                                   wanting = ParseUtils.stringToInt(stat.Element("wanting").Value),
-                                                   wishing = ParseUtils.stringToInt(stat.Element("wishing").Value),
+                                                   statDate = (DateTime?) DateTime.ParseExact((string) stat.Attribute("date") ?? "00010101", "yyyyMMdd", null) ?? DateTime.MinValue,
+                                                   average = (float?) stat.Element("average") ?? 0,
+                                                   averageWeight = (float?) stat.Element("averageweight") ?? 0,
+                                                   bayesAverage = (float?) stat.Element("bayesaverage") ?? 0,
+                                                   median = (float?) stat.Element("median") ?? 0,
+                                                   numComments = (int?) stat.Element("numcomments") ?? 0,
+                                                   numWeights = (int?) stat.Element("numweights") ?? 0,
+                                                   owned = (int?) stat.Element("owned") ?? 0,
+                                                   trading = (int?) stat.Element("trading") ?? 0,
+                                                   standardDeviation = (float?) stat.Element("stddev") ?? 0,
+                                                   usersRated = (int?) stat.Element("usersrated") ?? 0,
+                                                   wanting = (int?) stat.Element("wanting") ?? 0,
+                                                   wishing = (int?) stat.Element("wishing") ?? 0,
                                                    ranks = (from ranks in stat.Elements("ranks").Elements("rank")
                                                             select new BoardGameRank
                                                             {
-                                                                id = ParseUtils.stringToInt(ranks.Attribute("id").Value),
-                                                                name = ranks.Attribute("name").Value ?? "",
-                                                                friendlyName = ranks.Attribute("friendlyname").Value,
-                                                                type = ranks.Attribute("type").Value ?? "",
-                                                                value = ParseUtils.stringToInt(ranks.Attribute("value").Value),
-                                                                bayesAverage = ParseUtils.setingToFloat(ranks.Attribute("bayesaverage").Value)
+                                                                id = (int?) ranks.Attribute("id") ?? 0,
+                                                                name = (string) ranks.Attribute("name") ?? "",
+                                                                friendlyName = (string) ranks.Attribute("friendlyname") ?? "",
+                                                                type = (string) ranks.Attribute("type") ?? "",
+                                                                value = (int?) ranks.Attribute("value") ?? 0,
+                                                                bayesAverage = (float?) ranks.Attribute("bayesaverage") ?? 0
                                                             }).ToList()
                                                }).ToList(),

                                  polls = (from pol in data.Elements("poll")
                                           select new BoardGamePoll
                                           {
-                                              pollName = pol.Attribute("name").Value ?? "",
-                                              pollTitle = pol.Attribute("title").Value ?? "",
-                                              totalVotes = ParseUtils.stringToInt(pol.Attribute("totalvotes").Value),
+                                              pollName = (string) pol.Attribute("name") ?? "",
+                                              pollTitle = (string) pol.Attribute("title") ?? "",
+                                              totalVotes = (int?) pol.Attribute("totalvotes") ?? 0,
                                               resultsList = (from res in pol.Elements("results").Elements("result")
                                                              select new BoardGamePollResult
                                                              {
-                                                                 responseValue = res.Attribute("value").Value ?? "",
-                                                                 voteCount = (int?)res.Attribute("numvotes") ?? 0,
-                                                                 level = (int?)res.Attribute("level") ?? 0
+                                                                 responseValue = (string) res.Attribute("value") ?? "",
+                                                                 voteCount = (int?) res.Attribute("numvotes") ?? 0,
+                                                                 level = (int?) res.Attribute("level") ?? 0
                                                              }).ToList()
                                           }).ToList()
                              });
@@ -156,9 +156,9 @@
             var searchResults = from data in input.Descendants("boardgame")
                                 select new BGSearchResult
                                 {
-                                    name = data.Element("name").Value,
-                                    yearPublished = int.Parse(data.Element("yearpublished").Value),
-                                    ObjectID = (int)data.Attribute("objectid")
+                                    name = (string) data.Element("name") ?? "",
+                                    yearPublished = (int?) data.Element("yearpublished") ?? 0,
+                                    ObjectID = (int?) data.Attribute("objectid") ?? 0
                                 };

             return searchResults.ToList();
@@ -169,30 +169,30 @@
             var collection = from coll in input.Descendants("item")
                              select new CollectionItem
                              {
-                                 objecttype = coll.Attribute("objecttype").Value,
-                                 objectID = int.Parse(coll.Attribute("objectid").Value),
-                                 subType = coll.Attribute("subtype").Value,
-                                 collID = int.Parse(coll.Attribute("collid").Value),
-                                 name = coll.Element("name").Value,
-                                 yearPublished = int.Parse(coll.Element("yearpublished").Value),
-                                 image = coll.Element("image").Value,
-                                 thumbnail = coll.Element("thumbnail").Value,
-
-                                 minPlayers = int.Parse(coll.Element("stats").Attribute("minplayers").Value),
-                                 maxPlayers = int.Parse(coll.Element("stats").Attribute("maxplayers").Value),
-                                 numOwned = int.Parse(coll.Element("stats").Attribute("numowned").Value),
-
-                                 userRated = int.Parse(coll.Element("stats").Element("rating").Element("usersrated").Attribute("value").Value),
-
-                                 own = int.Parse(coll.Element("status").Attribute("own").Value),
-                                 prevOwned = int.Parse(coll.Element("status").Attribute("prevowned").Value),
-                                 forTrade = int.Parse(coll.Element("status").Attribute("fortrade").Value),
-                                 want = int.Parse(coll.Element("status").Attribute("want").Value),
-                                 wantToPlay = int.Parse(coll.Element("status").Attribute("wanttoplay").Value),
-                                 wantToBuy = int.Parse(coll.Element("status").Attribute("wanttobuy").Value),
-                                 wishlist = int.Parse(coll.Element("status").Attribute("wishlist").Value),
-                                 preOrdered = int.Parse(coll.Element("status").Attribute("preordered").Value),
-                                 numPlays = int.Parse(coll.Element("numplays").Value)
+                                 objecttype = (string) coll.Attribute("objecttype") ?? "",
+                                 objectID = (int?) coll.Attribute("objectid") ?? 0,
+                                 subType = (string) coll.Attribute("subtype") ?? "",
+                                 collID = (int?) coll.Attribute("collid") ?? 0,
+                                 name = (string) coll.Element("name") ?? "",
+                                 yearPublished = (int?) coll.Element("yearpublished") ?? 0,
+                                 image = (string) coll.Element("image") ?? "",
+                                 thumbnail = (string) coll.Element("thumbnail") ?? "",
+
+                                 minPlayers = (int?) coll.Element("stats").Attribute("minplayers") ?? 0,
+                                 maxPlayers = (int?) coll.Element("stats").Attribute("maxplayers") ?? 0,
+                                 numOwned = (int?) coll.Element("stats").Attribute("numowned") ?? 0,
+
+                                 userRated = (int?) coll.Element("stats").Element("rating").Element("usersrated").Attribute("value") ?? 0,
+
+                                 own = (int?) coll.Element("status").Attribute("own") ?? 0,
+                                 prevOwned = (int?) coll.Element("status").Attribute("prevowned") ?? 0,
+                                 forTrade = (int?) coll.Element("status").Attribute("fortrade") ?? 0,
+                                 want = (int?) coll.Element("status").Attribute("want") ?? 0,
+                                 wantToPlay = (int?) coll.Element("status").Attribute("wanttoplay") ?? 0,
+                                 wantToBuy = (int?) coll.Element("status").Attribute("wanttobuy") ?? 0,
+                                 wishlist = (int?) coll.Element("status").Attribute("wishlist") ?? 0,
+                                 preOrdered = (int?) coll.Element("status").Attribute("preordered") ?? 0,
+                                 numPlays = (int?) coll.Element("numplays") ?? 0
                              };

             return collection.ToList();
@@ -203,49 +203,49 @@
             var geekListResult = from data in input.Descendants("geeklist")
                                  select new GeekList
                                  {
-                                     description = data.Element("description").Value,
-                                     id = (int)data.Attribute("id"),
-                                     numItems = int.Parse(data.Element("numitems").Value),
-                                     editDateTimestamp = data.Element("editdate_timestamp").Value,
-                                     postDateTimestamp = data.Element("postdate_timestamp").Value,
-                                     thumbs = int.Parse(data.Element("thumbs").Value),
-                                     title = data.Element("title").Value,
-                                     userName = data.Element("username").Value,
-                                     editDate = ParseUtils.stringToDateTime(data.Element("editdate").Value),
-                                     postDate = ParseUtils.stringToDateTime(data.Element("postdate").Value),
+                                     description = (string) data.Element("description") ?? "",
+                                     id = (int?) data.Attribute("id") ?? 0,
+                                     numItems = (int?) data.Element("numitems") ?? 0,
+                                     editDateTimestamp = (string) data.Element("editdate_timestamp") ?? "",
+                                     postDateTimestamp = (string) data.Element("postdate_timestamp") ?? "",
+                                     thumbs = (int?) data.Element("thumbs") ?? 0,
+                                     title = (string) data.Element("title") ?? "",
+                                     userName = (string) data.Element("username") ?? "",
+                                     editDate = ParseUtils.stringToDateTime((string) data.Element("editdate") ?? ""),
+                                     postDate = ParseUtils.stringToDateTime((string) data.Element("postdate") ?? ""),

                                      comments = (from com in data.Elements("comment")
                                                  select new GeekListComment
                                                  {
-                                                     username = com.Attribute("username").Value,
-                                                     thumbs = int.Parse(com.Attribute("thumbs").Value),
-                                                     commentText = com.Value,
-                                                     editDate = ParseUtils.stringToDateTime(com.Attribute("editdate").Value),
-                                                     postDate = ParseUtils.stringToDateTime(com.Attribute("postdate").Value),
+                                                     username = (string) com.Attribute("username") ?? "",
+                                                     thumbs = (int?) com.Attribute("thumbs") ?? 0,
+                                                     commentText = (string) com ?? "",
+                                                     editDate = ParseUtils.stringToDateTime((string) com.Attribute("editdate") ?? ""),
+                                                     postDate = ParseUtils.stringToDateTime((string) com.Attribute("postdate") ?? ""),
                                                  }).ToList(),

                                      items = (from it in data.Descendants("item")
                                               select new GeekListItem
                                               {
-                                                  id = int.Parse(it.Attribute("id").Value),
-                                                  objectType = it.Attribute("objecttype").Value,
-                                                  subType = it.Attribute("subtype").Value,
-                                                  objectID = int.Parse(it.Attribute("objectid").Value),
-                                                  objectName = it.Attribute("objectname").Value,
-                                                  userName = it.Attribute("username").Value,
-                                                  thumbs = int.Parse(it.Attribute("thumbs").Value),
-                                                  imageID = int.Parse(it.Attribute("imageid").Value),
-                                                  body = it.Element("body").Value,
-                                                  editDate = ParseUtils.stringToDateTime(it.Attribute("editdate").Value),
-                                                  postDate = ParseUtils.stringToDateTime(it.Attribute("postdate").Value),
+                                                  id = (int?) it.Attribute("id") ?? 0,
+                                                  objectType = (string) it.Attribute("objecttype") ?? "",
+                                                  subType = (string) it.Attribute("subtype") ?? "",
+                                                  objectID = (int?) it.Attribute("objectid") ?? 0,
+                                                  objectName = (string) it.Attribute("objectname") ?? "",
+                                                  userName = (string) it.Attribute("username") ?? "",
+                                                  thumbs = (int?) it.Attribute("thumbs") ?? 0,
+                                                  imageID = (int?) it.Attribute("imageid") ?? 0,
+                                                  body = (string) it.Element("body") ?? "",
+                                                  editDate = ParseUtils.stringToDateTime((string) it.Attribute("editdate") ?? ""),
+                                                  postDate = ParseUtils.stringToDateTime((string) it.Attribute("postdate") ?? ""),
                                                   comments = (from com in it.Elements("comment")
                                                               select new GeekListComment
                                                               {
-                                                                  username = com.Attribute("username").Value,
-                                                                  thumbs = int.Parse(com.Attribute("thumbs").Value),
-                                                                  commentText = com.Value,
-                                                                  editDate = ParseUtils.stringToDateTime(com.Attribute("editdate").Value),
-                                                                  postDate = ParseUtils.stringToDateTime(com.Attribute("postdate").Value)
+                                                                  username = (string) com.Attribute("username") ?? "",
+                                                                  thumbs = (int?) com.Attribute("thumbs") ?? 0,
+                                                                  commentText = (string) com ?? "",
+                                                                  editDate = ParseUtils.stringToDateTime((string) com.Attribute("editdate") ?? ""),
+                                                                  postDate = ParseUtils.stringToDateTime((string) com.Attribute("postdate") ?? "")
                                                               }).ToList()
                                               }).ToList()
                                  };


refactored renames

refactored renames

--- EADatabaseTransformer/EADatabaseTransformerAddin.cs
+++ EADatabaseTransformer/EADatabaseTransformerAddin.cs
@@ -72,7 +72,7 @@
 				var renamePopup = new RenameWindow(comparedItem.newDatabaseItem.name);
 				if (renamePopup.ShowDialog(this._dbCompareControl) == DialogResult.OK)
 				{
-					_databaseTransformer.renameItem(comparedItem.newDatabaseItem, renamePopup.newName);
+					comparedItem.rename(renamePopup.newName);
 				}
 			}
 			this.refreshCompare(false);


New test for edge indexes.

New test for edge indexes.

--- ExRam.Gremlinq.Dse.Tests/CreateSchemaQueriesTest.cs
+++ ExRam.Gremlinq.Dse.Tests/CreateSchemaQueriesTest.cs
@@ -19,6 +19,7 @@
                 .SecondaryIndex<TimeFrame>(x => x.StartTime)
                 .MaterializedIndex<Authority>(x => x.PhoneNumber)
                 .SearchIndex<Country>(x => x.CountryCallingCode)
+                .EdgeIndex<User, WorksFor>(x => x.From, EdgeDirection.Out)
                 .AddConnection<Authority, IsDescribedIn, Language>()
                 .AddConnection<User, WorksFor, Authority>()
                 .AddConnection<User, Gremlinq.Tests.Edge, User>()
@@ -202,5 +203,16 @@
                                   query.Steps.Any(step => step.Name == "search") &&
                                   query.Steps.Any(step => step.Name == "by" && (string)step.Parameters[0] == "CountryCallingCode"));
         }
+
+        [Fact]
+        public void FromAssembly_CreateSchemaQueries_includes_edge_index()
+        {
+            this._queries
+                .Should()
+                .Contain(query => query.Steps.Any(step => step.Name == "vertexLabel" && (string)step.Parameters[0] == "User") &&
+                                  query.Steps.Any(step => step.Name == "index") &&
+                                  query.Steps.Any(step => step.Name == "outE" && (string)step.Parameters[0] == "WorksFor") &&
+                                  query.Steps.Any(step => step.Name == "by" && (string)step.Parameters[0] == "From"));
+        }
     }
 }


Fixed type parameter in ObservableMethodCallBase.

--- Expressions/Expressions/ObservableMethodCallBase.cs
+++ Expressions/Expressions/ObservableMethodCallBase.cs
@@ -90,7 +90,9 @@
             var newTarget = target as INotifyCollectionChanged;
             if (newTarget != null)
             {
-                ExecutionContext.Instance.AddChangeListener<TResult>(this, newTarget);
+                // Since we don't know the type of the items of the Target.Value collection
+                // without using reflection, we use object here.
+                ExecutionContext.Instance.AddChangeListener<object>(this, newTarget);
             }
         }