add token

add token

--- MYOB.API.SDK/SDK.Test/Services/TimesheetServicePacTests.cs
+++ MYOB.API.SDK/SDK.Test/Services/TimesheetServicePacTests.cs
@@ -31,7 +31,7 @@
             _mockProviderService.ClearInteractions(); //NOTE: Clears any previously registered interactions before the test is run

             _configuration = Substitute.For<IApiConfiguration>();
-            _service = new TimesheetService(_configuration);
+            _service = new TimesheetService(_configuration, keyService: new SimpleOAuthKeyService());

             _cfUid = Guid.NewGuid();
             _uid = Guid.NewGuid();


Add a generic method for calling reflection

--- Assets/HoloToolkit-UnitTests/Editor/Utilities/TestUtils.cs
+++ Assets/HoloToolkit-UnitTests/Editor/Utilities/TestUtils.cs
@@ -61,11 +61,7 @@
         /// <returns>The given gameObject to be able to chain call</returns>
         internal static GameObject CallAwake(this GameObject gameObject)
         {
-            foreach (var script in gameObject.GetComponentsInChildren<MonoBehaviour>())
-            {
-                script.Call("Awake");
-            }
-            return gameObject;
+            return gameObject.Call("Awake");
         }

         /// <summary>
@@ -75,11 +71,7 @@
         /// <returns>The given gameObject to be able to chain call</returns>
         internal static GameObject CallStart(this GameObject gameObject)
         {
-            foreach (var script in gameObject.GetComponentsInChildren<MonoBehaviour>())
-            {
-                script.Call("Start");
-            }
-            return gameObject;
+            return gameObject.Call("Start");
         }

         /// <summary>
@@ -89,9 +81,21 @@
         /// <returns>The given gameObject to be able to chain call</returns>
         internal static GameObject CallUpdate(this GameObject gameObject)
         {
+            return gameObject.Call("Update");
+        }
+
+
+        /// <summary>
+        /// Calls the given method on all MonoBehaviours on the given gameObject through reflection.
+        /// </summary>
+        /// <param name="gameObject">The gameObject that contains the monoBehaviour</param>
+        /// <param name="methodName">The method to call</param>
+        /// <returns>The given gameObject to be able to chain call</returns>
+        internal static GameObject Call(this GameObject gameObject, string methodName)
+        {
             foreach (var script in gameObject.GetComponentsInChildren<MonoBehaviour>())
             {
-                script.Call("Update");
+                script.Call(methodName);
             }
             return gameObject;
         }
@@ -101,7 +105,7 @@
         /// </summary>
         /// <param name="obj">Object to call the method on</param>
         /// <param name="methodName">The method that should be called</param>
-        private static void Call(this object obj, string methodName)
+        internal static void Call(this object obj, string methodName)
         {
             const BindingFlags findFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
             var methodInfo = obj.GetType().GetMethod(methodName, findFlags);


Revert "Changed the order of checks since the platform can filter classes that might be null"

This reverts commit 8fe7aaaf2f1daef300547b87169521a6539ba79f.

--- Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs
+++ Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs
@@ -618,24 +618,24 @@
                 return false;
             }

+            if (interfaceType == null)
+            {
+                Debug.LogError("Unable to register a service with a null concrete type.");
+                return false;
+            }
+
+            if (!typeof(IMixedRealityService).IsAssignableFrom(interfaceType))
+            {
+                Debug.LogError($"Unable to register the {interfaceType.Name} service. It does not implement {typeof(IMixedRealityService)}.");
+                return false;
+            }
+
 #if !UNITY_EDITOR
             if (!Application.platform.IsPlatformSupported(supportedPlatforms))
 #else
             if (!UnityEditor.EditorUserBuildSettings.activeBuildTarget.IsPlatformSupported(supportedPlatforms))
 #endif
             {
-                return false;
-            }
-
-            if (interfaceType == null)
-            {
-                Debug.LogError("Unable to register a service with a null concrete type.");
-                return false;
-            }
-
-            if (!typeof(IMixedRealityService).IsAssignableFrom(interfaceType))
-            {
-                Debug.LogError($"Unable to register the {interfaceType.Name} service. It does not implement {typeof(IMixedRealityService)}.");
                 return false;
             }


add comment

add comment

--- CSharpGL/OpenGLObjects/UniformVariables/UniformVariable.cs
+++ CSharpGL/OpenGLObjects/UniformVariables/UniformVariable.cs
@@ -8,13 +8,13 @@
 namespace CSharpGL
 {
     ///
-    /// shader中的一个uniform变量。
+    /// An uniform variable in shader.
     ///
     public abstract class UniformVariable
     {

         ///
-        /// 变量名。
+        /// variable name.
         ///
         public string VarName { get; private set; }

@@ -25,14 +25,15 @@

         ///
         /// 标识此uniform变量是否已更新（若为true，则需要在render前一刻提交到GPU）
+        /// <para>Set uniform's value to GPU if true; otherwise nothing to do.</para>
         ///
         [Browsable(false)]
         public bool Updated { get; set; }

         ///
-        /// shader中的一个uniform变量。
+        /// An uniform variable in shader.
         ///
-        /// <param name="varName"></param>
+        /// <param name="varName">variable name.</param>
         public UniformVariable(string varName)
         {
             this.VarName = varName;
@@ -40,7 +41,7 @@
         }

         ///
-        ///
+        /// Set uniform's value to GPU.
         ///
         /// <param name="program"></param>
         public abstract void SetUniform(ShaderProgram program);
@@ -49,9 +50,14 @@
         /// 默认重置Updated = false;
         /// <para>以避免重复设置。</para>
         /// <para>某些类型的uniform可能需要重复调用SetUniform()（例如纹理类型的uniform sampler2D）</para>
+        /// <para>Simply set this.Updated = false; by default to avoid repeatly setting uniform variable.</para>
+        /// <para>But some types of uniform variables may need to be set repeatly(uniform sampler2D etc.) and that's when you should override this method.</para>
         ///
         /// <param name="program"></param>
-        public virtual void ResetUniform(ShaderProgram program) { this.Updated = false; }
+        public virtual void ResetUniform(ShaderProgram program)
+        {
+            this.Updated = false;
+        }

         public override string ToString()
         {


updated configuration defaults (when no config is present) to the same values the packaged config file contains.

--- FarmAutomation.ItemCollector/ItemCollectorConfiguration.cs
+++ FarmAutomation.ItemCollector/ItemCollectorConfiguration.cs
@@ -26,9 +26,9 @@
             PetAnimals = true;
             AdditionalFriendshipFromCollecting = 5;
             EnableMod = true;
-            MachinesToCollectFrom = "Keg, Preserves Jar, Cheese Press, Mayonnaise Machine, Loom, Oil Maker, Recycling Machine, Crystalarium, Worm Bin, Bee House, Strange Capsule, Tapper";
-            ItemsToConsiderConnectors = "Keg, Preserves Jar, Cheese Press, Mayonnaise Machine, Loom, Oil Maker, Recycling Machine, Crystalarium, Worm Bin, Bee House, Strange Capsule, Tapper, Chest";
-            LocationsToSearch = "Farm, Greenhouse, FarmHouse, FarmCave";
+            MachinesToCollectFrom = "Keg, Preserves Jar, Cheese Press, Mayonnaise Machine, Loom, Oil Maker, Recycling Machine, Crystalarium, Worm Bin, Bee House, Strange Capsule, Tapper, Statue Of Endless Fortune, Furnace, Seed Maker, Statue of Perfection, Crab Pot, Charcoal Kiln, Mushroom Box, Lightning Rod";
+            ItemsToConsiderConnectors = "Keg, Preserves Jar, Cheese Press, Mayonnaise Machine, Loom, Oil Maker, Recycling Machine, Crystalarium, Worm Bin, Bee House, Strange Capsule, Tapper, Statue Of Endless Fortune, Furnace, Seed Maker, Statue of Perfection, Crab Pot, Charcoal Kiln, Mushroom Box, Lightning Rod, Chest";
+            LocationsToSearch = "Farm, Greenhouse, FarmHouse, FarmCave, Beach";
             FlooringsToConsiderConnectors = new List<int> {6};
             AddBuildingsToLocations = true;
         }


Update assembly version

Update assembly version

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


extended unit test to verify it works for pending examples

--- NSpecSpecs/describe_RunningSpecs/describe_tag_filtering.cs
+++ NSpecSpecs/describe_RunningSpecs/describe_tag_filtering.cs
@@ -59,17 +59,20 @@
         {
             void filters_out_not_run_examples()
             {
-                context["has multiple examples"] = () =>
+                context["has only example level tags"] = () =>
                 {
-                    it["has the correct tag", "onlybar"] = () => true.should_be_true();
-                    it["has a tag but not the correct one", "onlybaz"] = () => true.should_be_true();
-                    it["does not have a tag"] = () => true.should_be_true();
+                    it["should run and be in output", "shouldbeinoutput"] = () => true.should_be_true();
+                    it["should not run and not be in output", "barbaz"] = () => true.should_be_true();
+                    it["should also not run too not be in output"] = () => true.should_be_true();
+
+                    xit["pending but should be in output", "shouldbeinoutput"] = () => true.should_be_true();
+                    it["also pending but should be in output", "shouldbeinoutput"] = todo;
                 };

-                context["tagged with onlybar", "onlybar"] = () =>
+                context["has context level tags", "shouldbeinoutput"] = () =>
                 {
-                    it["has a tag and inherits the correct one", "onlybaz"] = () => true.should_be_true();
-                    it["does not have a tag but inherits the correct one"] = () => true.should_be_true();
+                    it["should also run and be in output", "barbaz"] = () => true.should_be_true();
+                    it["should yet also run and be in output"] = () => true.should_be_true();
                 };
             }
         }
@@ -139,13 +142,15 @@
         [Test]
         public void excludes_examples_not_run()
         {
-            Run(typeof(SpecClass1), "onlybar");
+            Run(typeof(SpecClass1), "shouldbeinoutput");
             var allExamples = classContext.AllContexts().SelectMany(c => c.AllExamples()).ToList();
-            allExamples.should_contain(e => e.Spec == "has the correct tag");
-            allExamples.should_contain(e => e.Spec == "has a tag and inherits the correct one");
-            allExamples.should_contain(e => e.Spec == "does not have a tag but inherits the correct one");
-            allExamples.should_not_contain(e => e.Spec == "has a tag but not the correct one");
-            allExamples.should_not_contain(e => e.Spec == "does not have a tag");
+            allExamples.should_contain(e => e.Spec == "should run and be in output");
+            allExamples.should_contain(e => e.Spec == "should also run and be in output");
+            allExamples.should_contain(e => e.Spec == "should yet also run and be in output");
+            allExamples.should_contain(e => e.Spec == "pending but should be in output");
+            allExamples.should_contain(e => e.Spec == "also pending but should be in output");
+            allExamples.should_not_contain(e => e.Spec == "should not run and not be in output");
+            allExamples.should_not_contain(e => e.Spec == "should also not run too not be in output");
         }
     }
 }


* minor: Remove LINK_SET debug Console Writeline * only appeared in DotNetEngine's LSL_BuildIn_Commands.cs * Nice spot Ewe Loon (http://opensimulator.org/mantis/view.php?id=1548)

--- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -2819,8 +2819,6 @@
                     break;

                 case (int)BuiltIn_Commands_BaseClass.LINK_SET:
-
-                    Console.WriteLine("LINK_SET");

                     foreach (SceneObjectPart partInst in m_host.ParentGroup.GetParts())
                     {


Mantis #2028 Thank you, salahzar, for a patch that implements llGetNumberOfSides() for the DotNetEngine.

--- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -3321,12 +3321,114 @@
             return result;

         }
