Don't async void

Don't async void

--- WalletWasabi.Gui/Controls/NoparaPasswordBox.cs
+++ WalletWasabi.Gui/Controls/NoparaPasswordBox.cs
@@ -243,7 +243,7 @@
 						e.Handled = OnTextInput(text, true);
 						if (!e.Handled)
 						{
-							DisplayWarning("Password too long (Max 150 characters)");
+							_ = DisplayWarningAsync("Password too long (Max 150 characters)");
 						}
 					}
 				}
@@ -367,7 +367,7 @@
 			}
 		}

-		private async void DisplayWarning(string message)
+		private async Task DisplayWarningAsync(string message)
 		{
 			WarningMessage = message;
 			await Task.Delay(2000); // 2 seconds


Add macOS error code

Add macOS error code

--- WalletWasabi/Services/SingleInstanceChecker.cs
+++ WalletWasabi/Services/SingleInstanceChecker.cs
@@ -54,7 +54,7 @@
 				// This is the first instance, nothing else to do.
 				return;
 			}
-			catch (SocketException ex) when (ex.ErrorCode == 10048)
+			catch (SocketException ex) when (ex.ErrorCode is 10048 or 48)
 			{
 				// It is already used -> another Wasabi is running on this network.
 				Logger.LogDebug("Detected another Wasabi instance.");


Bring back the NSAttributedString constants;   If we later introduce NSStringAttributes, we can make them internal

--- src/foundation.cs
+++ src/foundation.cs
@@ -115,7 +115,6 @@
 		IntPtr Constructor (string str);

 		[Export ("initWithString:attributes:")]
-		[Obsolete ("Use NSAttributedString (string, CTStringAttributes)")]
 		IntPtr Constructor (string str, NSDictionary attributes);

 		[Export ("initWithAttributedString:")]
@@ -222,6 +221,42 @@
 		void DrawString (RectangleF rect, NSStringDrawingOptions options);

 #else
+		[Field ("NSFontAttributeName", "UIKit")]
+		NSString FontAttributeName { get; }
+
+		[Field ("NSParagraphStyleAttributeName", "UIKit")]
+		NSString ParagraphStyleAttributeName { get; }
+
+		[Field ("NSForegroundColorAttributeName", "UIKit")]
+		NSString ForegroundColorAttributeName { get; }
+
+		[Field ("NSBackgroundColorAttributeName", "UIKit")]
+		NSString BackgroundColorAttributeName { get; }
+
+		[Field ("NSLigatureAttributeName", "UIKit")]
+		NSString LigatureAttributeName { get; }
+
+		[Field ("NSKernAttributeName", "UIKit")]
+		NSString KernAttributeName { get; }
+
+		[Field ("NSStrikethroughStyleAttributeName", "UIKit")]
+		NSString StrikethroughStyleAttributeName { get; }
+
+		[Field ("NSUnderlineStyleAttributeName", "UIKit")]
+		NSString UnderlineStyleAttributeName { get; }
+
+		[Field ("NSStrokeColorAttributeName", "UIKit")]
+		NSString StrokeColorAttributeName { get; }
+
+		[Field ("NSStrokeWidthAttributeName", "UIKit")]
+		NSString StrokeWidthAttributeName { get; }
+
+		[Field ("NSShadowAttributeName", "UIKit")]
+		NSString ShadowAttributeName { get; }
+
+		[Field ("NSVerticalGlyphFormAttributeName", "UIKit")]
+		NSString VerticalGlyphFormAttributeName { get; }
+
 		[Since (6,0)]
 		[Export ("size")]
 		SizeF Size { get; }


Spelling fix.

Spelling fix.

--- WebAssembly/MemoryAccessOutOfRangeException.cs
+++ WebAssembly/MemoryAccessOutOfRangeException.cs
@@ -11,7 +11,7 @@
 		/// <param name="offset">The memory location that was attempted to be accessed.</param>
 		/// <param name="length">The amount of memory to be accessed.</param>
 		public MemoryAccessOutOfRangeException(uint offset, uint length)
-			: base($"Attempted to access {length} bytes of memory starting at offset {offset}, which would have acceeded the allocated memory.")
+			: base($"Attempted to access {length} bytes of memory starting at offset {offset}, which would have exceeded the allocated memory.")
 		{
 			this.Offset = offset;
 			this.Length = length;


Fix exception saving ASL <=530 games

Fix exception saving ASL <=530 games

--- WorldModel/WorldModel/GameLoader/FieldSaver.cs
+++ WorldModel/WorldModel/GameLoader/FieldSaver.cs
@@ -400,6 +400,24 @@
             }
         }

