Changed the decimal parsing in ConvertPropertyValueByDataType so it only tries to do this if the string contains the current decimal seperator character to prevent CSV strings from converting to decimals in cultures where , is used as the decimal seperator

--- umbraco.MacroEngines.Juno/RazorDynamicNode/DynamicNode.cs
+++ umbraco.MacroEngines.Juno/RazorDynamicNode/DynamicNode.cs
@@ -514,6 +514,7 @@
         {
             //the resulting property is a string, but to support some of the nice linq stuff in .Where
             //we should really check some more types
+            string sResult = string.Format("{0}", result).Trim();

             //boolean
             if (dataType == DATATYPE_YESNO_GUID)
@@ -524,7 +525,7 @@
                     result = false;
                     return true;
                 }
-                if (Boolean.TryParse(result.ToString().Replace("1", "true").Replace("0", "false"), out parseResult))
+                if (Boolean.TryParse(sResult.Replace("1", "true").Replace("0", "false"), out parseResult))
                 {
                     result = parseResult;
                     return true;
@@ -533,18 +534,22 @@

             //integer
             int iResult = 0;
-            if (int.TryParse(string.Format("{0}", result), System.Globalization.NumberStyles.Number, System.Globalization.CultureInfo.CurrentCulture, out iResult))
+            if (int.TryParse(sResult, System.Globalization.NumberStyles.Number, System.Globalization.CultureInfo.CurrentCulture, out iResult))
             {
                 result = iResult;
                 return true;
             }

-            //decimal
-            decimal dResult = 0;
-            if (decimal.TryParse(string.Format("{0}", result), System.Globalization.NumberStyles.Number, System.Globalization.CultureInfo.CurrentCulture, out dResult))
-            {
-                result = dResult;
-                return true;
+            //this will eat csv strings, so only do it if the decimal also includes a decimal seperator (according to the current culture)
+            if (sResult.Contains(System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator))
+            {
+                //decimal
+                decimal dResult = 0;
+                if (decimal.TryParse(sResult, System.Globalization.NumberStyles.Number, System.Globalization.CultureInfo.CurrentCulture, out dResult))
+                {
+                    result = dResult;
+                    return true;
+                }
             }
             if (dataType == DATATYPE_DATETIMEPICKER_GUID || dataType == DATATYPE_DATEPICKER_GUID)
             {
@@ -570,12 +575,12 @@
             }

-            if (string.Equals("true", string.Format("{0}", result), StringComparison.CurrentCultureIgnoreCase))
+            if (string.Equals("true", sResult, StringComparison.CurrentCultureIgnoreCase))
             {
                 result = true;
                 return true;
             }
-            if (string.Equals("false", string.Format("{0}", result), StringComparison.CurrentCultureIgnoreCase))
+            if (string.Equals("false", sResult, StringComparison.CurrentCultureIgnoreCase))
             {
                 result = false;
                 return true;
@@ -583,7 +588,6 @@

             if (result != null)
             {
-                string sResult = string.Format("{0}", result).Trim();
                 //a really rough check to see if this may be valid xml
                 if (sResult.StartsWith("<") && sResult.EndsWith(">") && sResult.Contains("/"))
                 {


add clipping plane

add clipping plane

--- SharpGL_project_1/SharpGL_project_1/SharpGLForm.cs
+++ SharpGL_project_1/SharpGL_project_1/SharpGLForm.cs
@@ -56,6 +56,10 @@

         private List<Mesh> Models;

+        private float[] fog_color = new float[]{0.8f, 0.8f, 0.8f, 1.0f};
+
+        private float _wireframeShiftX = 0.0f;
+
         public SharpGLForm()
         {
             Models = new List<Mesh>();
@@ -70,16 +74,32 @@

             gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT);

+            //gl.ClearColor(fog_color[0], fog_color[1], fog_color[2], 1.0f);
+
             gl.LoadIdentity();

-            colorBlue[2] += addBlue;
-            if (colorBlue[2] >= 1 || colorBlue[2] <= 0)
-            {
-                addBlue *= -1;
-            }
-            gl.Light(OpenGL.GL_LIGHT1, OpenGL.GL_DIFFUSE, colorBlue);
-            gl.Light(OpenGL.GL_LIGHT1, OpenGL.GL_SPECULAR, colorBlue);
-
+            //colorBlue[2] += addBlue;
+            //if (colorBlue[2] >= 1 || colorBlue[2] <= 0)
+            //{
+            //    addBlue *= -1;
+            //}
+            //gl.Light(OpenGL.GL_LIGHT1, OpenGL.GL_DIFFUSE, colorBlue);
+            //gl.Light(OpenGL.GL_LIGHT1, OpenGL.GL_SPECULAR, colorBlue);
+
+
+            gl.Enable(OpenGL.GL_CLIP_PLANE0);
+
+            gl.Translate(_wireframeShiftX, 0.0f, 0.0f);
+            gl.PolygonMode(OpenGL.GL_FRONT_AND_BACK, OpenGL.GL_LINE);
+            gl.ClipPlane(OpenGL.GL_CLIP_PLANE0, new double[] { 1.0f, 0.0f, 0.0f, 0.0f });
+            gl.LoadIdentity();
+            DrawModels(gl);
+
+            gl.LoadIdentity();
+            gl.Translate(_wireframeShiftX, 0.0f, 0.0f);
+            gl.PolygonMode(OpenGL.GL_FRONT_AND_BACK, OpenGL.GL_FILL);
+            gl.ClipPlane(OpenGL.GL_CLIP_PLANE0, new double[] { -1.0f, 0.0f, 0.0f, 0.0f });
+            gl.LoadIdentity();
             DrawModels(gl);
         }

@@ -333,6 +353,14 @@

             ModelsLoading();

+            gl.Enable(OpenGL.GL_FOG);
+            gl.Fog(OpenGL.GL_FOG_COLOR, fog_color);
+            gl.Fog(OpenGL.GL_FOG_START, 1.0f);
+            gl.Fog(OpenGL.GL_FOG_END, 100.0f);
+            gl.Fog(OpenGL.GL_FOG_DENSITY, 0.10f);
+            gl.Fog(OpenGL.GL_FOG_MODE, OpenGL.GL_EXP);
+            //gl.Fog(OpenGL.GL_FOG_MODE, OpenGL.GL_LINEAR);
+
         }

         private void ModelsLoading()
@@ -344,62 +372,64 @@
             fileStream.Close();

             //man1
-            float[] color = new float[] {1.0f, 0.0f, 0.0f, 1.0f};
+            float[] color = new float[] { 1.0f, 0.0f, 0.0f, 1.0f };
             Vector3 position = new Vector3(10, -11.5f, -5);
             Vector3 rotation = new Vector3(-1, 0, 0);
             float rotationAngle = 90.0f;
             Vector3 scale = new Vector3(1.0f, 0.5f, 0.5f);
-            Models.Add(new Mesh(result, position, rotation, rotationAngle, scale, color));
-
-            //man2
-            color = new float[] { 0.0f, 1.0f, 0.0f, 1.0f };
-            position = new Vector3(10, -11.5f, 7);
-            rotation = new Vector3(-1, 0, 0);
-            rotationAngle = 90.0f;
-            scale = new Vector3(1.0f, 0.5f, 0.5f);
-            Models.Add(new Mesh(result, position, rotation, rotationAngle, scale, color));
+            //Models.Add(new Mesh(result, position, rotation, rotationAngle, scale, color));
+
+            ////man2
+            //color = new float[] { 0.0f, 1.0f, 0.0f, 1.0f };
+            //position = new Vector3(10, -11.5f, 7);
+            //rotation = new Vector3(-1, 0, 0);
+            //rotationAngle = 90.0f;
+            //scale = new Vector3(1.0f, 0.5f, 0.5f);
+            //Models.Add(new Mesh(result, position, rotation, rotationAngle, scale, color));

             objLoader = objLoaderFactory.Create();
             fileStream = new FileStream("teapot.obj", FileMode.Open);
             result = objLoader.Load(fileStream);
             fileStream.Close();

-            color = new float[] { 0.0f, 0.0f, 1.0f, 1.0f };
-            position = new Vector3(-30, 1, 1);
-            rotation = new Vector3(0, 1, 0);
+            color = new float[] { 0.0f, 0.0f, 1.0f, 1.0f };
+            //position = new Vector3(-30, 1, 1);
+            //rotation = new Vector3(0, 1, 0);
             rotationAngle = 360.0f;
-            scale = new Vector3(0.05f, 0.05f, 0.05f);
+            scale = new Vector3(0.15f, 0.15f, 0.15f);
+
+            position = new Vector3(5, 0, -5);
             Models.Add(new Mesh(result, position, rotation, rotationAngle, scale, color));

-            objLoader = objLoaderFactory.Create();
-            fileStream = new FileStream("sphere.obj", FileMode.Open);
-            result = objLoader.Load(fileStream);
-            fileStream.Close();
-
-            color = new float[] { 0.5f, 0.5f, 0.5f, 1.0f };
-            position = new Vector3(-10.0f, 0.0f + drawEps, 1.0f);
-            rotation = new Vector3(0, 1.0f, 0);
-            rotationAngle = 360.0f;
-            scale = new Vector3(1.0f, 1.0f, 1.0f);
-            Models.Add(new Mesh(result, position, rotation, rotationAngle, scale, color));
-
-
-            objLoader = objLoaderFactory.Create();
-            fileStream = new FileStream("cube.obj", FileMode.Open);
-            result = objLoader.Load(fileStream);
-            fileStream.Close();
-
-            color = new float[] { 0.5f, 0.5f, 0.5f, 1.0f };
-            position = new Vector3(-10.0f, -9.0f + drawEps, 1.0f);
-            rotation = new Vector3(0, 1.0f, 0);
-            rotationAngle = 360.0f;
-            scale = new Vector3(1.0f, 1.0f, 1.0f);
-            Models.Add(new Mesh(result, position, rotation, rotationAngle, scale, color));
+            //objLoader = objLoaderFactory.Create();
+            //fileStream = new FileStream("sphere.obj", FileMode.Open);
+            //result = objLoader.Load(fileStream);
+            //fileStream.Close();
+
+            //color = new float[] { 0.5f, 0.5f, 0.5f, 1.0f };
+            //position = new Vector3(-10.0f, 0.0f + drawEps, 1.0f);
+            //rotation = new Vector3(0, 1.0f, 0);
+            //rotationAngle = 360.0f;
+            //scale = new Vector3(1.0f, 1.0f, 1.0f);
+            //Models.Add(new Mesh(result, position, rotation, rotationAngle, scale, color));
+
+
+            //objLoader = objLoaderFactory.Create();
+            //fileStream = new FileStream("cube.obj", FileMode.Open);
+            //result = objLoader.Load(fileStream);
+            //fileStream.Close();
+
+            //color = new float[] { 0.5f, 0.5f, 0.5f, 1.0f };
+            //position = new Vector3(-10.0f, -9.0f + drawEps, 1.0f);
+            //rotation = new Vector3(0, 1.0f, 0);
+            //rotationAngle = 360.0f;
+            //scale = new Vector3(1.0f, 1.0f, 1.0f);
+            //Models.Add(new Mesh(result, position, rotation, rotationAngle, scale, color));
         }

         private void LightInitialization(OpenGL gl)
         {
-            gl.Enable(OpenGL.GL_COLOR_MATERIAL);
+            //gl.Enable(OpenGL.GL_COLOR_MATERIAL);
             gl.ColorMaterial(OpenGL.GL_FRONT, OpenGL.GL_AMBIENT_AND_DIFFUSE);
             float[] qaBlack = new float[]{0.2f, 0.2f, 0.2f, 1.0f};
             float[] qaGreen = new float[]{1.0f, 1.0f, 1.0f, 1.0f};
@@ -447,10 +477,10 @@
             gl.Light(OpenGL.GL_LIGHT3, OpenGL.GL_SPOT_EXPONENT, 0.0f);
             gl.Light(OpenGL.GL_LIGHT3, OpenGL.GL_QUADRATIC_ATTENUATION, 0.01f);

-            gl.Enable(OpenGL.GL_LIGHTING);
-            gl.Enable(OpenGL.GL_LIGHT0);
-            gl.Enable(OpenGL.GL_LIGHT1);
-            gl.Enable(OpenGL.GL_LIGHT3);
+            //gl.Enable(OpenGL.GL_LIGHTING);
+            //gl.Enable(OpenGL.GL_LIGHT0);
+            //gl.Enable(OpenGL.GL_LIGHT1);
+            //gl.Enable(OpenGL.GL_LIGHT3);
         }

         private void CameraInitialization()
@@ -526,7 +556,6 @@
             switch (e.KeyChar)
             {
                 #region options
-
                 case 'p':
                 case 'P': //pause animation
                     _sceneIsRotating = !_sceneIsRotating;
@@ -540,7 +569,6 @@
                 #endregion

                 #region camera movement
-
                 case 's':
                 case 'S': //near
                     _cameraEye -= _cameraTarget * StepSize;
@@ -581,6 +609,7 @@
                     break;

                 #endregion
+
                 #region camera rotation
                 case 'c':
                 case 'C': //clockwise
@@ -594,6 +623,14 @@
                     break;
                 #endregion

+                #region wireframe
+                case '[':
+                    _wireframeShiftX -= 1.0f;
+                    break;
+                case ']':
+                    _wireframeShiftX += 1.0f;
+                    break;
+                #endregion
             }

             if (keyPressed)


rename exclude action

rename exclude action

--- Src/Qart.Testing/TestCase.cs
+++ Src/Qart.Testing/TestCase.cs
@@ -121,7 +121,7 @@

         public static void AssertContent(this TestCase testCase, XmlDocument doc, string resultName, bool rebaseline)
         {
-            string exclusionListFileName = resultName + ".xpath_exclude";
+            string exclusionListFileName = resultName + ".exclude.xpath";
             if(testCase.Contains(exclusionListFileName))
             {
                 doc.RemoveNodes(testCase.GetContent(exclusionListFileName).Split('\n').Select(_ => _.Trim()).Where(_ => !string.IsNullOrEmpty(_)));


LogicCodeGenerator WriteExpressionMethod

--- Signum.Engine/CodeGeneration/LogicCodeGenerator.cs
+++ Signum.Engine/CodeGeneration/LogicCodeGenerator.cs
@@ -84,44 +84,63 @@

         protected virtual string WriteFile(Module mod)
         {
-            StringBuilder sb = new StringBuilder();
-            foreach (var item in GetUsingNamespaces(mod))
+            var expression = mod.Types.SelectMany(t => GetExpressions(t)).ToList();
+
+            StringBuilder sb = new StringBuilder();
+            foreach (var item in GetUsingNamespaces(mod, expression))
                 sb.AppendLine("using {0};".Formato(item));

             sb.AppendLine();
             sb.AppendLine("namespace " + GetNamespace(mod));
             sb.AppendLine("{");
-            sb.Append(WriteClass(mod).Indent(4));
+            sb.Append(WriteClass(mod, expression).Indent(4));
             sb.AppendLine("}");

             return sb.ToString();
         }

-        protected virtual string WriteClass(Module mod)
-        {
+        protected virtual string WriteClass(Module mod, List<ExpressionInfo> expressions)
+        {
+            var allExpression = mod.Types.SelectMany(t => GetExpressions(t)).ToList();
+
             StringBuilder sb = new StringBuilder();
             sb.AppendLine("public static class " + mod.ModuleName + "Logic");
             sb.AppendLine("{");
-            sb.Append(WriteStartMethod(mod).Indent(4));
+
+            foreach (var ei in expressions)
+            {
+                string info = WriteExpressionMethod(ei);
+                if (info != null)
+                {
+                    sb.Append(info.Indent(4));
+                    sb.AppendLine();
+                }
+            }
+
+            sb.Append(WriteStartMethod(mod, expressions).Indent(4));
             sb.AppendLine("}");
             return sb.ToString();
         }

+
+
         protected virtual string GetNamespace(Module mod)
         {
             return SolutionName + ".Logic." + mod.ModuleName;
         }

-        protected virtual List<string> GetUsingNamespaces(Module mod)
+        protected virtual List<string> GetUsingNamespaces(Module mod, List<ExpressionInfo> expressions)
         {
             var result = new List<string>()
             {
                 "System",
                 "System.Collections.Generic",
                 "System.Linq",
+                "System.Linq.Expressions",
                 "System.Text",
                 "System.Reflection",
                 "Signum.Utilities",
+                "Signum.Utilities.ExpressionTrees",
                 "Signum.Entities",
                 "Signum.Engine",
                 "Signum.Engine.Operations",
@@ -129,12 +148,12 @@
                 "Signum.Engine.DynamicQuery",
             };

-            result.AddRange(mod.Types.Select(t => t.Namespace).Distinct());
+            result.AddRange(mod.Types.Concat(expressions.Select(e => e.FromType)).Select(t => t.Namespace).Distinct());

             return result;
         }

-        protected virtual string WriteStartMethod(Module mod)
+        protected virtual string WriteStartMethod(Module mod, List<ExpressionInfo> expressions)
         {
             StringBuilder sb = new StringBuilder();
             sb.AppendLine("public static void Start(SchemaBuilder sb, DynamicQueryManager dqm)");
@@ -161,6 +180,18 @@
                 }
             }

+            if (expressions.Any())
+            {
+                foreach (var ei in expressions)
+                {
+                    string register = GetRegisterExpression(ei);
+                    if (register != null)
+                        sb.AppendLine(register.Indent(8));
+                }
+
+                sb.AppendLine();
+            }
+
             foreach (var item in mod.Types)
             {
                 string opers = WriteOperations(item);
@@ -177,7 +208,15 @@
             return sb.ToString();
         }

-
+        protected virtual string GetRegisterExpression(ExpressionInfo ei)
+        {
+            return "dqm.RegisterExpression(({from} {f}) => {f}.{name}(), () => typeof({to}).{NiceName}());"
+                .Replace("{from}", ei.FromType.Name)
+                .Replace("{to}", ei.ToType.Name)
+                .Replace("{f}", GetVariableName(ei.FromType))
+                .Replace("{name}", ei.Name)
+                .Replace("{NiceName}", ei.IsUnique ? "NiceName" : "NicePluralName");
+        }

         protected virtual string WritetInclude(Type type)
         {
@@ -206,6 +245,96 @@
             return sb.ToString();
         }

+        protected internal class ExpressionInfo
+        {
+            public Type FromType;
+            public Type ToType;
+            public PropertyInfo Property;
+            public string Name;
+            public string ExpressionName;
+            public bool IsUnique;
+        }
+
+        protected virtual List<ExpressionInfo> GetExpressions(Type toType)
+        {
+            var result = (from pi in Reflector.PublicInstanceDeclaredPropertiesInOrder(toType)
+                          let fromType = pi.PropertyType.CleanType()
+                          where fromType.IsEntity() && !fromType.IsAbstract
+                          let fi = Reflector.TryFindFieldInfo(toType, pi)
+                          where fi != null
+                          let isUnique = fi.GetCustomAttribute<UniqueIndexAttribute>() != null
+                          select new ExpressionInfo
+                          {
+                              ToType = toType,
+                              FromType = fromType,
+                              Property = pi,
+                              IsUnique = isUnique,
+                              Name = isUnique ? Reflector.CleanTypeName(toType) :
+                                     NaturalLanguageTools.Pluralize(Reflector.CleanTypeName(toType).SpacePascal()).ToPascal()
+                          }).ToList();
+
+            result = result.GroupBy(ei => new { ei.FromType, ei.ToType }).Where(g => g.Count() == 1).SelectMany(g => g).ToList();
+
+            result = result.Where(ShouldWriteExpression).ToList();
+
+            var groups = result.Select(a => a.Name).GroupCount();
+
+            foreach (var ei in result)
+            {
+                if (groups[ei.Name] == 1)
+                    ei.ExpressionName = ei.Name + "Expression";
+                else
+                    ei.ExpressionName = ei.Name + Reflector.CleanTypeName(ei.Property.PropertyType.CleanType()) + "Expresion";
+            }
+
+            return result;
+        }
+
+        bool? writeExpressions;
+        protected virtual bool ShouldWriteExpression(ExpressionInfo ei)
+        {
+            return SafeConsole.Ask(ref writeExpressions, "Create extensions {0} -[{1}]-> {2}?".Formato(ei.Property.PropertyType.CleanType(), ei.Name, ei.ToType));
+        }
+
+        protected virtual string WriteExpressionMethod(ExpressionInfo info)
+        {
+            Type from = info.Property.PropertyType.CleanType();
+
+            string varFrom = GetVariableName(from);
+            string varTo = GetVariableName(info.ToType);
+
+            if (varTo == varFrom)
+                varTo += "2";
+
+            string filter = info.Property.PropertyType.IsLite() ? "{t} => {t}.{prop}.RefersTo({f})" : "{t} => {t}.{prop} == {f}";
+
+            string str =  info.IsUnique?
+@"static Expression<Func<{from}, {to}>> {MethodExpression} =
+    {f} => Database.Query<{to}>().SingleOrDefaultEx({filter});
+{attr}public static {to} {Method}(this {from} e)
+{
+    return {MethodExpression}.Evaluate(e);
+}
+" :
+@"static Expression<Func<{from}, IQueryable<{to}>>> {MethodExpression} =
+    {f} => Database.Query<{to}>().Where({filter});
+{attr}public static IQueryable<{to}> {Method}(this {from} e)
+{
+    return {MethodExpression}.Evaluate(e);
+}
+";
+
+            return str.Replace("{filter}", filter)
+                .Replace("{attr}", info.ExpressionName == info.Name + "Expression" ? null : "[ExpressionField(\"{MethodExpression}\")]\r\n")
+                .Replace("{from}", from.Name)
+                .Replace("{to}", info.ToType.Name)
+                .Replace("{t}", varTo)
+                .Replace("{f}", varFrom)
+                .Replace("{prop}", info.Property.Name)
+                .Replace("{Method}", info.Name)
+                .Replace("{MethodExpression}", info.ExpressionName);
+        }
+
         protected virtual IEnumerable<PropertyInfo> GetQueryProperties(Type type)
         {
             return (from p in Reflector.PublicInstancePropertiesInOrder(type)
@@ -215,7 +344,7 @@
                     select p).Take(10);
         }

-        private bool IsSimpleValueType(Type type)
+        protected virtual bool IsSimpleValueType(Type type)
         {
             var t = CurrentSchema.Settings.GetSqlDbTypePair(type.UnNullify());


:microscope:

:microscope:

--- SonghayCore.Tests/Extensions/UriExtensionsTests.cs
+++ SonghayCore.Tests/Extensions/UriExtensionsTests.cs
@@ -14,6 +14,7 @@
         }

         [Theory]
+        [InlineData("http://ow.ly/i/8Tq32")] //does not expand
         [InlineData("https://t.co/bS1b8WklHh")]
         [InlineData("https://t.co/DdK08h4AZh")]
         [InlineData("https://t.co/ug1txCNmU6")] //returns shortened URI


Updated ServiceHost to use C# 7.0 syntax for default literals so application can still compile with VS 2017

--- Source/Applications/openMIC/openMIC/ServiceHost.cs
+++ Source/Applications/openMIC/openMIC/ServiceHost.cs
@@ -509,7 +509,7 @@
         /// <param name="userInput">Request string.</param>
         /// <param name="clientID">Client ID of sender.</param>
         /// <param name="principal">The principal used for role-based security.</param>
-        public void SendRequest(string userInput, Guid clientID = default, IPrincipal principal = null)
+        public void SendRequest(string userInput, Guid clientID = default(Guid), IPrincipal principal = null)
         {
             ClientRequest request = ClientRequest.Parse(userInput);


Removed commented out synchronous tests. Only async is used now.

--- Neo4j.Driver/Neo4j.Driver.Tests/Internal/IO/ChunkReaderTests.cs
+++ Neo4j.Driver/Neo4j.Driver.Tests/Internal/IO/ChunkReaderTests.cs
@@ -63,36 +63,6 @@
             ex.Should().BeOfType<ArgumentOutOfRangeException>();
         }

-        /*[Theory]
-        [InlineData(new byte[] { 0x00, 0x00 },
-                                 new byte[] { }, 0)]
-        [InlineData(new byte[] { 0x00, 0x01, 0x00,
-                                 0x00, 0x02, 0x01, 0x02,
-                                 0x00, 0x00 },
-                                 new byte[] { 0x00, 0x01, 0x02 }, 1)]
-        [InlineData(new byte[] { 0x00, 0x01, 0x00,
-                                 0x00, 0x01, 0x01,
-                                 0x00, 0x01, 0x02,
-                                 0x00, 0x00 },
-                                 new byte[] { 0x00, 0x01, 0x02 }, 1)]
-        [InlineData(new byte[] { 0x00, 0x01, 0x00,
-                                 0x00, 0x01, 0x01,
-                                 0x00, 0x01, 0x02,
-                                 0x00, 0x00,
-                                 0x00, 0x03, 0x00, 0x01, 0x02,
-                                 0x00, 0x00 },
-                                 new byte[] { 0x00, 0x01, 0x02, 0x00, 0x01, 0x02 }, 2)]
-        public void ShouldReadMessageSpanningMultipleChunks(byte[] input, byte[] expectedMessageBuffers, int expectedCount)
-        {
-            var reader = new ChunkReader(new MemoryStream(input));
-
-            var targetStream = new MemoryStream();
-            var count = reader.ReadNextMessages(targetStream);
-            var messageBuffers = targetStream.ToArray();
-
-            count.Should().Be(expectedCount);
-            messageBuffers.Should().Equal(expectedMessageBuffers);
-        }*/

         [Theory]
         [InlineData(new byte[] { 0x00, 0x00 },
@@ -125,23 +95,6 @@
             messageBuffers.Should().Equal(expectedMessageBuffers);
         }

-        /*
-        [Theory]
-        [InlineData(new byte[] { 0x00 })]   //Half chunk
-        [InlineData(new byte[] { 0x00, 0x01 })]
-        [InlineData(new byte[] { 0x00, 0x01, 0x00, 0x00, 0x02 })]
-        [InlineData(new byte[] { 0x00, 0x01, 0x00, 0x00, 0x02, 0x01 })]
-        public void ShouldThrowWhenEndOfStreamIsDetected(byte[] input)
-        {
-            var reader = new ChunkReader(new MemoryStream(input));
-
-            var targetStream = new MemoryStream();
-            var ex = Record.Exception(() => reader.ReadNextMessages(targetStream));
-
-            ex.Should().NotBeNull();
-            ex.Should().BeOfType<IOException>().Which.Message.Should().StartWith("Unexpected end of stream");
-        }*/
-
         [Theory]
         [InlineData(new byte[] { 0x00 })]   //Half chunk
         [InlineData(new byte[] { 0x00, 0x01 })]
@@ -276,22 +229,6 @@
             count.Should().Be(1);
         }

-        /*
-        [Fact]
-        public void ShouldReadSingleMessageStreamLargerThanBufferSize()
-        {
-            const int chunkSize = 22 * 1024;
-            const int totalStreamSizeByte = 2 * chunkSize;
-            var inputStream = new MemoryStream(GenerateMessages(chunkSize, totalStreamSizeByte));  // Will create a message of two 11k chunks, these will straddle the 16k internal buffer size...
-            var resultStream = new MemoryStream();
-            var reader = new ChunkReader(inputStream);
-
-            var count = reader.ReadNextMessages(resultStream);
-
-            count.Should().Be(1);
-        }
-        */
-

         [Fact]
         public async void ShouldReadMultipleMessageStreamLargerThanBufferSizeAsync()
@@ -311,25 +248,7 @@
             count.Should().Be(2);
         }

-        /*
-        [Fact]
-        public void ShouldReadMultipleMessageStreamLargerThanBufferSize()
-        {
-             const int chunkSize = 11 * 1024;
-            const int totalStreamSizeByte = 2 * chunkSize;
-            var inputStream = new MemoryStream();
-            inputStream.Write(GenerateMessages(chunkSize, totalStreamSizeByte));    //Add a message made of two 11k chunks.
-            inputStream.Write(GenerateMessages(chunkSize, totalStreamSizeByte));    //Add another message made of two 11k chunks.
-            inputStream.Position = 0;
-
-            var resultStream = new MemoryStream();
-            var reader = new ChunkReader(inputStream);
-
-            var count = reader.ReadNextMessages(resultStream);
-
-            count.Should().Be(2);
-        }*/
-
+

         private static byte[] GenerateMessageChunk(int messageSize)
         {


Fixed IQueryable

Fixed IQueryable

--- Noodles.AspMvc.Templates/Views/Shared/Noodles/Collection.cshtml
+++ Noodles.AspMvc.Templates/Views/Shared/Noodles/Collection.cshtml
@@ -1,7 +1,7 @@
 @using System.Web.Mvc.Html
-@model Noodles.Models.NodeProperty
+@model Noodles.Models.NodeCollectionProperty

-@foreach(var child in Model.Items)
+@foreach(var child in Model.Query(0, int.MaxValue).Items)
 {
     @Html.Partial("Noodles/Link", child)
 }


Forget about rename of MathHelper as there are conflicts with MG and XNA MathHelper

--- cocos2d/particle_nodes/CCParticleSystemQuad.cs
+++ cocos2d/particle_nodes/CCParticleSystemQuad.cs
@@ -206,9 +206,9 @@
                 float x = newPosition.X;
                 float y = newPosition.Y;

-                float r = -MathHelper.ToRadians(particle.rotation);
-                float cr = MathHelper.Cos(r);
-                float sr = MathHelper.Sin(r);
+                float r = -MHelper.ToRadians(particle.rotation);
+                float cr = MHelper.Cos(r);
+                float sr = MHelper.Sin(r);
                 float ax = x1 * cr - y1 * sr + x;
                 float ay = x1 * sr + y1 * cr + y;
                 float bx = x2 * cr - y1 * sr + x;


[UDP] Always run IPv4

[UDP] Always run IPv4

This mainly to fix Mono builds, but it's a pretty safe bet that every OS
that can run Tempest has IPv4 support.

--- Desktop/Tempest/Providers/Network/UdpConnectionlessListener.cs
+++ Desktop/Tempest/Providers/Network/UdpConnectionlessListener.cs
@@ -51,7 +51,7 @@
 			this.running = true;
 			this.mtypes = types;

-			if (Socket.OSSupportsIPv4)
+			//if (Socket.OSSupportsIPv4)
 			{
 				this.socket4 = new Socket (AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
 				this.socket4.EnableBroadcast = true;


Cleanup

Cleanup

--- test/Stormpath.Owin.CoreHarness/Startup.cs
+++ test/Stormpath.Owin.CoreHarness/Startup.cs
@@ -1,7 +1,19 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
+// <copyright file="Startup.cs" company="Stormpath, Inc.">
+// Copyright (c) 2016 Stormpath, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// </copyright>
+
 using Microsoft.AspNet.Builder;
 using Microsoft.AspNet.Hosting;
 using Microsoft.Extensions.Configuration;


remove redundant null checks

remove redundant null checks

--- Sources/ReCommendedExtension.Deployment/Program.cs
+++ Sources/ReCommendedExtension.Deployment/Program.cs
@@ -190,7 +190,6 @@

                 var customAttribute = customAttributes.First(a => a.AttributeType == attributeType);

-                Debug.Assert(customAttribute != null);
                 Debug.Assert(customAttribute.ConstructorArguments[0].Value is string);

                 var replacementText = (string)customAttribute.ConstructorArguments[0].Value;
@@ -211,7 +210,7 @@
             nuspec.Root.Element("files")
                 ?.Elements("file")
                 .First(e => (string)e.Attribute("src") == "")
-                ?.SetAttributeValue("src", Path.GetFileName(assemblyPath));
+                .SetAttributeValue("src", Path.GetFileName(assemblyPath));

             var metadataElement = nuspec.Root.Element("metadata");
             Debug.Assert(metadataElement != null);


Start height in the middle

Start height in the middle

--- SpiderBot/SpiderBot/ViewModels/GamePadViewModel.cs
+++ SpiderBot/SpiderBot/ViewModels/GamePadViewModel.cs
@@ -64,7 +64,7 @@
 			}
 		}

-		int heightValue;
+		int heightValue = 50;
 		public int HeightValue
 		{
 			get { return heightValue; }


item possibilities

item possibilities

--- ParticleStormControl/ParticleStormControl/InGame/Level/Level.cs
+++ ParticleStormControl/ParticleStormControl/InGame/Level/Level.cs
@@ -117,7 +117,7 @@
         /// item possebilities [0] = no item; [5] = no item; [1] = antibody; [2] = dangerZone; [3] = mutate; [4] = wipeout
         /// every value is [i-1] + possebility
         /// </summary>
-        private static readonly float[] itemPossibilities = new float[] { 0.0f, 0.25f, 0.40f, 0.55f, 0.75f, 1.0f };
+        private static readonly float[] itemPossibilities = new float[] { 0.0f, 0.25f, 0.45f, 0.60f, 0.73f, 1.0f };

         #endregion


Changed the logo, in case Jiri would change SqlMetal name...

git-svn-id: 1800f71f313d917366f95485fa960eed04b40598@275 33146b6e-df29-0410-a1ca-39be37fb9416


Fix right duration disposable NRE in GroupJoin().

--- System.Reactive/System.Reactive.Linq/Observable.cs
+++ System.Reactive/System.Reactive.Linq/Observable.cs
@@ -1101,7 +1101,7 @@
 			Action drcleanup = () => {
 				Console.WriteLine ("right duration cleanup");
 				rddis.Dispose ();
-				rddis = null;
+				rddis = new SingleAssignmentDisposable ();
 				rsub = null;
 				dright = null;
 				};


Also fixes EditFilter.

Also fixes EditFilter.

--- Python/Product/PythonTools/PythonTools/Navigation/EditFilter.cs
+++ Python/Product/PythonTools/PythonTools/Navigation/EditFilter.cs
@@ -354,7 +354,7 @@
                 _pathText = GetSearchDisplayText();
                 AnalysisEntry entry = analyzer.GetAnalysisEntryFromPath(_locationInfo.FilePath);
                 if (entry != null) {
-                    _lineText = entry.GetLine(_locationInfo.Line);
+                    _lineText = entry.GetLine(_locationInfo.Line) ?? "";
                 } else {
                     _lineText = "";
                 }


Progressive honor actions as remark #2

Progressive honor actions as remark #2

--- Spines.Mahjong/Spines.Mahjong.Analysis/Classification/ProgressiveHonorClassifier.cs
+++ Spines.Mahjong/Spines.Mahjong.Analysis/Classification/ProgressiveHonorClassifier.cs
@@ -25,6 +25,9 @@
   /// </summary>
   internal class ProgressiveHonorClassifier
   {
+    /// <summary>
+    /// The arrangement value of the current state.
+    /// </summary>
     public int Value { get; private set; }

     /// <summary>
@@ -32,6 +35,24 @@
     /// </summary>
     /// <param name="actionId">The id of the action used to advance the state.</param>
     /// <returns>The arrangement value of the new state.</returns>
+    /// <remarks>
+    /// concealed, melded, action, actionId
+    /// 0, 0, draw 0
+    /// 1, 0, draw 1
+    /// 2, 0, draw 2
+    /// 3, 0, draw 3
+    /// 0, 3, draw 4
+    /// 1, 0, discard 5
+    /// 2, 0, discard 6
+    /// 3, 0, discard 7
+    /// 4, 0, discard 8
+    /// 1, 3, discard 9
+    /// 2, 0, pon 10
+    /// 3, 0, pon 11
+    /// 3, 0, daiminkan 12
+    /// 1, 3, chakan 13
+    /// 4, 0, ankan 14
+    /// </remarks>
     public void MoveNext(int actionId)
     {
       _current = Transitions[_current + actionId + 1];


Clearer region name

Clearer region name

--- RDFSharp/Semantics/OWL/Validator/RDFOntologyValidatorRuleset.cs
+++ RDFSharp/Semantics/OWL/Validator/RDFOntologyValidatorRuleset.cs
@@ -669,7 +669,7 @@
         }
         #endregion

-        #region Rule:AsymmetricProperty
+        #region Rule:AsymmetricProperty [OWL2]
         /// <summary>
         /// Validation rule checking for consistency of owl:AsymmetricProperty axioms [OWL2]
         /// </summary>


git-svn-id: https://gorgonlib.googlecode.com/svn/branches/2.x@1563 a61f9e97-bd4c-0410-8c65-85b29eaa70ff

--- Dorian/Gorgon/Gorgon.Renderers/2D/Renderables/GorgonDrawing.cs
+++ Dorian/Gorgon/Gorgon.Renderers/2D/Renderables/GorgonDrawing.cs
@@ -60,10 +60,12 @@
 			}
 			set
 			{
-				if (value == null)
-					return;
-
-				_depthStencil = value;
+			    if (value == null)
+			    {
+			        return;
+			    }
+
+			    _depthStencil = value;
 			}
 		}

@@ -78,10 +80,12 @@
 			}
 			set
 			{
-				if (value == null)
-					return;
-
-				_blend = value;
+			    if (value == null)
+			    {
+			        return;
+			    }
+
+			    _blend = value;
 			}
 		}

@@ -96,10 +100,12 @@
 			}
 			set
 			{
-				if (value == null)
-					return;
-
-				_sampler = value;
+			    if (value == null)
+			    {
+			        return;
+			    }
+
+			    _sampler = value;
 			}
 		}