+        // this function to understand which shape it is (taken from meshmerizer)
+        // quite useful can be used by meshmerizer to have a centralized point of understanding the shape
+        // except that it refers to scripting constants
+        private int getScriptPrimType(PrimitiveBaseShape primShape)
+        {
+
+            if (primShape.SculptEntry)
+                return BuiltIn_Commands_BaseClass.PRIM_TYPE_SCULPT;
+            if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square)
+            {
+                if (primShape.PathCurve == (byte)Extrusion.Straight)
+                    return BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX;
+                else if (primShape.PathCurve == (byte)Extrusion.Curve1)
+                    return BuiltIn_Commands_BaseClass.PRIM_TYPE_TUBE;
+            }
+            else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Circle)
+            {
+                if (primShape.PathCurve == (byte)Extrusion.Straight)
+                    return BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER;
+                // ProfileCurve seems to combine hole shape and profile curve so we need to only compare against the lower 3 bits
+                else if (primShape.PathCurve == (byte)Extrusion.Curve1)
+                    return BuiltIn_Commands_BaseClass.PRIM_TYPE_TORUS;
+            }
+            else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.HalfCircle)
+            {
+                if (primShape.PathCurve == (byte)Extrusion.Curve1 || primShape.PathCurve == (byte)Extrusion.Curve2)
+                    return BuiltIn_Commands_BaseClass.PRIM_TYPE_SPHERE;
+            }
+            else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.EquilateralTriangle)
+            {
+                if (primShape.PathCurve == (byte)Extrusion.Straight)
+                    return BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM;
+                else if (primShape.PathCurve == (byte)Extrusion.Curve1)
+                    return BuiltIn_Commands_BaseClass.PRIM_TYPE_RING;
+            }
+            return BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX;
+
+
+        }
+        // Helper functions to understand if object has cut, hollow, dimple, and other affecting number of faces
+        private void hasCutHollowDimpleProfileCut(PrimitiveBaseShape shape, out bool hasCut, out bool hasHollow,
+            out bool hasDimple, out bool hasProfileCut)
+        {
+            hasCut = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0);
+            hasHollow = shape.ProfileHollow > 0;
+            hasDimple = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0); // taken from llSetPrimitiveParms
+            hasProfileCut = (shape.PathBegin > 0) || (shape.PathEnd > 0); // is it the same thing?
+
+        }

         public LSL_Types.LSLInteger llGetNumberOfSides()
         {
             m_host.AddScriptLPS(1);
-            NotImplemented("llGetNumberOfSides");
-            return 0;
+            int ret = 0;
+            bool hasCut;
+            bool hasHollow;
+            bool hasDimple;
+            bool hasProfileCut;
+
+            hasCutHollowDimpleProfileCut(m_host.Shape, out hasCut, out hasHollow, out hasDimple, out hasProfileCut);
+
+            switch (getScriptPrimType(m_host.Shape))
+            {
+                case BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX:
+                    ret = 6;
+                    if (hasCut) ret += 2;
+                    if (hasHollow) ret += 1;
+                    break;
+                case BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER:
+                    ret = 3;
+                    if (hasCut) ret += 2;
+                    if (hasHollow) ret += 1;
+                    break;
+                case BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM:
+                    ret = 5;
+                    if (hasCut) ret += 2;
+                    if (hasHollow) ret += 1;
+                    break;
+                case BuiltIn_Commands_BaseClass.PRIM_TYPE_SPHERE:
+                    ret = 1;
+                    if (hasProfileCut) ret += 2;
+                    if (hasDimple) ret += 2;
+                    if (hasHollow) ret += 1; // actually lsl adds 4!!!!!! is that a great mistake?
+                    break;
+                case BuiltIn_Commands_BaseClass.PRIM_TYPE_TORUS:
+                    ret = 1;
+                    if (hasCut) ret += 2;
+                    if (hasProfileCut) ret += 2;
+                    if (hasHollow) ret += 1;
+                    break;
+                case BuiltIn_Commands_BaseClass.PRIM_TYPE_TUBE:
+                    ret = 4;
+                    if (hasCut) ret += 2;
+                    if (hasProfileCut) ret += 2;
+                    if (hasHollow) ret += 1;
+                    break;
+                case BuiltIn_Commands_BaseClass.PRIM_TYPE_RING:
+                    ret = 3;
+                    if (hasCut) ret += 2;
+                    if (hasProfileCut) ret += 2;
+                    if (hasHollow) ret += 1;
+                    break;
+                case BuiltIn_Commands_BaseClass.PRIM_TYPE_SCULPT:
+                    ret = 1;
+                    break;
+            }
+
+            return ret;
         }


Conditionally display AutoConnect on printer edit form - Fixes #86664638

--- PrinterControls/PrinterConnections/EditConnectionWidget.cs
+++ PrinterControls/PrinterConnections/EditConnectionWidget.cs
@@ -227,7 +227,9 @@
 				ConnectionControlContainer.AddChild(serialPortScroll);
                 ConnectionControlContainer.AddChild(baudRateLabel);
                 ConnectionControlContainer.AddChild(baudRateWidget);
+#if !__ANDROID__
                 ConnectionControlContainer.AddChild(enableAutoconnect);
+#endif
             }

             FlowLayoutWidget buttonContainer = new FlowLayoutWidget(FlowDirection.LeftToRight);


fix paging

fix paging

--- Rest/NakedObjects.Rest/API/RestfulObjectsControllerBase.cs
+++ Rest/NakedObjects.Rest/API/RestfulObjectsControllerBase.cs
@@ -972,6 +972,8 @@
             return (new ArgumentsContextFacade {
                 Digest = GetIfMatchTag(),
                 Values = map,
+                Page = flags.Page,
+                PageSize = flags.PageSize,
                 ValidateOnly = flags.ValidateOnly
             }, flags);
         }
@@ -982,6 +984,8 @@
             return new ArgumentsContextFacade {
                 Digest = GetIfMatchTag(),
                 Values = dictionary,
+                Page = flags.Page,
+                PageSize = flags.PageSize,
                 ValidateOnly = flags.ValidateOnly
             };
         }
@@ -995,6 +999,8 @@
                 Digest = ignoreConcurrency ? null : GetIfMatchTag(),
                 Values = map,
                 ValidateOnly = flags.ValidateOnly,
+                Page = flags.Page,
+                PageSize = flags.PageSize,
                 ExpectedActionType = GetExpectedMethodType(new HttpMethod(Request.Method))
             };
             return (facade, flags);
@@ -1005,7 +1011,7 @@
             return (new ArgumentContextFacade {
                 Digest = GetIfMatchTag(),
                 Value = value,
-                ValidateOnly = flags.ValidateOnly
+                ValidateOnly = flags.ValidateOnly,
             }, flags);
         }


Adding OneDrive status to home page

Adding OneDrive status to home page

--- SecuritySystemUWP/SecuritySystemUWP/WebServer/WebHelper.cs
+++ SecuritySystemUWP/SecuritySystemUWP/WebServer/WebHelper.cs
@@ -98,7 +98,7 @@
         public string GenerateOneDrivePage()
         {
             string html = "";
-            html += "OneDrive Status:  " + (OneDrive.IsLoggedIn() ? "Logged In" : "Not Logged In") + "

";
+            html += "OneDrive Status:  " + (OneDrive.IsLoggedIn() ? "Logged In" : "Not Logged In") + "
";
             string uri = string.Format(AppSettings.OneDriveLoginUrl, App.Controller.XmlSettings.OneDriveClientId, AppSettings.OneDriveScope, AppSettings.OneDriveRedirectUrl);
             html += "
Log into OneDrive:
";
             html += "
";
@@ -124,8 +124,14 @@
             string html = "";

             html += "Camera Type:  " + App.Controller.Camera.GetType().Name + "
";
-            html += "Storage Type:  " + App.Controller.Storage.GetType().Name + "
";
-            html += "Status:  " + ((App.Controller.IsInitialized()) ? "Running" : "Not Running") + "";
+            html += "Storage Type:  " + App.Controller.Storage.GetType().Name + "

";
+            html += "Status:  " + ((App.Controller.IsInitialized()) ? "Running" : "Not Running") + "
";
+
+            // Show OneDrive status if the Storage Provider selected is OneDrive
+            if(App.Controller.Storage.GetType() == typeof(OneDrive))
+            {
+                html += "OneDrive Status:  " + (OneDrive.IsLoggedIn() ? "Logged In" : "Not Logged In") + "
";
+            }

             return GeneratePage("Security System", "Home", html);
         }


Put in BSD text

Put in BSD text

--- SerialPortCommunication/FrostedSerial/FrostedSerialPort.cs
+++ SerialPortCommunication/FrostedSerial/FrostedSerialPort.cs
@@ -1,11 +1,39 @@
-using System;
+/*
+Copyright (c) 2014, Kevin Pope
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+   list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those
+of the authors and should not be interpreted as representing official policies,
+either expressed or implied, of the FreeBSD Project.
+*/
+
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Diagnostics;
+using System.IO;
 using System.Text;
-using System.Runtime.InteropServices;
 using Microsoft.Win32;
-using System.IO;

 namespace MatterHackers.SerialPortCommunication.FrostedSerial
 {
@@ -18,7 +46,6 @@
         Dtr = 8, // Data terminal ready
         Rts = 16 // Request to send
     }