+        private class LegacyDictionarySaver : FieldSaverBase
+        {
+            public override Type AppliesTo
+            {
+                get { return typeof(QuestDictionary<object>); }
+            }
+
+            public override void Save(GameXmlWriter writer, Element element, string attribute, object value)
+            {
+                // Do nothing - objectdictionaries are not saved for ASL 530 and earlier.
+            }
+
+            public override WorldModelVersion? MaxVersion
+            {
+                get { return WorldModelVersion.v530; }
+            }
+        }
+
         private class ScriptSaver : FieldSaverBase
         {
             public override Type AppliesTo


Forward Orientation Methods in PlatformRenderer and ModalWrapper (#147)

* PlatformRenderer and ModalWrapper are Wrappers around the real UIViewController, rotation and orientations methods are not correctly forwarded in IOS. Per example, you cannot programatically lock the rotation of the IOS screen. This changes will fix that.

* Changed spaces to tabs, as requested.

--- Xamarin.Forms.Platform.iOS/PlatformRenderer.cs
+++ Xamarin.Forms.Platform.iOS/PlatformRenderer.cs
@@ -25,8 +25,42 @@

 		public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations()
 		{
-			return UIInterfaceOrientationMask.All;
+			if ((ChildViewControllers != null) && (ChildViewControllers.Length > 0))
+			{
+				return ChildViewControllers[0].GetSupportedInterfaceOrientations();
+			}
+
+			return base.GetSupportedInterfaceOrientations();
 		}
+
+		public override UIInterfaceOrientation PreferredInterfaceOrientationForPresentation()
+		{
+			if ((ChildViewControllers != null) && (ChildViewControllers.Length > 0))
+			{
+				return ChildViewControllers[0].PreferredInterfaceOrientationForPresentation();
+			}
+			return base.PreferredInterfaceOrientationForPresentation();
+		}
+
+		public override bool ShouldAutorotate()
+		{
+			if ((ChildViewControllers != null) && (ChildViewControllers.Length > 0))
+			{
+				return ChildViewControllers[0].ShouldAutorotate();
+			}
+			return base.ShouldAutorotate();
+		}
+
+		public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
+		{
+			if ((ChildViewControllers != null) && (ChildViewControllers.Length > 0))
+			{
+				return ChildViewControllers[0].ShouldAutorotateToInterfaceOrientation(toInterfaceOrientation);
+			}
+			return base.ShouldAutorotateToInterfaceOrientation(toInterfaceOrientation);
+		}
+
+		public override bool ShouldAutomaticallyForwardRotationMethods => true;

 		public override void ViewDidLayoutSubviews()
 		{
@@ -60,8 +94,41 @@

 		public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations()
 		{
-			return UIInterfaceOrientationMask.All;
+			if ((ChildViewControllers != null) && (ChildViewControllers.Length > 0))
+			{
+				return ChildViewControllers[0].GetSupportedInterfaceOrientations();
+			}
+			return base.GetSupportedInterfaceOrientations();
 		}
+
+		public override UIInterfaceOrientation PreferredInterfaceOrientationForPresentation()
+		{
+			if ((ChildViewControllers != null) && (ChildViewControllers.Length > 0))
+			{
+				return ChildViewControllers[0].PreferredInterfaceOrientationForPresentation();
+			}
+			return base.PreferredInterfaceOrientationForPresentation();
+		}
+
+		public override bool ShouldAutorotate()
+		{
+			if ((ChildViewControllers != null) && (ChildViewControllers.Length > 0))
+			{
+				return ChildViewControllers[0].ShouldAutorotate();
+			}
+			return base.ShouldAutorotate();
+		}
+
+		public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
+		{
+			if ((ChildViewControllers != null) && (ChildViewControllers.Length > 0))
+			{
+				return ChildViewControllers[0].ShouldAutorotateToInterfaceOrientation(toInterfaceOrientation);
+			}
+			return base.ShouldAutorotateToInterfaceOrientation(toInterfaceOrientation);
+		}
+
+		public override bool ShouldAutomaticallyForwardRotationMethods => true;

 		public override void ViewDidAppear(bool animated)
 		{


[Mac] Fix default TextLayout foreground color

Temporary adding the foreground color attribute will
override all other foreground color changes. In order to
apply a default foreground color from the current context,
it needs to be applied first.

--- Xwt.XamMac/Xwt.Mac/TextLayoutBackendHandler.cs
+++ Xwt.XamMac/Xwt.Mac/TextLayoutBackendHandler.cs
@@ -26,6 +26,7 @@

 using System;
 using System.Collections.Generic;
+using System.Linq;
 using AppKit;
 using CoreGraphics;
 using CoreText;
@@ -129,7 +130,7 @@
 				ResetAttributes ();
 			}

-			void ResetAttributes ()
+			void ResetAttributes (NSColor foregroundColorOverride = null)
 			{
 				// clear user attributes
 				TextStorage.SetAttributes (new NSDictionary (), new NSRange (0, TextStorage.Length));
@@ -150,6 +151,10 @@
 				if (TextTrimming == TextTrimming.WordElipsis)
 					pstyle.LineBreakMode = NSLineBreakMode.TruncatingTail;
 				TextStorage.AddAttribute (NSStringAttributeKey.ParagraphStyle, pstyle, r);
+
+				// set foreground color override
+				if (foregroundColorOverride != null)
+					TextStorage.AddAttribute(NSStringAttributeKey.ForegroundColor, foregroundColorOverride, r);

 				// restore user attributes
 				foreach (var att in Attributes)
@@ -225,13 +230,14 @@
 			public void Draw (CGContext ctx, CGColor foregroundColor, double x, double y)
 			{
 				bool tempForegroundSet = false;
-				NSRange r = new NSRange ();
 				// if no color attribute is set for the whole string,
 				// NSLayoutManager will use the default control foreground color.
-				// Set a forground color attribute with the current CGContext stroke color instead.
-				if (foregroundColor != null && (TextStorage.GetAttribute(NSStringAttributeKey.ForegroundColor, 0, out r) == null || r.Length < Text.Length))
-				{
-					TextStorage.AddAttribute (NSStringAttributeKey.ForegroundColor, NSColor.FromCGColor (foregroundColor), r);
+				// To override the default color we need to apply the current CGContext stroke color
+				// before all other attributes are set, otherwise it will remove all other foreground colors.
+				if (foregroundColor != null && !Attributes.Any (a => a is ColorTextAttribute && a.StartIndex == 0 && a.Count == Text.Length))
+				{
+					// FIXME: we need to find a better way to accomplish this without the need to reset all attributes.
+					ResetAttributes(NSColor.FromCGColor(foregroundColor));
 					tempForegroundSet = true;
 				}

@@ -252,8 +258,8 @@
 				}

 				// reset foreground color change
-				if (tempForegroundSet && r.Length > 0)
-					TextStorage.RemoveAttribute (NSStringAttributeKey.ForegroundColor, r);
+				if (tempForegroundSet)
+					ResetAttributes();

 				NSGraphicsContext.GlobalRestoreGraphicsState ();
 				ctx.RestoreState ();


-Don't call JsonWriter.Close when not disposing

--- Src/Newtonsoft.Json/JsonWriter.cs
+++ Src/Newtonsoft.Json/JsonWriter.cs
@@ -1446,7 +1446,7 @@
         /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
         protected virtual void Dispose(bool disposing)
         {
-            if (_currentState != State.Closed)
+            if (_currentState != State.Closed && disposing)
             {
                 Close();
             }


Remove the thing for skipping the intro, another mod already does that

--- StardewValleyMP/MultiplayerMod.cs
+++ StardewValleyMP/MultiplayerMod.cs
@@ -55,12 +55,6 @@
                 if (Game1.activeClickableMenu is TitleMenu)
                 {
                     TitleMenu title = (TitleMenu)Game1.activeClickableMenu;
-                    if (DEBUG)
-                    {
-                        Util.SetInstanceField(typeof(TitleMenu), title, "chuckleFishTimer", 0);
-                        Util.SetInstanceField(typeof(TitleMenu), title, "logoFadeTimer", 0);
-                        Util.SetInstanceField(typeof(TitleMenu), title, "fadeFromWhiteTimer", 0);
-                    }

                     if (TitleMenu.subMenu != null && (TitleMenu.subMenu.GetType() == typeof(LoadGameMenu)))
                     {


Update Testcase inline with framework

Update Testcase inline with framework

--- osu.Desktop.VisualTests/Tests/TestCaseBeatSyncedContainer.cs
+++ osu.Desktop.VisualTests/Tests/TestCaseBeatSyncedContainer.cs
@@ -15,6 +15,7 @@
 using osu.Framework.Lists;
 using System;
 using System.Globalization;
+using osu.Framework.Allocation;

 namespace osu.Desktop.VisualTests.Tests
 {
@@ -27,11 +28,6 @@
         public TestCaseBeatSyncedContainer()
         {
             Clock = new FramedClock();
-        }
-
-        public override void Reset()
-        {
-            base.Reset();
             Clock.ProcessFrame();

             Add(new BeatContainer
@@ -45,7 +41,12 @@
                 Origin = Anchor.TopRight,
                 Anchor = Anchor.TopRight,
             });
-            mc.State = Visibility.Visible;
+        }
+
+        [BackgroundDependencyLoader]
+        private void load()
+        {
+            mc.ToggleVisibility();
         }

         private class BeatContainer : BeatSyncedContainer
@@ -141,6 +142,8 @@
             {
                 base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);

+                if (beatIndex < 0) return;
+
                 timingPointCount.Value = timingPoints.Count;
                 currentTimingPoint.Value = timingPoints.IndexOf(timingPoint) + 1;
                 beatCount.Value = calculateBeatCount(timingPoint);


Make SafeAreaTargetContainer.SafeAreaPadding entirely internal

--- osu.Framework/Graphics/Containers/SafeAreaTargetContainer.cs
+++ osu.Framework/Graphics/Containers/SafeAreaTargetContainer.cs
@@ -25,10 +25,10 @@
         /// Setting this property will bind a new <see cref="BindableSafeArea"/> and unbind any previously bound bindables.
         /// Automatically bound to <see cref="GameWindow.SafeAreaPadding"/> if not assigned before injecting dependencies.
         /// </summary>
-        public BindableSafeArea SafeAreaPadding
+        internal BindableSafeArea SafeAreaPadding
         {
             get => safeAreaPadding;
-            internal set
+            set
             {
                 if (value == null)
                     throw new ArgumentNullException(nameof(value));


fix slider follow circle instantly disappearing on slider ends

--- osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SliderBall.cs
+++ osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SliderBall.cs
@@ -108,6 +108,12 @@
             base.ClearTransforms(false, targetMember);
         }

+        public override void ClearTransformsAfter(double time, bool propagateChildren = false, string targetMember = null)
+        {
+            // Same reasoning as in ClearTransforms.
+            base.ClearTransformsAfter(time, false, targetMember);
+        }
+
         private bool tracking;
         public bool Tracking
         {
@@ -141,4 +147,4 @@
             Position = slider.Curve.PositionAt(progress);
         }
     }
-}+}


Fix test text not being centered

Fix test text not being centered

--- osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs
+++ osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs
@@ -6,6 +6,7 @@
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.Containers;
 using osu.Framework.Graphics.Shapes;
+using osu.Game.Graphics;
 using osu.Game.Graphics.Sprites;
 using osu.Game.Graphics.UserInterface;
 using osu.Game.Online;
@@ -38,6 +39,7 @@
                 : base(@"Please sign in to view dummy test content")
             {
                 RelativeSizeAxes = Axes.Both;
+
                 Children = new Drawable[]
                 {
                     new Box
@@ -48,7 +50,7 @@
                     new OsuSpriteText
                     {
                         Text = "dummy online content",
-                        RelativeSizeAxes = Axes.Both,
+                        Font = OsuFont.Default.With(size: 40),
                         Anchor = Anchor.Centre,
                         Origin = Anchor.Centre,
                     }


[trunk] Fixing symlink creation in MakeFiles.

--- packages/C/dev/MakeFileBuilder/PosixSharedLibrarySymlinks.cs
+++ packages/C/dev/MakeFileBuilder/PosixSharedLibrarySymlinks.cs
@@ -24,12 +24,9 @@
             recipeBuilder.AppendFormat(" {0}", symlinkFileLeafname);

             var recipe = recipeBuilder.ToString();
-            // replace primary target with $@
-            recipe = recipe.Replace(symlinkFileLeafname, "$@");

-            // TODO: working directory support is incorrect
             var recipes = new Opus.Core.StringArray();
-            recipes.Add(System.String.Format("pushd {0}; {1}; popd", workingDirectory, recipe));
+            recipes.Add(System.String.Format("cd {0} && {1}", workingDirectory, recipe));
             return recipes;
         }


better feedback if last save import file is not existing anymore

--- ARKBreedingStats/Form1.importSave.cs
+++ ARKBreedingStats/Form1.importSave.cs
@@ -112,8 +112,7 @@
                                      ? "\n\nInner Exception:\n" + ex.InnerException.Message
                                      : string.Empty)
                     ;
-                MessageBox.Show($"An error occured while importing. Message: \n\n{message}",
-                    "Import Error", MessageBoxButtons.OK);
+                MessageBoxes.ShowMessageBox($"An error occurred while importing. Message:\n\n{message}", "Save file import error");
             }
             finally
             {
@@ -294,9 +293,17 @@
         {
             if (string.IsNullOrEmpty(Properties.Settings.Default.LastImportedSaveGame))
             {
-                MessageBox.Show(
-                    "First import a savegame via the menu, after that you can import the last imported file with this button.",
-                    "First import manual.", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                MessageBoxes.ShowMessageBox(
+                "First import a savegame via the menu. After that you can import the last imported file with this button.",
+                    "First import a save file manually", MessageBoxIcon.Information);
+                return;
+            }
+
+            if (!File.Exists(Properties.Settings.Default.LastImportedSaveGame))
+            {
+                MessageBoxes.ShowMessageBox(
+                    $"The file that was imported last time is not existing anymore:\n{Properties.Settings.Default.LastImportedSaveGame}\nImport the file you want to import at least once via the menu. After that you can import the last imported file with this button.",
+                    "File not existing");
                 return;
             }


DEV-27759; fix: Not capitalizing existing Types to maintain compatibility and avoid breaking changes

--- Acrolinx.Sidebar/Documents/Format.cs
+++ Acrolinx.Sidebar/Documents/Format.cs
@@ -5,12 +5,12 @@
 {
     public enum Format
     {
-        XML, TEXT, HTML, WORD_XML,
-        MARKDOWN, CPP, JAVA,
+        XML, Text, HTML, Word_XML,
+        Markdown, CPP, JAVA,
         PROPERTIES, YAML, JSON,
         /// <summary>
         /// Use server-side detection of input format based on file name. 5.2 server is required.
         /// </summary>
-        AUTO
+        Auto
     }
 }


Reduced CPU utilization by adding in a sleep.

--- vimage/Source/ImageViewer.cs
+++ vimage/Source/ImageViewer.cs
@@ -8,6 +8,7 @@
 using Tao.DevIl;
 using System.Diagnostics;
 using System.Text.RegularExpressions;
+using System.Threading;

 namespace vimage
 {
@@ -214,6 +215,9 @@

             while (Window.IsOpen())
             {
+                // Add in some idle time to not thrash the CPU
+                Thread.Sleep(1);
+
                 if (CloseNextTick)
                     break;


Plik jeszcze od Visibility jeden

Plik jeszcze od Visibility jeden

--- Adugo/Adugo/Models/PointDataModel.cs
+++ Adugo/Adugo/Models/PointDataModel.cs
@@ -42,6 +42,23 @@
             }
         }

+
+        public string _Visibility;
+
+        public string Visibility
+        {
+            get { return _Visibility; }
+            set
+            {
+                if (value != _Visibility)
+                {
+                    _Visibility = value;
+                    OnPropertyChanged();
+                }
+            }
+        }
+
+
         public int Left { get; set; }

         public int Top { get; set; }


Added new database execute overload with DML instance option (Insert and Update)

--- Aphysoft.Common/Database/Database.cs
+++ Aphysoft.Common/Database/Database.cs
@@ -247,6 +247,12 @@
             return sb.ToString();
         }

+        public void Execute()
+        {
+            database.Execute(this);
+        }
+
+
         #endregion
     }

@@ -303,6 +309,12 @@

             return sb.ToString();
         }
+
+        public void Execute()
+        {
+            database.Execute(this);
+        }
+

         #endregion
     }
@@ -629,6 +641,16 @@
         {
             string fsql = Format(sql, args);
             return connection.Execute(fsql);
+        }
+
+        public Result Execute(Insert insert)
+        {
+            return connection.Execute(insert.ToString());
+        }
+
+        public Result Execute(Update update)
+        {
+            return connection.Execute(update.ToString());
         }

         public Result ExecuteIdentity(string sql, params object[] args)


Fixed filename bug with 'add to new playlist'

--- Tabster/Forms/MainForm.Library.cs
+++ Tabster/Forms/MainForm.Library.cs
@@ -658,7 +658,7 @@
                 {
                     if (string.IsNullOrEmpty(p.PlaylistName))
                     {
-                        MessageBox.Show("Please enter a valid tablaturePlaylist name.", "Invalid Name", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        MessageBox.Show("Please enter a valid playlist name.", "Invalid Name", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return;
                     }

@@ -666,11 +666,14 @@

                     var item = GetSelectedLibraryItem();

-                    //add tab to new tablaturePlaylist
-                    if (sender == newPlaylistToolStripMenuItem && item != null)
-                    {
-                        playlist.Add(new TablaturePlaylistItem(item.File, item.FileInfo));
-                        playlist.Save(item.FileInfo.FullName);
+                    // new playlist
+                    if (sender == newPlaylistToolStripMenuItem)
+                    {
+                        // 'add to' new playlist
+                        if (item != null)
+                        {
+                            playlist.Add(new TablaturePlaylistItem(item.File, item.FileInfo));
+                        }
                     }

                     var playlistItem = _tablatureLibrary.Add(playlist);


feat: Add uri schemes for AndroidManifest

--- Assets/Adjust/Editor/AdjustEditor.cs
+++ Assets/Adjust/Editor/AdjustEditor.cs
@@ -402,6 +402,9 @@
             // Add intent filter to main activity if it is missing.
             manifestHasChanged |= AddBroadcastReceiver(manifestFile);

+            // Add intent filter to URL schemes for deeplinking
+            manifestHasChanged |= AddURLSchemes(manifestFile);
+
             if (manifestHasChanged)
             {
                 // Save the changes.
@@ -420,6 +423,44 @@
                 UnityEngine.Debug.Log("[Adjust]: No modifications performed due to app's AndroidManifest.xml file compatibility.");
             }
         }
+    }
+
+    private static bool AddURLSchemes(XmlDocument manifest)
+    {
+        bool hasAndroidScheme = false;
+
+        XmlElement manifestRoot = manifest.DocumentElement;
+
+        foreach (XmlNode node in manifestRoot.ChildNodes)
+        {
+            if (node.Name == "uses-permission")
+            {
+                foreach(XmlNode innerNode in node.ChildNodes)
+                {
+                    if (innerNode.Attributes != null && innerNode.Attributes["android:scheme"] != null)
+                    {
+                        hasAndroidScheme = true;
+                    }
+
+                }
+            }
+        }
+
+        bool manifestHasChanged = false;
+
+        if (!hasAndroidScheme)
+        {
+            XmlElement usesPermissionNode = manifest.CreateElement("uses-permission");
+            XmlElement androidSchemeNode = manifest.CreateElement("data");
+            androidSchemeNode.SetAttribute("android:scheme", "Sample");
+            usesPermissionNode.AppendChild(androidSchemeNode);
+            manifestRoot.AppendChild(usesPermissionNode);
+            UnityEngine.Debug.Log("[Adjust]: Android deeplink URL scheme successfully added to your app's AndroidManifest.xml file.");
+            manifestHasChanged = true;
+
+        }
+
+        return manifestHasChanged;
     }

     private static bool AddPermissions(XmlDocument manifest)


Just adding some comments. I deem them to be useful in the future.

--- Assets/common/scripts/BaseTooltip.cs
+++ Assets/common/scripts/BaseTooltip.cs
@@ -24,30 +24,33 @@
 	private String textMemory;
 	private bool enableTooltipFlag;

+	//Initialization stuffs.
 	public void Start() {
-		this.panel = this.GetComponent<Image>();
-		this.canvasGroup = this.GetComponent<CanvasGroup>();
-		this.rectTransform = this.GetComponent<RectTransform>();
-		this.tooltipTextContent = this.GetComponentInChildren<Text>();
+		this.panel = this.GetComponent<Image>();  //Part of the default Panel UI component.
+		this.canvasGroup = this.GetComponent<CanvasGroup>(); //Used to switch Tooltip to be visible/invisible.
+		this.rectTransform = this.GetComponent<RectTransform>();  //Gets the Panel UI's RectTransform.
+		this.tooltipTextContent = this.GetComponentInChildren<Text>(); //Gets the Text UI component that's the child of this Panel UI.
 		if (this.paddingSize == 0) {
-			this.paddingSize = 10;
+			this.paddingSize = 10; //Sets the text margins on all 4 sides (top, left, bottom, right).
 		}
 		this.transform.position = Vector3.zero;
 		rectTransform.localScale = Vector3.one;
 		rectTransform.localPosition = Vector3.zero;
-		this.tooltipTextContent.text = "";
-		this.enableTooltipFlag = true;
-		this.SetToolTipHidden(true);
+		this.tooltipTextContent.text = "";  //Initialize the actual Tooltip text content to an empty string.
+		this.enableTooltipFlag = true;  //True, if I want to enable the Tooltip. False, otherwise.
+		this.SetToolTipHidden(true); //Toggles visibility using the CanvasGroup.
 	}

 	public void Update() {
-		if (Input.GetKeyUp(this.toggleKey) || Input.GetKeyUp(this.alternateToggleKey)) {
+		if (Input.GetKeyUp(this.toggleKey) || Input.GetKeyUp(this.alternateToggleKey)) {  //The toggle keys are LEFT and RIGHT SHIFT.
 			this.enableTooltipFlag = !this.enableTooltipFlag;
 			this.SetToolTipHidden(this.enableTooltipFlag);
 		}

 		if (this.panel != null && this.tooltipTextContent != null) {
-			this.tooltipTextContent.text = this.textMemory;
+			this.tooltipTextContent.text = this.textMemory;  //Sets the tooltip text content to the child Text UI component.
+
+			//The following code adjusts the tooltip Panel UI's width and height. There's no other way I know of that auto-adjusts the child Text UI component's text content to fit nicely.
 			if (this.tooltipTextContent.preferredWidth > Screen.width) {
 				this.panel.rectTransform.sizeDelta = new Vector2(this.tooltipTextContent.preferredWidth * 0.5f, this.tooltipTextContent.preferredHeight + this.paddingSize * 2f);
 			}
@@ -56,6 +59,7 @@
 			}
 		}

+		//If followCursorFlag is TRUE, the tooltip will follow the cursor at a specific offset from the mouse cursor's position.
 		if (this.target != null && this.followCursorFlag) {
 			Vector2 pos = Input.mousePosition;
 			pos.x -= this.xOffset;
@@ -64,10 +68,12 @@
 		}
 	}

+	//Just setting text to the child Text UI component.
 	public void SetText(string hint) {
 		this.textMemory = hint;
 	}

+	//Toggles tooltip visibility/
 	public void SetToolTipHidden(bool flag) {
 		if (this.enableTooltipFlag) {
 			if (flag) {
@@ -88,6 +94,10 @@
 		}
 	}

+	//This sets the target. Target is a UI component that contains tooltip hint text contents.
+	//When a mouse cursor enters/exits the target's RectTransform boundaries, this function
+	//will be called. Its intended purpose is merely just to point out the last touched UI
+	//component the player has the mouse hovering over.
 	public void SetTarget(RectTransform obj) {
 		this.target = obj;
 	}


...

Test to see if non-authority updates works. Can be reverted.

--- Assets/new_multiplayer/NewSpawner.cs
+++ Assets/new_multiplayer/NewSpawner.cs
@@ -330,6 +330,7 @@

 		public void Update() {
 			if (!this.hasAuthority) {
+				ManageNonAuthorityLists();
 				return;
 			}
 			if (!this.isGameStart && this.isUnitListEmpty) {
@@ -607,6 +608,36 @@
 			}
 		}

+		private void ManageNonAuthorityLists() {
+			if (this.splitList.Count > 0) {
+				for (int i = this.splitList.Count - 1; i >= 0; i--) {
+					Split splitGroup = this.splitList[i];
+					if (splitGroup.owner == null || splitGroup.split == null) {
+						this.splitList.Remove(splitGroup);
+					}
+					if (splitGroup.elapsedTime > 1f) {
+						NewGameUnit unit = splitGroup.owner.GetComponent<NewGameUnit>();
+						NewChanges changes = unit.CurrentProperty();
+						changes.isSelected = false;
+						changes.isSplitting = false;
+						//CmdUpdateUnitProperty(splitGroup.owner.gameObject, changes);
+						unit.NewProperty(changes);
+						unit = splitGroup.split.GetComponent<NewGameUnit>();
+						unit.NewProperty(changes);
+						//CmdUpdateUnitProperty(splitGroup.split.gameObject, changes);
+						//this.unitList.Add(new NewUnitStruct(splitGroup.split.gameObject));
+						this.splitList.Remove(splitGroup);
+
+						//GameMetricLogger.Increment(GameMetricOptions.Splits);
+					}
+					else {
+						splitGroup.Update();
+						this.splitList[i] = splitGroup;
+					}
+				}
+			}
+		}
+
 		private void HandleSelection() {
 			if (this.minimapCamera == null || !this.selectionBoxRenderer.enabled) {
 				return;


Copy Folder Adding comments

Copy Folder
Adding comments

--- Box.V2/Managers/BoxFoldersManager.cs
+++ Box.V2/Managers/BoxFoldersManager.cs
@@ -102,7 +102,13 @@
         /// <summary>
         /// Used to create a copy of a folder in another folder. The original version of the folder will not be altered.
         /// </summary>
-        /// <returns></returns>
+        /// <param name="folderRequest">
+        /// folderRequest.Id - Id of the file
+        /// folderRequest.Parent.Id - The ID of the destination folder
+        /// folderRequest.Name - An optional new name for the folder.
+        /// </param>
+        /// <param name="fields">Attribute(s) to include in the response</param>
+        /// <returns>A full folder object is returned if the ID is valid and if the update is successful.</returns>
         public async Task<BoxFolder> CopyAsync(BoxFolderRequest folderRequest, List<string> fields = null)
         {
             folderRequest.ThrowIfNull("folderRequest")


removed unused usings

removed unused usings

--- CH09/CombiningObservables/Program.cs
+++ CH09/CombiningObservables/Program.cs
@@ -1,10 +1,7 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.Reactive.Linq;
 using System.Reactive.Subjects;
 using System.Reactive.Threading.Tasks;
-using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
 using Helpers;
@@ -95,8 +92,8 @@
             Task<string[]> twitterStatuses = Task.FromResult(new[] { "Twitter1", "Twitter2" }); //this will finish immidiatly

             Observable.Merge(
-                facebookMessages.ToObservable(),
-                twitterStatuses.ToObservable())
+                    facebookMessages.ToObservable(),
+                    twitterStatuses.ToObservable())
                 .SelectMany(messages => messages)
                 .RunExample("Merged Messages");


Call ObjectManager.Initialize inside our _GtkSharp.GnomeSharp.

--- Tomboy/panelapplet/PanelApplet.cs
+++ Tomboy/panelapplet/PanelApplet.cs
@@ -435,7 +435,7 @@

 		static PanelApplet ()
 		{
-			GtkSharp.GnomeSharp.ObjectManager.Initialize ();
+			_GtkSharp.GnomeSharp.ObjectManager.Initialize ();
 		}
 #endregion
 #region Customized extensions


Bump version number

Bump version number

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


More LINQ conversion.

More LINQ conversion.

--- Utilities/CustomTypeCollection.cs
+++ Utilities/CustomTypeCollection.cs
@@ -14,7 +14,6 @@

         internal CustomTypeCollection()
         {
-
         }

         internal CustomTypeCollection(IEnumerable<T> items)
@@ -31,10 +30,7 @@

         public IEnumerator<T> GetEnumerator()
         {
-            foreach (var item in _items)
-            {
-                yield return item;
-            }
+            return ((IEnumerable<T>) _items).GetEnumerator();
         }

         IEnumerator IEnumerable.GetEnumerator()


GitVersioner - zjistovani vetve a dlouheho hashe

--- Utilities/GitVersioner/Program.cs
+++ Utilities/GitVersioner/Program.cs
@@ -19,6 +19,8 @@
             public int Revision;
             public int Commit;
             public string ShortHash;
+            public string LongHash;
+            public string Branch;
         }

         static readonly string GitExeName = Environment.OSVersion.Platform == PlatformID.Unix ? "git" : "git.exe";
@@ -122,7 +124,7 @@
             var bkp = sFile + ".gwbackup";
             //if (File.Exists(bkp)) return false;
             File.Copy(sFile, bkp, true);
-            var git = ExecGit(Path.GetDirectoryName(sFile));
+            var git = GetVersionInfo(Path.GetDirectoryName(sFile));
             // zapis
             using (var infile = new StreamReader(bkp, Encoding.Default, true))
             {
@@ -141,23 +143,9 @@
             return true;
         }

-        private static GitResult ExecGit(string workDir)
-        {
-            var psi = new ProcessStartInfo(FindGitBinary(), "describe --long --tags --always");
-            psi.WorkingDirectory = workDir;
-            psi.RedirectStandardOutput = true;
-            psi.UseShellExecute = false;
-            var p = Process.Start(psi);
-            var lines = "";
-            while (!p.StandardOutput.EndOfStream)
-            {
-                lines += p.StandardOutput.ReadLine() + "\n";
-            }
-            if (!p.WaitForExit(1000))
-            {
-                p.Kill();
-            }
-
+        private static GitResult GetVersionInfo(string workDir)
+        {
+            var lines = ExecGit(workDir, "describe --long --tags --always");
             GitResult r;
             r.MajorVersion = 0;
             r.MinorVersion = 0;
@@ -222,6 +210,30 @@
                 r.ShortHash = lines;
             }
             r.ShortHash = r.ShortHash.Trim();
+            //
+            r.Branch = ExecGit(workDir, "rev-parse --abbrev-ref HEAD").Trim();
+            r.LongHash = ExecGit(workDir, "rev-parse HEAD").Trim();
+            return r;
+        }
+
+        private static string ExecGit(string workDir, string parameters)
+        {
+            var psi = new ProcessStartInfo(FindGitBinary(), parameters)
+            {
+                WorkingDirectory = workDir,
+                RedirectStandardOutput = true,
+                UseShellExecute = false
+            };
+            var p = Process.Start(psi);
+            var r = string.Empty;
+            while (p != null && !p.StandardOutput.EndOfStream)
+            {
+                r += p.StandardOutput.ReadLine() + "\n";
+            }
+            if (p != null && !p.WaitForExit(1000))
+            {
+                p.Kill();
+            }
             return r;
         }

@@ -232,7 +244,14 @@
             r = r.Replace("$Revision$", gr.Revision.ToString(CultureInfo.InvariantCulture));
             r = r.Replace("$Commit$", gr.Commit.ToString(CultureInfo.InvariantCulture));
             r = r.Replace("$ShortHash$", gr.ShortHash);
+            r = r.Replace("$LongHash$", gr.LongHash);
+            r = r.Replace("$Branch$", gr.Branch);
             return r;
+        }
+
+        private static void RestoreBackup(string inFile)
+        {
+
         }

         static void Main(string[] args)
@@ -245,7 +264,8 @@
                     WriteInfo(args[1]);
                     break;
                 case "r":
-                    return;
+                    RestoreBackup(args[1]);
+                    break;
                 default:
                     return;
             }


update

update

--- CSharpGL/0Foundations/Maths/ivec3.cs
+++ CSharpGL/0Foundations/Maths/ivec3.cs
@@ -1,5 +1,6 @@
 using System;
 using System.ComponentModel;
+using System.Runtime.InteropServices;

 namespace CSharpGL
 {
@@ -7,21 +8,22 @@
     /// Represents a three dimensional vector.
     /// </summary>
     [TypeConverter(typeof(StructTypeConverter<ivec3>))]
+    [StructLayout(LayoutKind.Explicit)]
     public struct ivec3 : IEquatable<ivec3>, ILoadFromString
     {
         /// <summary>
-        /// Don't change the order of x, y, z appears!
-        /// </summary>
+        /// </summary>
+        [FieldOffset(sizeof(int) * 0)]
         public int x;

         /// <summary>
-        /// Don't change the order of x, y, z appears!
-        /// </summary>
+        /// </summary>
+        [FieldOffset(sizeof(int) * 1)]
         public int y;

         /// <summary>
-        /// Don't change the order of x, y, z appears!
-        /// </summary>
+        /// </summary>
+        [FieldOffset(sizeof(int) * 2)]
         public int z;

         /// <summary>


Writing out results of grammar split. This solution "works" but you must (a) use the new format of .csproj, (b) update the solution to remove the old grammar (I might just return a commented out file), (c) update the project to have a namespace specified for the Antlr tool because I don't parse the generated files.

--- Client/Menus/SplitCombineGrammars.cs
+++ Client/Menus/SplitCombineGrammars.cs
@@ -149,61 +149,19 @@
                 foreach (var pair in changes)
                 {
                     string fn = pair.Key;
+                    string new_code = pair.Value;
+
+                    if (new_code == null)
+                    {
+                        // Delete the file.
+                        System.IO.File.Delete(fn);
+                    }
                     Workspaces.Document dd = Workspaces.Workspace.Instance.FindDocument(fn);
                     if (dd == null)
                     {
-                        return;
+                        // Create the file.
+                        System.IO.File.WriteAllText(fn, new_code);
                     }
-                    string new_code = pair.Value;
-                    var edit = buffer.CreateEdit();
-                    var diff = new LanguageServer.diff_match_patch();
-                    var diffs = diff.diff_main(document.Code, new_code);
-                    var patch = diff.patch_make(diffs);
-                    //patch.Reverse();
-
-                    // Start edit session.
-                    int times = 0;
-                    int delta = 0;
-                    foreach (var p in patch)
-                    {
-                        times++;
-                        var start = p.start1 - delta;
-
-                        var offset = 0;
-                        foreach (var ed in p.diffs)
-                        {
-                            if (ed.operation == LanguageServer.Operation.EQUAL)
-                            {
-                                // Let's verify that.
-                                var len = ed.text.Length;
-                                var tokenSpan = new SnapshotSpan(buffer.CurrentSnapshot,
-                                  new Span(start + offset, len));
-                                var tt = tokenSpan.GetText();
-                                if (ed.text != tt)
-                                { }
-                                offset = offset + len;
-                            }
-                            else if (ed.operation == LanguageServer.Operation.DELETE)
-                            {
-                                var len = ed.text.Length;
-                                var tokenSpan = new SnapshotSpan(buffer.CurrentSnapshot,
-                                  new Span(start + offset, len));
-                                var tt = tokenSpan.GetText();
-                                if (ed.text != tt)
-                                { }
-                                var sp = new Span(start + offset, len);
-                                offset = offset + len;
-                                edit.Delete(sp);
-                            }
-                            else if (ed.operation == LanguageServer.Operation.INSERT)
-                            {
-                                var len = ed.text.Length;
-                                edit.Insert(start + offset, ed.text);
-                            }
-                        }
-                        delta = delta + (p.length2 - p.length1);
-                    }
-                    edit.Apply();
                 }
             }
             catch (Exception exception)


Regex glob now uses anchors so that it only matches entire file names

--- Linguist/Languages.cs
+++ Linguist/Languages.cs
@@ -124,7 +124,8 @@
 				Language lang;
 				if (!ms_languages.TryGetValue(glob, out lang))
 				{
-					string pattern = Regex.Escape(glob).Replace(@"\*", ".*").Replace(@"\?", ".");
+					string pattern = string.Format("^{0}$", Regex.Escape(glob));
+					pattern = pattern.Replace(@"\*", ".*").Replace(@"\?", ".");
 					var re = new Regex(pattern, RegexOptions.IgnoreCase);
 					ms_languages.Add(glob, new Language(name, re, elements));
 				}


base şimdilik kaldırıldı (bir şekilde baz dosyaları bulabilmek lazım)

--- CodeGenerator/EntityCodeGenerator.cs
+++ CodeGenerator/EntityCodeGenerator.cs
@@ -99,7 +99,7 @@
                     kdiff3Path ?? ""));
             }

-            Process.Start(kdiff3Path, "--auto " + file + " " + file + " " + generated + " -o " + file);
+            Process.Start(kdiff3Path, "--auto " + file + " " + generated + " -o " + file);
         }

         private static bool StreamsContentsAreEqual(Stream stream1, Stream stream2)


refactored code comments

refactored code comments

--- WordPressTests/CreatePostTests.cs
+++ WordPressTests/CreatePostTests.cs
@@ -27,16 +27,26 @@
                 .WithPassword("selenium")
                 .Login();

+            // navigate to the create post page
             NewPostPage.GoTo();

+            // create post contents - title, body
             NewPostPage
                 .CreatePost("This is the post test title")
                 .WithBody("Hi, this is the body")
                 .Publish();

+            // create post
             NewPostPage.GoToNewPost();

+            // check if the post has been created and that the title of the post equals the provided one
             Assert.AreEqual(PostPage.Title, "This is the Title", "Title did not match a new post");
+        }
+
+        [TestCleanup]
+        public void CleanUp()
+        {
+            Driver.Close();
         }
     }
 }