@@ -151,24 +157,37 @@
 		{
 			get
 			{
-				if ((Blending.SourceBlend == BlendType.One) && (Blending.DestinationBlend == BlendType.Zero))
-					return BlendingMode.None;
-
-				if (Blending.SourceBlend == BlendType.SourceAlpha)
+			    if ((Blending.SourceBlend == BlendType.One)
+			        && (Blending.DestinationBlend == BlendType.Zero))
+			    {
+			        return BlendingMode.None;
+			    }
+
+			    if (Blending.SourceBlend == BlendType.SourceAlpha)
 				{
-					if (Blending.DestinationBlend == BlendType.InverseSourceAlpha)
-						return BlendingMode.Modulate;
-					if (Blending.DestinationBlend == BlendType.One)
-						return BlendingMode.Additive;
+				    if (Blending.DestinationBlend == BlendType.InverseSourceAlpha)
+				    {
+				        return BlendingMode.Modulate;
+				    }
+				    if (Blending.DestinationBlend == BlendType.One)
+				    {
+				        return BlendingMode.Additive;
+				    }
 				}

-				if ((Blending.SourceBlend == BlendType.One) && (Blending.DestinationBlend == BlendType.InverseSourceAlpha))
-					return BlendingMode.PreMultiplied;
-
-				if ((Blending.SourceBlend == BlendType.InverseDestinationColor) && (Blending.DestinationBlend == BlendType.InverseSourceColor))
-					return BlendingMode.Inverted;
-
-				return BlendingMode.Custom;
+			    if ((Blending.SourceBlend == BlendType.One)
+			        && (Blending.DestinationBlend == BlendType.InverseSourceAlpha))
+			    {
+			        return BlendingMode.PreMultiplied;
+			    }
+
+			    if ((Blending.SourceBlend == BlendType.InverseDestinationColor)
+			        && (Blending.DestinationBlend == BlendType.InverseSourceColor))
+			    {
+			        return BlendingMode.Inverted;
+			    }
+
+			    return BlendingMode.Custom;
 			}
 			set
 			{
@@ -254,7 +273,6 @@
 		/// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="texture"/> parameter is NULL (Nothing in VB.Net).</exception>
 		public void Blit(GorgonTexture2D texture, RectangleF blitRegion)
 		{
-			GorgonDebug.AssertNull(texture, "texture");
 			Blit(texture, blitRegion, new RectangleF(Vector2.Zero, new Vector2(1)));
 		}

@@ -267,7 +285,6 @@
 		/// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="texture"/> parameter is NULL (Nothing in VB.Net).</exception>
 		public void Blit(GorgonTexture2D texture, Vector2 position)
 		{
-			GorgonDebug.AssertNull(texture, "texture");
 			Blit(texture, new RectangleF(position, texture.Settings.Size), new RectangleF(Vector2.Zero, new Vector2(1)));
 		}

@@ -440,17 +457,21 @@
 		/// <param name="font">Font to use when measuring.</param>
 		/// <param name="text">Text to measure.</param>
 		/// <param name="wordWrap">TRUE if word wrapping should be used.</param>
-		/// <param name="bounds">Boundaries for the size.</param>
+		/// <param name="bounds">Boundaries for the size of the string.</param>
 		/// <returns>The size of the string.</returns>
-		public Vector2 MeasureString(GorgonFont font, string text, bool wordWrap, RectangleF bounds)
+		public Vector2 MeasureString(GorgonFont font, string text, bool wordWrap, SizeF bounds)
 		{
 			_string.Font = font;
 			Vector2 size = _string.MeasureText(text, wordWrap, bounds.Width);

-			if (size.X > bounds.Width)
-				size.X = bounds.Width;
-			if (size.Y > bounds.Height)
+		    if (size.X > bounds.Width)
+		    {
+		        size.X = bounds.Width;
+		    }
+		    if (size.Y > bounds.Height)
+            {
 				size.Y = bounds.Height;
+            }

 			return size;
 		}


fix(WebView): Seal WinRT component type (#1403)

MessagePostedEventArgs from WinRT component was not sealed and causing issues for Win App Cert Kit.

Towards #1401

--- ReactWindows/ReactNativeWebViewBridge/MessagePostedEventArgs.cs
+++ ReactWindows/ReactNativeWebViewBridge/MessagePostedEventArgs.cs
@@ -3,7 +3,7 @@
     /// <summary>
     /// Arguments for <see cref="WebViewBridge.MessagePosted"/> event.
     /// </summary>
-    public class MessagePostedEventArgs
+    public sealed class MessagePostedEventArgs
     {
         internal MessagePostedEventArgs(int tag, string message)
         {


start paused for better results (unpause after all channel settings)

--- SimpleMusicPlayer/SimpleMusicPlayer/Core/Player/PlayerEngine.cs
+++ SimpleMusicPlayer/SimpleMusicPlayer/Core/Player/PlayerEngine.cs
@@ -265,8 +265,9 @@
             uint length;
             this.sound.getLength(out length, FMOD.TIMEUNIT.PCM).ERRCHECK();

-            FMOD.Channel channel = null;
-            if (!this.system.playSound(this.sound, null, false, out channel).ERRCHECK())
+            // start paused for better results
+            FMOD.Channel channel;
+            if (!this.system.playSound(this.sound, null, true, out channel).ERRCHECK())
             {
                 return;
             }
@@ -298,6 +299,7 @@

                 channel.addDSP(numDSPs, faderDSP).ERRCHECK();

+                // get the reference clock, which is the parent channel group
                 ulong dspclock;
                 ulong parentclock;
                 channel.getDSPClock(out dspclock, out parentclock).ERRCHECK();
@@ -308,12 +310,22 @@
                 this.system.getSoftwareFormat(out samplerate, out speakermode, out numrawspeakers).ERRCHECK();

                 var samples = (uint)Math.Round(5000f * samplerate / 1000f);
-
+                var samplesCompl = (uint)Math.Round(lengthMs * samplerate / 1000f);
+
+                // add a fade point at 'now' with zero volume
                 channel.addFadePoint(parentclock, 0f).ERRCHECK();
-                channel.addFadePoint(parentclock + samples, 1f).ERRCHECK();
-
-                //channel.addFadePoint(parentclock + length - samples, 1f).ERRCHECK();
-                //channel.addFadePoint(parentclock + length, 0f).ERRCHECK();
+                // add a fade point 5 seconds later at 1 volume
+                channel.addFadePoint(parentclock + (uint)samplerate * 5 /*samples*/, 1f).ERRCHECK();
+
+                // add a fade point at 'now' with full volume
+                //channel.addFadePoint(samplesCompl - (uint)samplerate * 5, 1f).ERRCHECK();
+                // add a fade point 5 seconds later at 0 volume
+                //channel.addFadePoint(samplesCompl, 0f).ERRCHECK();
+                // add a delayed stop command at 5 seconds ('stopchannels = true')
+                //channel.setDelay(0, samplesCompl, true).ERRCHECK();
+
+                // now start the music
+                channel.setPaused(false).ERRCHECK();

                 this.system.update().ERRCHECK();
             }


Gtk: DateTimePicker should use default mode, and only fire events after loaded

--- Source/Eto.Platform.Gtk/Forms/Controls/DateTimePickerHandler.cs
+++ Source/Eto.Platform.Gtk/Forms/Controls/DateTimePickerHandler.cs
@@ -8,6 +8,12 @@
 		public DateTimePickerHandler ()
 		{
 			Control = new CustomControls.DateComboBox ();
+			this.Mode = DateTimePicker.DefaultMode;
+		}
+
+		public override void OnLoad (EventArgs e)
+		{
+			base.OnLoad (e);
 			this.Control.DateChanged += delegate {
 				Widget.OnValueChanged (EventArgs.Empty);
 			};


StyleSheet property has been added. Code refactoring.

--- TAlex.WPF.Controls/Controls/HtmlRichEditor.xaml.cs
+++ TAlex.WPF.Controls/Controls/HtmlRichEditor.xaml.cs
@@ -28,6 +28,7 @@
         #region Fields

         public static readonly DependencyProperty HtmlSourceProperty;
+        public static readonly DependencyProperty StyleSheetProperty;
         public static readonly DependencyProperty EditModeProperty;

         private DispatcherTimer _styleTimer;
@@ -49,6 +50,19 @@
             }
         }

+        public string StyleSheet
+        {
+            get
+            {
+                return (string)GetValue(StyleSheetProperty);
+            }
+
+            set
+            {
+                SetValue(StyleSheetProperty, value);
+            }
+        }
+
         public EditMode EditMode
         {
             get
@@ -62,19 +76,19 @@
             }
         }

+        public bool DocumentIsReady
+        {
+            get
+            {
+                return HtmlDocument != null && HtmlDocument.readyState == "complete";
+            }
+        }
+
         private IHTMLDocument2 HtmlDocument
         {
             get
             {
                 return VisualEditor != null ? (IHTMLDocument2)VisualEditor.Document : null;
-            }
-        }
-
-        private bool DocumentIsReady
-        {
-            get
-            {
-                return HtmlDocument != null && HtmlDocument.readyState == "complete";
             }
         }

@@ -86,16 +100,19 @@
         {
             EditModeProperty = DependencyProperty.Register("EditMode", typeof(EditMode), typeof(HtmlRichEditor), new FrameworkPropertyMetadata(EditMode.Visual, new PropertyChangedCallback(OnEditModeChanged)));
             HtmlSourceProperty = DependencyProperty.Register("HtmlSource", typeof(string), typeof(HtmlRichEditor), new FrameworkPropertyMetadata(String.Empty, new PropertyChangedCallback(OnHtmlSourceChanged)));
+            StyleSheetProperty = DependencyProperty.Register("StyleSheet", typeof(string), typeof(HtmlRichEditor), new FrameworkPropertyMetadata(String.Empty, new PropertyChangedCallback(OnStyleSheetChanged)));
         }

         public HtmlRichEditor()
         {
             InitializeComponent();
-            InitVisualEditor();
+            InitVisualEditorEvents();

             _styleTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(200) };
             _styleTimer.Tick += StyleTimer_Tick;
-            _styleTimer.Start();
+
+            Loaded += OnLoaded;
+            Unloaded += OnUnloaded;
         }

         #endregion
@@ -117,7 +134,16 @@
         private static void OnHtmlSourceChanged(object sender, DependencyPropertyChangedEventArgs e)
         {
             HtmlRichEditor editor = (HtmlRichEditor)sender;
-            editor.UpdateHtmlSource((string)e.NewValue);
+            //if (e.OldValue != e.NewValue)
+            {
+                editor.UpdateHtmlSource((string)e.NewValue);
+            }
+        }
+
+        private static void OnStyleSheetChanged(object sender, DependencyPropertyChangedEventArgs e)
+        {
+            HtmlRichEditor editor = (HtmlRichEditor)sender;
+            editor.SetNewStyleSheet((string)e.NewValue);
         }

         #endregion
@@ -260,15 +286,52 @@

         #region Event Handlers

-        private void VisualEditor_Navigated(object sender, NavigationEventArgs e)
-        {
-            ((HTMLTextContainerEvents2_Event)HtmlDocument.body).onchange += new HTMLTextContainerEvents2_onchangeEventHandler(b);
-        }
-
-        private void b(IHTMLEventObj obj)
-        {
-            int d = 5;
-            var state = HtmlDocument.readyState;
+        private void OnLoaded(object sender, RoutedEventArgs e)
+        {
+            if (!DocumentIsReady)
+            {
+                VisualEditor.NavigateToString(WrapHtmlContent(HtmlSource, StyleSheet));
+            }
+            _styleTimer.Start();
+        }
+
+        private void OnUnloaded(object sender, RoutedEventArgs e)
+        {
+            _styleTimer.Stop();
+        }
+
+        private void VisualEditor_LoadCompleted(object sender, NavigationEventArgs e)
+        {
+            OnDocumentReady();
+
+            HTMLTextContainerEvents2_Event bodyEvent = HtmlDocument.body as HTMLTextContainerEvents2_Event;
+            //bodyEvent.onchange += OnBodyChangeEventHandler;
+
+            //bodyEvent.onkeyup -= OnBodyChangeEventHandler;
+            bodyEvent.onkeyup += OnBodyChangeEventHandler;
+            //bodyEvent.onblur -= OnBodyChangeEventHandler;
+            //bodyEvent.onblur += OnBodyChangeEventHandler;
+            //bodyEvent.oncut -= new HTMLTextContainerEvents2_oncutEventHandler(OnBodyChangeEventHanlder2);
+            //bodyEvent.oncut += new HTMLTextContainerEvents2_oncutEventHandler(OnBodyChangeEventHanlder2);
+            //bodyEvent.onpaste -= new HTMLTextContainerEvents2_onpasteEventHandler(OnBodyChangeEventHanlder2);
+            //bodyEvent.onpaste += new HTMLTextContainerEvents2_onpasteEventHandler(OnBodyChangeEventHanlder2);
+        }
+
+        private bool OnBodyChangeEventHanlder2(IHTMLEventObj pEvtObj)
+        {
+            UpdateHtmlSource();
+            return true;
+        }
+
+        private void OnBodyChangeEventHandler(IHTMLEventObj obj)
+        {
+            UpdateHtmlSource();
+        }
+
+        private void UpdateHtmlSource()
+        {
+            //HtmlSource = HtmlDocument.body.innerHTML;
+            //SetValue()
         }

         private void StyleTimer_Tick(object sender, EventArgs e)
@@ -340,6 +403,11 @@

         #region Helpers

+        protected virtual void OnDocumentReady()
+        {
+            SetNewStyleSheet(StyleSheet);
+        }
+
         private void SetVisualMode()
         {
             if (EditMode == Controls.EditMode.Visual)
@@ -368,6 +436,20 @@
                 HtmlDocument.body.innerHTML = source;
             else
                 CodeEditor.Text = source;
+        }
+
+        private void SetNewStyleSheet(string styleSheet)
+        {
+            if (DocumentIsReady)
+            {
+                var styleSheets = HtmlDocument.styleSheets.Cast<IHTMLStyleSheet>().ToList();
+
+                if (styleSheets.Count == 2)
+                {
+                    var customStyleSheet = styleSheets[1];
+                    customStyleSheet.cssText = styleSheet;
+                }
+            }
         }

         private void ExecuteHtmlCommand(string command, object value = null)
@@ -440,11 +522,10 @@
             return new ReadOnlyCollection<FontSize>(ls);
         }

-        private void InitVisualEditor()
-        {
-            VisualEditor.Navigated += VisualEditor_Navigated;
-            VisualEditor.NavigateToString(WrapHtmlContent(String.Empty));
-
+        private void InitVisualEditorEvents()
+        {
+            VisualEditor.LoadCompleted += VisualEditor_LoadCompleted;
+
             FontSizeList.ItemsSource = GetDefaultFontSizes();
             FontSizeList.SelectionChanged += FontSizeList_SelectionChanged;

@@ -459,10 +540,13 @@
                     <head>
                         <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

+                        <!-- Default style sheet -->
                         <style type='text/css'>
                             body {{ font: 14px verdana; color: #505050; background: #fcfcfc; }}
-                            {1}
+                            table, td, th, tr {{ border: 1px solid black; border-collapse: collapse; }}
                         </style>
+                        <!-- Custom style sheet -->
+                        <style type='text/css'>{1}</style>
                     </head>
                     <body contenteditable>{0}</body>
                 </html>",


Add value change event

Add value change event

--- Source/HelixToolkit.SharpDX.Shared/Utilities/FrameStatistics.cs
+++ Source/HelixToolkit.SharpDX.Shared/Utilities/FrameStatistics.cs
@@ -7,8 +7,14 @@
 namespace HelixToolkit.UWP.Utilities
 #endif
 {
+    public struct FrameStatisticsArg
+    {
+        public double AverageValue;
+        public double AverageFrequency;
+    }
     public interface IFrameStatistics : INotifyPropertyChanged
     {
+        event EventHandler<FrameStatisticsArg> OnValueChanged;
         /// <summary>
         /// Gets the average value.
         /// </summary>
@@ -41,6 +47,8 @@

     public sealed class FrameStatistics : Model.ObservableObject, IFrameStatistics
     {
+        public event EventHandler<FrameStatisticsArg> OnValueChanged;
+
         private double averageValue = 0;
         /// <summary>
         /// Average latency
@@ -52,9 +60,7 @@
                 if (Set(ref averageValue, value))
                 {
                     AverageFrequency = value < 1 ? 1000 : 1000 / value;
-#if !NETFX_CORE
-      //              Console.WriteLine($"Latency: {value}");
-#endif
+                    OnValueChanged?.Invoke(this, new FrameStatisticsArg() { AverageValue = value, AverageFrequency = AverageFrequency });
                 }
             }
             get


Fixed bug with initial loading HtmlRichEditor.

--- TAlex.WPF.Controls/Controls/HtmlRichEditor.xaml.cs
+++ TAlex.WPF.Controls/Controls/HtmlRichEditor.xaml.cs
@@ -432,9 +432,15 @@

         internal void InternalUpdateHtmlSourceProperty()
         {
-            _isInternalHtmlSourceChanged = true;
-            HtmlSource = (EditMode == Controls.EditMode.Visual) ? HtmlDocument.body.innerHTML : CodeEditor.Text;
-            _isInternalHtmlSourceChanged = false;
+            if (DocumentIsReady)
+            {
+                _isInternalHtmlSourceChanged = true;
+
+                string newContent = (EditMode == Controls.EditMode.Visual) ? HtmlDocument.body.innerHTML : CodeEditor.Text;
+                if (HtmlSource != newContent) HtmlSource = newContent;
+
+                _isInternalHtmlSourceChanged = false;
+            }
         }

         private void SetNewStyleSheet(string styleSheet)


fixed mw calc.

fixed mw calc.

--- Source/Libraries/FaultData/DataOperations/StatisticOperation.cs
+++ Source/Libraries/FaultData/DataOperations/StatisticOperation.cs
@@ -195,22 +195,22 @@

         private double CalcInitialLLMW(VICycleDataGroup viCycleDataGroup)
         {
-            Complex vac = Complex.FromPolarCoordinates(viCycleDataGroup.VCA.RMS.DataPoints.First().Value, viCycleDataGroup.VCA.Phase.DataPoints.First().Value);
+            Complex vca = Complex.FromPolarCoordinates(viCycleDataGroup.VCA.RMS.DataPoints.First().Value, viCycleDataGroup.VCA.Phase.DataPoints.First().Value);
             Complex ia = Complex.Conjugate(Complex.FromPolarCoordinates(viCycleDataGroup.IA.RMS.DataPoints.First().Value, viCycleDataGroup.IA.Phase.DataPoints.First().Value));
             Complex vbc = Complex.FromPolarCoordinates(viCycleDataGroup.VBC.RMS.DataPoints.First().Value, viCycleDataGroup.VBC.Phase.DataPoints.First().Value);
             Complex ib = Complex.Conjugate(Complex.FromPolarCoordinates(viCycleDataGroup.IB.RMS.DataPoints.First().Value, viCycleDataGroup.IB.Phase.DataPoints.First().Value));

-            return (vac * ia + vbc * ib).Real / 1E6;
+            return (-1*vca * ia + vbc * ib).Real / 1E6;
         }

         private double CalcFinalLLMW(VICycleDataGroup viCycleDataGroup)
         {
-            Complex vac = Complex.FromPolarCoordinates(viCycleDataGroup.VCA.RMS.DataPoints.Last().Value, viCycleDataGroup.VCA.Phase.DataPoints.Last().Value);
+            Complex vca = Complex.FromPolarCoordinates(viCycleDataGroup.VCA.RMS.DataPoints.Last().Value, viCycleDataGroup.VCA.Phase.DataPoints.Last().Value);
             Complex ia = Complex.Conjugate(Complex.FromPolarCoordinates(viCycleDataGroup.IA.RMS.DataPoints.Last().Value, viCycleDataGroup.IA.Phase.DataPoints.Last().Value));
             Complex vbc = Complex.FromPolarCoordinates(viCycleDataGroup.VBC.RMS.DataPoints.Last().Value, viCycleDataGroup.VBC.Phase.DataPoints.Last().Value);
             Complex ib = Complex.Conjugate(Complex.FromPolarCoordinates(viCycleDataGroup.IB.RMS.DataPoints.Last().Value, viCycleDataGroup.IB.Phase.DataPoints.Last().Value));

-            return (vac * ia + vbc * ib).Real / 1E6;
+            return (-1 * vca * ia + vbc * ib).Real / 1E6;
         }


XL Print proteinPos

XL Print proteinPos

--- TaskLayer/XLSearchTask/XLSearchTaskOutputMethod.cs
+++ TaskLayer/XLSearchTask/XLSearchTaskOutputMethod.cs
@@ -40,7 +40,7 @@
                                             + "\t" + item.CrossType.ToString()
                                             + "\t"
                                             + "\t" + item.CompactPeptides.First().Value.Item2.Select(p => p.Protein.Accession).First().ToString(CultureInfo.InvariantCulture)
-                                                   + "\t" + item.XlProteinPos.ToString(CultureInfo.InvariantCulture)
+                                            + "\t" + item.XlProteinPos.ToString(CultureInfo.InvariantCulture)
                                             + "\t" + item.BaseSequence + "(" + item.XlPos.ToString(CultureInfo.InvariantCulture) + ")"
                                             + "\t" + item.FullSequence
                                             + "\t" + (item.PeptideMonisotopicMass.HasValue ? item.PeptideMonisotopicMass.Value.ToString(CultureInfo.InvariantCulture) : "---")
@@ -49,7 +49,7 @@
                                             + "\t" + item.XlRank[0].ToString(CultureInfo.InvariantCulture)
                                             + "\t"
                                             + "\t" + item.BetaPsmCross.CompactPeptides.First().Value.Item2.Select(p => p.Protein.Accession).First().ToString(CultureInfo.InvariantCulture)
-                                                   + "\t" + item.BetaPsmCross.XlProteinPos.ToString(CultureInfo.InvariantCulture)
+                                            + "\t" + item.BetaPsmCross.XlProteinPos.ToString(CultureInfo.InvariantCulture)
                                             + "\t" + item.BetaPsmCross.BaseSequence + "(" + item.BetaPsmCross.XlPos.ToString(CultureInfo.InvariantCulture) + ")"
                                             + "\t" + item.BetaPsmCross.FullSequence
                                             + "\t" + (item.BetaPsmCross.PeptideMonisotopicMass.HasValue ? item.BetaPsmCross.PeptideMonisotopicMass.Value.ToString(CultureInfo.InvariantCulture) : "---")
@@ -202,7 +202,9 @@
                         + "\t" + (item.BetaPsmCross.BaseSequence.Length + item.BaseSequence.Length).ToString(CultureInfo.InvariantCulture)
                         + "\t" + "-." + item.BaseSequence + item.XlPos.ToString(CultureInfo.InvariantCulture) + "--" + item.BetaPsmCross.BaseSequence + item.BetaPsmCross.XlPos.ToString(CultureInfo.InvariantCulture) + ".-"
                         + "\t" + item.CompactPeptides.First().Value.Item2.Select(p => p.Protein.Accession).First().ToString(CultureInfo.InvariantCulture)
+                               + "(" + item.XlProteinPos.ToString(CultureInfo.InvariantCulture) + ")"
                         + "\t" + item.BetaPsmCross.CompactPeptides.First().Value.Item2.Select(p => p.Protein.Accession).First().ToString(CultureInfo.InvariantCulture)
+                               + "(" + item.BetaPsmCross.XlProteinPos.ToString(CultureInfo.InvariantCulture) + ")"
                         );
                 }
             }


Revert "Fixed the regressions bug"

Revert "Fixed the regressions bug"

This reverts commit d19f917a45dc2c77312532a654780f8e736d880f.

--- Src/PCompiler/CompilerCore/Backend/CSharp/CSharpCodeCompiler.cs
+++ Src/PCompiler/CompilerCore/Backend/CSharp/CSharpCodeCompiler.cs
@@ -13,7 +13,7 @@
     <OutputType>Exe</OutputType>
     <StartupObject />
     <LangVersion>latest</LangVersion>
-    <OutputPath>.</OutputPath>
+    <OutputPath>-directory-</OutputPath>
   </PropertyGroup >
   <ItemGroup>
     <PackageReference Include=""Microsoft.Coyote"" Version=""1.0.5""/>
@@ -74,6 +74,8 @@
             // if the file does not exist then create the file
             if (!File.Exists(csprojPath))
             {
+                csprojTemplate = csprojTemplate.Replace("-directory-",
+                    Path.GetRelativePath(job.ProjectRootPath.FullName,job.OutputDirectory.FullName));
                 File.WriteAllText(csprojPath, csprojTemplate);
             }

@@ -85,10 +87,10 @@
             }

             // compile the csproj file
-            string[] args = new[] { $"build -c Release", csprojName };
+            string[] args = new[] { "build -c Release", csprojName };

             int exitCode = RunWithOutput(job.ProjectRootPath.FullName, out stdout, out stderr, "dotnet", args);
-            if (exitCode != 0)
+            if(exitCode != 0)
             {
                 throw new TranslationException($"Compiling generated C# code FAILED!\n" + $"{stdout}\n" + $"{stderr}\n");
             }


Fix for: MPLY-7227. Using new path structure to load resources. Buddy: Mark

--- windows/ExampleApp/ExampleAppWPF/StartupResourceLoader.cs
+++ windows/ExampleApp/ExampleAppWPF/StartupResourceLoader.cs
@@ -1,8 +1,6 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.IO;
 using System.Windows.Controls;
 using System.Windows.Media.Imaging;

@@ -11,6 +9,7 @@
     public static class StartupResourceLoader
     {
         private static Dictionary<string, BitmapImage> m_resources;
+        private static string ProgramDataPath;

         static StartupResourceLoader()
         {
@@ -34,6 +33,8 @@
             LoadImage("button_remove_pin_off.png");

             LoadImage("arrow3_down.png");
+
+            ProgramDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "eeGeo_Ltd", System.Diagnostics.Process.GetCurrentProcess().ProcessName, "Resources");
         }

         public static void Init()
@@ -57,6 +58,22 @@
             return bitmap;
         }

+        private static bool CanOpenPath(string filePath, out Uri uri)
+        {
+            uri = null;
+
+            try
+            {
+                uri = new Uri(filePath);
+            }
+            catch(UriFormatException)
+            {
+                return false;
+            }
+
+            return File.Exists(filePath);
+        }
+
         public static void LoadImage(params string[] pathAndName)
         {
             BitmapImage key = null;
@@ -65,31 +82,17 @@
             if (key != null)
                 return;

-            var path = System.IO.Path.Combine(pathAndName);
-            path = System.IO.Path.Combine(Environment.CurrentDirectory, "Resources", path);
+            var filePath = Path.Combine(pathAndName);
+            Uri uri = null;

-            Uri uri = null;
-            try
+            if (!CanOpenPath(Path.Combine(Environment.CurrentDirectory, "Resources", filePath), out uri) &&
+                !CanOpenPath(Path.Combine(ProgramDataPath, filePath), out uri))
             {
-                uri = new Uri(path);
-            }
-            catch(System.Exception)
-            {
-                System.Windows.MessageBox.Show("Cannot find Path: " + path, "Path Not Found", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error);
+                System.Windows.MessageBox.Show("Cannot find Path: " + filePath, "Path Not Found", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error);
                 return;
             }

-            BitmapImage bitmap = null;
-
-            try
-            {
-                bitmap = new BitmapImage(uri);
-            }
-            catch (System.IO.IOException e)
-            {
-                System.Windows.MessageBox.Show("Cannot find file: " + path, "File Not Found", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error);
-                return;
-            }
+            BitmapImage bitmap = new BitmapImage(uri);

             m_resources.Add(pathAndName[pathAndName.Length - 1], bitmap);
         }


Fixed JsonSyncRepositoryReaderTest

Fixed JsonSyncRepositoryReaderTest

--- SyncTool.Configuration.Git/test/JsonSyncRepositoryReaderTest.cs
+++ SyncTool.Configuration.Git/test/JsonSyncRepositoryReaderTest.cs
@@ -10,9 +10,9 @@
 using SyncTool.Configuration.Reader;
 using Xunit;

-namespace SyncTool.Configuration.Test
+namespace SyncTool.Configuration.Git.Test
 {
-    public class JsonConfigurationReaderTest : IDisposable
+    public class JsonSyncRepositoryReaderTest : IDisposable
     {
         readonly JsonSyncRepositoryReader m_Instance = new JsonSyncRepositoryReader();
         readonly string m_SettingsFilePath = Path.Combine(Environment.CurrentDirectory, "SyncTool.Repositories.json");
@@ -26,7 +26,7 @@

-        [Fact(DisplayName = nameof(JsonSyncFolderReader) + ".GetSyncFolders() successfully reads valid json file")]
+        [Fact(DisplayName = nameof(JsonSyncRepositoryReader) + ".GetSyncFolders() successfully reads valid json file")]
         public void GetSyncFolders_successfully_reads_valid_json_file()
         {


fix twitter search news

fix twitter search news

--- Terradue.Tep/Terradue/Tep/WebServer/News/TwitterNews.Service.cs
+++ Terradue.Tep/Terradue/Tep/WebServer/News/TwitterNews.Service.cs
@@ -36,10 +36,15 @@

                 Type type = OpenSearchFactory.ResolveTypeFromRequest(httpRequest, ose);

-                List<TwitterFeed> twitters = TwitterNews.LoadTwitterFeeds(context);
+                List<Terradue.OpenSearch.IOpenSearchable> osentities = new List<Terradue.OpenSearch.IOpenSearchable>();
+
+                try {
+                    var twitters = TwitterNews.LoadTwitterCollection(context);
+                    osentities.Add(twitters);
+                } catch (Exception) { }

                 var settings = MasterCatalogue.OpenSearchFactorySettings;
-                MultiGenericOpenSearchable multiOSE = new MultiGenericOpenSearchable(twitters.Cast<IOpenSearchable>().ToList(), settings, false);
+                MultiGenericOpenSearchable multiOSE = new MultiGenericOpenSearchable(osentities, settings);
                 result = ose.Query(multiOSE, httpRequest.QueryString, type);

                 context.Close ();


[SFSRAP-37] Code review changes

[SFSRAP-37] Code review changes

--- Tests/RoslynPluginGeneratorTests/RoslynSdkConfigurationTests.cs
+++ Tests/RoslynPluginGeneratorTests/RoslynSdkConfigurationTests.cs
@@ -74,13 +74,13 @@
   <RulesXmlResourcePath>/org/sonar/plugins/roslynsdk/rules.xml</RulesXmlResourcePath>
   <SqaleXmlResourcePath>/org/sonar/plugins/roslynsdk/sqale.xml</SqaleXmlResourcePath>
   <PluginProperties>
-    <example.pluginKey>example</example.pluginKey>
-    <example.pluginVersion>example</example.pluginVersion>
-    <example.staticResourceName>example</example.staticResourceName>
-    <example.nuget.packageId>example</example.nuget.packageId>
-    <example.nuget.packageVersion>example</example.nuget.packageVersion>
-    <example.analyzerId>example</example.analyzerId>
-    <example.ruleNamespace>example</example.ruleNamespace>
+    <example.pluginKey>example.pluginKey.Value</example.pluginKey>
+    <example.pluginVersion>example.pluginVersion.Value</example.pluginVersion>
+    <example.staticResourceName>example.staticResourceName.Value</example.staticResourceName>
+    <example.nuget.packageId>example.nuget.packageId.Value</example.nuget.packageId>
+    <example.nuget.packageVersion>example.nuget.packageVersion.Value</example.nuget.packageVersion>
+    <example.analyzerId>example.analyzerId.Value</example.analyzerId>
+    <example.ruleNamespace>example.ruleNamespace.Value</example.ruleNamespace>
   </PluginProperties>
 </RoslynSdkConfiguration>
 ";
@@ -105,13 +105,13 @@
             Assert.AreEqual("/org/sonar/plugins/roslynsdk/rules.xml", loaded.RulesXmlResourcePath);
             Assert.AreEqual("/org/sonar/plugins/roslynsdk/sqale.xml", loaded.SqaleXmlResourcePath);

-            AssertPropertyExists("example.pluginKey", "example", loaded.Properties);
-            AssertPropertyExists("example.pluginVersion", "example", loaded.Properties);
-            AssertPropertyExists("example.staticResourceName", "example", loaded.Properties);
-            AssertPropertyExists("example.nuget.packageId", "example", loaded.Properties);
-            AssertPropertyExists("example.nuget.packageVersion", "example", loaded.Properties);
-            AssertPropertyExists("example.analyzerId", "example", loaded.Properties);
-            AssertPropertyExists("example.ruleNamespace", "example", loaded.Properties);
+            AssertPropertyExists("example.pluginKey", "example.pluginKey.Value", loaded.Properties);
+            AssertPropertyExists("example.pluginVersion", "example.pluginVersion.Value", loaded.Properties);
+            AssertPropertyExists("example.staticResourceName", "example.staticResourceName.Value", loaded.Properties);
+            AssertPropertyExists("example.nuget.packageId", "example.nuget.packageId.Value", loaded.Properties);
+            AssertPropertyExists("example.nuget.packageVersion", "example.nuget.packageVersion.Value", loaded.Properties);
+            AssertPropertyExists("example.analyzerId", "example.analyzerId.Value", loaded.Properties);
+            AssertPropertyExists("example.ruleNamespace", "example.ruleNamespace.Value", loaded.Properties);
         }

         #endregion


Clean up lexer

Clean up lexer

--- LoonyC/Compiler/Lexer.cs
+++ LoonyC/Compiler/Lexer.cs
@@ -9,233 +9,267 @@
 {
     partial class Lexer : IEnumerable<Token>
     {
-        private readonly IEnumerator<char> _source;
+        private readonly string _fileName;
+        private readonly IEnumerable<char> _sourceEnumerable;
+
+        private IEnumerator<char> _source;
         private int _length;
         private List<char> _read;

-        private readonly string _fileName;
-
         private int _index;
         private int _currentLine;
-
-        public Lexer(string source, string fileName = null)
-            : this(source, source == null ? -1 : source.Length, fileName)
-        {
-
-        }
-
-        public Lexer(IEnumerable<char> source, int length, string fileName = null)
-        {
-            if (source == null || length <= 0)
+        private int _startLine;
+
+        public Lexer(IEnumerable<char> source, string fileName = null)
+        {
+            if (source == null)
                 throw new ArgumentNullException("source");

-            _source = source.GetEnumerator();
-            _length = length;
+            _fileName = fileName;
+            _sourceEnumerable = source;
+        }
+
+        public IEnumerator<Token> GetEnumerator()
+        {
+            _length = int.MaxValue;
+            _source = _sourceEnumerable.GetEnumerator();
             _read = new List<char>(16);
-
-            _fileName = fileName;

             _index = 0;
             _currentLine = 1;
-        }
-
-        public IEnumerator<Token> GetEnumerator()
-        {
+
             while (_index < _length)
             {
                 SkipWhiteSpace();

+                if (SkipComment())
+                    continue;
+
                 if (_index >= _length)
                     break;

-                // single line comment (discarded)
-                if (TakeIfNext("//"))
-                {
-                    while (!IsNext("\n"))
-                    {
-                        TakeChar();
-                    }
-
-                    continue;
-                }
-
-                // multi line comment (discarded)
-                if (TakeIfNext("/*"))
-                {
-                    var depth = 1;
-
-                    while (_index < _length && depth > 0)
-                    {
-                        if (TakeIfNext("/*"))
-                        {
-                            depth++;
-                            continue;
-                        }
-
-                        if (TakeIfNext("*/"))
-                        {
-                            depth--;
-                            continue;
-                        }
-
-                        TakeChar();
-                    }
-
-                    continue;
-                }
-
-                var startLine = _currentLine;
+                _startLine = _currentLine;
+
                 var ch = PeekChar();
-
-                // operators
-                var opList = _operators.Lookup(ch);
-                if (opList != null)
-                {
-                    var op = opList.FirstOrDefault(o => TakeIfNext(o.Item1));
-
-                    if (op != null)
-                    {
-                        yield return new Token(_fileName, _currentLine, op.Item2, op.Item1);
-                        continue;
-                    }
-                }
-
-                // string/char
-                if (TakeIfNext('"') || TakeIfNext('\''))
-                {
-                    var stringTerminator = ch;
-                    var stringContentsBuilder = new StringBuilder();
-
-                    while (true)
-                    {
-                        if (_index >= _length)
-                            throw new CompilerException(_fileName, startLine, CompilerError.UnterminatedString);
-
-                        ch = TakeChar();
-
-                        if (ch == stringTerminator)
-                            break;
-
-                        switch (ch)
-                        {
-                            case '\\':
-                                ch = TakeChar();
-
-                                if (_index >= _length)
-                                    throw new CompilerException(_fileName, _currentLine, CompilerError.UnexpectedEofString);
-
-                                switch (ch)
-                                {
-                                    case '\\':
-                                        stringContentsBuilder.Append('\\');
-                                        break;
-
-                                    case '"':
-                                        stringContentsBuilder.Append('"');
-                                        break;
-
-                                    case '\'':
-                                        stringContentsBuilder.Append('\'');
-                                        break;
-
-                                    case 'n':
-                                        stringContentsBuilder.Append('\n');
-                                        break;
-
-                                    case 't':
-                                        stringContentsBuilder.Append('\t');
-                                        break;
-
-                                    // TODO: more escape sequences
-
-                                    default:
-                                        throw new CompilerException(_fileName, _currentLine, CompilerError.InvalidEscapeSequence, ch);
-                                }
-
-                                break;
-
-                            default:
-                                stringContentsBuilder.Append(ch);
-                                break;
-                        }
-                    }
-
-                    var stringContents = stringContentsBuilder.ToString(); // TODO: we need to convert this to CP437 byte array or something
-
-                    if (stringTerminator == '\'')
-                    {
-                        if (stringContents.Length != 1)
-                            throw new CompilerException(_fileName, _currentLine, CompilerError.CharLiteralLength);
-
-                        yield return new Token(_fileName, _currentLine, TokenType.SingleString, stringContents);
-                        continue;
-                    }
-
-                    yield return new Token(_fileName, _currentLine, TokenType.String, stringContents);
-                    continue;
-                }
-
-                // keyword/word
-                if (char.IsLetter(ch) || ch == '_')
-                {
-                    var wordContents = TakeWhile(c => char.IsLetterOrDigit(c) || c == '_');
-                    TokenType keywordType;
-                    var isKeyword = _keywords.TryGetValue(wordContents, out keywordType);
-
-                    yield return new Token(_fileName, _currentLine, isKeyword ? keywordType : TokenType.Identifier, wordContents);
-                    continue;
-                }
-
-                // number
-                if (char.IsDigit(ch))
-                {
-                    var format = NumberFormat.Decimal;
-
-                    if (ch == '0')
-                    {
-                        var nextChar = PeekChar(1);
-
-                        if (nextChar == 'x' || nextChar == 'X')
-                            format = NumberFormat.Hexadecimal;
-
-                        if (nextChar == 'b' || nextChar == 'B')
-                            format = NumberFormat.Binary;
-
-                        if (format != NumberFormat.Decimal)
-                        {
-                            TakeChar(); // '0'
-                            TakeChar(); // 'x' or 'b'
-                        }
-                    }
-
-                    Func<char, bool> isDigit = c => char.IsDigit(c) || (format == NumberFormat.Hexadecimal && _hexChars.Contains(c));
-
-                    var numberContents = TakeWhile(c =>
-                    {
-                        if (c == '_' && isDigit(PeekChar(1)))
-                        {
-                            TakeChar();
-                            return true;
-                        }
-
-                        return isDigit(c);
-                    });
-
-                    int number;
-                    if (!TryParseNumber(numberContents, format, out number))
-                        throw new CompilerException(_fileName, _currentLine, CompilerError.InvalidNumber, format.ToString().ToLower(), numberContents);
-
-                    yield return new Token(_fileName, _currentLine, TokenType.Number, number.ToString("G", CultureInfo.InvariantCulture));
-                    continue;
-                }
-
-                throw new CompilerException(_fileName, _currentLine, CompilerError.UnexpectedCharacter, ch);
+                Token token;
+
+                if (!TryLexOperator(ch, out token) &&
+                    !TryLexString(ch, out token) &&
+                    !TryLexWord(ch, out token) &&
+                    !TryLexNumber(ch, out token))
+                {
+                    throw new CompilerException(_fileName, _currentLine, CompilerError.UnexpectedCharacter, ch);
+                }
+
+                yield return token;
             }

             while (true)
                 yield return new Token(_fileName, _currentLine, TokenType.Eof, null);
         }

+        private bool TryLexOperator(char ch, out Token token)
+        {
+            var opList = _operators.Lookup(ch);
+            if (opList != null)
+            {
+                var op = opList.FirstOrDefault(o => TakeIfNext(o.Item1));
+
+                if (op != null)
+                {
+                    token = new Token(_fileName, _currentLine, op.Item2, op.Item1);
+                    return true;
+                }
+            }
+
+            token = null;
+            return false;
+        }
+
+        private bool TryLexString(char ch, out Token token)
+        {
+            if (ch == '"' || ch == '\'')
+            {
+                TakeChar();
+
+                var stringTerminator = ch;
+                var stringContentsBuilder = new StringBuilder();
+
+                while (true)
+                {
+                    if (_index >= _length)
+                        throw new CompilerException(_fileName, _startLine, CompilerError.UnterminatedString);
+
+                    ch = TakeChar();
+
+                    if (ch == stringTerminator)
+                        break;
+
+                    if (ch != '\\')
+                    {
+                        stringContentsBuilder.Append(ch);
+                        continue;
+                    }
+
+                    // escape sequence
+                    ch = TakeChar();
+
+                    if (_index >= _length)
+                        throw new CompilerException(_fileName, _currentLine, CompilerError.UnexpectedEofString);
+
+                    switch (ch)
+                    {
+                        case '\\':
+                            stringContentsBuilder.Append('\\');
+                            break;
+
+                        case '"':
+                            stringContentsBuilder.Append('"');
+                            break;
+
+                        case '\'':
+                            stringContentsBuilder.Append('\'');
+                            break;
+
+                        case 'n':
+                            stringContentsBuilder.Append('\n');
+                            break;
+
+                        case 't':
+                            stringContentsBuilder.Append('\t');
+                            break;
+
+                        // TODO: more escape sequences
+
+                        default:
+                            throw new CompilerException(_fileName, _currentLine, CompilerError.InvalidEscapeSequence, ch);
+                    }
+                }
+
+                var stringContents = stringContentsBuilder.ToString(); // TODO: we need to convert this to CP437 byte array or something
+
+                if (stringTerminator == '\'')
+                {
+                    if (stringContents.Length != 1)
+                        throw new CompilerException(_fileName, _currentLine, CompilerError.CharLiteralLength);
+
+                    token = new Token(_fileName, _currentLine, TokenType.SingleString, stringContents);
+                    return true;
+                }
+
+                token = new Token(_fileName, _currentLine, TokenType.String, stringContents);
+                return true;
+            }
+
+            token = null;
+            return false;
+        }
+
+        private bool TryLexWord(char ch, out Token token)
+        {
+            if (char.IsLetter(ch) || ch == '_')
+            {
+                var wordContents = TakeWhile(c => char.IsLetterOrDigit(c) || c == '_');
+                TokenType keywordType;
+                var isKeyword = _keywords.TryGetValue(wordContents, out keywordType);
+
+                token = new Token(_fileName, _currentLine, isKeyword ? keywordType : TokenType.Identifier, wordContents);
+                return true;
+            }
+
+            token = null;
+            return false;
+        }
+
+        private bool TryLexNumber(char ch, out Token token)
+        {
+            if (char.IsDigit(ch))
+            {
+                var format = NumberFormat.Decimal;
+
+                if (ch == '0')
+                {
+                    var nextChar = PeekChar(1);
+
+                    if (nextChar == 'x' || nextChar == 'X')
+                        format = NumberFormat.Hexadecimal;
+
+                    if (nextChar == 'b' || nextChar == 'B')
+                        format = NumberFormat.Binary;
+
+                    if (format != NumberFormat.Decimal)
+                    {
+                        TakeChar(); // '0'
+                        TakeChar(); // 'x' or 'b'
+                    }
+                }
+
+                Func<char, bool> isDigit = c => char.IsDigit(c) || (format == NumberFormat.Hexadecimal && _hexChars.Contains(c));
+
+                var numberContents = TakeWhile(c =>
+                {
+                    if (c == '_' && isDigit(PeekChar(1)))
+                    {
+                        TakeChar();
+                        return true;
+                    }
+
+                    return isDigit(c);
+                });
+
+                int number;
+                if (!TryParseNumber(numberContents, format, out number))
+                    throw new CompilerException(_fileName, _currentLine, CompilerError.InvalidNumber, format.ToString().ToLower(), numberContents);
+
+                token = new Token(_fileName, _currentLine, TokenType.Number, number.ToString("G", CultureInfo.InvariantCulture));
+                return true;
+            }
+
+            token = null;
+            return false;
+        }
+
+        private bool SkipComment()
+        {
+            // single line comment
+            if (TakeIfNext("//"))
+            {
+                while (!IsNext("\n"))
+                {
+                    TakeChar();
+                }
+
+                return true;
+            }
+
+            // multi line comment
+            if (TakeIfNext("/*"))
+            {
+                var depth = 1;
+
+                while (_index < _length && depth > 0)
+                {
+                    if (TakeIfNext("/*"))
+                    {
+                        depth++;
+                        continue;
+                    }
+
+                    if (TakeIfNext("*/"))
+                    {
+                        depth--;
+                        continue;
+                    }
+
+                    TakeChar();
+                }
+
+                return true;
+            }
+
+            return false;
+        }
+
         private void SkipWhiteSpace()
         {
             while (_index < _length)
@@ -257,15 +291,6 @@
             for (var i = 0; i < value.Length; i++)
                 TakeChar();

-            return true;
-        }
-
-        private bool TakeIfNext(char value)
-        {
-            if (PeekChar() != value)
-                return false;
-
-            TakeChar();
             return true;
         }


Showing all future versions of an implementation guide to allow versioning in next->next version

--- Trifolia.Web/Controllers/API/TemplateController.cs
+++ Trifolia.Web/Controllers/API/TemplateController.cs
@@ -107,6 +107,32 @@
                 throw new ArgumentException("Could not find template with id/reference of " + identifier);

             return GetTemplate(templateId);
+        }
+
+        private Dictionary<int, String> GetNewVersionImplementationGuides(List<ImplementationGuide> igs)
+        {
+            Dictionary<int, String> ret = new Dictionary<int, string>();
+
+            foreach (var ig in igs)
+            {
+                ret.Add(ig.Id, ig.GetDisplayName());
+                List<ImplementationGuide> nextIgs = this.GetNewVersionImplementationGuides(ig);
+
+                foreach (var nextIg in nextIgs)
+                    ret.Add(nextIg.Id, nextIg.GetDisplayName());
+            }
+
+            return ret;
+        }
+
+        private List<ImplementationGuide> GetNewVersionImplementationGuides(ImplementationGuide ig)
+        {
+            if (ig.NextVersions == null || ig.NextVersions.Count == 0) return new List<ImplementationGuide>();
+            var nextVersions = ig.NextVersions.ToList();
+            List<ImplementationGuide> ret = new List<ImplementationGuide>(nextVersions);
+            foreach (var nextVersion in nextVersions)
+                ret.AddRange(this.GetNewVersionImplementationGuides(nextVersion));
+            return ret;
         }

         /// <summary>
@@ -171,8 +197,7 @@
                 HasGreenModel = template.GreenTemplates.Any()
             };

-            if (template.OwningImplementationGuide.NextVersions != null && template.OwningImplementationGuide.NextVersions.Count > 0)
-                model.NewVersionImplementationGuides = template.OwningImplementationGuide.NextVersions.ToDictionary(ig => ig.Id, ig => ig.GetDisplayName());
+            model.NewVersionImplementationGuides = this.GetNewVersionImplementationGuides(template.OwningImplementationGuide.NextVersions.ToList());

             PublishStatus lStatus = template.Status;


Fixed account dialog tests

Fixed account dialog tests

--- Twice/ViewModels/Profile/ProfileDialogViewModel.cs
+++ Twice/ViewModels/Profile/ProfileDialogViewModel.cs
@@ -91,7 +91,7 @@
 			}

 			IsBusy = true;
-			Context = ContextList.Contexts.First( ctx => ctx.IsDefault );
+			Context = ContextList.Contexts.FirstOrDefault( ctx => ctx.IsDefault ) ?? ContextList.Contexts.First();

 			UserEx user = null;
 			try


S-51801: Rename the test class and method

--- VersionOne.Bugzilla.BugzillaAPI.Testss/BugTests.cs
+++ VersionOne.Bugzilla.BugzillaAPI.Testss/BugTests.cs
@@ -3,7 +3,7 @@
 namespace VersionOne.Bugzilla.BugzillaAPI.Testss
 {
     [TestClass()]
-    public class given_a_Bug
+    public class Given_A_Bug
     {
         private IBug _bug;
         private string _expectedReassignToPayload;
@@ -17,7 +17,7 @@
         }

         [TestMethod]
-        public void it_should_give_appropriate_reassigneto_payloads()
+        public void it_should_give_appropriate_reassignto_payloads()
         {
             var integrationUser = "terry.densmore@versionone.com";
             _bug.AssignedTo = "denise@denise.com";


Removed de-duplication of assertion failures because it causes more confusion. #151

--- FluentAssertions.Core/Execution/CollectingAssertionStrategy.cs
+++ FluentAssertions.Core/Execution/CollectingAssertionStrategy.cs
@@ -4,7 +4,6 @@
 using System.Text;

 using FluentAssertions.Common;
-using FluentAssertions.Formatting;

 namespace FluentAssertions.Execution
 {
@@ -47,7 +46,7 @@
             {
                 var builder = new StringBuilder();
                 builder.AppendLine(string.Join(Environment.NewLine, failureMessages.ToArray()));
-
+
                 if (context.Any())
                 {
                     foreach (KeyValuePair<string, object> pair in context)
@@ -65,10 +64,7 @@
         /// </summary>
         public void HandleFailure(string message)
         {
-            if (!failureMessages.Contains(message))
-            {
-                failureMessages.Add(message);
-            }
+            failureMessages.Add(message);
         }
     }
 }


remove links to samples since they're included

--- Assets/HappyFunTimes/HappyFunTimesCore/Editor/HFTMenuItems.cs
+++ Assets/HappyFunTimes/HappyFunTimesCore/Editor/HFTMenuItems.cs
@@ -49,88 +49,10 @@
         Application.OpenURL("http://github.com/greggman/HappyFunTimes/issues");
     }

-    [MenuItem("Window/HappyFunTimes/Examples/Simple Example/UnityPackage", false, 4)]
-    static void ExampleSimple() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?owner=greggman&repo=hft-unitysimple");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Simple Example/Docs", false, 4)]
-    static void ExampleSimpleDocs() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?type=docs&owner=greggman&repo=hft-unitysimple");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/2D Platform Example/UnityPackage", false, 5)]
-    static void Example2DPlatformer() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?owner=greggman&repo=hft-unity2dplatformer");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/2D Platform Example/Docs", false, 5)]
-    static void Example2DPlatformerDocs() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?type=docs&owner=greggman&repo=hft-unity2dplatformer");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Character Controller Example/UnityPackage", false, 6)]
-    static void ExampleCharacterController() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?owner=greggman&repo=hft-unitycharacterexample");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Character Controller Example/Docs", false, 6)]
-    static void ExampleCharacterControllerDocs() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?type=docs&owner=greggman&repo=hft-unitycharacterexample");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Device Orientation and Acceleration Example/UnityPackage", false, 7)]
-    static void ExampleMultiDeviceOrientationAndAcceleration() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?owner=greggman&repo=hft-unity-deviceorientation-and-accel");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Device Orientation and Acceleration Example/Docs", false, 7)]
-    static void ExampleMultiDeviceOrientationAndAccelerationDocs() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?type=docs&owner=greggman&repo=hft-unity-deviceorientation-and-accel");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Players in Scene Example/UnityPackage", false, 8)]
-    static void ExamplePlayersInScene() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?owner=greggman&repo=hft-unityplayersinscene");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Players in Scene Example/Docs", false, 8)]
-    static void ExamplePlayersInSceneDocs() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?type=docs&owner=greggman&repo=hft-unityplayersinscene");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Character Selection/UnityPackage", false, 9)]
-    static void ExampleCharacterSelect() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?owner=greggman&repo=hft-unity-character-select");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Character Selection/Docs", false, 9)]
-    static void ExampleCharacterSelectDocs() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?type=docs&owner=greggman&repo=hft-unity-character-select");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Multi Machine Example/UnityPackage", false, 10)]
-    static void ExampleMultiMachine() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?owner=greggman&repo=hft-unity-multi-character-select");
-    }
-
-    [MenuItem("Window/HappyFunTimes/Examples/Multi Machine Example/Docs", false, 10)]
-    static void ExampleMultiMachineDocs() {
-        Application.OpenURL("http://docs.happyfuntimes.net/docs/unity/samples.html?type=docs&owner=greggman&repo=hft-unity-multi-game-example");
-    }
-
     [MenuItem("Window/HappyFunTimes/SuperHappyFunTimes", false, 12)]
     static void SuperHappyFunTimes() {
         Application.OpenURL("http://superhappyfuntimes.net");
     }