-

     public enum Handshake
     {


Output the gcard vendor on loadup

Output the gcard vendor on loadup

--- ShadowOperations/ClientGame/ClientMainSystem/ClientBase.cs
+++ ShadowOperations/ClientGame/ClientMainSystem/ClientBase.cs
@@ -113,6 +113,7 @@
             SysConsole.Output(OutputType.INIT, "Loading shaders...");
             Shaders = new ShaderEngine();
             string vendor = GL.GetString(StringName.Vendor);
+            SysConsole.Output(OutputType.INIT, "Found vendor " + vendor);
             if (vendor.ToLower().Contains("intel"))
             {
                 Shaders.MCM_GOOD_GRAPHICS = false;


move over to interface context

move over to interface context

--- Snippets/Snippets_6/UpgradeGuides/5to6/OutgoingBehavior.cs
+++ Snippets/Snippets_6/UpgradeGuides/5to6/OutgoingBehavior.cs
@@ -6,9 +6,9 @@
     using NServiceBus.Pipeline.OutgoingPipeline;

     #region 5to6header-outgoing-behavior
-    public class OutgoingBehavior : Behavior<OutgoingLogicalMessageContext>
+    public class OutgoingBehavior : Behavior<IOutgoingLogicalMessageContext>
     {
-        public override async Task Invoke(OutgoingLogicalMessageContext context, Func<Task> next)
+        public override async Task Invoke(IOutgoingLogicalMessageContext context, Func<Task> next)
         {
             context.Headers["MyCustomHeader"] = "My custom value";
             await next();


Fixed wrong JsObject serialization that caused cyclic dependency (fixes #224)

--- Source/AlphaTab.JavaScript/Importer/Model/JsonConverter.cs
+++ Source/AlphaTab.JavaScript/Importer/Model/JsonConverter.cs
@@ -135,7 +135,7 @@
                         var chord = staff.Chords[key];
                         Chord chord2 = Platform.Platform.NewObject();
                         Chord.CopyTo(chord, chord2);
-                        staff2.Chords[key] = chord;
+                        staff2.Chords[key] = chord2;
                     }

                     #region Bars


[REFACTORED] Comments in SexyCurvesWindow.cs

--- Source/Assets/SexyCurves/CustomEditors/SexyCurvesWindow.cs
+++ Source/Assets/SexyCurves/CustomEditors/SexyCurvesWindow.cs
@@ -1,10 +1,10 @@
 // SexyCurvesWindow.cs - SexyCurves
 //
-// Created at 1:52 PM, on 14.06.2016
-//
+// Created at 13:52, on 14.06.2016
 // By Konstantin Rudolph
 //
-// Last modified at 1:46 AM, on 16.06.2016
+// Last modified at 17:43, on 25.07.2016
+// By Konstantin Rudolph

 using JetBrains.Annotations;
 using SexyCurves.Enumerators;
@@ -31,34 +31,48 @@
         #region privateFunctions

         /// <summary>
-        ///     Creates the GUI for the cosine settings.
+        ///     Creates the GUI-part for the cosine settings.
         /// </summary>
         private void CosineSettingsGui()
         {
             EditorGUILayout.LabelField("Cosine Function Settings:");
-            _sexyCurvesManager.HarmonicSineWave.SetAmplitude(EditorGUILayout.FloatField("Amplitude:", _sexyCurvesManager.HarmonicSineWave.GetAmplitude()));
-            _sexyCurvesManager.HarmonicSineWave.SetFrequency(EditorGUILayout.FloatField("Frequency:", _sexyCurvesManager.HarmonicSineWave.GetFrequency()));
-            _sexyCurvesManager.HarmonicSineWave.SetYDisplacement(EditorGUILayout.FloatField("Y-Displacement:", _sexyCurvesManager.HarmonicSineWave.GetYDisplacement()));
-        }
-
-        /// <summary>
-        ///     Creates the GUI for the sine settings.
+            _sexyCurvesManager.HarmonicSineWave.SetAmplitude(EditorGUILayout.FloatField("Amplitude:",
+                _sexyCurvesManager.HarmonicSineWave.GetAmplitude()));
+            _sexyCurvesManager.HarmonicSineWave.SetFrequency(EditorGUILayout.FloatField("Frequency:",
+                _sexyCurvesManager.HarmonicSineWave.GetFrequency()));
+            _sexyCurvesManager.HarmonicSineWave.SetYDisplacement(EditorGUILayout.FloatField("Y-Displacement:",
+                _sexyCurvesManager.HarmonicSineWave.GetYDisplacement()));
+        }
+
+        /// <summary>
+        ///     Creates the GUI-part for the sine settings.
         /// </summary>
         private void SineSettingsGui()
         {
             EditorGUILayout.LabelField("Sine Function Settings:");
-            _sexyCurvesManager.HarmonicSineWave.SetAmplitude(EditorGUILayout.FloatField("Amplitude:", _sexyCurvesManager.HarmonicSineWave.GetAmplitude()));
-            _sexyCurvesManager.HarmonicSineWave.SetFrequency(EditorGUILayout.FloatField("Frequency:", _sexyCurvesManager.HarmonicSineWave.GetFrequency()));
-            _sexyCurvesManager.HarmonicSineWave.SetYDisplacement(EditorGUILayout.FloatField("Y-Displacement:", _sexyCurvesManager.HarmonicSineWave.GetYDisplacement()));
-        }
-
+            _sexyCurvesManager.HarmonicSineWave.SetAmplitude(EditorGUILayout.FloatField("Amplitude:",
+                _sexyCurvesManager.HarmonicSineWave.GetAmplitude()));
+            _sexyCurvesManager.HarmonicSineWave.SetFrequency(EditorGUILayout.FloatField("Frequency:",
+                _sexyCurvesManager.HarmonicSineWave.GetFrequency()));
+            _sexyCurvesManager.HarmonicSineWave.SetYDisplacement(EditorGUILayout.FloatField("Y-Displacement:",
+                _sexyCurvesManager.HarmonicSineWave.GetYDisplacement()));
+        }
+
+        /// <summary>
+        ///     Creates the GUI-part for the exponential settings.
+        /// </summary>
         private void ExponentialSettingsGui()
         {
             EditorGUILayout.LabelField("Exponential Function Settings:");
-            _sexyCurvesManager.ExponentialGrowthFunction.SetStartQuantity(EditorGUILayout.FloatField("Start Quantity: ", _sexyCurvesManager.ExponentialGrowthFunction.GetStartQuantity()));
-            _sexyCurvesManager.ExponentialGrowthFunction.SetRate(EditorGUILayout.FloatField("Decay/Growth Rate: ", _sexyCurvesManager.ExponentialGrowthFunction.GetRate()));
-        }
-
+            _sexyCurvesManager.ExponentialGrowthFunction.SetStartQuantity(EditorGUILayout.FloatField(
+                "Start Quantity: ", _sexyCurvesManager.ExponentialGrowthFunction.GetStartQuantity()));
+            _sexyCurvesManager.ExponentialGrowthFunction.SetRate(EditorGUILayout.FloatField("Decay/Growth Rate: ",
+                _sexyCurvesManager.ExponentialGrowthFunction.GetRate()));
+        }
+
+        /// <summary>
+        ///     Creates the GUI-part for the polynomial settings.
+        /// </summary>
         private void PolynomialSettingsGui()
         {
             EditorGUILayout.LabelField("Polynomial Function Settings:");
@@ -90,13 +104,14 @@
         // ReSharper disable once ArrangeTypeMemberModifiers
         void OnGUI()
         {
+            // General GUI Creation/Handling
             _sexyCurvesManager.SetTargetParticleSystem(
                 EditorGUILayout.ObjectField(
                     new GUIContent(
                         "Target Particle System:",
                         "The target particle system on which one or more curve shall be modified."),
                     _sexyCurvesManager.GetTargetParticleSystem(),
-                    typeof (ParticleSystem),
+                    typeof(ParticleSystem),
                     true) as ParticleSystem);

             EditorGUILayout.BeginHorizontal();
@@ -121,12 +136,12 @@
             }

             //evaluate if different axes are needed then add to ui
-            //TODO: evaluate
+            //TODO: evaluate //-> if there's only on axis yet, every droptdown affects that one. Disable Droptdown if there's only one.
             _sexyCurvesManager.SetTargetCurves(
-            (SexyCurvesCurveEnum)
-                EditorGUILayout.EnumPopup(
-                    new GUIContent("Target Axis:", "Which axis-curves shall be modified."),
-                    _sexyCurvesManager.GetTargetCurves()));
+                (SexyCurvesCurveEnum)
+                    EditorGUILayout.EnumPopup(
+                        new GUIContent("Target Axis:", "Which axis-curves shall be modified."),
+                        _sexyCurvesManager.GetTargetCurves()));

             _sexyCurvesManager.SetTargetFunction(
@@ -136,22 +151,23 @@
                             "Target Function:",
                             "Which function-type shall be applied onto the selected curve(s)."),
                         _sexyCurvesManager.GetTargetFunction()));
-            int amount = EditorGUILayout.IntField(
+            var amount = EditorGUILayout.IntField(
                 new GUIContent("Key Amount:", "The amount of keys which shall be applied."),
                 (int) _sexyCurvesManager.GetKeyAmount());

             if (amount >= 1)
             {
-                _sexyCurvesManager.SetKeyAmount((uint)amount);
+                _sexyCurvesManager.SetKeyAmount((uint) amount);
             }
             else
             {
                 Debug.LogWarning("The key amount has to be at least 1, which will result in a line.");
                 Repaint();
             }
-
+            // !General GUI Creation/Handling
+            // Function Specific GUI
             EditorGUILayout.Separator();
-            float tempScalar = EditorGUILayout.FloatField("Curve Scalar:", _sexyCurvesManager.GetScalar());
+            var tempScalar = EditorGUILayout.FloatField("Curve Scalar:", _sexyCurvesManager.GetScalar());
             if (tempScalar >= 0.1f)
             {
                 _sexyCurvesManager.SetScalar(tempScalar);
@@ -172,8 +188,9 @@
                     PolynomialSettingsGui();
                     break;
             }
-
-            float tempXDisplacement = EditorGUILayout.FloatField("X-Displacement :", _sexyCurvesManager.GetXDisplacement());
+            // !Function Specific GUI
+
+            var tempXDisplacement = EditorGUILayout.FloatField("X-Displacement :", _sexyCurvesManager.GetXDisplacement());
             _sexyCurvesManager.SetXDisplacement(tempXDisplacement);

             if (GUILayout.Button("Apply Function"))


Fix Swagger feature

Fix Swagger feature

--- Source/Boilerplate.Templates/content/Api-CSharp/Startup.cs
+++ Source/Boilerplate.Templates/content/Api-CSharp/Startup.cs
@@ -223,7 +223,9 @@
                 .AddXmlSerializerFormatters()
 #endif
                 .Services
+#if (Swagger)
                 .AddSwagger()
+#endif
                 .AddCommands()
                 .AddRepositories()
                 .AddTranslators();


SpriteRenderer Clone Fix #FIX: Fixed SpriteRenderer not copying its values for pixel grid alignment and flip modes when being cloned.

--- Source/Core/Duality/Components/Renderers/SpriteRenderer.cs
+++ Source/Core/Duality/Components/Renderers/SpriteRenderer.cs
@@ -331,10 +331,12 @@
 			base.OnCopyDataTo(targetObj, operation);
 			SpriteRenderer target = targetObj as SpriteRenderer;

-			target.rect			= this.rect;
-			target.colorTint	= this.colorTint;
-			target.rectMode		= this.rectMode;
-			target.offset		= this.offset;
+			target.rect      = this.rect;
+			target.colorTint = this.colorTint;
+			target.rectMode  = this.rectMode;
+			target.offset    = this.offset;
+			target.pixelGrid = this.pixelGrid;
+			target.flipMode  = this.flipMode;

 			operation.HandleValue(ref this.sharedMat, ref target.sharedMat);
 			operation.HandleObject(this.customMat, ref target.customMat);


Removed AccessToken and ProfileId properties in LoginButton (these properties are available off the CurrentSession property), added RequestNewPermissions method to LoginButton, updated login to handle FacebookOAuthException

--- Source/Facebook.Client/Controls/LoginButton/LoginButton.cs
+++ Source/Facebook.Client/Controls/LoginButton/LoginButton.cs
@@ -39,8 +39,6 @@
         #region Default Property Values

         private const string DefaultApplicationId = "";
-        private const string DefaultAccessToken = "";
-        private const string DefaultProfileId = "";
         private const Audience DefaultDefaultAudience = Audience.None;
         private const string DefaultPermissions = "";
         private const bool DefaultFetchUserInfo = true;
@@ -110,60 +108,15 @@
         {
             var target = (LoginButton)d;
             var applicationId = (string)e.NewValue;
-            if (!string.IsNullOrWhiteSpace(applicationId))
-            {
-                target.facebookSessionClient = new FacebookSessionClient(applicationId);
-            }
-            else
-            {
-                target.facebookSessionClient = null;
-            }
+            target.facebookSessionClient = string.IsNullOrWhiteSpace(applicationId) ? null : new FacebookSessionClient(applicationId);
         }

         #endregion ApplicationId

-        #region AccessToken
-
-        /// <summary>
-        /// Gets or sets the access token returned by the Facebook Login service.
-        /// </summary>
-        public string AccessToken
-        {
-            get { return (string)GetValue(AccessTokenProperty); }
-            set { this.SetValue(AccessTokenProperty, value); }
-        }
-
-        /// <summary>
-        /// Identifies the AccessToken dependency property.
-        /// </summary>
-        public static readonly DependencyProperty AccessTokenProperty =
-            DependencyProperty.Register("AccessToken", typeof(string), typeof(LoginButton), new PropertyMetadata(LoginButton.DefaultAccessToken));
-
-        #endregion AccessToken
-
-        #region ProfileId
-
-        /// <summary>
-        /// The Facebook ID of the logged in user.
-        /// </summary>
-        public string ProfileId
-        {
-            get { return (string)GetValue(ProfileIdProperty); }
-            set { this.SetValue(ProfileIdProperty, value); }
-        }
-
-        /// <summary>
-        /// Identifies the ProfileId dependency property.
-        /// </summary>
-        public static readonly DependencyProperty ProfileIdProperty =
-            DependencyProperty.Register("ProfileId", typeof(string), typeof(LoginButton), new PropertyMetadata(LoginButton.DefaultProfileId));
-
-        #endregion ProfileId
-
         #region DefaultAudience

         /// <summary>
-        /// The default audience to use, if publish permissions are requested at login time.
+        /// Gets or sets the default audience to use, if publish permissions are requested at login time.
         /// </summary>
         /// <remarks>
         /// Certain operations such as publishing a status or publishing a photo require an audience. When the user grants an application
@@ -187,7 +140,7 @@
         #region Permissions

         /// <summary>
-        /// The permissions to request.
+        /// Gets or sets the permissions to request.
         /// </summary>
         public string Permissions
         {
@@ -244,7 +197,7 @@
             var target = (LoginButton)d;
             target.UpdateSession();
         }
-
+
         #endregion CurrentSession

         #region CurrentUser
@@ -286,6 +239,19 @@
         #endregion CornerRadius

         #endregion Properties
+
+        #region Methods
+
+        /// <summary>
+        /// Requests new permissions for the current Facebook session.
+        /// </summary>
+        /// <param name="permissions">The permissions to request.</param>
+        public async Task RequestNewPermissions(string permissions)
+        {
+            await this.LogIn(permissions);
+        }
+
+        #endregion Methods

         #region Implementation

@@ -330,7 +296,7 @@
             }
         }