cancel new results calculation

cancel new results calculation

--- Wox/ViewModel/ResultsViewModel.cs
+++ Wox/ViewModel/ResultsViewModel.cs
@@ -138,9 +138,9 @@
         {
             lock (_addResultsLock)
             {
-                var newResults = NewResults(newRawResults, resultId);
+                var t = new CancellationTokenSource().Token;
+                var newResults = NewResults(newRawResults, resultId, t);
                 // update UI in one run, so it can avoid UI flickering
-                var t = new CancellationTokenSource().Token;
                 Results.Update(newResults, t);

                 if (Results.Count > 0)
@@ -163,7 +163,7 @@
             lock (_addResultsLock)
             {
                 if (token.IsCancellationRequested) { return; }
-                var newResults = NewResults(newRawResults, resultId);
+                var newResults = NewResults(newRawResults, resultId, token);
                 // update UI in one run, so it can avoid UI flickering
                 if (token.IsCancellationRequested) { return; }
                 Results.Update(newResults, token);
@@ -180,24 +180,28 @@
             }
         }

-        private List<ResultViewModel> NewResults(List<Result> newRawResults, string resultId)
+        private List<ResultViewModel> NewResults(List<Result> newRawResults, string resultId, CancellationToken token)
         {
             var newResults = newRawResults.Select(r => new ResultViewModel(r)).ToList();
             var results = Results.ToList();
             var oldResults = results.Where(r => r.Result.PluginID == resultId).ToList();

+            if (token.IsCancellationRequested) { return new List<ResultViewModel>(); }
             // intersection of A (old results) and B (new newResults)
             var intersection = oldResults.Intersect(newResults).ToList();

+            if (token.IsCancellationRequested) { return new List<ResultViewModel>(); }
             // remove result of relative complement of B in A
             foreach (var result in oldResults.Except(intersection))
             {
+                if (token.IsCancellationRequested) { return new List<ResultViewModel>(); }
                 results.Remove(result);
             }

             // update index for result in intersection of A and B
             foreach (var commonResult in intersection)
             {
+                if (token.IsCancellationRequested) { return new List<ResultViewModel>(); }
                 int oldIndex = results.IndexOf(commonResult);
                 int oldScore = results[oldIndex].Result.Score;
                 var newResult = newResults[newResults.IndexOf(commonResult)];
@@ -221,6 +225,7 @@
             // insert result in relative complement of A in B
             foreach (var result in newResults.Except(intersection))
             {
+                if (token.IsCancellationRequested) { return new List<ResultViewModel>(); }
                 if (results.Count <= maxResults)
                 {
                     int newIndex = InsertIndexOf(result.Result.Score, results);
@@ -232,6 +237,7 @@
                 }
             }

+            if (token.IsCancellationRequested) { return new List<ResultViewModel>(); }
             if (results.Count > maxResults)
             {
                 var resultsCopy = results.GetRange(0, maxResults);


Change in Desgin

Change in Desgin

--- source/HotelBooking/Views/Hotel/index.cshtml
+++ source/HotelBooking/Views/Hotel/index.cshtml
@@ -4,8 +4,8 @@
     Layout = "~/Views/Shared/Hotel_Layout.cshtml";
 }

-@Html.TextBoxFor(m => m.TokenId, new { @class = "form-control" })
-@Html.TextBoxFor(m => m.Status, new { @class = "form-control" })
+@*@Html.TextBoxFor(m => m.TokenId, new { @class = "form-control" })
+@Html.TextBoxFor(m => m.Status, new { @class = "form-control" })*@

@@ -49,7 +49,7 @@
     return Number(n) === n && n % 1 !== 0;
 }
 </script>
-</script>
+

@@ -103,12 +103,11 @@

-
Who

+
Person(0)

                                     <button type="button" onClick="onClick()">+</button>
                                     <button type="button" onClick="onClick_Minus()">-</button>
-                                    Person 0

                                     @*

                 Rooms
@@ -122,31 +121,18 @@

*@

-                                        Adults
+
Rooms

-
-                                                @*<option value="1">01</option>
-                                                <option value="2">02</option>
-                                                <option value="3">03</option>
-                                                <option value="4">04</option>*@
+
+

-

-                                        Kids
-

-                                            <select class="full-width">
-                                                <option value="1">01</option>
-                                                <option value="2">02</option>
-                                                <option value="3">03</option>
-                                                <option value="4">04</option>
-                                            </select>
-

-

-

-

-
-

+
+

+

+
+

                             <button type="submit" class="full-width icon-check animated" data-animation-type="bounce" data-animation-duration="1">SEARCH NOW</button>


Median trading durations (all/winning/losing) added to TradeStatistics

--- Common/Statistics/TradeStatistics.cs
+++ Common/Statistics/TradeStatistics.cs
@@ -15,6 +15,7 @@

 using System;
 using System.Collections.Generic;
+using QuantConnect.Util;

 namespace QuantConnect.Statistics
 {
@@ -102,6 +103,21 @@
         /// The average duration for all losing trades
         /// </summary>
         public TimeSpan AverageLosingTradeDuration { get; set; }
+
+        /// <summary>
+        /// The median duration for all trades
+        /// </summary>
+        public TimeSpan MedianTradeDuration { get; set; }
+
+        /// <summary>
+        /// The median duration for all winning trades
+        /// </summary>
+        public TimeSpan MedianWinningTradeDuration { get; set; }
+
+        /// <summary>
+        /// The median duration for all losing trades
+        /// </summary>
+        public TimeSpan MedianLosingTradeDuration { get; set; }

         /// <summary>
         /// The maximum number of consecutive winning trades
@@ -239,6 +255,9 @@
             var sumForDownsideVariance = 0m;
             var lastPeakTime = DateTime.MinValue;
             var isInDrawdown = false;
+            List<double> allTradeDurationsSeconds = new List<double>();
+            List<double> winningTradeDurationsSeconds = new List<double>();
+            List<double> losingTradeDurationsSeconds = new List<double>();

             foreach (var trade in trades)
             {
@@ -268,6 +287,8 @@
                     AverageProfit += (trade.ProfitLoss - AverageProfit) / NumberOfWinningTrades;

                     AverageWinningTradeDuration += TimeSpan.FromSeconds((trade.Duration.TotalSeconds - AverageWinningTradeDuration.TotalSeconds) / NumberOfWinningTrades);
+
+                    winningTradeDurationsSeconds.Add(trade.Duration.TotalSeconds);

                     if (trade.ProfitLoss > LargestProfit)
                         LargestProfit = trade.ProfitLoss;
@@ -305,6 +326,8 @@

                     AverageLosingTradeDuration += TimeSpan.FromSeconds((trade.Duration.TotalSeconds - AverageLosingTradeDuration.TotalSeconds) / NumberOfLosingTrades);

+                    losingTradeDurationsSeconds.Add(trade.Duration.TotalSeconds);
+
                     if (trade.ProfitLoss < LargestLoss)
                         LargestLoss = trade.ProfitLoss;

@@ -327,6 +350,7 @@
                 ProfitLossStandardDeviation = (decimal)Math.Sqrt((double)variance);

                 AverageTradeDuration += TimeSpan.FromSeconds((trade.Duration.TotalSeconds - AverageTradeDuration.TotalSeconds) / TotalNumberOfTrades);
+                allTradeDurationsSeconds.Add(trade.Duration.TotalSeconds);
                 AverageMAE += (trade.MAE - AverageMAE) / TotalNumberOfTrades;
                 AverageMFE += (trade.MFE - AverageMFE) / TotalNumberOfTrades;

@@ -352,6 +376,13 @@
             ProfitToMaxDrawdownRatio = TotalProfitLoss == 0 ? 0 : (MaximumClosedTradeDrawdown < 0 ? TotalProfitLoss / Math.Abs(MaximumClosedTradeDrawdown) : 10);

             AverageEndTradeDrawdown = AverageProfitLoss - AverageMFE;
+
+            if (allTradeDurationsSeconds.Count > 0)
+                MedianTradeDuration = TimeSpan.FromSeconds(allTradeDurationsSeconds.Median());
+            if (winningTradeDurationsSeconds.Count > 0)
+                MedianWinningTradeDuration = TimeSpan.FromSeconds(winningTradeDurationsSeconds.Median());
+            if (losingTradeDurationsSeconds.Count > 0)
+                MedianLosingTradeDuration = TimeSpan.FromSeconds(losingTradeDurationsSeconds.Median());
         }

         /// <summary>


Cleaned up exception handling and added encryption prompt

--- ConDep.Dsl/Config/EnvConfigParser.cs
+++ ConDep.Dsl/Config/EnvConfigParser.cs
@@ -115,7 +115,9 @@
             dynamic config;

             if (!Encrypted(json, out config))
-                return;
+            {
+                throw new ConDepCryptoException("Unable to decrypt. No content in file [{0}] is encrypted.");
+            }

             DecryptJsonConfig(config, crypto);
             UpdateConfig(file, config);


Removed separate msdocs search

Removed separate msdocs search

Turns out the MSDN search also searches msdocs, among other sources.

--- ContactsBot/Modules/Documentation.cs
+++ ContactsBot/Modules/Documentation.cs
@@ -13,19 +13,11 @@

 namespace ContactsBot.Modules
 {
-    [Group("docs")]
     public class Documentation : ModuleBase
     {
         private const string MSDNIcon = "http://i.imgur.com/LCr4b6P.png";
-        private const string MSDocsIcon = "http://i.imgur.com/GSXfzSU.jpg";

-        private enum ReplyType
-        {
-            MSDN,
-            MSDocs
-        }
-
-        [Command("msdn")]
+        [Command("docs")]
         public async Task Msdn([Summary("The query to search for")] [Remainder] string query)
         {
             try
@@ -41,8 +33,7 @@
                         OriginalQuery = query,
                         Title = d.Descendants(XName.Get("title", "")).FirstOrDefault()?.Value,
                         Description = d.Descendants(XName.Get("description", "")).FirstOrDefault()?.Value,
-                        Url = d.Descendants(XName.Get("link", "")).FirstOrDefault()?.Value,
-                        ReplyType = ReplyType.MSDN
+                        Url = d.Descendants(XName.Get("link", "")).FirstOrDefault()?.Value
                     })
                     .FirstOrDefault();

@@ -62,47 +53,6 @@
             }
         }

-        [Command("msdocs")]
-        public async Task Docs([Summary("The query to search for")] [Remainder] string query)
-        {
-            try
-            {
-                var request = HttpWebRequest.CreateHttp($"https://docs.microsoft.com/api/search?search={Uri.EscapeDataString(query)}&locale=en-us&$top=10");
-                using (StreamReader reader = new StreamReader((await request.GetResponseAsync()).GetResponseStream()))
-                {
-                    var response = JObject.Parse(reader.ReadToEnd());
-                    var result = response.First.First.First();
-
-                    var item = new QueryResponse
-                    {
-                        OriginalQuery = query,
-                        Title = result["title"].Value<string>(),
-                        Description = result["description"].Value<string>(),
-                        Url = result["url"].Value<string>(),
-                        ReplyType = ReplyType.MSDocs
-                    };
-
-                    await ReplyWithResponse(item);
-                }
-            }
-            catch (WebException)
-            {
-                await ReplyAsync("Sorry, there was a network issue.");
-            }
-            catch (JsonException)
-            {
-                await ReplyAsync("There was a problem parsing the JSON response from MSDocs.");
-            }
-            catch (IOException)
-            {
-                await ReplyAsync("There was an issue in reading the response from MSDocs.");
-            }
-            catch (Exception)
-            {
-                await ReplyAsync("Something weird happened.");
-            }
-        }
-
         private async Task ReplyWithResponse(QueryResponse response)
         {
             var embed = new Discord.EmbedBuilder
@@ -111,9 +61,9 @@
                 Description = WebUtility.HtmlDecode(response.Description),
                 Url = response.Url,
                 Color = new Discord.Color(104, 33, 122),
-                Thumbnail = new Discord.EmbedThumbnailBuilder()
+                Thumbnail = new Discord.EmbedThumbnailBuilder
                 {
-                    Url = (response.ReplyType == ReplyType.MSDN ? MSDNIcon : MSDocsIcon)
+                    Url = MSDNIcon
                 }
             };

@@ -127,8 +77,6 @@
             public string Title { get; set; }
             public string Description { get; set; }
             public string Url { get; set; }
-
-            public ReplyType ReplyType { get; set; }
         }
     }
 }