-
-    //[MenuItem("Window/HappyFunTimes/Export", false, 13)]
-    //static void Export() {
-    //}
-    //
-    //[MenuItem("Window/HappyFunTimes/Publish Game", false, 14)]
-    //static void Publish() {
-    //}
 }

 }  // namespace HappyFunTimesEditor


all the DOCS!!!

all the DOCS!!!

--- Assets/MixedRealityToolkit/_Core/Devices/BaseDeviceManager.cs
+++ Assets/MixedRealityToolkit/_Core/Devices/BaseDeviceManager.cs
@@ -11,8 +11,16 @@

 namespace Microsoft.MixedReality.Toolkit.Internal.Devices
 {
+    /// <summary>
+    /// Base Device manager to inherit from.
+    /// </summary>
     public class BaseDeviceManager : IMixedRealityDeviceManager
     {
+        /// <summary>
+        /// Constructor.
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="priority"></param>
         public BaseDeviceManager(string name, uint priority)
         {
             Name = name;
@@ -71,7 +79,7 @@
                             pointerProfile.Handedness == Handedness.Both ||
                             pointerProfile.Handedness == controllingHand)
                         {
-                            var pointerObject = UnityEngine.Object.Instantiate(pointerProfile.PointerPrefab);
+                            var pointerObject = Object.Instantiate(pointerProfile.PointerPrefab);
                             var pointer = pointerObject.GetComponent<IMixedRealityPointer>();

                             if (pointer != null)


Added Icons to the Help Menu

Added Icons to the Help Menu

--- AuthoringTools/IntegratedAuthoringToolWF/MainForm.Designer.cs
+++ AuthoringTools/IntegratedAuthoringToolWF/MainForm.Designer.cs
@@ -477,22 +477,25 @@
             //
             // officialWebsiteToolStripMenuItem
             //
+            this.officialWebsiteToolStripMenuItem.Image = global::IntegratedAuthoringToolWF.Properties.Resources.icons8_help_40;
             this.officialWebsiteToolStripMenuItem.Name = "officialWebsiteToolStripMenuItem";
-            this.officialWebsiteToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+            this.officialWebsiteToolStripMenuItem.Size = new System.Drawing.Size(184, 26);
             this.officialWebsiteToolStripMenuItem.Text = "Official Website";
             this.officialWebsiteToolStripMenuItem.Click += new System.EventHandler(this.officialWebsiteToolStripMenuItem_Click);
             //
             // videoExamplesToolStripMenuItem
             //
+            this.videoExamplesToolStripMenuItem.Image = global::IntegratedAuthoringToolWF.Properties.Resources.icons8_template_40;
             this.videoExamplesToolStripMenuItem.Name = "videoExamplesToolStripMenuItem";
-            this.videoExamplesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+            this.videoExamplesToolStripMenuItem.Size = new System.Drawing.Size(184, 26);
             this.videoExamplesToolStripMenuItem.Text = "Video Examples";
             this.videoExamplesToolStripMenuItem.Click += new System.EventHandler(this.videoExamplesToolStripMenuItem_Click);
             //
             // checkForUpdatesToolStripMenuItem
             //
+            this.checkForUpdatesToolStripMenuItem.Image = global::IntegratedAuthoringToolWF.Properties.Resources.NormalFace;
             this.checkForUpdatesToolStripMenuItem.Name = "checkForUpdatesToolStripMenuItem";
-            this.checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+            this.checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(184, 26);
             this.checkForUpdatesToolStripMenuItem.Text = "Check for Updates";
             this.checkForUpdatesToolStripMenuItem.Click += new System.EventHandler(this.checkForUpdatesToolStripMenuItem_Click);
             //


Fix for issue #762 - composite Swagger client compilation fails due to a lower case parameter name

--- AutoRest/Modelers/CompositeSwagger/CompositeSwaggerModeler.cs
+++ AutoRest/Modelers/CompositeSwagger/CompositeSwaggerModeler.cs
@@ -219,6 +219,16 @@
                     && m.Group == subClientMethod.Group);
                 if (compositeClientMethod == null)
                 {
+                    // Re-link client parameters
+                    foreach (var parameter in subClientMethod.Parameters.Where(p => p.ClientProperty != null))
+                    {
+                        var clientProperty = compositeClient.Properties
+                            .FirstOrDefault(p => p.SerializedName == parameter.ClientProperty.SerializedName);
+                        if (clientProperty != null)
+                        {
+                            parameter.ClientProperty = clientProperty;
+                        }
+                    }
                     compositeClient.Methods.Add(subClientMethod);
                 }
             }


 r127@realmforge.tigris.org (orig r141):  arilou | 2006-01-18 06:49:15 -0500
 minor plugin changes related to Vfs (2)

git-svn-id: 53f2a8ff3606f182ef4420064c1f4a5cdcbe6bb1@730 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Axiom3D/Axiom/Engine/Graphics/GPUProgramsNamespaceExtender.cs
+++ Axiom3D/Axiom/Engine/Graphics/GPUProgramsNamespaceExtender.cs
@@ -41,7 +41,7 @@
                 throw new ArgumentOutOfRangeException("GPUProgramsNamespaceExtender supports only IHighLevelGpuProgramFactory-compatible instances");

             IEnumerator
-                enu = ParticleSystemManager.Instance.Emitters.Values.GetEnumerator();
+                enu = HighLevelGpuProgramManager.Instance.Resources.GetEnumerator();

             while (enu.MoveNext())
                 yield return (K)enu.Current;