-        private async Task LogIn()
+        private async Task LogIn(string permissions = null)
         {
             try
             {
@@ -338,7 +304,7 @@

                 // TODO: using Permissions for the time being until we decide how
                 // to handle separate ReadPermissions and PublishPermissions
-                var session = await this.facebookSessionClient.LoginAsync(this.Permissions);
+                var session = await this.facebookSessionClient.LoginAsync(permissions ?? this.Permissions);

                 // initialize current session
                 this.CurrentSession = session;
@@ -371,6 +337,13 @@

                 this.AuthenticationError.RaiseEvent(this, authenticationErrorEventArgs);
             }
+            catch (FacebookOAuthException error)
+            {
+                var authenticationErrorEventArgs =
+                    new AuthenticationErrorEventArgs("Login failure.", error.Message);
+
+                this.AuthenticationError.RaiseEvent(this, authenticationErrorEventArgs);
+            }
         }

         private void LogOut()
@@ -386,8 +359,6 @@

         private void UpdateSession()
         {
-            this.AccessToken = this.CurrentSession != null ? this.CurrentSession.AccessToken : string.Empty;
-            this.ProfileId = this.CurrentSession != null ? this.CurrentSession.FacebookId : string.Empty;
             this.UpdateButtonCaption();
         }


GSF.Web: Updated AuthenticationHandler to respond with Unauthorized for Ajax calls instead of Redirect for resources that are marked for auth-failure redirection.

--- Source/Libraries/GSF.Web/Security/AuthenticationHandler.cs
+++ Source/Libraries/GSF.Web/Security/AuthenticationHandler.cs
@@ -27,6 +27,7 @@

 using System;
 using System.Collections.Concurrent;
+using System.Linq;
 using System.Net;
 using System.Net.Http.Headers;
 using System.Runtime.CompilerServices;
@@ -187,7 +188,7 @@
                     return false; // Let pipeline continue

                 // Abort pipeline with appropriate response
-                if (Options.IsAuthFailureRedirectResource(urlPath))
+                if (Options.IsAuthFailureRedirectResource(urlPath) && !IsAjaxCall())
                 {
                     string urlQueryString = Request.QueryString.HasValue ? "?" + Request.QueryString.Value : "";
                     byte[] pathBytes = Encoding.UTF8.GetBytes(urlPath + urlQueryString);
@@ -217,6 +218,12 @@

                 return true; // Abort pipeline
             });
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        private bool IsAjaxCall()
+        {
+            return Request.Headers.TryGetValue("X-Requested-With", out string[] values) && values.Any(value => value.Equals("XMLHttpRequest"));
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]


- Minor change

- Minor change

--- Source/Mosa.CoolWorld.x86/DeviceSystem/InterruptManager.cs
+++ Source/Mosa.CoolWorld.x86/DeviceSystem/InterruptManager.cs
@@ -61,12 +61,11 @@
 			//spinLock.Enter();
 			var hardwareDevice = handlers.First.value;

-
-			//hardwareDevice.OnInterrupt();
+			hardwareDevice.OnInterrupt();

 			//foreach (IHardwareDevice hardwareDevice in interruptHandlers[irq])
 			//{
-			//    hardwareDevice.OnInterrupt();
+			//	hardwareDevice.OnInterrupt();
 			//}

 			//spinLock.Exit();


Still attempting to fix failing PackageTruster test.

--- Source/OpenIIoT.SDK.Packaging/Operations/PackageTruster.cs
+++ Source/OpenIIoT.SDK.Packaging/Operations/PackageTruster.cs
@@ -120,18 +120,19 @@
             Verbose($"Updating Manifest in Package '{Path.GetFileName(packageFile)}'...");

             string tempDirectory = Path.Combine(Path.GetTempPath(), GetType().Namespace.Split('.')[0], Guid.NewGuid().ToString());