Jump to 1.0.4000

Jump to 1.0.4000

--- source/NHibernate.AspNet.Identity/Properties/AssemblyInfo.cs
+++ source/NHibernate.AspNet.Identity/Properties/AssemblyInfo.cs
@@ -32,6 +32,6 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyFileVersion("3.3.3.4000")]
-[assembly: AssemblyInformationalVersion("3.3.3.4000")]
-[assembly: AssemblyVersion("3.3.3")]
+[assembly: AssemblyFileVersion("1.0.4000")]
+[assembly: AssemblyInformationalVersion("1.0.4000")]
+[assembly: AssemblyVersion("1.0")]


Addressing CR

Addressing CR

--- Controllers/Api/PushApiController.cs
+++ Controllers/Api/PushApiController.cs
@@ -91,7 +91,7 @@
             if (this.Request.Headers.TryGetValues("X-ZUMO-INSTALLATION-ID", out installationIds))
             {
                 var installationId = installationIds.FirstOrDefault();
-                Installation nhInstallation = await this.GetNhHubClient().GetInstallationAsync(installationId);
+                Installation nhInstallation = await this.GetNhClient().GetInstallationAsync(installationId);
                 string nhTemplates = null;
                 string nhSecondaryTiles = null;

@@ -138,25 +138,25 @@
         public async Task<bool> GetVerifyUnregisterInstallationResult()
         {
             IEnumerable<string> installationIds;
-            string responseErrorMessge = null;
+            string responseErrorMessage = null;
             if (this.Request.Headers.TryGetValues("X-ZUMO-INSTALLATION-ID", out installationIds))
             {
                 var installationId = installationIds.FirstOrDefault();
                 try
                 {
-                    Installation nhInstallation = await this.GetNhHubClient().GetInstallationAsync(installationId);
+                    Installation nhInstallation = await this.GetNhClient().GetInstallationAsync(installationId);
                 }
                 catch (MessagingEntityNotFoundException)
                 {
                     return true;
                 }
-                responseErrorMessge = string.Format("Found deleted Installation with id {0}", installationId);
+                responseErrorMessage = string.Format("Found deleted Installation with id {0}", installationId);
             }

             HttpResponseMessage msg = new HttpResponseMessage()
             {
                 StatusCode = HttpStatusCode.InternalServerError,
-                Content = new StringContent(responseErrorMessge)
+                Content = new StringContent(responseErrorMessage)
             };
             throw new HttpResponseException(msg);
         }
@@ -164,10 +164,10 @@
         [Route("api/deleteRegistrationsForChannel")]
         public async Task DeleteRegistrationsForChannel(string channelUri)
         {
-            await this.GetNhHubClient().DeleteRegistrationsByChannelAsync(channelUri);
-        }
-
-        private NotificationHubClient GetNhHubClient()
+            await this.GetNhClient().DeleteRegistrationsByChannelAsync(channelUri);
+        }
+
+        private NotificationHubClient GetNhClient()
         {
             string connString = null;
             string hubName = null;
@@ -183,11 +183,11 @@
             string continuationToken = null;
             do
             {
-                CollectionQueryResult<RegistrationDescription> regsForChannel = await this.GetNhHubClient().GetRegistrationsByChannelAsync(channelUri, continuationToken, 100);
+                CollectionQueryResult<RegistrationDescription> regsForChannel = await this.GetNhClient().GetRegistrationsByChannelAsync(channelUri, continuationToken, 100);
                 continuationToken = regsForChannel.ContinuationToken;
                 foreach (RegistrationDescription reg in regsForChannel)
                 {
-                    RegistrationDescription registration = await this.GetNhHubClient().GetRegistrationAsync<RegistrationDescription>(reg.RegistrationId);
+                    RegistrationDescription registration = await this.GetNhClient().GetRegistrationAsync<RegistrationDescription>(reg.RegistrationId);
                     if (registration.Tags == null || registration.Tags.Count() != 1)
                     {
                         return false;


Null ref fix restored;

Null ref fix restored;

--- Controllers/Base/ControllerHelper.cs
+++ Controllers/Base/ControllerHelper.cs
@@ -26,14 +26,23 @@
 		}
 	 */
 	public class ControllerHelper<TController>: ControllerHelperBase where TController:IController {
-		public static List<TController> Instances { get; private set; }
-		public static TController       Instance  { get; private set; }
+
+		static List<TController> _instances = null;
+
+		public static List<TController> Instances {
+			get {
+				if( _instances == null ) {
+					_instances = new List<TController>();
+				}
+				return _instances;
+			}
+		}
+
+		public static TController Instance { get; private set; }
+

 		public override void Attach(IController handler) {
 			var newHanlder = (TController)handler;
-			if( Instances == null ) {
-				Instances = new List<TController>();
-			}
 			Instances.Add(newHanlder);
 			if( Instances.Count == 1 ) {
 				Instance = newHanlder;


Test method body generation: assert

Test method body generation: assert

--- CreateTestPlugin/CreateTestAction.cs
+++ CreateTestPlugin/CreateTestAction.cs
@@ -103,12 +103,20 @@
       }

       // Act
-      var invocation = originalMethod.ReturnType.IsVoid()
+      var invocation = !originalMethod.ReturnType.IsVoid()
         ? factory.CreateStatement("$0 result = " + originalMethod.ShortName + "();", originalMethod.ReturnType)
         : factory.CreateStatement(originalMethod.ShortName + "();");
       anchorStatement = testMethod.Body.AddStatementAfter(invocation, anchorStatement);

       // Assert
+      if (!originalMethod.ReturnType.IsVoid())
+      {
+        var stmt = factory.CreateStatement("$0 expected = $1;", originalMethod.ReturnType, DefaultValueUtil.GetDefaultValue(originalMethod.ReturnType, testMethod.Language, psiModule));
+        anchorStatement = testMethod.Body.AddStatementAfter(stmt, anchorStatement);
+
+        stmt = factory.CreateStatement("Assert.AreEqual(expected, result);");
+        anchorStatement = testMethod.Body.AddStatementAfter(stmt, anchorStatement);
+      }
     }

     public override string Text


Fix shadowing property.

Fix shadowing property.

--- Ctl.Data.Excel/ExcelObjectOptions.cs
+++ Ctl.Data.Excel/ExcelObjectOptions.cs
@@ -54,12 +54,6 @@
         /// </summary>
         public bool Validate { get; set; }

-        /// <summary>
-        /// If true, leading and trailing whitespace will be trimmed from column values.
-        /// Values consisting of only whitespace will be returned as null.
-        /// </summary>
-        public bool TrimWhitespace { get; set; }
-
         public ExcelObjectOptions()
         {
             FormatProvider = null;


Change the too big to render message to Reduce Polygons to Render

fixes #921

--- CustomWidgets/PartThumbnailWidget.cs
+++ CustomWidgets/PartThumbnailWidget.cs
@@ -665,8 +665,8 @@
 				this.thumbnailImage.SetRecieveBlender(new BlenderPreMultBGRA());
 				Graphics2D graphics = this.thumbnailImage.NewGraphics2D();
 				Vector2 center = new Vector2(Width / 2.0, Height / 2.0);
-				double yOffset = 8 * Width / 50 * GuiWidget.DeviceScale * 1.5;
-				graphics.DrawString("Too Big\nto\nRender", center.x, center.y + yOffset, 8 * Width / 50, Agg.Font.Justification.Center, Agg.Font.Baseline.BoundsCenter, color: RGBA_Bytes.White);
+				double yOffset = 8 * Width / 50 * GuiWidget.DeviceScale * 2;
+				graphics.DrawString("Reduce\nPolygons\nto\nRender", center.x, center.y + yOffset, 8 * Width / 50, Agg.Font.Justification.Center, Agg.Font.Baseline.BoundsCenter, color: RGBA_Bytes.White);

 				UiThread.RunOnIdle(this.EnsureImageUpdated);
 				return true;


Use glob-recurse and fix the program when you pass it file names

--- DeviceMetadataInstallTool/Program.cs
+++ DeviceMetadataInstallTool/Program.cs
@@ -4,32 +4,7 @@

 namespace DeviceMetadataInstallTool
 {
-    /// <summary>
-    /// see https://support.microsoft.com/en-us/kb/303974
-    /// </summary>
-    class MetadataFinder
-    {
-        public System.Collections.Generic.List<String> Files = new System.Collections.Generic.List<String>();

-        public void SearchDirectory(string dir)
-        {
-            try
-            {
-                foreach (var d in Directory.GetDirectories(dir))
-                {
-                    foreach (var f in Directory.GetFiles(d, "*.devicemetadata-ms"))
-                    {
-                        Files.Add(f);
-                    }
-                    SearchDirectory(d);
-                }
-            }
-            catch (System.Exception excpt)
-            {
-                Console.WriteLine(excpt.Message);
-            }
-        }
-    }
     class Program
     {
         static void Main(string[] args)
@@ -39,12 +14,11 @@
             if (args.Length == 0)
             {
                 var assemblyDir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
-                var finder = new MetadataFinder();
-                finder.SearchDirectory(assemblyDir);
-                files = finder.Files;
-            } else
+                files = Sensics.DeviceMetadataInstaller.Util.GetMetadataFilesRecursive(assemblyDir);
+            }
+            else
             {
-                files.AddRange(files);
+                files.AddRange(args);
             }

             var store = new Sensics.DeviceMetadataInstaller.MetadataStore();


Fixed a bug where RSA-encrypted key was getting written twice.

--- DieFledermaus/DieFledermausStream.cs
+++ DieFledermaus/DieFledermausStream.cs
@@ -3729,12 +3729,7 @@
                     formats.Add(_kHash, _vHash, HashBDict[_hashFunc]);

                     if (_encFmt != MausEncryptionFormat.None)
-                    {
                         WriteEncFormat(_encFmt, _keySize, rsaKey, formats);
-
-                        if (rsaKey != null)
-                            formats.Add(_kEncRsa, _vEnc, rsaKey);
-                    }

                     WriteRsaSig(rsaSignature, dsaSignature, ecdsaSignature, formats);


Tweak to property label

Tweak to property label

--- DlxLibPropertyTests/PropertyTests.cs
+++ DlxLibPropertyTests/PropertyTests.cs
@@ -29,11 +29,15 @@
         [Test]
         public void ExactCoverProblemsWithSingleSolutionTest()
         {
+            Func<int, string> makeLabel = numSolutions => string.Format(
+                "Expected exactly one solution but got {0}",
+                numSolutions);
+
             var arb = Arb.fromGen(GenMatrixOfIntWithSingleSolution());
             var property = Prop.forAll(arb, FSharpFunc<int[,], Property>.FromConverter(matrix =>
             {
                 var solutions = new Dlx().Solve(matrix).ToList();
-                var p1 = PropExtensions.Label(solutions.Count() == 1, "Expected exactly one solution");
+                var p1 = PropExtensions.Label(solutions.Count() == 1, makeLabel(solutions.Count()));
                 var p2 = CheckSolution(solutions.First(), matrix);
                 return PropExtensions.And(p1, p2);
             }));
@@ -47,12 +51,12 @@
             var expectedNumZerosPerColumn = numSolutionRows - 1;
             var colProperties = new List<Property>();

-            Func<int, int, string> label1 = (colIndex, numOnes) => string.Format(
+            Func<int, int, string> makeLabel1 = (colIndex, numOnes) => string.Format(
                 "Expected column {0} to contain a single 1 but it contains {1}",
                 colIndex,
                 numOnes);

-            Func<int, int, string> label2 = (colIndex, numZeros) => string.Format(
+            Func<int, int, string> makeLabel2 = (colIndex, numZeros) => string.Format(
                 "Expected column {0} to contain exactly {1} 0s but it contains {2}",
                 colIndex,
                 expectedNumZerosPerColumn,
@@ -69,8 +73,8 @@
                     if (matrix[rowIndex, colIndex] == 1) numOnes++;
                 }

-                var p1 = PropExtensions.Label(numOnes == 1, label1(colIndex, numOnes));
-                var p2 = PropExtensions.Label(numZeros == expectedNumZerosPerColumn, label2(colIndex, numZeros));
+                var p1 = PropExtensions.Label(numOnes == 1, makeLabel1(colIndex, numOnes));
+                var p2 = PropExtensions.Label(numZeros == expectedNumZerosPerColumn, makeLabel2(colIndex, numZeros));

                 colProperties.Add(PropExtensions.And(p1, p2));
             }


Perf Optimization: Moved fixed statements all the way up to ParseMessage() and ParseEntity()

Doesn't seem to help much running under Mono on Mac OS X, but maybe it'll help on Windows?

--- MimeKit/MimeParser.cs
+++ MimeKit/MimeParser.cs
@@ -217,24 +217,22 @@
 			SetStream (ParserOptions.Default, stream, MimeFormat.Default);
 		}

-		static unsafe void MemMove (byte[] buffer, int sourceIndex, int destIndex, int length)
-		{
-			fixed (byte* buf = buffer) {
-				if (sourceIndex + length > destIndex) {
-					byte* src = buf + sourceIndex + length - 1;
-					byte *dest = buf + destIndex + length - 1;
-					byte *start = buf + sourceIndex;
-
-					while (src >= start)
-						*dest-- = *src--;
-				} else {
-					byte* src = buf + sourceIndex;
-					byte* dest = buf + destIndex;
-					byte* end = src + length;
-
-					while (src < end)
-						*dest++ = *src++;
-				}
+		static unsafe void MemMove (byte *buf, int sourceIndex, int destIndex, int length)
+		{
+			if (sourceIndex + length > destIndex) {
+				byte* src = buf + sourceIndex + length - 1;
+				byte *dest = buf + destIndex + length - 1;
+				byte *start = buf + sourceIndex;
+
+				while (src >= start)
+					*dest-- = *src--;
+			} else {
+				byte* src = buf + sourceIndex;
+				byte* dest = buf + destIndex;
+				byte* end = src + length;
+
+				while (src < end)
+					*dest++ = *src++;
 			}
 		}

@@ -252,7 +250,7 @@
 			return (need + 63) & ~63;
 		}

-		int ReadAhead (int atleast, int save)
+		unsafe int ReadAhead (byte* inbuf, int atleast, int save)
 		{
 			int left = inputEnd - inputIndex;

@@ -269,12 +267,12 @@
 			// attempt to align the end of the remaining input with BackBufferSize
 			if (index >= start) {
 				start -= left < ReadAheadSize ? left : ReadAheadSize;
-				MemMove (input, index, start, left);
+				MemMove (inbuf, index, start, left);
 				index = start;
 				start += left;
 			} else if (index > 0) {
 				int shift = Math.Min (index, end - start);
-				MemMove (input, index, index - shift, left);
+				MemMove (inbuf, index, index - shift, left);
 				index -= shift;
 				start = index + left;
 			} else {
@@ -335,7 +333,7 @@
 #endif
 		}

-		unsafe int StepMboxMarker ()
+		unsafe int StepMboxMarker (byte* inbuf)
 		{
 			bool complete = false;
 			bool needInput;
@@ -343,63 +341,61 @@

 			mboxMarkerLength = 0;

-			fixed (byte* inbuf = input) {
-				do {
-					if (ReadAhead (Math.Max (ReadAheadSize, left), 0) <= left) {
-						// failed to find a From line; EOF reached
-						state = MimeParserState.Error;
-						inputIndex = inputEnd;
-						return -1;
+			do {
+				if (ReadAhead (inbuf, Math.Max (ReadAheadSize, left), 0) <= left) {
+					// failed to find a From line; EOF reached
+					state = MimeParserState.Error;
+					inputIndex = inputEnd;
+					return -1;
+				}
+
+				needInput = false;
+
+				byte* inptr = inbuf + inputIndex;
+				byte* inend = inbuf + inputEnd;
+
+				*inend = (byte) '\n';
+
+				while (inptr < inend) {
+					byte* start = inptr;
+
+					// scan for the end of the line
+					while (*inptr != (byte) '\n')
+						inptr++;
+
+					long length = inptr - start;
+
+					// consume the '\n'
+					inptr++;
+
+					if (inptr >= inend) {
+						// we don't have enough input data
+						inputIndex = (int) (start - inbuf);
+						left = (int) length;
+						needInput = true;
+						break;
 					}

-					needInput = false;
-
-					byte* inptr = inbuf + inputIndex;
-					byte* inend = inbuf + inputEnd;
-
-					*inend = (byte) '\n';
-
-					while (inptr < inend) {
-						byte* start = inptr;
-
-						// scan for the end of the line
-						while (*inptr != (byte) '\n')
-							inptr++;
-
-						long length = inptr - start;
-
-						// consume the '\n'
-						inptr++;
-
-						if (inptr >= inend) {
-							// we don't have enough input data
-							inputIndex = (int) (start - inbuf);
-							left = (int) length;
-							needInput = true;
-							break;
-						}
-
-						if (length >= 5 && IsMboxMarker (start)) {
-							long startIndex = start - inbuf;
-
-							mboxMarkerOffset = GetOffset ((int) startIndex);
-							mboxMarkerLength = (int) length;
-
-							if (mboxMarkerBuffer.Length < mboxMarkerLength)
-								Array.Resize (ref mboxMarkerBuffer, mboxMarkerLength);
-
-							Array.Copy (input, startIndex, mboxMarkerBuffer, 0, length);
-							complete = true;
-							break;
-						}
+					if (length >= 5 && IsMboxMarker (start)) {
+						long startIndex = start - inbuf;
+
+						mboxMarkerOffset = GetOffset ((int) startIndex);
+						mboxMarkerLength = (int) length;
+
+						if (mboxMarkerBuffer.Length < mboxMarkerLength)
+							Array.Resize (ref mboxMarkerBuffer, mboxMarkerLength);
+
+						Array.Copy (input, startIndex, mboxMarkerBuffer, 0, length);
+						complete = true;
+						break;
 					}
-
-					if (!needInput) {
-						inputIndex = (int) (inptr - inbuf);
-						left = 0;
-					}
-				} while (!complete);
-			}
+				}
+
+				if (!needInput) {
+					inputIndex = (int) (inptr - inbuf);
+					left = 0;
+				}
+			} while (!complete);

 			state = MimeParserState.MessageHeaders;

@@ -457,7 +453,7 @@
 			return *text == (byte) '\n';
 		}

-		unsafe int StepHeaders ()
+		unsafe int StepHeaders (byte* inbuf)
 		{
 			bool scanningFieldName = true;
 			bool checkFolded = false;
@@ -471,165 +467,161 @@
 			headers.Clear ();
 			midline = false;

-			fixed (byte* inbuf = input) {
-				do {
-					if (ReadAhead (Math.Max (ReadAheadSize, left), 0) <= left) {
-						// failed to find a From line; EOF reached
-						state = MimeParserState.Error;
-						inputIndex = inputEnd;
-						return -1;
+			do {
+				if (ReadAhead (inbuf, Math.Max (ReadAheadSize, left), 0) <= left) {
+					// failed to find a From line; EOF reached
+					state = MimeParserState.Error;
+					inputIndex = inputEnd;
+					return -1;
+				}
+
+				needInput = false;
+
+				byte* inptr = inbuf + inputIndex;
+				byte* inend = inbuf + inputEnd;
+
+				*inend = (byte) '\n';
+
+				while (inptr < inend) {
+					byte* start = inptr;
+
+					// if we are scanning a new line, check for a folded header
+					if (!midline && checkFolded && !(*inptr).IsBlank ()) {
+						ParseAndAppendHeader ();
+
+						headerOffset = GetOffset ((int) (inptr - inbuf));
+						scanningFieldName = true;
+						checkFolded = false;
+						valid = true;
 					}

-					needInput = false;
-
-					byte* inptr = inbuf + inputIndex;
-					byte* inend = inbuf + inputEnd;
-
-					*inend = (byte) '\n';
-
-					while (inptr < inend) {
-						byte* start = inptr;
-
-						// if we are scanning a new line, check for a folded header
-						if (!midline && checkFolded && !(*inptr).IsBlank ()) {
-							ParseAndAppendHeader ();
-
-							headerOffset = GetOffset ((int) (inptr - inbuf));
-							scanningFieldName = true;
-							checkFolded = false;
-							valid = true;
-						}
-
-						eoln = IsEoln (inptr);
-						if (scanningFieldName && !eoln) {
-							// scan and validate the field name
-							if (*inptr != (byte) ':') {
-								*inend = (byte) ':';
-
-								while (*inptr != (byte) ':') {
-									if (IsBlankOrControl (*inptr)) {
-										valid = false;
-										break;
-									}
-
-									inptr++;
-								}
-
-								if (inptr == inend) {
-									// we don't have enough input data
-									left = (int) (inend - start);
-									inputIndex = (int) (start - inbuf);
-									needInput = true;
+					eoln = IsEoln (inptr);
+					if (scanningFieldName && !eoln) {
+						// scan and validate the field name
+						if (*inptr != (byte) ':') {
+							*inend = (byte) ':';
+
+							while (*inptr != (byte) ':') {
+								if (IsBlankOrControl (*inptr)) {
+									valid = false;
 									break;
 								}

-								*inend = (byte) '\n';
-							} else {
-								valid = false;
+								inptr++;
 							}

-							if (!valid) {
-								length = inptr - start;
-
-								if (format == MimeFormat.Mbox && length == 4 && IsMboxMarker (start)) {
-									// we've found the start of the next message...
+							if (inptr == inend) {
+								// we don't have enough input data
+								left = (int) (inend - start);
+								inputIndex = (int) (start - inbuf);
+								needInput = true;
+								break;
+							}
+
+							*inend = (byte) '\n';
+						} else {
+							valid = false;
+						}
+
+						if (!valid) {
+							length = inptr - start;
+
+							if (format == MimeFormat.Mbox && length == 4 && IsMboxMarker (start)) {
+								// we've found the start of the next message...
+								inputIndex = (int) (start - inbuf);
+								state = MimeParserState.Complete;
+								headerIndex = 0;
+								return 0;
+							}
+
+							if (state == MimeParserState.MessageHeaders && headers.Count == 0) {
+								// ignore From-lines that might appear at the start of a message
+								if (length != 4 || !IsMboxMarker (start)) {
 									inputIndex = (int) (start - inbuf);
-									state = MimeParserState.Complete;
+									state = MimeParserState.Error;
 									headerIndex = 0;
-									return 0;
-								}
-
-								if (state == MimeParserState.MessageHeaders && headers.Count == 0) {
-									// ignore From-lines that might appear at the start of a message
-									if (length != 4 || !IsMboxMarker (start)) {
-										inputIndex = (int) (start - inbuf);
-										state = MimeParserState.Error;
-										headerIndex = 0;
-										return -1;
-									}
+									return -1;
 								}
 							}
 						}
-
-						scanningFieldName = false;
-
-						while (*inptr != (byte) '\n')
-							inptr++;
-
-						if (inptr == inend) {
-							// we didn't manage to slurp up a full line, save what we have and refill our input buffer
-							length = inptr - start;
-
-							if (inptr > start) {
-								// Note: if the last byte we got was a '\r', rewind a byte
-								inptr--;
-								if (*inptr == (byte) '\r')
-									length--;
-								else
-									inptr++;
-							}
-
-							AppendRawHeaderData ((int) (start - inbuf), (int) length);
-							inputIndex = (int) (inptr - inbuf);
-							left = (int) (inend - inptr);
-							needInput = true;
-							midline = true;
-							break;
+					}
+
+					scanningFieldName = false;
+
+					while (*inptr != (byte) '\n')
+						inptr++;
+
+					if (inptr == inend) {
+						// we didn't manage to slurp up a full line, save what we have and refill our input buffer
+						length = inptr - start;
+
+						if (inptr > start) {
+							// Note: if the last byte we got was a '\r', rewind a byte
+							inptr--;
+							if (*inptr == (byte) '\r')
+								length--;
+							else
+								inptr++;
 						}

-						// check to see if we've reached the end of the headers
-						if (!midline && IsEoln (start)) {
-							inputIndex = (int) (inptr - inbuf) + 1;
-							state = MimeParserState.Content;
-							ParseAndAppendHeader ();
-							headerIndex = 0;
-							return 0;
-						}
-
-						length = (inptr + 1) - start;
-
 						AppendRawHeaderData ((int) (start - inbuf), (int) length);
-						checkFolded = true;
-						midline = false;
-						inptr++;
-					}
-
-					if (!needInput) {
 						inputIndex = (int) (inptr - inbuf);
 						left = (int) (inend - inptr);
+						needInput = true;
+						midline = true;
+						break;
 					}
-				} while (true);
-			}
-		}
-
-		unsafe bool SkipLine ()
-		{
-			fixed (byte* inbuf = input) {
-				do {
-					byte* inptr = inbuf + inputIndex;
-					byte* inend = inbuf + inputEnd;
-
-					*inend = (byte) '\n';
-
-					while (*inptr != (byte) '\n')
-						inptr++;
-
-					if (inptr < inend) {
+
+					// check to see if we've reached the end of the headers
+					if (!midline && IsEoln (start)) {
 						inputIndex = (int) (inptr - inbuf) + 1;
-						midline = false;
-						return true;
+						state = MimeParserState.Content;
+						ParseAndAppendHeader ();
+						headerIndex = 0;
+						return 0;
 					}

-					inputIndex = inputEnd;
-					if (ReadAhead (ReadAheadSize, 0) <= 0) {
-						midline = true;
-						return false;
-					}
-				} while (true);
-			}
-		}
-
-		MimeParserState Step ()
+					length = (inptr + 1) - start;
+
+					AppendRawHeaderData ((int) (start - inbuf), (int) length);
+					checkFolded = true;
+					midline = false;
+					inptr++;
+				}
+
+				if (!needInput) {
+					inputIndex = (int) (inptr - inbuf);
+					left = (int) (inend - inptr);
+				}
+			} while (true);
+		}
+
+		unsafe bool SkipLine (byte* inbuf)
+		{
+			do {
+				byte* inptr = inbuf + inputIndex;
+				byte* inend = inbuf + inputEnd;
+
+				*inend = (byte) '\n';
+
+				while (*inptr != (byte) '\n')
+					inptr++;
+
+				if (inptr < inend) {
+					inputIndex = (int) (inptr - inbuf) + 1;
+					midline = false;
+					return true;
+				}
+
+				inputIndex = inputEnd;
+				if (ReadAhead (inbuf, ReadAheadSize, 0) <= 0) {
+					midline = true;
+					return false;
+				}
+			} while (true);
+		}
+
+		unsafe MimeParserState Step (byte* inbuf)
 		{
 			switch (state) {
 			case MimeParserState.Error:
@@ -638,11 +630,11 @@
 				state = format == MimeFormat.Mbox ? MimeParserState.MboxMarker : MimeParserState.MessageHeaders;
 				break;
 			case MimeParserState.MboxMarker:
-				StepMboxMarker ();
+				StepMboxMarker (inbuf);
 				break;
 			case MimeParserState.MessageHeaders:
 			case MimeParserState.Headers:
-				StepHeaders ();
+				StepHeaders (inbuf);
 				break;
 			case MimeParserState.Content:
 				break;
@@ -737,22 +729,19 @@
 			return BoundaryType.None;
 		}

-		unsafe bool FoundImmediateBoundary (bool final)
+		unsafe bool FoundImmediateBoundary (byte* inbuf, bool final)
 		{
 			int boundaryLength = final ? bounds[0].FinalLength : bounds[0].Length;
-
-			fixed (byte* inbuf = input) {
-				byte* start = inbuf + inputIndex;
-				byte* inend = inbuf + inputEnd;
-				byte *inptr = start;
-
-				*inend = (byte) '\n';
-
-				while (*inptr != (byte) '\n')
-					inptr++;
-
-				return IsBoundary (start, (int) (inptr - start), bounds[0].Marker, boundaryLength);
-			}
+			byte* start = inbuf + inputIndex;
+			byte* inend = inbuf + inputEnd;
+			byte *inptr = start;
+
+			*inend = (byte) '\n';
+
+			while (*inptr != (byte) '\n')
+				inptr++;
+
+			return IsBoundary (start, (int) (inptr - start), bounds[0].Marker, boundaryLength);
 		}

 		int GetMaxBoundaryLength ()
@@ -760,7 +749,7 @@
 			return bounds.Count > 0 ? bounds[0].MaxLength + 2 : 0;
 		}

-		unsafe BoundaryType ScanContent (Stream content)
+		unsafe BoundaryType ScanContent (byte* inbuf, Stream content)
 		{
 			int atleast = Math.Min (ReadAheadSize, GetMaxBoundaryLength ());
 			BoundaryType found = BoundaryType.None;
@@ -770,58 +759,56 @@

 			do {
 				nleft = inputEnd - inputIndex;
-				if (ReadAhead (atleast, 2) <= 0) {
+				if (ReadAhead (inbuf, atleast, 2) <= 0) {
 					found = BoundaryType.Eos;
 					break;
 				}

-				fixed (byte* inbuf = input) {
-					byte* inptr = inbuf + inputIndex;
-					byte* inend = inbuf + inputEnd;
-					int startIndex = inputIndex;
-
-					length = inputEnd - inputIndex;
-
-					if (midline && length == nleft)
-						found = BoundaryType.Eos;
-
-					*inend = (byte) '\n';
-
-					while (inptr < inend) {
-						byte* start = inptr;
-
-						while (*inptr != (byte) '\n')
-							inptr++;
-
-						length = (int) (inptr - start);
-
-						if (inptr < inend) {
-							found = CheckBoundary (startIndex, start, length);
-							if (found != BoundaryType.None)
-								break;
-
-							length++;
-							inptr++;
-						} else {
-							// didn't find the end of the line...
-							midline = true;
-
-							if (found == BoundaryType.None) {
-								// not enough to tell if we found a boundary
-								break;
-							}
-
-							found = CheckBoundary (startIndex, start, length);
-							if (found != BoundaryType.None)
-								break;
+				byte* inptr = inbuf + inputIndex;
+				byte* inend = inbuf + inputEnd;
+				int startIndex = inputIndex;
+
+				length = inputEnd - inputIndex;
+
+				if (midline && length == nleft)
+					found = BoundaryType.Eos;
+
+				*inend = (byte) '\n';
+
+				while (inptr < inend) {
+					byte* start = inptr;
+
+					while (*inptr != (byte) '\n')
+						inptr++;
+
+					length = (int) (inptr - start);
+
+					if (inptr < inend) {
+						found = CheckBoundary (startIndex, start, length);
+						if (found != BoundaryType.None)
+							break;
+
+						length++;
+						inptr++;
+					} else {
+						// didn't find the end of the line...
+						midline = true;
+
+						if (found == BoundaryType.None) {
+							// not enough to tell if we found a boundary
+							break;
 						}

-						content.Write (input, startIndex, length);
-						startIndex += length;
+						found = CheckBoundary (startIndex, start, length);
+						if (found != BoundaryType.None)
+							break;
 					}

-					inputIndex = startIndex;
-				}
+					content.Write (input, startIndex, length);
+					startIndex += length;
+				}
+
+				inputIndex = startIndex;
 			} while (found == BoundaryType.None);

 			if (found != BoundaryType.Eos) {
@@ -837,10 +824,10 @@
 			return found;
 		}

-		BoundaryType ScanMimePartContent (MimePart part)
+		unsafe BoundaryType ScanMimePartContent (byte* inbuf, MimePart part)
 		{
 			var memory = new MemoryStream ();
-			var found = ScanContent (memory);
+			var found = ScanContent (inbuf, memory);

 			memory.Seek (0, SeekOrigin.Begin);

@@ -854,40 +841,39 @@
 			return found;
 		}

-		unsafe BoundaryType ScanMessagePart (MessagePart part)
+		unsafe BoundaryType ScanMessagePart (byte* inbuf, MessagePart part)
 		{
 			BoundaryType found;

 			if (bounds.Count > 0) {
 				int atleast = Math.Min (ReadAheadSize, GetMaxBoundaryLength ());

-				if (ReadAhead (atleast, 0) <= 0)
+				if (ReadAhead (inbuf, atleast, 0) <= 0)
 					return BoundaryType.Eos;

-				fixed (byte* inbuf = input) {
-					byte* inptr = inbuf + inputIndex;
-					byte* inend = inbuf + inputEnd;
-
-					*inend = (byte) '\n';
-
-					while (*inptr != (byte) '\n')
-						inptr++;
-
-					found = CheckBoundary (inputIndex, inbuf, (int) (inptr - inbuf));
-					if (found == BoundaryType.Boundary)
-						return BoundaryType.Boundary;
-
-					if (found == BoundaryType.EndBoundary) {
-						// ignore "From " boundaries, broken mailers tend to include these...
-						if (!IsMboxMarker (inbuf))
-							return BoundaryType.EndBoundary;
-					}
+				byte* start = inbuf + inputIndex;
+				byte* inend = inbuf + inputEnd;
+				byte* inptr = start;
+
+				*inend = (byte) '\n';
+
+				while (*inptr != (byte) '\n')
+					inptr++;
+
+				found = CheckBoundary (inputIndex, start, (int) (inptr - start));
+				if (found == BoundaryType.Boundary)
+					return BoundaryType.Boundary;
+
+				if (found == BoundaryType.EndBoundary) {
+					// ignore "From " boundaries, broken mailers tend to include these...
+					if (!IsMboxMarker (start))
+						return BoundaryType.EndBoundary;
 				}
 			}

 			// parse the headers...
 			state = MimeParserState.Headers;
-			if (Step () == MimeParserState.Error) {
+			if (Step (inbuf) == MimeParserState.Error) {
 				// Note: currently this can't happen because StepHeaders() never returns error
 				return BoundaryType.Eos;
 			}
@@ -896,9 +882,9 @@
 			var type = GetContentType (null);

 			if (type.Matches ("multipart", "*")) {
-				message.Body = ConstructMultipart (type, true, out found);
+				message.Body = ConstructMultipart (inbuf, type, true, out found);
 			} else {
-				message.Body = ConstructEntity (type, true, out found);
+				message.Body = ConstructEntity (inbuf, type, true, out found);
 			}

 			part.Message = message;
@@ -906,23 +892,23 @@
 			return found;
 		}

-		MimeEntity ConstructEntity (ContentType type, bool toplevel, out BoundaryType found)
+		unsafe MimeEntity ConstructEntity (byte* inbuf, ContentType type, bool toplevel, out BoundaryType found)
 		{
 			var entity = MimeEntity.Create (options, type, headers, toplevel);

 			if (entity is MessagePart) {
-				found = ScanMessagePart ((MessagePart) entity);
+				found = ScanMessagePart (inbuf, (MessagePart) entity);
 			} else {
-				found = ScanMimePartContent ((MimePart) entity);
+				found = ScanMimePartContent (inbuf, (MimePart) entity);
 			}

 			return entity;
 		}

-		BoundaryType ScanMultipartPreambleOrEpilogue (Multipart multipart, bool preamble)
+		unsafe BoundaryType ScanMultipartPreambleOrEpilogue (byte* inbuf, Multipart multipart, bool preamble)
 		{
 			using (var memory = new MemoryStream ()) {
-				var found = ScanContent (memory);
+				var found = ScanContent (inbuf, memory);

 				if (preamble)
 					multipart.RawPreamble = memory.ToArray ();
@@ -933,19 +919,19 @@
 			}
 		}

-		BoundaryType ScanMultipartSubparts (Multipart multipart)
+		unsafe BoundaryType ScanMultipartSubparts (byte* inbuf, Multipart multipart)
 		{
 			BoundaryType found;
 			MimeEntity entity;

 			do {
 				// skip over the boundary marker
-				if (!SkipLine ())
+				if (!SkipLine (inbuf))
 					return BoundaryType.Eos;

 				// parse the headers
 				state = MimeParserState.Headers;
-				if (Step () == MimeParserState.Error)
+				if (Step (inbuf) == MimeParserState.Error)
 					return BoundaryType.Eos;

 				//if (state == ParserState.Complete && headers.Count == 0)
@@ -954,12 +940,12 @@
 				var type = GetContentType (multipart.ContentType);

 				if (type.Matches ("multipart", "*"))
-					entity = ConstructMultipart (type, false, out found);
+					entity = ConstructMultipart (inbuf, type, false, out found);
 				else
-					entity = ConstructEntity (type, false, out found);
+					entity = ConstructEntity (inbuf, type, false, out found);

 				multipart.Add (entity);
-			} while (found == BoundaryType.Boundary && FoundImmediateBoundary (false));
+			} while (found == BoundaryType.Boundary && FoundImmediateBoundary (inbuf, false));

 			return found;
 		}
@@ -977,7 +963,7 @@
 			bounds.RemoveAt (0);
 		}

-		Multipart ConstructMultipart (ContentType type, bool toplevel, out BoundaryType found)
+		unsafe Multipart ConstructMultipart (byte* inbuf, ContentType type, bool toplevel, out BoundaryType found)
 		{
 			var multipart = (Multipart) MimeEntity.Create (options, type, headers, toplevel);

@@ -986,21 +972,21 @@
 				Debug.WriteLine ("Multipart without a boundary encountered!");

 				// Note: this will scan all content into the preamble...
-				found = ScanMultipartPreambleOrEpilogue (multipart, true);
+				found = ScanMultipartPreambleOrEpilogue (inbuf, multipart, true);
 				return multipart;
 			}

 			PushBoundary (boundary);

-			found = ScanMultipartPreambleOrEpilogue (multipart, true);
+			found = ScanMultipartPreambleOrEpilogue (inbuf, multipart, true);
 			if (found == BoundaryType.Boundary)
-				found = ScanMultipartSubparts (multipart);
-
-			if (found == BoundaryType.EndBoundary && FoundImmediateBoundary (true)) {
+				found = ScanMultipartSubparts (inbuf, multipart);
+
+			if (found == BoundaryType.EndBoundary && FoundImmediateBoundary (inbuf, true)) {
 				// consume the end boundary and read the epilogue (if there is one)
-				SkipLine ();
+				SkipLine (inbuf);
 				PopBoundary ();
-				found = ScanMultipartPreambleOrEpilogue (multipart, false);
+				found = ScanMultipartPreambleOrEpilogue (inbuf, multipart, false);
 			} else {
 				// We either found the end of the stream or we found a parent's boundary
 				PopBoundary ();
@@ -1009,11 +995,11 @@
 			return multipart;
 		}

-		public MimeEntity ParseEntity ()
+		unsafe MimeEntity ParseEntity (byte* inbuf)
 		{
 			state = MimeParserState.Headers;
 			while (state < MimeParserState.Content) {
-				if (Step () == MimeParserState.Error)
+				if (Step (inbuf) == MimeParserState.Error)
 					throw new Exception ("Failed to parse entity headers.");
 			}

@@ -1022,9 +1008,9 @@
 			MimeEntity entity;

 			if (type.Matches ("multipart", "*"))
-				entity = ConstructMultipart (type, true, out found);
+				entity = ConstructMultipart (inbuf, type, true, out found);
 			else
-				entity = ConstructEntity (type, true, out found);
+				entity = ConstructEntity (inbuf, type, true, out found);

 			if (found != BoundaryType.Eos)
 				state = MimeParserState.Complete;
@@ -1034,23 +1020,32 @@
 			return entity;
 		}

-		public MimeMessage ParseMessage ()
+		public MimeEntity ParseEntity ()
+		{
+			unsafe {
+				fixed (byte* inbuf = input) {
+					return ParseEntity (inbuf);
+				}
+			}
+		}
+
+		unsafe MimeMessage ParseMessage (byte* inbuf)
 		{
 			BoundaryType found;

 			// scan the from-line if we are parsing an mbox
 			while (state != MimeParserState.MessageHeaders) {
-				switch (Step ()) {
-				case MimeParserState.Error:
+				switch (Step (inbuf)) {
+					case MimeParserState.Error:
 					throw new Exception ("Failed to find mbox From marker.");
-				case MimeParserState.Eos:
+					case MimeParserState.Eos:
 					throw new Exception ("End of stream.");
 				}
 			}

 			// parse the headers
 			while (state < MimeParserState.Content) {
-				if (Step () == MimeParserState.Error)
+				if (Step (inbuf) == MimeParserState.Error)
 					throw new Exception ("Failed to parse message headers.");
 			}

@@ -1079,9 +1074,9 @@
 			var type = GetContentType (null);

 			if (type.Matches ("multipart", "*"))
-				message.Body = ConstructMultipart (type, true, out found);
+				message.Body = ConstructMultipart (inbuf, type, true, out found);
 			else
-				message.Body = ConstructEntity (type, true, out found);
+				message.Body = ConstructEntity (inbuf, type, true, out found);

 			if (found != BoundaryType.Eos) {
 				if (format == MimeFormat.Mbox)
@@ -1094,5 +1089,14 @@

 			return message;
 		}
+
+		public MimeMessage ParseMessage ()
+		{
+			unsafe {
+				fixed (byte* inbuf = input) {
+					return ParseMessage (inbuf);
+				}
+			}
+		}
 	}
 }


fixed GetVisualHull (for right-handed view-projection transformation);

--- src/Aardvark.Base.Essentials/Camera/IRenderViewExtensions.cs
+++ src/Aardvark.Base.Essentials/Camera/IRenderViewExtensions.cs
@@ -44,7 +44,8 @@
         }

         /// <summary>
-        /// Builds a hull from the given view-projection. The normals of the hull planes point to the inside.
+        /// Builds a hull from the given view-projection.
+        /// The normals of the hull planes point to the inside.
         /// A point inside the visual hull will have positive height to all planes.
         /// </summary>
         public static Hull3d GetVisualHull(this IViewProjection vp)
@@ -53,18 +54,27 @@

             var frustumCorners = new Box3d(-V3d.IIO, V3d.III).ComputeCorners();

+            //Min,                             0 near left bottom
+            //new V3d(Max.X, Min.Y, Min.Z),    1 near right bottom
+            //new V3d(Min.X, Max.Y, Min.Z),    2 near left top
+            //new V3d(Max.X, Max.Y, Min.Z),    3 near right top
+            //new V3d(Min.X, Min.Y, Max.Z),    4 far left bottom
+            //new V3d(Max.X, Min.Y, Max.Z),    5 far right bottom
+            //new V3d(Min.X, Max.Y, Max.Z),    6 far left top
+            //Max                              7 far right top
+
             // use inverse view-projection to get vertices in world space
             frustumCorners.Apply(c => mvp.Backward.TransformPosProj(c));

             // hull planes should point inward, assume right-handed transformation to build planes
             var hull = new Hull3d(new[]
             {
-                new Plane3d(frustumCorners[0], frustumCorners[2], frustumCorners[4]), // left
-                new Plane3d(frustumCorners[1], frustumCorners[5], frustumCorners[3]), // right
-                new Plane3d(frustumCorners[2], frustumCorners[3], frustumCorners[7]), // bottom
-                new Plane3d(frustumCorners[0], frustumCorners[4], frustumCorners[1]), // top
-                new Plane3d(frustumCorners[0], frustumCorners[1], frustumCorners[2]), // near
-                new Plane3d(frustumCorners[4], frustumCorners[6], frustumCorners[5]), // far
+                new Plane3d(frustumCorners[0], frustumCorners[4], frustumCorners[2]), // left
+                new Plane3d(frustumCorners[1], frustumCorners[3], frustumCorners[5]), // right
+                new Plane3d(frustumCorners[2], frustumCorners[6], frustumCorners[3]), // top
+                new Plane3d(frustumCorners[0], frustumCorners[1], frustumCorners[4]), // bottom
+                new Plane3d(frustumCorners[0], frustumCorners[2], frustumCorners[1]), // near
+                new Plane3d(frustumCorners[4], frustumCorners[5], frustumCorners[6]), // far
             });

             // handedness of transformation -> flip planes in case of left-handed


Add ToString method to return actual raw AQL query string.

--- src/Arango/Arango.Client/API/Queries/ArangoQueryOperation.cs
+++ src/Arango/Arango.Client/API/Queries/ArangoQueryOperation.cs
@@ -82,5 +82,10 @@

             return genericCollection;
         }
+
+        public string ToString()
+        {
+            return _aql;
+        }
     }
 }


commented code clean up

commented code clean up

--- src/BizTalk.Dsl/Dsl/Binding/Subscription/FilterTranslator.cs
+++ src/BizTalk.Dsl/Dsl/Binding/Subscription/FilterTranslator.cs
@@ -90,8 +90,6 @@
 				case ExpressionType.AndAlso:
 					return new[] {
 						BuildFilterGroup(TranslateFilterStatement(expression))
-						//,
-						//TranslateFilterStatement(expression.Right))
 					};
 				default:
 					return new[] {