-            string tempManifest = Path.Combine(tempDirectory, PackagingConstants.ManifestFilename);
+            string tempPackageDirectory = Path.Combine(tempDirectory, "package");
+            string tempManifest = Path.Combine(tempPackageDirectory, PackagingConstants.ManifestFilename);
             string tempPackage = Path.Combine(tempDirectory, Path.GetFileName(packageFile));

             Exception deferredException = default(Exception);

             try
             {
-                ZipFile.ExtractToDirectory(packageFile, Path.Combine(tempDirectory, "package"));
+                ZipFile.ExtractToDirectory(packageFile, tempPackageDirectory);
                 File.Delete(tempManifest);
                 File.WriteAllText(tempManifest, manifest.ToJson());

-                ZipFile.CreateFromDirectory(Path.Combine(tempDirectory, "package"), tempPackage);
+                ZipFile.CreateFromDirectory(tempPackageDirectory, tempPackage);

                 File.Copy(tempPackage, packageFile, true);


Added more KnowMediaType to XmlConverter

--- Sources/Silphid.Loadzup/Sources/Converters/XmlConverter.cs
+++ Sources/Silphid.Loadzup/Sources/Converters/XmlConverter.cs
@@ -1,4 +1,5 @@
 using System.IO;
+using System.Linq;
 using System.Text;
 using System.Xml.Serialization;

@@ -6,8 +7,14 @@
 {
     public class XmlConverter : IConverter
     {
+        private readonly string[] _xmlMediaTypes =
+        {
+            KnownMediaType.ApplicationXml,
+            "text/xml"
+        };
+
         public bool Supports<T>(byte[] bytes, ContentType contentType) =>
-            contentType.MediaType == KnownMediaType.ApplicationXml;
+            _xmlMediaTypes.Contains(contentType.MediaType);

         public T Convert<T>(byte[] bytes, ContentType contentType, Encoding encoding)
         {


Fixed the bug in PMachineValue implementation

--- Src/PSharpRuntime/PSharpExtensions/Values/PMachineValue.cs
+++ Src/PSharpRuntime/PSharpExtensions/Values/PMachineValue.cs
@@ -32,6 +32,10 @@
         {
             return other is PMachineValue machine && Equals(Id, machine.Id);
         }
+        public override int GetHashCode()
+        {
+            return Id.GetHashCode();
+        }

         public IPrtValue Clone()
         {


Fix name refactoring for authentication helper

--- Stranne.BooliLib.Tests/Helpers/AuthenticationHelperTest.cs
+++ Stranne.BooliLib.Tests/Helpers/AuthenticationHelperTest.cs
@@ -12,7 +12,7 @@
         [InlineData("Abc", "123")]
         public void GetAuthenticationQuery(string callerId, string key)
         {
-            var actual = AuthenticationService.GetAuthenticationQuery(callerId, key);
+            var actual = AuthenticationHelper.GetAuthenticationQuery(callerId, key);

             Assert.NotEmpty(actual);
             Assert.Contains(new KeyValuePair<string, string>("callerId", callerId), actual);
@@ -26,7 +26,7 @@
         [InlineData("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi feugiat orci ac arcu vulputate aliquet. In hac habitasse platea dictumst. In enim quam, iaculis a gravida suscipit, volutpat ac ipsum. Curabitur euismod orci sit amet tortor suscipit, eu ultricies felis fermentum. Aenean tincidunt convallis risus ac tempus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Quisque suscipit elit et dignissim semper. Aliquam molestie neque non dui bibendum aliquet. Nunc sed sapien eget velit elementum auctor. Vestibulum turpis quam, efficitur in tempus quis, faucibus id justo. Nam interdum sem a turpis tincidunt maximus. Ut quis nisl sed turpis vulputate sollicitudin. Nulla sit amet arcu iaculis, molestie eros sit amet, bibendum tellus. Cras ut justo turpis. Ut vitae iaculis arcu, sed tempus libero. Quisque et justo metus.", "dafc5ce692c975a0b48cc1c9cca25611690a7174")]
         public void CreateHash(string text, string expected)
         {
-            var actual = AuthenticationService.CreateHash(text);
+            var actual = AuthenticationHelper.CreateHash(text);
             Assert.Equal(expected, actual);
         }

@@ -35,7 +35,7 @@
         [InlineData(16)]
         public void CreateUniqueLength(int length)
         {
-            var actual = AuthenticationService.CreateUnique(length);
+            var actual = AuthenticationHelper.CreateUnique(length);
             Assert.Equal(length, actual.Length);
         }

@@ -43,7 +43,7 @@
         [InlineData(16)]
         public void CreateUniqueCharacters(int length)
         {
-            var actual = AuthenticationService.CreateUnique(length);
+            var actual = AuthenticationHelper.CreateUnique(length);
             var regex = new Regex(@"^[a-zA-Z0-9]*$");
             Assert.True(regex.IsMatch(actual));
         }


加fCreateTime 时间值

加fCreateTime 时间值

--- SurveyDesign/Government/AppSGXKZGL/CCBLFSAuditInfo.aspx.cs
+++ SurveyDesign/Government/AppSGXKZGL/CCBLFSAuditInfo.aspx.cs
@@ -358,7 +358,7 @@
             DataTable dt = ds.Tables[0];

             for (int i = 0; i < dt.Rows.Count; i++) {
-                sql = "INSERT INTO TC_PrjItem_Emp_Lock (FId,FIdCard,FHumanName,FAppId,FPrjId,FPrjItemId,FEntId,FEntName,IsLock,SelectedCount) VALUES ";
+                sql = "INSERT INTO TC_PrjItem_Emp_Lock (FId,FIdCard,FHumanName,FAppId,FPrjId,FPrjItemId,FEntId,FEntName,IsLock,SelectedCount,fCreateTime) VALUES ";
                 sql += "('" + Guid.NewGuid().ToString();
                 sql += "','" + dt.Rows[i]["FIdCard"].ToString();
                 sql += "','" + dt.Rows[i]["FHumanName"].ToString();//item.FHumanName;
@@ -367,7 +367,7 @@
                 sql += "','" + dt.Rows[i]["FPrjItemId"].ToString();
                 sql += "','" + dt.Rows[i]["FEntId"].ToString();
                 sql += "','" + dt.Rows[i]["FEntName"].ToString();
-                sql += "',1,1)";
+                sql += "',1,1,getdate())";

                 SqlCommand cmd = new SqlCommand(sql, conn);


Explicit AllowMultiple = true

Explicit AllowMultiple = true

--- Gu.Roslyn.Asserts/TransitiveMetadataReferencesAttribute.cs
+++ Gu.Roslyn.Asserts/TransitiveMetadataReferencesAttribute.cs
@@ -8,7 +8,7 @@
     /// <summary>
     /// Specify what default metadata reference to use.
     /// </summary>
-    [AttributeUsage(AttributeTargets.Assembly)]
+    [AttributeUsage(AttributeTargets.Assembly,  AllowMultiple = true)]
     public class TransitiveMetadataReferencesAttribute : Attribute
     {
         /// <summary>


Commented old bad tests

Commented old bad tests

--- Tamagochi/TamagochiClassLibraryTests/Models/PlayerTests.cs
+++ Tamagochi/TamagochiClassLibraryTests/Models/PlayerTests.cs
@@ -13,10 +13,11 @@
         [TestMethod()]
         public void InitializeTest()
         {
-            Animal pet = new Dog(Gender.Male, "Rex");
-            //Player player = Player.Initialize("dany", pet);
-            Assert.AreEqual(pet.Name, "Rex");
-            //Assert.AreEqual(player.Pet.Name, "Rex");
+            //Animal pet = new Dog(Gender.Male, "Rex");
+            ////Player player = Player.Initialize("dany", pet);
+            //Assert.AreEqual(pet.Name, "Rex");
+            ////Assert.AreEqual(player.Pet.Name, "Rex");
+            Assert.Fail();
         }

         [TestMethod()]
@@ -28,10 +29,10 @@
         [TestMethod()]
         public void SerializeTest()
         {
-            Animal pet = new Dog(Gender.Male, "Rex");
+            //Animal pet = new Dog(Gender.Male, "Rex");
             //Player player = Player.Initialize("dany", pet);
             //player.Serialize();
-            //Assert.Fail();
+            Assert.Fail();
         }

         [TestMethod()]


codegen: fix version in tests

codegen: fix version in tests

--- test/Odachi.CodeGen.TypeScript.Tests/RenderingTests.cs
+++ test/Odachi.CodeGen.TypeScript.Tests/RenderingTests.cs
@@ -67,7 +67,7 @@
 function fail(message: string): never { throw new Error(message); }
 const _$$_factory_boolean = { create: (source: any): boolean => typeof source === 'boolean' ? source : fail(`Contract violation: expected boolean, got \'{typeof(source)}\'`) };

-// source: Odachi.CodeModel.Tests.GenericObject`1, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+// source: Odachi.CodeModel.Tests.GenericObject`1, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 class GenericObject<T> {
 	@observable.ref
@@ -112,7 +112,7 @@
 const _$$_factory_string_opt = _$$_opt(_$$_factory_string);
 const _$$_factory_number = { create: (source: any): number => typeof source === 'number' ? source : fail(`Contract violation: expected number, got \'{typeof(source)}\'`) };

-// source: Odachi.CodeModel.Tests.ObjectWithGenericObject, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+// source: Odachi.CodeModel.Tests.ObjectWithGenericObject, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 class ObjectWithGenericObject {
 	@observable.ref
@@ -155,7 +155,7 @@
 const _$$_factory_string_opt = _$$_opt(_$$_factory_string);
 const _$$_factory_number = { create: (source: any): number => typeof source === 'number' ? source : fail(`Contract violation: expected number, got \'{typeof(source)}\'`) };

-// source: Odachi.CodeModel.Tests.ObjectWithArrayOfGenericObject, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+// source: Odachi.CodeModel.Tests.ObjectWithArrayOfGenericObject, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 class ObjectWithArrayOfGenericObject {
 	@observable.ref
@@ -208,7 +208,7 @@
 const _$$_factory_string = { create: (source: any): string => typeof source === 'string' ? source : fail(`Contract violation: expected string, got \'{typeof(source)}\'`) };
 const _$$_factory_string_opt = _$$_opt(_$$_factory_string);

-// source: Odachi.CodeModel.Tests.ObjectWithArrayOfGenericObjectWithPages, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+// source: Odachi.CodeModel.Tests.ObjectWithArrayOfGenericObjectWithPages, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 class ObjectWithArrayOfGenericObjectWithPages {
 	@observable.ref
@@ -249,7 +249,7 @@
 const _$$_factory_number = { create: (source: any): number => typeof source === 'number' ? source : fail(`Contract violation: expected number, got \'{typeof(source)}\'`) };
 const _$$_factory_datetime = { create: (source: any): Moment => typeof source === 'string' ? moment(source) : fail(`Contract violation: expected datetime string, got \'{typeof(source)}\'`) };

-// source: Odachi.CodeModel.Tests.ObjectWithTuple, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+// source: Odachi.CodeModel.Tests.ObjectWithTuple, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 class ObjectWithTuple {
 	@observable.ref
@@ -290,7 +290,7 @@
 const _$$_factory_number = { create: (source: any): number => typeof source === 'number' ? source : fail(`Contract violation: expected number, got \'{typeof(source)}\'`) };
 const _$$_factory_datetime = { create: (source: any): Moment => typeof source === 'string' ? moment(source) : fail(`Contract violation: expected datetime string, got \'{typeof(source)}\'`) };

-// source: Odachi.CodeModel.Tests.ObjectWithOneOf, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+// source: Odachi.CodeModel.Tests.ObjectWithOneOf, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 class ObjectWithOneOf {
 	@observable.ref
@@ -326,7 +326,7 @@
 const _$$_factory_ValidationState = { create: (source: any): validation.ValidationState => typeof source === 'object' && source !== null && typeof source.state === 'object' && source.state !== null ? new validation.ValidationState(source.state) : fail(`Contract violation: expected validation state, got \\'{typeof(source)}\\'`) };
 const _$$_factory_ValidationState_opt = _$$_opt(_$$_factory_ValidationState);

-// source: Odachi.CodeModel.Tests.ObjectWithValidationState, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+// source: Odachi.CodeModel.Tests.ObjectWithValidationState, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 class ObjectWithValidationState {
 	@observable.ref
@@ -358,7 +358,7 @@
 function fail(message: string): never { throw new Error(message); }
 const _$$_factory_number = { create: (source: any): number => typeof source === 'number' ? source : fail(`Contract violation: expected number, got \'{typeof(source)}\'`) };

-// source: Odachi.CodeModel.Tests.ObjectWithPrimitives, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+// source: Odachi.CodeModel.Tests.ObjectWithPrimitives, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 class ObjectWithPrimitives {
 	@observable.ref
@@ -409,7 +409,7 @@

 			var result = RenderModule(package, $".\\{nameof(StandardEnum)}");

-			Assert.Equal(@"// source: Odachi.CodeModel.Tests.StandardEnum, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+			Assert.Equal(@"// source: Odachi.CodeModel.Tests.StandardEnum, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 enum StandardEnum {
 	foo = 1,
@@ -469,7 +469,7 @@

 			var result = RenderModule(package, $".\\{nameof(FlagsEnum)}");

-			Assert.Equal(@"// source: Odachi.CodeModel.Tests.FlagsEnum, Odachi.CodeModel.Tests, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
+			Assert.Equal(@"// source: Odachi.CodeModel.Tests.FlagsEnum, Odachi.CodeModel.Tests, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null

 enum FlagsEnum {
 	foo = 1,


キャラカオスの判定修正

キャラカオスの判定修正

--- Inferno/ChaosMode/PedChaosChecker/CharacterChaosChecker.cs
+++ Inferno/ChaosMode/PedChaosChecker/CharacterChaosChecker.cs
@@ -68,7 +68,7 @@

             //IG/CSから始まるものはユニークキャラ（？）
             var pedTypeName = pedType.ToString();
-            return pedTypeName.StartsWith("Ig") || pedTypeName.Contains("Cs");
+            return pedTypeName.StartsWith("Ig") || pedTypeName.StartsWith("Cs");
         }


Tests for parsing MaxInt & excp on prerelease missing hyphen

--- test/SemanticVersionTest/SemanticVersion/ParseTests.cs
+++ test/SemanticVersionTest/SemanticVersion/ParseTests.cs
@@ -16,6 +16,16 @@
             Assert.Equal(1, version.Major);
             Assert.Equal(1, version.Minor);
             Assert.Equal(1, version.Patch);
+        }
+
+        [Fact]
+        public void ParseMaxInts()
+        {
+            SemanticVersion version = SemanticVersion.Parse(string.Format("{0}.{0}.{0}", int.MaxValue));
+
+            Assert.Equal(int.MaxValue, version.Major);
+            Assert.Equal(int.MaxValue, version.Minor);
+            Assert.Equal(int.MaxValue, version.Patch);
         }

         [Fact]
@@ -103,6 +113,12 @@
         }

         [Fact]
+        public void ParseMissingLeadingHyphenForPrereleaseThrows()
+        {
+            Assert.Throws<ArgumentException>(() => SemanticVersion.Parse("1.2.3.alpha"));
+        }
+
+        [Fact]
         public void ImplicitConversion()
         {
             SemanticVersion version = "1.1.1";


fixed typo and test

fixed typo and test

--- tests/OmniSharp.Roslyn.CSharp.Tests/FormattingFacts.cs
+++ tests/OmniSharp.Roslyn.CSharp.Tests/FormattingFacts.cs
@@ -264,7 +264,7 @@

 namespace Bar
 {
-    class Foo {}
+    class Foo { }
 }");

             using (var host = CreateOmniSharpHost(new[] { testFile }, configurationData: new Dictionary<string, string>
@@ -284,13 +284,13 @@

 namespace Bar
 {
-    class Foo {}
+    class Foo { }
 }", response.Buffer);
             }
         }

         [Fact]
-        public async Task DoersntOrganizeImportsWhenDisabled()
+        public async Task DoesntOrganizeImportsWhenDisabled()
         {
             var testFile = new TestFile("dummy.cs", @"
 using System.IO;
@@ -299,7 +299,7 @@

 namespace Bar
 {
-    class Foo {}
+    class Foo { }
 }");

             using (var host = CreateOmniSharpHost(new[] { testFile }, configurationData: new Dictionary<string, string>
@@ -319,7 +319,7 @@

 namespace Bar
 {
-    class Foo {}
+    class Foo { }
 }", response.Buffer);
             }
         }


Update CalibrationTask.cs

Update CalibrationTask.cs

--- InternalLogicWithFileIO/CalibrationTask/CalibrationTask.cs
+++ InternalLogicWithFileIO/CalibrationTask/CalibrationTask.cs
@@ -115,7 +115,7 @@
                     allPsms[i].AddRange(searchResults.outerPsms[i]);

                 // Run analysis on single file results
-                var analysisEngine = new AnalysisEngine(searchResults.outerPsms, compactPeptideToProteinPeptideMatching, proteinList, variableModifications, fixedModifications, localizeableModifications, protease, searchModes, myMsDataFile, productMassTolerance, (BinTreeStructure myTreeStructure, string s) => WriteTree(myTreeStructure, output_folder, Path.GetFileNameWithoutExtension(origDataFile) + s), (List<NewPsmWithFDR> h, string s) => WritePSMsToTSV(h, output_folder, Path.GetFileNameWithoutExtension(origDataFileName) + s), null, false);
+                var analysisEngine = new AnalysisEngine(searchResults.outerPsms, compactPeptideToProteinPeptideMatching, proteinList, variableModifications, fixedModifications, localizeableModifications, protease, searchModes, myMsDataFile, productMassTolerance, (BinTreeStructure myTreeStructure, string s) => WriteTree(myTreeStructure, output_folder, Path.GetFileNameWithoutExtension(origDataFileName) + s), (List<NewPsmWithFDR> h, string s) => WritePSMsToTSV(h, output_folder, Path.GetFileNameWithoutExtension(origDataFileName) + s), null, false);

                 var analysisResults = (AnalysisResults)analysisEngine.Run();


[Technical] Fix failing bootstrapper exes on the CI machine

Modified the test environment to make it look like the tests are not running under TFS

--- Tests/SonarQube.Bootstrapper.Tests/BootstrapperExeTests.cs
+++ Tests/SonarQube.Bootstrapper.Tests/BootstrapperExeTests.cs
@@ -24,21 +24,24 @@
         {
             // Arrange
             string rootDir = TestUtils.CreateTestSpecificFolder(this.TestContext);
-            Directory.SetCurrentDirectory(rootDir);
-            string binDir = CalculateBinDir(rootDir);
-
-            MockBuildAgentUpdater mockUpdater = new MockBuildAgentUpdater();
-
-            // Act
-            TestLogger logger = CheckExecutionFails(mockUpdater, "/p: badkey=123");
-
-            // Assert
-            mockUpdater.AssertUpdateNotAttempted();
-            mockUpdater.AssertVersionNotChecked();
-
-            AssertDirectoryDoesNotExist(binDir);
-
-            logger.AssertErrorsLogged();
+
+            using (InitializeNonTeamBuildEnvironment(rootDir))
+            {
+                string binDir = CalculateBinDir(rootDir);
+
+                MockBuildAgentUpdater mockUpdater = new MockBuildAgentUpdater();
+
+                // Act
+                TestLogger logger = CheckExecutionFails(mockUpdater, "/p: badkey=123");
+
+                // Assert
+                mockUpdater.AssertUpdateNotAttempted();
+                mockUpdater.AssertVersionNotChecked();
+
+                AssertDirectoryDoesNotExist(binDir);
+
+                logger.AssertErrorsLogged();
+            }
         }

         [TestMethod]
@@ -46,21 +49,23 @@
         {
             // Arrange
             string rootDir = TestUtils.CreateTestSpecificFolder(this.TestContext);
-            Directory.SetCurrentDirectory(rootDir);
-
-            string binDir = CalculateBinDir(rootDir);
-            MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://host:9000");
-            mockUpdater.TryUpdateReturnValue = false;
-
-            // Act
-            TestLogger logger = CheckExecutionFails(mockUpdater, "/p:sonar.host.url=http://host:9000");
-
-            // Assert
-            mockUpdater.AssertUpdateAttempted();
-            mockUpdater.AssertVersionNotChecked();
-
-            AssertDirectoryExists(binDir);
-            logger.AssertErrorsLogged();
+            using (InitializeNonTeamBuildEnvironment(rootDir))
+            {
+
+                string binDir = CalculateBinDir(rootDir);
+                MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://host:9000");
+                mockUpdater.TryUpdateReturnValue = false;
+
+                // Act
+                TestLogger logger = CheckExecutionFails(mockUpdater, "/p:sonar.host.url=http://host:9000");
+
+                // Assert
+                mockUpdater.AssertUpdateAttempted();
+                mockUpdater.AssertVersionNotChecked();
+
+                AssertDirectoryExists(binDir);
+                logger.AssertErrorsLogged();
+            }
         }

         [TestMethod]
@@ -68,23 +73,24 @@
         {
             // Arrange
             string rootDir = TestUtils.CreateTestSpecificFolder(this.TestContext);
-            Directory.SetCurrentDirectory(rootDir);
-
-            string binDir = CalculateBinDir(rootDir);
-            MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://ahost");
-            mockUpdater.VersionCheckReturnValue = false;
-
-            // Act
-            TestLogger logger = CheckExecutionFails(mockUpdater, "/p:sonar.host.url=http://ahost");
-
-            // Assert
-            mockUpdater.AssertUpdateAttempted();
-            mockUpdater.AssertVersionChecked();
-
-            AssertDirectoryExists(binDir);
-            DummyExeHelper.AssertDummyPreProcLogDoesNotExist(binDir);
-            DummyExeHelper.AssertDummyPostProcLogDoesNotExist(binDir);
-            logger.AssertErrorsLogged();
+            using (InitializeNonTeamBuildEnvironment(rootDir))
+            {
+                string binDir = CalculateBinDir(rootDir);
+                MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://ahost");
+                mockUpdater.VersionCheckReturnValue = false;
+
+                // Act
+                TestLogger logger = CheckExecutionFails(mockUpdater, "/p:sonar.host.url=http://ahost");
+
+                // Assert
+                mockUpdater.AssertUpdateAttempted();
+                mockUpdater.AssertVersionChecked();
+
+                AssertDirectoryExists(binDir);
+                DummyExeHelper.AssertDummyPreProcLogDoesNotExist(binDir);
+                DummyExeHelper.AssertDummyPostProcLogDoesNotExist(binDir);
+                logger.AssertErrorsLogged();
+            }
         }

         [TestMethod]
@@ -92,28 +98,29 @@
         {
             // Arrange
             string rootDir = TestUtils.CreateTestSpecificFolder(this.TestContext);
-            Directory.SetCurrentDirectory(rootDir);
-
-            string binDir = CalculateBinDir(rootDir);
-            MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://host:9");
-
-            mockUpdater.Updating += (sender, args) =>
-            {
-                AssertDirectoryExists(args.TargetDir);
-                DummyExeHelper.CreateDummyPreProcessor(args.TargetDir, 1 /* pre-proc fails */);
-            };
-
-            // Act
-            CheckExecutionFails(mockUpdater,
-                "/p:sonar.host.url=http://host:9",
-                "/p:another.key=will be ignored");
-
-            // Assert
-            mockUpdater.AssertUpdateAttempted();
-            mockUpdater.AssertVersionChecked();
-
-            string logPath = DummyExeHelper.AssertDummyPreProcLogExists(binDir, this.TestContext);
-            DummyExeHelper.AssertExpectedLogContents(logPath, "/p:sonar.host.url=http://host:9\r\n/p:another.key=will be ignored\r\n");
+            using (InitializeNonTeamBuildEnvironment(rootDir))
+            {
+                string binDir = CalculateBinDir(rootDir);
+                MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://host:9");
+
+                mockUpdater.Updating += (sender, args) =>
+                {
+                    AssertDirectoryExists(args.TargetDir);
+                    DummyExeHelper.CreateDummyPreProcessor(args.TargetDir, 1 /* pre-proc fails */);
+                };
+
+                // Act
+                CheckExecutionFails(mockUpdater,
+                    "/p:sonar.host.url=http://host:9",
+                    "/p:another.key=will be ignored");
+
+                // Assert
+                mockUpdater.AssertUpdateAttempted();
+                mockUpdater.AssertVersionChecked();
+
+                string logPath = DummyExeHelper.AssertDummyPreProcLogExists(binDir, this.TestContext);
+                DummyExeHelper.AssertExpectedLogContents(logPath, "/p:sonar.host.url=http://host:9\r\n/p:another.key=will be ignored\r\n");
+            }
         }

         [TestMethod]
@@ -121,29 +128,30 @@
         {
             // Arrange
             string rootDir = TestUtils.CreateTestSpecificFolder(this.TestContext);
-            Directory.SetCurrentDirectory(rootDir);
-
-            string binDir = CalculateBinDir(rootDir);
-
-            MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://anotherHost");
-
-            mockUpdater.Updating += (sender, args) =>
-            {
-                AssertDirectoryExists(args.TargetDir);
-                DummyExeHelper.CreateDummyPreProcessor(args.TargetDir, 0 /* pre-proc succeeds */);
-            };
-
-            // Act
-            TestLogger logger = CheckExecutionSucceeds(mockUpdater,
-                "/p:sonar.host.url=http://anotherHost", "begin");
-
-            // Assert
-            mockUpdater.AssertUpdateAttempted();
-            mockUpdater.AssertVersionChecked();
-            logger.AssertWarningsLogged(0);
-
-            string logPath = DummyExeHelper.AssertDummyPreProcLogExists(binDir, this.TestContext);
-            DummyExeHelper.AssertExpectedLogContents(logPath, "/p:sonar.host.url=http://anotherHost\r\nbegin\r\n");
+            using (InitializeNonTeamBuildEnvironment(rootDir))
+            {
+                string binDir = CalculateBinDir(rootDir);
+
+                MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://anotherHost");
+
+                mockUpdater.Updating += (sender, args) =>
+                {
+                    AssertDirectoryExists(args.TargetDir);
+                    DummyExeHelper.CreateDummyPreProcessor(args.TargetDir, 0 /* pre-proc succeeds */);
+                };
+
+                // Act
+                TestLogger logger = CheckExecutionSucceeds(mockUpdater,
+                    "/p:sonar.host.url=http://anotherHost", "begin");
+
+                // Assert
+                mockUpdater.AssertUpdateAttempted();
+                mockUpdater.AssertVersionChecked();
+                logger.AssertWarningsLogged(0);
+
+                string logPath = DummyExeHelper.AssertDummyPreProcLogExists(binDir, this.TestContext);
+                DummyExeHelper.AssertExpectedLogContents(logPath, "/p:sonar.host.url=http://anotherHost\r\nbegin\r\n");
+            }
         }

         [TestMethod]
@@ -151,24 +159,25 @@
         {
             // Arrange
             string rootDir = TestUtils.CreateTestSpecificFolder(this.TestContext);
-            Directory.SetCurrentDirectory(rootDir);
-
-            string binDir = CalculateBinDir(rootDir);
-            Directory.CreateDirectory(binDir);
-            DummyExeHelper.CreateDummyPostProcessor(binDir, 1 /* post-proc fails */);
-
-            MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://h:9000");
-
-            // Act
-            TestLogger logger = CheckExecutionFails(mockUpdater, "end");
-
-            // Assert
-            mockUpdater.AssertUpdateNotAttempted();
-            mockUpdater.AssertVersionNotChecked();
-            logger.AssertWarningsLogged(0);
-
-            string logPath = DummyExeHelper.AssertDummyPostProcLogExists(binDir, this.TestContext);
-            DummyExeHelper.AssertExpectedLogContents(logPath, string.Empty);
+            using (InitializeNonTeamBuildEnvironment(rootDir))
+            {
+                string binDir = CalculateBinDir(rootDir);
+                Directory.CreateDirectory(binDir);
+                DummyExeHelper.CreateDummyPostProcessor(binDir, 1 /* post-proc fails */);
+
+                MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://h:9000");
+
+                // Act
+                TestLogger logger = CheckExecutionFails(mockUpdater, "end");
+
+                // Assert
+                mockUpdater.AssertUpdateNotAttempted();
+                mockUpdater.AssertVersionNotChecked();
+                logger.AssertWarningsLogged(0);
+
+                string logPath = DummyExeHelper.AssertDummyPostProcLogExists(binDir, this.TestContext);
+                DummyExeHelper.AssertExpectedLogContents(logPath, string.Empty);
+            }
         }

         [TestMethod]
@@ -176,24 +185,25 @@
         {
             // Arrange
             string rootDir = TestUtils.CreateTestSpecificFolder(this.TestContext);
-            Directory.SetCurrentDirectory(rootDir);
-
-            string binDir = CalculateBinDir(rootDir);
-            Directory.CreateDirectory(binDir);
-            DummyExeHelper.CreateDummyPostProcessor(binDir, 0 /* success exit code */);
-
-            MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://h:9000");
-
-            // Act
-            TestLogger logger = CheckExecutionSucceeds(mockUpdater, "end");
-
-            // Assert
-            mockUpdater.AssertUpdateNotAttempted();
-            mockUpdater.AssertVersionNotChecked();
-            logger.AssertWarningsLogged(0);
-
-            string logPath = DummyExeHelper.AssertDummyPostProcLogExists(binDir, this.TestContext);
-            DummyExeHelper.AssertExpectedLogContents(logPath, string.Empty);
+            using (InitializeNonTeamBuildEnvironment(rootDir))
+            {
+                string binDir = CalculateBinDir(rootDir);
+                Directory.CreateDirectory(binDir);
+                DummyExeHelper.CreateDummyPostProcessor(binDir, 0 /* success exit code */);
+
+                MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://h:9000");
+
+                // Act
+                TestLogger logger = CheckExecutionSucceeds(mockUpdater, "end");
+
+                // Assert
+                mockUpdater.AssertUpdateNotAttempted();
+                mockUpdater.AssertVersionNotChecked();
+                logger.AssertWarningsLogged(0);
+
+                string logPath = DummyExeHelper.AssertDummyPostProcLogExists(binDir, this.TestContext);
+                DummyExeHelper.AssertExpectedLogContents(logPath, string.Empty);
+            }
         }

         [TestMethod]
@@ -207,58 +217,68 @@

             // Arrange
             string rootDir = TestUtils.CreateTestSpecificFolder(this.TestContext);
-            Directory.SetCurrentDirectory(rootDir);
-
-            string binDir = CalculateBinDir(rootDir);
-            MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://host");
-
-            mockUpdater.Updating += (sender, args) =>
-            {
-                Assert.IsTrue(Directory.Exists(args.TargetDir), "Expecting the target directory to have been created");
-                DummyExeHelper.CreateDummyPreProcessor(args.TargetDir, 0 /* post-proc succeeds */);
-                DummyExeHelper.CreateDummyPostProcessor(args.TargetDir, 0 /* post-proc succeeds */);
-            };
-
-            // Create a default properties file next to the exe
-            AnalysisProperties defaultProperties = new AnalysisProperties();
-            defaultProperties.Add(new Property() { Id = SonarProperties.HostUrl, Value = "http://host" });
-            string defaultPropertiesFilePath = CreateDefaultPropertiesFile(defaultProperties);
-
-            // Act
-            try
-            {
-                // Call the pre-processor
-                TestLogger logger = CheckExecutionSucceeds(mockUpdater, "/v:version", "/n:name", "/k:key");
-                logger.AssertWarningsLogged(1); // Should be warned once about the missing "begin" / "end"
-                logger.AssertSingleWarningExists(ArgumentProcessor.BeginVerb, ArgumentProcessor.EndVerb);
-
-                mockUpdater.AssertUpdateAttempted();
-                mockUpdater.AssertVersionChecked();
-
-                string logPath = DummyExeHelper.AssertDummyPreProcLogExists(binDir, this.TestContext);
-                DummyExeHelper.AssertExpectedLogContents(logPath, "/v:version\r\n/n:name\r\n/k:key\r\n");
-
-                DummyExeHelper.AssertDummyPostProcLogDoesNotExist(binDir);
-
-
-                // Call the post-process (no arguments)
-                logger = CheckExecutionSucceeds(mockUpdater);
-
-                logPath = DummyExeHelper.AssertDummyPostProcLogExists(binDir, this.TestContext);
-                DummyExeHelper.AssertExpectedLogContents(logPath, string.Empty);
-
-                logger.AssertWarningsLogged(1); // Should be warned once about the missing "begin" / "end"
-                logger.AssertSingleWarningExists(ArgumentProcessor.BeginVerb, ArgumentProcessor.EndVerb);
-            }
-            finally
-            {
-                File.Delete(defaultPropertiesFilePath);
+            using (InitializeNonTeamBuildEnvironment(rootDir))
+            {
+                string binDir = CalculateBinDir(rootDir);
+                MockBuildAgentUpdater mockUpdater = CreateValidUpdater(binDir, "http://host");
+
+                mockUpdater.Updating += (sender, args) =>
+                {
+                    Assert.IsTrue(Directory.Exists(args.TargetDir), "Expecting the target directory to have been created");
+                    DummyExeHelper.CreateDummyPreProcessor(args.TargetDir, 0 /* post-proc succeeds */);
+                    DummyExeHelper.CreateDummyPostProcessor(args.TargetDir, 0 /* post-proc succeeds */);
+                };
+
+                // Create a default properties file next to the exe
+                AnalysisProperties defaultProperties = new AnalysisProperties();
+                defaultProperties.Add(new Property() { Id = SonarProperties.HostUrl, Value = "http://host" });
+                string defaultPropertiesFilePath = CreateDefaultPropertiesFile(defaultProperties);
+
+                // Act
+                try
+                {
+                    // Call the pre-processor
+                    TestLogger logger = CheckExecutionSucceeds(mockUpdater, "/v:version", "/n:name", "/k:key");
+                    logger.AssertWarningsLogged(1); // Should be warned once about the missing "begin" / "end"
+                    logger.AssertSingleWarningExists(ArgumentProcessor.BeginVerb, ArgumentProcessor.EndVerb);
+
+                    mockUpdater.AssertUpdateAttempted();
+                    mockUpdater.AssertVersionChecked();
+
+                    string logPath = DummyExeHelper.AssertDummyPreProcLogExists(binDir, this.TestContext);
+                    DummyExeHelper.AssertExpectedLogContents(logPath, "/v:version\r\n/n:name\r\n/k:key\r\n");
+
+                    DummyExeHelper.AssertDummyPostProcLogDoesNotExist(binDir);
+
+
+                    // Call the post-process (no arguments)
+                    logger = CheckExecutionSucceeds(mockUpdater);
+
+                    logPath = DummyExeHelper.AssertDummyPostProcLogExists(binDir, this.TestContext);
+                    DummyExeHelper.AssertExpectedLogContents(logPath, string.Empty);
+
+                    logger.AssertWarningsLogged(1); // Should be warned once about the missing "begin" / "end"
+                    logger.AssertSingleWarningExists(ArgumentProcessor.BeginVerb, ArgumentProcessor.EndVerb);
+                }
+                finally
+                {
+                    File.Delete(defaultPropertiesFilePath);
+                }
             }
         }

         #endregion

         #region Private methods
+
+        private static EnvironmentVariableScope InitializeNonTeamBuildEnvironment(string workingDirectory)
+        {
+            Directory.SetCurrentDirectory(workingDirectory);
+            EnvironmentVariableScope scope = new EnvironmentVariableScope();
+            scope.SetVariable(BootstrapperSettings.BuildDirectory_Legacy, null);
+            scope.SetVariable(BootstrapperSettings.BuildDirectory_TFS2015, null);
+            return scope;
+        }

         /// <summary>
         /// Creates and returns a mock updater that execute successfully


Attempting to print source in-line with assembly

--- Microsoft.Diagnostics.Runtime/CLRMD/MachineCode/Program.cs
+++ Microsoft.Diagnostics.Runtime/CLRMD/MachineCode/Program.cs
@@ -41,7 +41,15 @@
                 using (DataTarget dt = DataTarget.LoadCrashDump(dump))
                 {
                     // Boilerplate.
-                    ClrRuntime runtime = dt.CreateRuntime(dt.ClrVersions.Single().TryDownloadDac());
+                    //ClrRuntime runtime = dt.CreateRuntime(dt.ClrVersions.Single().TryDownloadDac());
+                    var version = dt.ClrVersions.Single();
+                    //{v4.0.30319.18444}
+                    //version.Version = new VersionInfo { Major = 4, Minor = 0, Patch = 30319, Revision = 18444 };
+                    Console.WriteLine("CLR Version: {0} ({1}), Dac: {2}", version.Version, version.Flavor, version.DacInfo);
+                    var dacFileName = version.TryDownloadDac();
+                    Console.WriteLine("DacFile: " + Path.GetFileName(dacFileName));
+                    Console.WriteLine("DacFile: " + Path.GetDirectoryName(dacFileName));
+                    ClrRuntime runtime = dt.CreateRuntime(dacFileName);
                     ClrHeap heap = runtime.GetHeap();

                     PrintDiagnosticInfo(dt, runtime, heap);
@@ -51,12 +59,12 @@
                     // limitations in the dac private apis that ClrMD is written on.  If you have the ClrType
                     // already via other means (heap walking, stack walking, etc), then that's better than
                     // using GetTypeByName:
-                    var classNameWithNamespace = "JITterOptimisations.Program"; // "System.Object";
+                    var classNameWithNamespace = "JITterOptimisations.Program";
                     ClrType @class = heap.GetTypeByName(classNameWithNamespace);

                     // Get the method you are looking for.
-                    var methodName = "Sqrt";
-                    ClrMethod @method = @class.Methods.Single(m => m.Name == methodName);
+                    var signature = "JITterOptimisations.Program.Log(System.ConsoleColor, System.String)";
+                    ClrMethod @method = @class.Methods.Single(m => m.GetFullSignature() == signature);

                     // Find out whether the method was JIT'ed or NGEN'ed (if you care):
                     MethodCompilationType compileType = @method.CompilationType;
@@ -71,6 +79,12 @@
                     // You are supposed to do code flow analysis like "uf" in windbg to find the size, but
                     // in practice you can use the IL to native mapping:
                     ulong endAddress = @method.ILOffsetMap.Select(entry => entry.EndAddress).Max();
+
+                    var lines =
+                        File.ReadAllLines(
+                            @"C:\Users\warma11\Documents\Visual Studio 2013\Projects\JITterOptimisations\JITterOptimisations\Program.cs");
+
+                    PrintILToNativeOffsets(method, startAddress, lines);

                     // This is what we expect it to be
                     //--- c:\Users\warma11\Documents\Visual Studio 2013\Projects\JITterOptimisations\JITterOptimisations\Program.cs
@@ -117,6 +131,62 @@
             }
         }

+        private static void PrintILToNativeOffsets(ClrMethod method, ulong startAddress, string[] lines)
+        {
+            Console.WriteLine("IL -> Native Offsets:");
+            Console.WriteLine("\t" + String.Join("\n\t", @method.ILOffsetMap));
+            foreach (ILToNativeMap il in @method.ILOffsetMap)
+            {
+                SourceLocation sourceLocation = null;
+                try
+                {
+                    Console.WriteLine(
+                        "\nPrintILToNativeOffsets, il.Offset: {0,10} ({1,3:N0}), il.StartAddress: {2} ({2,8:X8})",
+                        "0x" + il.ILOffset.ToString("X2"), il.ILOffset, il.StartAddress);
+                    if (il.ILOffset < 0) // FFFF FFFX is 4,294,967,280
+                        continue;
+                    sourceLocation = @method.GetSourceLocationForOffset(il.StartAddress);
+                }
+                catch (Exception ex)
+                {
+                    Console.WriteLine(ex.Message);
+                    continue;
+                }
+
+                var sourceInfo = "<UNKNOWN>";
+                if (sourceLocation != null)
+                {
+                    if (sourceLocation.LineNumber == sourceLocation.LineNumberEnd)
+                    {
+                        sourceInfo = String.Format("{0}:{1} (Columns {2}->{3})",
+                                                   Path.GetFileName(sourceLocation.FilePath),
+                                                   sourceLocation.LineNumber, sourceLocation.ColStart,
+                                                   sourceLocation.ColEnd);
+                    }
+                    else
+                    {
+                        sourceInfo = String.Format("{0}: {1}->{2} ({3}->{4})",
+                                                   Path.GetFileName(sourceLocation.FilePath),
+                                                   sourceLocation.LineNumber, sourceLocation.LineNumberEnd,
+                                                   sourceLocation.ColStart, sourceLocation.ColEnd);
+                    }
+                }
+
+                Console.WriteLine("{0,10} ({1,3:N0}) - [{2:X8}-{3:X8} ({4:X8}-{5:X8})] {6}",
+                                  "0x" + il.ILOffset.ToString("X2"), il.ILOffset,
+                                  il.StartAddress - startAddress, il.EndAddress - startAddress,
+                                  il.StartAddress, il.EndAddress, sourceInfo);
+                if (sourceLocation != null && il.ILOffset >= 0) // FFFF FFFX (-ve) appear to be special cases
+                {
+                    var indent = 7;
+                    Console.WriteLine("{0,6}:{1}", sourceLocation.LineNumber, lines[sourceLocation.LineNumber - 1]);
+                    Console.WriteLine(new string(' ', sourceLocation.ColStart - 1 + indent) +
+                                      new string('*', sourceLocation.ColEnd - sourceLocation.ColStart));
+                }
+                //Console.WriteLine();
+            }
+        }
+
         private static void PrintDiagnosticInfo(DataTarget dt, ClrRuntime runtime, ClrHeap heap)
         {
             Console.WriteLine("DataTarget Info:");
@@ -150,15 +220,6 @@
         // From http://stackoverflow.com/questions/139593/processstartinfo-hanging-on-waitforexit-why/7608823#7608823
         private static string GetDisassembly(string filename, string arguments, int timeoutMsecs)
         {
-            //using (Process exeProcess = Process.Start(startInfo))
-            //{
-            //    var processCompleted = exeProcess.WaitForExit(100);
-            //    if (processCompleted == false)
-            //        Console.WriteLine("Process did NOT complete in time!!");
-            //    Console.WriteLine(exeProcess.StandardOutput.ReadToEnd());
-            //    Console.WriteLine(exeProcess.StandardError.ReadToEnd());
-            //}
-
             using (Process process = new Process())
             {
                 process.StartInfo.FileName = filename;


fix tree

fix tree

--- Unity/ludum-dare-32-PixelStuff/Assets/Scripts/Tree/tree.cs
+++ Unity/ludum-dare-32-PixelStuff/Assets/Scripts/Tree/tree.cs
@@ -20,6 +20,8 @@

 	private float remaningSeconde;
 	private float RotationZIteration;
+
+	private bool isShake=true;

 	void Start () {
 		state = TreeState.UP;
@@ -49,7 +51,10 @@

 		if (remaningSeconde < 0) {
 			trunk.GetComponent<BoxCollider2D>().enabled = false;
+			if(isShake){
 			GameObject.FindGameObjectWithTag ("CameraManager").GetComponent<CameraManager> ().setShaking(true,true,0.2f);
+				isShake = false;
+			}
 			state = TreeState.FALLEN;
 		}
 	}


added DX11 tag to FaceData node

added DX11 tag to FaceData node

--- Nodes/VVVV.DX11.Nodes.MSKinect/Nodes/KinectFaceDataNode.cs
+++ Nodes/VVVV.DX11.Nodes.MSKinect/Nodes/KinectFaceDataNode.cs
@@ -13,6 +13,7 @@
 	            Category = "Kinect",
 	            Version = "Microsoft",
 	            Author = "vux",
+	            Tags = "DX11",
 	            Help = "Returns detailed 2D and 3D data describing the tracked face")]
     public class KinectFaceFrameDataNode : IPluginEvaluate
     {


Remove redundant call.

Remove redundant call.

--- PackageViewModel/PackageChooser/PackageChooserViewModel.cs
+++ PackageViewModel/PackageChooser/PackageChooserViewModel.cs
@@ -397,8 +397,6 @@
         {
             var token = (CancellationToken)state;

-            token.ThrowIfCancellationRequested();
-
             IList<PackageInfo> result = _currentQuery.GetItemsForCurrentPage().ToList();

             token.ThrowIfCancellationRequested();


Separate LookupIsoCode into view and model.  Added tests.

--- PalasoUIWindowsForms/WritingSystems/LookupISOCodeDialog.cs
+++ PalasoUIWindowsForms/WritingSystems/LookupISOCodeDialog.cs
@@ -102,7 +102,7 @@
 				listView1.SelectedIndices.Add(0);
 			}

-			_okButton.Enabled = listView1.Items.Count > 0 && listView1.SelectedItems.Count == 1;
+		}
 		}
 	}
 }


Inherit ITablatureWebImporter.

Inherit ITablatureWebImporter.

--- Plugins/Searching/GuitartabsDotCC/GuitartabsDotCCParser.cs
+++ Plugins/Searching/GuitartabsDotCC/GuitartabsDotCCParser.cs
@@ -1,6 +1,7 @@
 #region

 using System;
+using System.Net;
 using HtmlAgilityPack;
 using Tabster.Core.Types;
 using Tabster.Data;
@@ -10,8 +11,13 @@

 namespace GuitartabsDotCC
 {
-    public class GuitartabsDotCCParser : ITablatureWebpageImporter
+    public class GuitartabsDotCCParser : ITablatureWebImporter
     {
+        public GuitartabsDotCCParser()
+        {
+            Homepage = new Uri("http://guitartabs.cc");
+        }
+
         #region Implementation of ITablatureWebpageImporter

         public string SiteName
@@ -19,10 +25,24 @@
             get { return "Guitartabs.cc"; }
         }

-        public TablatureDocument Parse(string text, TablatureType type)
+        public Uri Homepage { get; private set; }
+
+        public bool IsUrlParsable(Uri url)
         {
+            return url.DnsSafeHost == "guitartabs.cc" || url.DnsSafeHost == "www.guitartabs.cc";
+        }
+
+        public TablatureDocument Parse(Uri url, WebProxy proxy)
+        {
+            string html;
+
+            using (var client = new WebClient() {Proxy = proxy})
+            {
+                html = client.DownloadString(url);
+            }
+
             var doc = new HtmlDocument();
-            doc.LoadHtml(text);
+            doc.LoadHtml(html);

             string contents = null;

@@ -37,6 +57,8 @@
             var artist = titleSplit[0];
             var title = titleSplit[1];

+            TablatureType type = null;
+
             var container = doc.DocumentNode.SelectSingleNode("//div[contains(@class, 'commonbox')]");

             if (container != null)
@@ -48,27 +70,24 @@
                     var infoCells = infoTable.SelectNodes("tr//th");

                     //get tab type
-                    if (type == null)
+                    if (infoCells != null && infoCells.Count > 2)
                     {
-                        if (infoCells != null && infoCells.Count > 2)
+                        var typeCell = infoCells[2].SelectSingleNode("strong");
+
+                        switch (typeCell.InnerText)
                         {
-                            var typeCell = infoCells[2].SelectSingleNode("strong");
-
-                            switch (typeCell.InnerText)
-                            {
-                                case "Tab":
-                                    type = TablatureType.Guitar;
-                                    break;
-                                case "Chords":
-                                    type = TablatureType.Chords;
-                                    break;
-                                case "Bass Tab":
-                                    type = TablatureType.Bass;
-                                    break;
-                                case "Drum Tab":
-                                    type = TablatureType.Drum;
-                                    break;
-                            }
+                            case "Tab":
+                                type = TablatureType.Guitar;
+                                break;
+                            case "Chords":
+                                type = TablatureType.Chords;
+                                break;
+                            case "Bass Tab":
+                                type = TablatureType.Bass;
+                                break;
+                            case "Drum Tab":
+                                type = TablatureType.Drum;
+                                break;
                         }
                     }
                 }
@@ -95,12 +114,6 @@
             return new TablatureDocument(artist, title, type, contents);
         }

-        public bool MatchesUrlPattern(Uri url)
-        {
-            return url.IsWellFormedOriginalString() &&
-                   (url.DnsSafeHost == "guitartabs.cc" || url.DnsSafeHost == "www.guitartabs.cc");
-        }
-
         #endregion
     }
 }


Get GL resizing working.

Get GL resizing working.

--- source/Eto.Gl/GLSurface.cs
+++ source/Eto.Gl/GLSurface.cs
@@ -106,6 +106,11 @@
             {
                 w.Platform.Invoke(() => w.OnShuttingDown(w, e));
             }
+
+            public void OnResize(GLSurface w, EventArgs e)
+            {
+                w.Platform.Invoke(() => w.OnSizeChanged(e));
+            }
         }

         //Gets an instance of an object used to perform callbacks to the widget from handler implementations


Remove warning generated by new virtual override in CCScrollView

--- src/extentions/GUI/CCScrollView/CCScrollView.cs
+++ src/extentions/GUI/CCScrollView/CCScrollView.cs
@@ -439,7 +439,7 @@
 		#region Event handling

         /** override functions */
-		public new virtual bool TouchBegan(CCTouch pTouch, CCEvent touchEvent)
+		public bool TouchBegan(CCTouch pTouch, CCEvent touchEvent)
         {
             if (!Visible)
             {
@@ -479,7 +479,7 @@
             return true;
         }

-		public new virtual void TouchMoved(CCTouch touch, CCEvent touchEvent)
+		public void TouchMoved(CCTouch touch, CCEvent touchEvent)
         {
             if (!Visible)
             {
@@ -556,7 +556,7 @@
             }
         }

-		public new virtual void TouchEnded(CCTouch touch, CCEvent touchEvent)
+		public void TouchEnded(CCTouch touch, CCEvent touchEvent)
         {
             if (!Visible)
             {
@@ -579,7 +579,7 @@
             }
         }

-		public new virtual void TouchCancelled(CCTouch touch, CCEvent touchEvent)
+		public void TouchCancelled(CCTouch touch, CCEvent touchEvent)
         {
             if (!Visible)
             {


Added compile error (testing AV build script)

--- source/Core/Models/Client.cs
+++ source/Core/Models/Client.cs
@@ -124,7 +124,7 @@
         /// <summary>
         /// Specifies the key material used to sign the identity token. Default for the primary X.509 certificate, ClientSecret for using the client secret as a symmetric key (must be 256 bits in length). Defaults to Default.
         /// </summary>
-        public SigningKeyTypes IdentityTokenSigningKeyType { get; set; }
+        public SigningKeyType IdentityTokenSigningKeyType { get; set; }

         /// <summary>
         /// Specifies whether the access token is a reference token or a self contained JWT token (defaults to Jwt).


dont use generic version of PtrToStructure

--- src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
+++ src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
@@ -74,7 +74,11 @@

         private AuthProperty PtrToAuthProperty(IntPtr authPropertyPtr)
         {
-            var nativeAuthProperty = Marshal.PtrToStructure<NativeAuthProperty>(authPropertyPtr);
+            #pragma warning disable 0618
+            // We need to use the obsolete non-generic version of Marshal.PtrToStructure, because the generic version is not available
+            // in net45 on Windows.
+            var nativeAuthProperty = (NativeAuthProperty) Marshal.PtrToStructure(authPropertyPtr, typeof(NativeAuthProperty));
+            #pragma warning restore 0618
             var name = Marshal.PtrToStringAnsi(nativeAuthProperty.Name);
             var valueBytes = new byte[(int) nativeAuthProperty.ValueLength];
             Marshal.Copy(nativeAuthProperty.Value, valueBytes, 0, (int)nativeAuthProperty.ValueLength);


revise index calcs

revise index calcs

--- source/randraw/RandomDraw.cs
+++ source/randraw/RandomDraw.cs
@@ -25,11 +25,10 @@
             Console.WriteLine("Loaded " + rows.Count + " rows.");

             // determine row limits
-            var rowMin = 0;
-            var rowMax = rows.Count - 1;
+            var rowMin = 1;
+            var rowMax = rows.Count;
             if (!noHeader) rowMin++;
-
-            if (numRowsToSelect > rowMax - rowMin) numRowsToSelect = rowMax - rowMin;
+            if (numRowsToSelect > rowMax - rowMin + 1) numRowsToSelect = rowMax - rowMin + 1;
             Console.WriteLine("Retrieving random " + numRowsToSelect + " rows between "
                 + rowMin + " and " + rowMax + ".");

@@ -41,10 +40,10 @@
             // output
             using (TextWriter writer = File.CreateText(outpath))
             {
-                if (!noHeader && rows.Any()) writer.WriteLine(rows[0]);
+                if (!noHeader) writer.WriteLine(rows[0]);
                 foreach (var randomi in randomRows)
                 {
-                    var line = rows.ElementAtOrDefault(randomi);
+                    var line = rows.ElementAtOrDefault(randomi - 1);
                     if (line != null) writer.WriteLine(line);
                 }
             }


Bug fix to correctly pass overwrite flag

--- console/Compare.cs
+++ console/Compare.cs
@@ -53,7 +53,8 @@
 				Source = _source,
 				Target = _target,
 				Verbose = _verbose,
-				OutDiff = _outDiff
+				OutDiff = _outDiff,
+				Overwrite = _overwrite
 			};

 			try {