Improved how we register the engine to make the registration more explicit.

--- src/JavaScriptViewEngine/Extensions.cs
+++ src/JavaScriptViewEngine/Extensions.cs
@@ -17,6 +17,9 @@

 namespace JavaScriptViewEngine
 {
+    /// <summary>
+    /// Some extensions
+    /// </summary>
     public static class Extensions
     {
         /// <summary>
@@ -42,18 +45,31 @@
         /// <summary>
         /// Add the services required to use a render engine, a pool, etc.
         /// </summary>
-        /// <typeparam name="T"></typeparam>
         /// <param name="services">The services.</param>
+        [Obsolete("Use the overload that uses the 'JsEngineServiceBuilder'.")]
         public static void AddJsEngine(this IServiceCollection services)
         {
-            services.TryAddEnumerable(ServiceDescriptor.Transient<IConfigureOptions<MvcViewOptions>, JavaScriptViewEngineMvcViewOptionsSetup>());
-            services.TryAddTransient<IFileWatcher, FileWatcher>();
-            services.TryAddTransient<IRenderEnginePool, RenderEnginePool>();
-            services.TryAddTransient<IRenderEngineBuilder, NodeRenderEngineBuilder>();
-            services.TryAddSingleton<IRenderEngineFactory, PooledRenderEngineFactory>();
-            services.TryAddTransient<IJsViewEngine, JsViewEngine>();
-        }
-
+            services.AddJsEngine(builder =>
+            {
+                // We are using polled here, simply because that is what this method did previously.
+                builder.UsePooledEngineFactory();
+                // Same thing as ^
+                builder.UseNodeRenderEngine();
+            });
+        }
+
+        /// <summary>
+        /// Add the services required to use a render engine, a pool, etc.
+        /// </summary>
+        /// <param name="services">The services.</param>
+        /// <param name="action"></param>
+        public static void AddJsEngine(this IServiceCollection services, Action<JsEngineServiceBuilder> action)
+        {
+            var builder = new JsEngineServiceBuilder();
+            action(builder);
+            builder.Register(services);
+        }
+
         /// <summary>
         /// This will add <see cref="JsViewEngine"/> to a collection used by mvc to render
         /// </summary>
@@ -88,6 +104,97 @@
             }
         }

+        public class JsEngineServiceBuilder
+        {
+            private Action<IServiceCollection> _engineFactoryAction;
+            private Action<IServiceCollection> _renderEngineBuilderAction;
+
+            internal JsEngineServiceBuilder() {  }
+
+            public JsEngineServiceBuilder UsePooledEngineFactory(Action<RenderPoolOptions> renderPoolOptionsSetupAction = null)
+            {
+                if(_engineFactoryAction != null)
+                    throw new Exception("You have already registered an engine factory.");
+
+                _engineFactoryAction = services =>
+                {
+                    services.TryAddTransient<IRenderEnginePool, RenderEnginePool>();
+                    services.TryAddSingleton<IRenderEngineFactory, PooledRenderEngineFactory>();
+                    services.Configure(renderPoolOptionsSetupAction);
+                };
+
+                return this;
+            }
+
+            public JsEngineServiceBuilder UseSingletonEngineFactory()
+            {
+                if (_engineFactoryAction != null)
+                    throw new Exception("You have already registered an engine factory.");
+
+                _engineFactoryAction = services =>
+                {
+                    services.TryAddSingleton<IRenderEngineFactory, SingletonRenderEngineFactory>();
+                };
+
+                return this;
+            }
+
+            public JsEngineServiceBuilder UseCustomEngineFactory<T>() where T: class, IRenderEngineFactory
+            {
+                if (_engineFactoryAction != null)
+                    throw new Exception("You have already registered an engine factory.");
+
+                _engineFactoryAction = services =>
+                {
+                    services.TryAddSingleton<IRenderEngineFactory, T>();
+                };
+
+                return this;
+            }
+
+            public JsEngineServiceBuilder UseNodeRenderEngine(Action<NodeRenderEngineOptions> nodeRenderOptionsAction = null)
+            {
+                if (_renderEngineBuilderAction != null)
+                    throw new Exception("You have already registered an engine builder.");
+
+                _renderEngineBuilderAction = services =>
+                {
+                    services.TryAddTransient<IRenderEngineBuilder, NodeRenderEngineBuilder>();
+                };
+
+                return this;
+            }
+
+            public JsEngineServiceBuilder UseRenderEngine<T>() where T: class, IRenderEngineBuilder
+            {
+                if (_renderEngineBuilderAction != null)
+                    throw new Exception("You have already registered an engine builder.");
+
+                _renderEngineBuilderAction = services =>
+                {
+                    services.TryAddTransient<IRenderEngineBuilder, T>();
+                };
+
+                return this;
+            }
+
+            internal void Register(IServiceCollection services)
+            {
+                if(_engineFactoryAction == null)
+                    throw new Exception("You must specific an engine factory using 'Use(.*)EngineFactory()' methods.");
+
+                if (_renderEngineBuilderAction == null)
+                    throw new Exception("You must specific an engine builder using 'Use(.*)RenderEngine()' methods.");
+
+                _engineFactoryAction(services);
+                _renderEngineBuilderAction(services);
+
+                services.TryAddEnumerable(ServiceDescriptor.Transient<IConfigureOptions<MvcViewOptions>, JavaScriptViewEngineMvcViewOptionsSetup>());
+                services.TryAddTransient<IFileWatcher, FileWatcher>();
+                services.TryAddTransient<IJsViewEngine, JsViewEngine>();
+            }
+        }
+
         #endif
     }
 }


Added Memo() for 0-arg Func

Added Memo() for 0-arg Func

--- src/KitchenSink/Operators.Functions.cs
+++ src/KitchenSink/Operators.Functions.cs
@@ -230,6 +230,15 @@
         /// </summary>
         public static Func<B, C, A, Z> RotateBack<A, B, C, Z>(Func<A, B, C, Z> f) =>
             (b, c, a) => f(a, b, c);
+
+        /// <summary>
+        /// Wrap function with memoizing cache.
+        /// </summary>
+        public static Func<Z> Memo<Z>(Func<Z> f)
+        {
+            var cache = new Lazy<Z>(f);
+            return () => cache.Value;
+        }

         /// <summary>
         /// Wrap function with memoizing cache.


cleanup

cleanup

--- Assets/Watson/Widgets/Question/Elements/EvidenceItem.cs
+++ Assets/Watson/Widgets/Question/Elements/EvidenceItem.cs
@@ -114,7 +114,14 @@
 			}
 		}

-
+		/// <summary>
+		/// Delayed outline because of rect size.
+		/// </summary>
+		/// <returns>The text gen.</returns>
+		/// <param name="tf">Tf.</param>
+		/// <param name="textGen">Text gen.</param>
+		/// <param name="answer">Answer.</param>
+		/// <param name="delayTime">Delay time.</param>
 		private IEnumerator PopulateTextGen(Text tf, TextGenerator textGen, string answer, float delayTime)
 		{
 			yield return new WaitForSeconds(delayTime);
@@ -134,13 +141,6 @@
 				Vector3 topLeft = textGen.verts[answerList[i] * 4].position;
 				Vector3 bottomRight = textGen.verts[((answerList[i] + answer.Length - 1) * 4) + 2].position;

-//				GameObject bb1= Instantiate(m_BoundingBox, topLeft, Quaternion.identity) as GameObject;
-//				GameObject bb2= Instantiate(m_BoundingBox, bottomRight, Quaternion.identity) as GameObject;
-//				RectTransform bb1RectTransform = bb1.GetComponent<RectTransform>();
-//				RectTransform bb2RectTransform = bb2.GetComponent<RectTransform>();
-//				bb1RectTransform.SetParent(tf.gameObject.transform, false);
-//				bb2RectTransform.SetParent(tf.gameObject.transform, false);
-

 				//	create bounding box at answer location
 				GameObject boundingBox = Instantiate(m_BoundingBox,


Do not drop column in u2f migration if not possible (#813)

closes #812

--- BTCPayServer/Migrations/20190425081749_AddU2fDevices.cs
+++ BTCPayServer/Migrations/20190425081749_AddU2fDevices.cs
@@ -7,9 +7,12 @@
     {
         protected override void Up(MigrationBuilder migrationBuilder)
         {
-            migrationBuilder.DropColumn(
-                name: "Facade",
-                table: "PairedSINData");
+            if (this.SupportDropColumn(migrationBuilder.ActiveProvider))
+            {
+                migrationBuilder.DropColumn(
+                    name: "Facade",
+                    table: "PairedSINData");
+            }

             migrationBuilder.CreateTable(
                 name: "U2FDevices",
@@ -44,11 +47,14 @@
         {
             migrationBuilder.DropTable(
                 name: "U2FDevices");
-
-            migrationBuilder.AddColumn<string>(
-                name: "Facade",
-                table: "PairedSINData",
-                nullable: true);
+            //if it did not support dropping it, then it is still here and re-adding it would throw
+            if (this.SupportDropColumn(migrationBuilder.ActiveProvider))
+            {
+                migrationBuilder.AddColumn<string>(
+                    name: "Facade",
+                    table: "PairedSINData",
+                    nullable: true);
+            }
         }
     }
 }


Use Buffer.BlockCopy instead of Array.Copy for byte arrays.

--- PsFtpProvider/ContentReaderWriter.cs
+++ PsFtpProvider/ContentReaderWriter.cs
@@ -225,7 +225,7 @@

 			var slice = new byte[read];

-			Array.Copy(buffer, slice, read);
+			Buffer.BlockCopy(buffer, 0, slice, 0, read);

 			return slice;
 		}


Done EthernetPacket api docs

Done EthernetPacket api docs

--- source/Cosmos.System2/Network/EthernetPacket.cs
+++ source/Cosmos.System2/Network/EthernetPacket.cs
@@ -4,21 +4,40 @@
 namespace Cosmos.System.Network
 {
     // for more info, http://standards.ieee.org/about/get/802/802.3.html
+    /// <summary>
+    /// EthernetPacket class.
+    /// </summary>
     public class EthernetPacket
     {
+        /// <summary>
+        /// Source MAC address.
+        /// </summary>
         protected MACAddress srcMAC;
+        /// <summary>
+        /// Destination MAC address.
+        /// </summary>
         protected MACAddress destMAC;

+        /// <summary>
+        /// Create new inctanse of the <see cref="EthernetPacket"/> class.
+        /// </summary>
         protected EthernetPacket()
         {
         }

+        /// <summary>
+        /// Create new inctanse of the <see cref="EthernetPacket"/> class, with specified raw data.
+        /// </summary>
+        /// <param name="rawData">Raw data.</param>
         protected EthernetPacket(byte[] rawData)
         {
             RawData = rawData;
             initFields();
         }

+        /// <summary>
+        /// Init EthernetPacket fields.
+        /// </summary>
         protected virtual void initFields()
         {
             destMAC = new MACAddress(RawData, 0);
@@ -26,11 +45,23 @@
             EthernetType = (ushort)((RawData[12] << 8) | RawData[13]);
         }

+        /// <summary>
+        /// Create new inctanse of the <see cref="EthernetPacket"/> class, with specified type and size.
+        /// </summary>
+        /// <param name="type">Type.</param>
+        /// <param name="packet_size">Size.</param>
         protected EthernetPacket(ushort type, int packet_size)
             : this(MACAddress.None, MACAddress.None, type, packet_size)
         {
         }

+        /// <summary>
+        /// Create new inctanse of the <see cref="EthernetPacket"/> class, with specified dsetination, source, type and size.
+        /// </summary>
+        /// <param name="dest">Destination.</param>
+        /// <param name="src">Source.</param>
+        /// <param name="type">Type.</param>
+        /// <param name="packet_size">Size.</param>
         protected EthernetPacket(MACAddress dest, MACAddress src, ushort type, int packet_size)
         {
             RawData = new byte[packet_size];
@@ -45,8 +76,14 @@
             initFields();
         }

+        /// <summary>
+        /// Get raw data byte array.
+        /// </summary>
         internal byte[] RawData { get; }

+        /// <summary>
+        /// Get and set source MAC address.
+        /// </summary>
         internal MACAddress SourceMAC
         {
             get => srcMAC;
@@ -59,6 +96,10 @@
                 initFields();
             }
         }
+
+        /// <summary>
+        /// Get and set destination MAC address.
+        /// </summary>
         internal MACAddress DestinationMAC
         {
             get => destMAC;
@@ -72,10 +113,14 @@
             }
         }

+        /// <summary>
+        /// Get packet type.
+        /// </summary>
         internal ushort EthernetType { get; private set; }

         /// <summary>
-        /// Calculate any checksums
+        /// Prepare packet for sending.
+        /// Not implemented.
         /// </summary>
         public virtual void PrepareForSending()
         {
@@ -83,6 +128,10 @@

         }

+        /// <summary>
+        /// To string.
+        /// </summary>
+        /// <returns>string value.</returns>
         public override string ToString()
         {
             return "Ethernet Packet : Src=" + srcMAC + ", Dest=" + destMAC + ", Type=" + EthernetType;


バージョン調整

バージョン調整

--- source/MetroRadiance/Properties/AssemblyInfo.cs
+++ source/MetroRadiance/Properties/AssemblyInfo.cs
@@ -47,5 +47,5 @@
 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
 // 既定値にすることができます:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.2")]
-[assembly: AssemblyInformationalVersion("2.0.2-alpha")]
+[assembly: AssemblyVersion("2.0.3")]
+[assembly: AssemblyInformationalVersion("2.0.3-alpha")]


#131 Further fix

#131 Further fix

--- RDFSharp/Model/Serializers/RDFXml.cs
+++ RDFSharp/Model/Serializers/RDFXml.cs
@@ -22,9 +22,9 @@
 using System.Text;
 using System.Xml;
 using System.Web;
-using System.Text.RegularExpressions;
-
-namespace RDFSharp.Model
+using System.Text.RegularExpressions;
+
+namespace RDFSharp.Model
 {

     /// <summary>
@@ -426,7 +426,7 @@
                         Uri xmlBase = null;
                         if (xmlnsAttrs != null && xmlnsAttrs.Count > 0)
                         {
-                            var xmlBaseAttr = (rdfRDF.Attributes?[RDFVocabulary.XML.PREFIX + ":base"]
+                            var xmlBaseAttr = (rdfRDF.Attributes?[RDFVocabulary.XML.PREFIX + ":base"]
                                                     ?? rdfRDF.Attributes?["xmlns"]);
                             if (xmlBaseAttr != null)
                             {
@@ -446,8 +446,11 @@

                         #region elements
                         //Parse resource elements, which are the children of root node
-                        if (rdfRDF.HasChildNodes)
-                            ParseNodeList(rdfRDF.ChildNodes, result, xmlBase);
+                        if (rdfRDF.HasChildNodes)
+                        {
+                            XmlAttribute xmlLangRoot = GetXmlLangAttribute(rdfRDF);
+                            ParseNodeList(rdfRDF.ChildNodes, result, xmlBase, xmlLangRoot);
+                        }
                         #endregion

                     }
@@ -468,7 +471,7 @@
         /// <summary>
         /// Parses the given list of nodes
         /// </summary>
-        private static List<RDFResource> ParseNodeList(XmlNodeList nodeList, RDFGraph result, Uri xmlBase)
+        private static List<RDFResource> ParseNodeList(XmlNodeList nodeList, RDFGraph result, Uri xmlBase, XmlAttribute xmlLangParent)
         {
             var subjects = new List<RDFResource>();
             var subjNodesEnum = nodeList.GetEnumerator();
@@ -484,6 +487,7 @@
                     continue;

                 //Assert resource as subject
+                XmlAttribute xmlLangSubj = GetXmlLangAttribute(subjNode) ?? xmlLangParent;
                 RDFResource subj = GetSubjectNode(subjNode, xmlBase, result);
                 if (subj == null)
                     subj = new RDFResource();
@@ -491,7 +495,44 @@
                 #endregion

                 #region predObjList
-                //Parse pred elements, which are the childs of subj element
+                //Parse predicate elements (attributes)
+                if (subjNode.Attributes?.Count > 0)
+                {
+                    List<XmlAttribute> subjAttributes = subjNode.Attributes.OfType<XmlAttribute>().ToList();
+                    subjAttributes.ForEach(subjAttr =>
+                    {
+                        switch (subjAttr.Name.ToLower())
+                        {
+                            //Skip reserved attributes
+                            case "rdf:about":
+                            case "rdf:resource":
+                            case "rdf:id":
+                            case "rdf:nodeid":
+                            case "xml:lang":
+                                break;
+
+                            //Threat rdf:type attribute as SPO
+                            case "rdf:type":
+                                Uri rdfTypeValue = RDFModelUtilities.GetUriFromString(subjAttr.Value);
+                                if (rdfTypeValue != null)
+                                {
+                                    RDFResource obj = new RDFResource(rdfTypeValue.ToString());
+                                    result.AddTriple(new RDFTriple(subj, RDFVocabulary.RDF.TYPE, obj));
+                                }
+                                break;
+
+                            //Threat other attributes as SPL
+                            default:
+                                RDFResource subjAttrPred = subjAttr.NamespaceURI == String.Empty ? new RDFResource(xmlBase + subjAttr.LocalName)
+                                                                                : new RDFResource(subjAttr.NamespaceURI + subjAttr.LocalName);
+                                RDFPlainLiteral plit = new RDFPlainLiteral(RDFModelUtilities.ASCII_To_Unicode(HttpUtility.HtmlDecode(subjAttr.Value)), xmlLangSubj?.Value);
+                                result.AddTriple(new RDFTriple(subj, subjAttrPred, plit));
+                                break;
+                        }
+                    });
+                }
+
+                //Parse predicate elements (child nodes)
                 if (subjNode.HasChildNodes)
                 {
                     IEnumerator predNodesEnum = subjNode.ChildNodes.GetEnumerator();
@@ -508,6 +549,7 @@
                             continue;

                         //Get the predicate
+                        XmlAttribute xmlLangPred = GetXmlLangAttribute(predNode) ?? xmlLangSubj;
                         if (predNode.NamespaceURI == String.Empty)
                             pred = new RDFResource(xmlBase + predNode.LocalName);
                         else
@@ -515,56 +557,12 @@
                                                                             : new RDFResource(predNode.NamespaceURI + predNode.LocalName));
                         #endregion

-                        #region object
-                        //Check if there is a "rdf:about" or a "rdf:resource" attribute
-                        XmlAttribute rdfObject = (GetRdfAboutAttribute(predNode) ?? GetRdfResourceAttribute(predNode));
-                        if (rdfObject != null)
-                        {
-                            //Attribute found, but we must check if it is "rdf:ID", "rdf:nodeID" or a relative Uri
-                            String rdfObjectValue = ResolveRelativeNode(rdfObject, xmlBase);
-                            RDFResource obj = new RDFResource(rdfObjectValue);
-                            result.AddTriple(new RDFTriple(subj, pred, obj));
-                            continue;
-                        }
-                        #endregion
-
-                        #region typed literal
-                        //Check if there is a "rdf:datatype" attribute
-                        XmlAttribute rdfDatatype = GetRdfDatatypeAttribute(predNode);
-                        if (rdfDatatype != null)
-                        {
-                            var dtype = RDFModelUtilities.GetDatatypeFromString(rdfDatatype.Value);
-                            RDFTypedLiteral tLit = new RDFTypedLiteral(RDFModelUtilities.ASCII_To_Unicode(HttpUtility.HtmlDecode(predNode.InnerText)), dtype);
-                            result.AddTriple(new RDFTriple(subj, pred, tLit));
-                            continue;
-                        }
-                        //Check if there is a "rdf:parseType=Literal" attribute
-                        XmlAttribute parseLiteral = GetParseTypeLiteralAttribute(predNode);
-                        if (parseLiteral != null)
-                        {
-                            RDFTypedLiteral tLit = new RDFTypedLiteral(RDFModelUtilities.ASCII_To_Unicode(HttpUtility.HtmlDecode(predNode.InnerXml)), RDFModelEnums.RDFDatatypes.RDFS_LITERAL);
-                            result.AddTriple(new RDFTriple(subj, pred, tLit));
-                            continue;
-                        }
-                        #endregion
-
-                        #region plain literal
-                        //Check if there is a "xml:lang" attribute, or if a unique textual child
-                        XmlAttribute xmlLang = GetXmlLangAttribute(predNode);
-                        if (xmlLang != null || (predNode.HasChildNodes && predNode.ChildNodes.Count == 1 && predNode.ChildNodes[0].NodeType == XmlNodeType.Text))
-                        {
-                            RDFPlainLiteral pLit = new RDFPlainLiteral(RDFModelUtilities.ASCII_To_Unicode(HttpUtility.HtmlDecode(predNode.InnerText)), (xmlLang != null ? xmlLang.Value : String.Empty));
-                            result.AddTriple(new RDFTriple(subj, pred, pLit));
-                            continue;
-                        }
-                        #endregion
-
                         #region collection
                         //Check if there is a "rdf:parseType=Collection" attribute
                         XmlAttribute rdfCollect = GetParseTypeCollectionAttribute(predNode);
                         if (rdfCollect != null)
                         {
-                            ParseCollectionElements(xmlBase, predNode, subj, pred, result);
+                            ParseCollectionElements(xmlBase, predNode, subj, pred, result, xmlLangPred);
                             continue;
                         }
                         #endregion
@@ -584,11 +582,54 @@
                         }
                         #endregion

+                        #region object
+                        //Check if there is a "rdf:about" or a "rdf:resource" attribute
+                        XmlAttribute rdfObject = (GetRdfAboutAttribute(predNode) ?? GetRdfResourceAttribute(predNode));
+                        if (rdfObject != null)
+                        {
+                            //Attribute found, but we must check if it is "rdf:ID", "rdf:nodeID" or a relative Uri
+                            String rdfObjectValue = ResolveRelativeNode(rdfObject, xmlBase);
+                            RDFResource obj = new RDFResource(rdfObjectValue);
+                            result.AddTriple(new RDFTriple(subj, pred, obj));
+                            continue;
+                        }
+                        #endregion
+
+                        #region typed literal
+                        //Check if there is a "rdf:datatype" attribute
+                        XmlAttribute rdfDatatype = GetRdfDatatypeAttribute(predNode);
+                        if (rdfDatatype != null)
+                        {
+                            var dtype = RDFModelUtilities.GetDatatypeFromString(rdfDatatype.Value);
+                            RDFTypedLiteral tLit = new RDFTypedLiteral(RDFModelUtilities.ASCII_To_Unicode(HttpUtility.HtmlDecode(predNode.InnerText)), dtype);
+                            result.AddTriple(new RDFTriple(subj, pred, tLit));
+                            continue;
+                        }
+                        //Check if there is a "rdf:parseType=Literal" attribute
+                        XmlAttribute parseLiteral = GetParseTypeLiteralAttribute(predNode);
+                        if (parseLiteral != null)
+                        {
+                            RDFTypedLiteral tLit = new RDFTypedLiteral(RDFModelUtilities.ASCII_To_Unicode(HttpUtility.HtmlDecode(predNode.InnerXml)), RDFModelEnums.RDFDatatypes.RDFS_LITERAL);
+                            result.AddTriple(new RDFTriple(subj, pred, tLit));
+                            continue;
+                        }
+                        #endregion
+
+                        #region plain literal
+                        //Check if there is a unique textual child
+                        if (predNode.HasChildNodes && predNode.ChildNodes.Count == 1 && predNode.ChildNodes[0].NodeType == XmlNodeType.Text)
+                        {
+                            RDFPlainLiteral pLit = new RDFPlainLiteral(RDFModelUtilities.ASCII_To_Unicode(HttpUtility.HtmlDecode(predNode.InnerText)), xmlLangPred?.Value);
+                            result.AddTriple(new RDFTriple(subj, pred, pLit));
+                            continue;
+                        }
+                        #endregion
+
                         #region nested description
                         //At last, check for nested resource descriptions
                         if (predNode.HasChildNodes)
                         {
-                            var nestedSubjects = ParseNodeList(predNode.ChildNodes, result, xmlBase);
+                            var nestedSubjects = ParseNodeList(predNode.ChildNodes, result, xmlBase, xmlLangPred);
                             foreach (var nestedSubject in nestedSubjects)
                                 result.AddTriple(new RDFTriple(subj, pred, nestedSubject));
                         }
@@ -633,8 +674,8 @@
                 while (iEnum != null && iEnum.MoveNext())
                 {
                     XmlAttribute attr = (XmlAttribute)iEnum.Current;
-                    if (attr.LocalName.ToUpperInvariant() != "XMLNS"
-                            && attr.LocalName.ToUpperInvariant() != "XML")
+                    if (attr.Prefix.ToUpperInvariant() != "XMLNS"
+                            && attr.Prefix.ToUpperInvariant() != "XML")
                     {

                         //Try to resolve the current namespace against the namespace register;
@@ -740,8 +781,8 @@
             {

                 //We are interested in finding the "rdf:about" or "rdf:resource" node for the subj
-                XmlAttribute rdfAbout =
-                    (GetRdfAboutAttribute(subjNode)
+                XmlAttribute rdfAbout =
+                    (GetRdfAboutAttribute(subjNode)
                         ?? GetRdfResourceAttribute(subjNode));
                 if (rdfAbout != null)
                 {
@@ -758,11 +799,11 @@
                 {
                     RDFResource obj = null;
                     if (subjNode.NamespaceURI == String.Empty)
-                    {
+                    {
                         obj = new RDFResource(xmlBase + subjNode.LocalName);
                     }
                     else
-                    {
+                    {
                         obj = new RDFResource(subjNode.NamespaceURI + subjNode.LocalName);
                     }
                     result.AddTriple(new RDFTriple(subj, RDFVocabulary.RDF.TYPE, obj));
@@ -781,15 +822,15 @@
                 {
                     RDFResource obj = null;
                     if (subjNode.NamespaceURI == String.Empty)
-                    {
+                    {
                         obj = new RDFResource(xmlBase + subjNode.LocalName);
                     }
                     else
-                    {
+                    {
                         obj = new RDFResource(subjNode.NamespaceURI + subjNode.LocalName);
                     }
                     result.AddTriple(new RDFTriple(subj, RDFVocabulary.RDF.TYPE, obj));
-                }
+                }
             }

             return subj;
@@ -928,7 +969,7 @@
         /// to build its standard reification triples.
         /// </summary>
         private static void ParseCollectionElements(Uri xmlBase, XmlNode predNode, RDFResource subj,
-                                                     RDFResource pred, RDFGraph result)
+                                                     RDFResource pred, RDFGraph result, XmlAttribute xmlLangSubj)
         {
             //Attach the collection as the blank object of the current predicate
             RDFResource obj = new RDFResource();
@@ -939,7 +980,8 @@
             //we can iterate detected collection items as resources
             if (predNode.HasChildNodes)
             {
-                var elems = ParseNodeList(predNode.ChildNodes, result, xmlBase);
+                XmlAttribute xmlLangPred = GetXmlLangAttribute(predNode) ?? xmlLangSubj;
+                List<RDFResource> elems = ParseNodeList(predNode.ChildNodes, result, xmlBase, xmlLangPred);
                 foreach (RDFResource elem in elems)
                 {
                     // obj -> rdf:type -> rdf:list


cleaned up algo, added double letters

cleaned up algo, added double letters

--- RandomExtensions/RandomExtensions.cs
+++ RandomExtensions/RandomExtensions.cs
@@ -69,29 +69,40 @@
 			//Get the length of the name we are gonna generate
 			int nameLength = rand.Next(minLength, maxLength);

-			//create an empty name
-			char[] name = new char[nameLength];
+			//create an empty word
+			StringBuilder name = new StringBuilder();

 			// The letters to choose from.  we add more of some so that we are more likely to get those letters
-			const string consonants = "bbcddfgghhjklmmnnppqrrssssttttvwxz";
-			const string vowels = "aaaeeeiioouy";
+			string[] consonants = new string[]
+			{
+				"b", "b", "c", "d", "d", "f","g","g","h","h","j","k","l","m","m","n","n","p","p","qu","r","r","s","s","s","t","t","t","v","w","x","z",
+				"ck", "ck", "sh", "ch", "nn", "gh", "ll", "st", "st", "mn", "sp", "sp","ss", "tt"
+			};
+			string[] vowels = new string[]
+			{
+				"a","a","a","e","e","e","i","i","o","o","u","y",
+				"ou", "ea", "oo"
+			};

 			//Should this name start with a consonant?
-			int startConsonant = rand.Next(0, 2);
+			bool startConsonant = 0 == rand.Next(0, 2);

 			//first fill the name with random consonants
-			for (int i = startConsonant; i < nameLength; i += 2)
+			while (name.Length < nameLength)
 			{
-				name[i] = consonants[rand.Next(0, consonants.Count())];
+				//do we want a consonant or a vowel?
+				if (startConsonant)
+				{
+					name.Append(consonants[rand.Next(0, consonants.Count())]);
+				}
+				else
+				{
+					name.Append(vowels[rand.Next(0, vowels.Count())]);
+				}
+				startConsonant = !startConsonant;
 			}

-			//Every other letter is a vowel
-			for (int i = 1 - startConsonant; i < nameLength; i += 2)
-			{
-				name[i] = vowels[rand.Next(0, vowels.Count())];
-			}
-
-			return new string(name);
+			return name.ToString();
 		}

 		/// <summary>


added null check for entryPointPath

added null check for entryPointPath

return empty string is entry point is not found

--- RequireJsNet/RequireJsHtmlHelpers.cs
+++ RequireJsNet/RequireJsHtmlHelpers.cs
@@ -15,7 +15,7 @@
 using System.Text;
 using System.Web.Mvc;
 using System;
-
+using Microsoft.SqlServer.Server;
 using RequireJsNet;
 using RequireJsNet.Configuration;
 using RequireJsNet.Helpers;
@@ -51,48 +51,60 @@
             IList<string> configsList, IRequireJsLogger logger = null)
         {
             var entryPointPath = html.RequireJsEntryPoint();
-            if (!configsList.Any())
+
+            if (entryPointPath != null)
             {
-                throw new Exception("No config files to load.");
+                if (!configsList.Any())
+                {
+                    throw new Exception("No config files to load.");
+                }
+                var processedConfigs = configsList.Select(r =>
+                {
+                    var resultingPath = html.ViewContext.HttpContext.MapPath(r);
+                    PathHelpers.VerifyFileExists(resultingPath);
+                    return resultingPath;
+                }).ToList();
+
+                var loader = new ConfigLoader(processedConfigs, logger);
+                var resultingConfig = loader.Get();
+                var outputConfig = new JsonConfig
+                {
+                    BaseUrl = baseUrl,
+                    Locale = html.CurrentCulture(),
+                    Paths = resultingConfig.Paths.PathList.ToDictionary(r => r.Key, r => r.Value),
+                    Shim = resultingConfig.Shim.ShimEntries.ToDictionary(r => r.For, r => new JsonRequireDeps
+                    {
+                        Dependencies = r.Dependencies.Select(x => x.Dependency).ToList(),
+                        Exports = r.Exports
+                    }),
+                    Map =
+                        resultingConfig.Map.MapElements.ToDictionary(r => r.For,
+                            r => r.Replacements.ToDictionary(x => x.OldKey, x => x.NewKey))
+                };
+
+                var options = new JsonRequireOptions
+                {
+                    Locale = html.CurrentCulture(),
+                    PageOptions = html.ViewBag.PageOptions,
+                    WebsiteOptions = html.ViewBag.GlobalOptions
+                };
+
+                var configBuilder = new JavaScriptBuilder();
+                configBuilder.AddStatement(JavaScriptHelpers.SerializeAsVariable(options, "requireConfig"));
+                configBuilder.AddStatement(JavaScriptHelpers.SerializeAsVariable(outputConfig, "require"));
+
+                var requireRootBuilder = new JavaScriptBuilder();
+                requireRootBuilder.AddAttributesToStatement("data-main", entryPointPath.ToString());
+                requireRootBuilder.AddAttributesToStatement("src", requireUrl);
+
+                return new MvcHtmlString(configBuilder.Render() + requireRootBuilder.Render());
+
             }
-            var processedConfigs = configsList.Select(r =>
+            else
             {
-                var resultingPath = html.ViewContext.HttpContext.MapPath(r);
-                PathHelpers.VerifyFileExists(resultingPath);
-                return resultingPath;
-            }).ToList();
+                return new MvcHtmlString(string.Empty);
+            }

-            var loader = new ConfigLoader(processedConfigs, logger);
-            var resultingConfig = loader.Get();
-            var outputConfig = new JsonConfig
-            {
-                BaseUrl = baseUrl,
-                Locale = html.CurrentCulture(),
-                Paths = resultingConfig.Paths.PathList.ToDictionary(r => r.Key, r => r.Value),
-                Shim = resultingConfig.Shim.ShimEntries.ToDictionary(r => r.For, r => new JsonRequireDeps
-                                                                                {
-                                                                                Dependencies = r.Dependencies.Select(x => x.Dependency).ToList(),
-                                                                                Exports = r.Exports
-                                                                                }),
-                Map = resultingConfig.Map.MapElements.ToDictionary(r => r.For, r => r.Replacements.ToDictionary(x => x.OldKey, x => x.NewKey))
-            };
-
-            var options = new JsonRequireOptions
-            {
-                Locale = html.CurrentCulture(),
-                PageOptions = html.ViewBag.PageOptions,
-                WebsiteOptions = html.ViewBag.GlobalOptions
-            };
-
-            var configBuilder = new JavaScriptBuilder();
-            configBuilder.AddStatement(JavaScriptHelpers.SerializeAsVariable(options, "requireConfig"));
-            configBuilder.AddStatement(JavaScriptHelpers.SerializeAsVariable(outputConfig, "require"));
-
-            var requireRootBuilder = new JavaScriptBuilder();
-            requireRootBuilder.AddAttributesToStatement("data-main", entryPointPath.ToString());
-            requireRootBuilder.AddAttributesToStatement("src", requireUrl);
-
-            return new MvcHtmlString(configBuilder.Render() + requireRootBuilder.Render());
         }

         public static MvcHtmlString RequireJsEntryPoint(this HtmlHelper html)


Simplify code: no need to cache the collection view

git-tfs-id: [https://tfs.codeplex.com:443/tfs/TFS36]$/ResXResourceManager/Main;C37377

--- ResXManager.Model/ResourceManager.cs
+++ ResXManager.Model/ResourceManager.cs
@@ -46,7 +46,6 @@
         private readonly ObservableCollection<CultureKey> _cultureKeys = new ObservableCollection<CultureKey>();

         private string _snapshot;
-        private CollectionView _groupedResourceTableEntries;

         public event EventHandler<ResourceBeginEditingEventArgs> BeginEditing;
         public event EventHandler<EventArgs> Loaded;
@@ -127,7 +126,18 @@
             }
         }

-        public CollectionView GroupedResourceTableEntries => _groupedResourceTableEntries ?? (_groupedResourceTableEntries = CreateGroupedListCollectionView());
+        public CollectionView GroupedResourceTableEntries
+        {
+            get
+            {
+                CollectionView collectionView = new ListCollectionView((IList)_resourceTableEntries);
+
+                // ReSharper disable once PossibleNullReferenceException
+                collectionView.GroupDescriptions.Add(new PropertyGroupDescription("Container"));
+
+                return collectionView;
+            }
+        }

         public ObservableCollection<CultureKey> CultureKeys
         {
@@ -431,16 +441,6 @@
             Contract.Ensures(Contract.Result<string>() != null);

             return _snapshot = ResourceEntities.CreateSnapshot();
-        }
-
-        private ListCollectionView CreateGroupedListCollectionView()
-        {
-            var collectionView = new ListCollectionView((IList)_resourceTableEntries);
-
-            // ReSharper disable once PossibleNullReferenceException
-            collectionView.GroupDescriptions.Add(new PropertyGroupDescription("Container"));
-
-            return collectionView;
         }

         [ContractInvariantMethod]


Fix #187 - Support for generating 'new Image()' script

--- src/Libraries/Web/Html/ImageElement.cs
+++ src/Libraries/Web/Html/ImageElement.cs
@@ -10,9 +10,16 @@

     [IgnoreNamespace]
     [Imported]
+    [ScriptName("Image")]
     public sealed class ImageElement : Element {

-        private ImageElement() {
+        public ImageElement() {
+        }
+
+        public ImageElement(int width) {
+        }
+
+        public ImageElement(int width, int height) {
         }

         [IntrinsicProperty]


Simplify stream fetching

Simplify stream fetching

--- osu.Framework.Tests/Visual/Sprites/TestSceneVideoLayout.cs
+++ osu.Framework.Tests/Visual/Sprites/TestSceneVideoLayout.cs
@@ -2,7 +2,6 @@
 // See the LICENCE file in the repository root for full licence text.

 using System;
-using System.IO;
 using osu.Framework.Allocation;
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.Containers;
@@ -23,20 +22,20 @@
         [BackgroundDependencyLoader]
         private void load(Game game)
         {
-            byte[] videoData = game.Resources.Get("Videos/sample-video.mp4");
+            const string video_path = "Videos/sample-video.mp4";

-            Cell(0, 0).Child = createTest("video - auto size", () => new TestVideo(new MemoryStream(videoData)));
-            Cell(0, 1).Child = createTest("video - relative size + fit", () => new TestVideo(new MemoryStream(videoData))
+            Cell(0, 0).Child = createTest("video - auto size", () => new TestVideo(game.Resources.GetStream(video_path)));
+            Cell(0, 1).Child = createTest("video - relative size + fit", () => new TestVideo(game.Resources.GetStream(video_path))
             {
                 RelativeSizeAxes = Axes.Both,
                 FillMode = FillMode.Fit
             });
-            Cell(0, 2).Child = createTest("video - relative size + fill", () => new TestVideo(new MemoryStream(videoData))
+            Cell(0, 2).Child = createTest("video - relative size + fill", () => new TestVideo(game.Resources.GetStream(video_path))
             {
                 RelativeSizeAxes = Axes.Both,
                 FillMode = FillMode.Fill
             });
-            Cell(0, 3).Child = createTest("video - fixed size", () => new TestVideo(new MemoryStream(videoData))
+            Cell(0, 3).Child = createTest("video - fixed size", () => new TestVideo(game.Resources.GetStream(video_path))
             {
                 Size = new Vector2(100, 50)
             });


Fix calculation of most common beat length for mania scroll speed

--- osu.Game/Rulesets/UI/Scrolling/DrawableScrollingRuleset.cs
+++ osu.Game/Rulesets/UI/Scrolling/DrawableScrollingRuleset.cs
@@ -116,25 +116,11 @@

             if (RelativeScaleBeatLengths)
             {
-                IReadOnlyList<TimingControlPoint> timingPoints = Beatmap.ControlPointInfo.TimingPoints;
-                double maxDuration = 0;
-
-                for (int i = 0; i < timingPoints.Count; i++)
-                {
-                    if (timingPoints[i].Time > lastObjectTime)
-                        break;
-
-                    double endTime = i < timingPoints.Count - 1 ? timingPoints[i + 1].Time : lastObjectTime;
-                    double duration = endTime - timingPoints[i].Time;
-
-                    if (duration > maxDuration)
-                    {
-                        maxDuration = duration;
-                        // The slider multiplier is post-multiplied to determine the final velocity, but for relative scale beat lengths
-                        // the multiplier should not affect the effective timing point (the longest in the beatmap), so it is factored out here
-                        baseBeatLength = timingPoints[i].BeatLength / Beatmap.Difficulty.SliderMultiplier;
-                    }
-                }
+                baseBeatLength = Beatmap.GetMostCommonBeatLength();
+
+                // The slider multiplier is post-multiplied to determine the final velocity, but for relative scale beat lengths
+                // the multiplier should not affect the effective timing point (the longest in the beatmap), so it is factored out here
+                baseBeatLength /= Beatmap.Difficulty.SliderMultiplier;
             }

             // Merge sequences of timing and difficulty control points to create the aggregate "multiplier" control point


Fix #5 (wrong PhotoSizeResponse null check)

--- Responses/Types/PhotoSizeResponse.cs
+++ Responses/Types/PhotoSizeResponse.cs
@@ -11,7 +11,7 @@

         internal static PhotoSizeResponse Parse(JsonData data)
         {
-            if (data == null || !data.Has("file_id") || data.Has("width") || data.Has("height"))
+            if (data == null || !data.Has("file_id") || !data.Has("width") || !data.Has("height"))
             {
                 return null;
             }


Dramatically more fixlike fix.

Dramatically more fixlike fix.

--- BepuPhysics/CollisionDetection/CollisionTasks/CylinderConvexHullTester.cs
+++ BepuPhysics/CollisionDetection/CollisionTasks/CylinderConvexHullTester.cs
@@ -12,16 +12,16 @@
         public int BatchSize => 16;

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        static void ProjectOntoCap(Vector3 capCenter, Vector3 capNormal, Vector3 capTangentX, Vector3 capTangentY, float inverseLocalNormalDotCapNormal, Vector3 localNormal, Vector3 point, out Vector2 projected)
+        static void ProjectOntoCap(Vector3 capCenter, in Matrix3x3 cylinderOrientation, float inverseLocalNormalDotAY, Vector3 localNormal, Vector3 point, out Vector2 projected)
         {
             var pointToCapCenter = capCenter - point;
-            var t = Vector3.Dot(pointToCapCenter, capNormal) * inverseLocalNormalDotCapNormal;
+            var t = Vector3.Dot(pointToCapCenter, cylinderOrientation.Y) * inverseLocalNormalDotAY;
             var projectionOffsetB = localNormal * t;
             var projectedPoint = point - projectionOffsetB;
             var capCenterToProjectedPoint = projectedPoint - capCenter;
             projected = new Vector2(
-                Vector3.Dot(capCenterToProjectedPoint, capTangentX),
-                Vector3.Dot(capCenterToProjectedPoint, capTangentY));
+                Vector3.Dot(capCenterToProjectedPoint, cylinderOrientation.X),
+                Vector3.Dot(capCenterToProjectedPoint, cylinderOrientation.Z));
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -122,14 +122,9 @@
             Vector3Wide.Scale(localNormal, depth, out var closestOnCylinderOffset);
             Vector3Wide.Subtract(closestOnHull, closestOnCylinderOffset, out var closestOnCylinder);
             Matrix3x3Wide.TransformByTransposedWithoutOverlap(localNormal, hullLocalCylinderOrientation, out var localNormalInA);
-            //The local normal always points toward the cylinder by convention. The cap normal points outward by convention.
-            //So the dot product is always negative.
-            var inverseLocalNormalDotCapNormal = new Vector<float>(-1f) / Vector.Abs(localNormalInA.Y);
+            var inverseLocalNormalDotCapNormal = Vector<float>.One / localNormalInA.Y;
             var useCap = Vector.GreaterThan(Vector.Abs(localNormalInA.Y), new Vector<float>(0.70710678118f));
             Unsafe.SkipInit(out Vector3Wide capCenter);
-            Unsafe.SkipInit(out Vector3Wide capNormal);
-            Unsafe.SkipInit(out Vector3Wide capTangentX);
-            Unsafe.SkipInit(out Vector3Wide capTangentY);
             Unsafe.SkipInit(out Vector2Wide interior0);
             Unsafe.SkipInit(out Vector2Wide interior1);
             Unsafe.SkipInit(out Vector2Wide interior2);
@@ -139,11 +134,6 @@
                 var useBottom = Vector.GreaterThan(localNormalInA.Y, Vector<float>.Zero);
                 Vector3Wide.Scale(hullLocalCylinderOrientation.Y, Vector.ConditionalSelect(useBottom, -a.HalfLength, a.HalfLength), out capCenter);
                 Vector3Wide.Add(capCenter, localOffsetA, out capCenter);
-                Vector3Wide.ConditionallyNegate(useBottom, cylinderOrientation.Y, out capNormal);
-                Vector3Wide.ConditionallyNegate(useBottom, cylinderOrientation.X, out capTangentX);
-                //Vector3Wide.ConditionallyNegate(useBottom, cylinderOrientation.Z, out capTangentY);
-                //capTangentX = cylinderOrientation.X;
-                capTangentY = cylinderOrientation.Z;

                 Vector3Wide.Subtract(closestOnCylinder, localOffsetA, out var hullLocalCylinderToClosestOnCylinder);
                 Matrix3x3Wide.TransformByTransposedWithoutOverlap(hullLocalCylinderToClosestOnCylinder, hullLocalCylinderOrientation, out var cylinderLocalCylinderToClosestOnCylinder);
@@ -194,20 +184,18 @@
                     var interiorPointsX = new Vector4(interior0Slot.X[0], interior1Slot.X[0], interior2Slot.X[0], interior3Slot.X[0]);
                     var interiorPointsY = new Vector4(interior0Slot.Y[0], interior1Slot.Y[0], interior2Slot.Y[0], interior3Slot.Y[0]);
                     var slotRadius = a.Radius[slotIndex];
-                    Vector3Wide.ReadSlot(ref capNormal, slotIndex, out var slotCapNormal);
-                    Vector3Wide.ReadSlot(ref capTangentX, slotIndex, out var slotCapTangentX);
-                    Vector3Wide.ReadSlot(ref capTangentY, slotIndex, out var slotCapTangentY);
+                    Matrix3x3Wide.ReadSlot(ref hullLocalCylinderOrientation, slotIndex, out var slotCylinderOrientation);

                     var previousIndex = faceVertexIndices[faceVertexIndices.Length - 1];
                     Vector3Wide.ReadSlot(ref hull.Points[previousIndex.BundleIndex], previousIndex.InnerIndex, out var hullFaceOrigin);
-                    ProjectOntoCap(slotCapCenter, slotCapNormal, slotCapTangentX, slotCapTangentY, slotInverseLocalNormalDotCapNormal, slotLocalNormal, hullFaceOrigin, out var previousVertex);
+                    ProjectOntoCap(slotCapCenter, slotCylinderOrientation, slotInverseLocalNormalDotCapNormal, slotLocalNormal, hullFaceOrigin, out var previousVertex);
                     var maximumInteriorContainmentDots = Vector4.Zero;

                     for (int i = 0; i < faceVertexIndices.Length; ++i)
                     {
                         var index = faceVertexIndices[i];
                         Vector3Wide.ReadSlot(ref hull.Points[index.BundleIndex], index.InnerIndex, out var hullVertex);
-                        ProjectOntoCap(slotCapCenter, slotCapNormal, slotCapTangentX, slotCapTangentY, slotInverseLocalNormalDotCapNormal, slotLocalNormal, hullVertex, out var vertex);
+                        ProjectOntoCap(slotCapCenter, slotCylinderOrientation, slotInverseLocalNormalDotCapNormal, slotLocalNormal, hullVertex, out var vertex);

                         //Test all the cap's interior points against this edge's plane normal (which, since we've projected the vertex, is just a perp dot product).
                         var hullEdgeOffset = vertex - previousVertex;
@@ -216,10 +204,13 @@
                         var hullEdgeOffsetX = new Vector4(hullEdgeOffset.X);
                         var hullEdgeOffsetY = new Vector4(hullEdgeOffset.Y);
                         var interiorPointContainmentDots = (interiorPointsX - previousStartX) * hullEdgeOffsetY - (interiorPointsY - previousStartY) * hullEdgeOffsetX;
+                        //If we're generating contacts with the bottom cap, then the visible winding of the hull is flipped and the containment signs will be negated.
+                        if (slotInverseLocalNormalDotCapNormal > 0)
+                            interiorPointContainmentDots *= -1;
                         maximumInteriorContainmentDots = Vector4.Max(interiorPointContainmentDots, maximumInteriorContainmentDots);

                         //Test the projected hull edge against the cap.
-                        if (false && IntersectLineCircle(previousVertex, hullEdgeOffset, slotRadius, out var tMin, out var tMax))
+                        if (IntersectLineCircle(previousVertex, hullEdgeOffset, slotRadius, out var tMin, out var tMax))
                         {
                             //We now have a convex hull edge interval. Add contacts for it.
                             //Create max contact if max >= min.


Build and publish Rock.Core nuget package

--- Rock.Core/Properties/AssemblyInfo.cs
+++ Rock.Core/Properties/AssemblyInfo.cs
@@ -33,7 +33,7 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("0.9.0.0")]
-[assembly: AssemblyFileVersion("0.9.7")]
-[assembly: AssemblyInformationalVersion("0.9.7")]
+[assembly: AssemblyFileVersion("0.9.8")]
+[assembly: AssemblyInformationalVersion("0.9.8")]

 [assembly: InternalsVisibleTo("Rock.Core.UnitTests")]


apparently, something weird was goofed up on mainwindow.xaml. changed testrunner slightly, to allow turning off running kernels through qemu

--- source/TestKernels/Cosmos.TestRunner/Program.cs
+++ source/TestKernels/Cosmos.TestRunner/Program.cs
@@ -26,6 +26,11 @@
             public bool Succeeded;

         }
+
+        /// <summary>
+        /// Determines if the test runner should run the kernel using qemu, or only compile (Basically useful for profiling purposes)
+        /// </summary>
+        private const bool RunKernel = true;
         public static void Main() {
             try {
                 Initialize();
@@ -35,25 +40,30 @@
                     string xMessage;
                     bool xReturn;
                     try {
-											var xBuilder = new Builder() {
-													BuildPath = Options.BuildPath,
-													UseInternalAssembler = false
-											};
-											xBuilder.TargetAssembly = xItem.Key.Assembly;
-											var xEvent = new AutoResetEvent(false);
-											xBuilder.CompileCompleted += delegate { xEvent.Set(); };
-											xBuilder.BeginCompile(DebugMode.None, 0, false);
-											xEvent.WaitOne();
-											xBuilder.Assemble();
-											xBuilder.Link();
-											xBuilder.MakeISO();
-											var xISOFile = Path.Combine(xBuilder.BuildPath, "Cosmos.iso");
-											// run qemu
-											xReturn = RunKernel(xItem.Key, xBuilder, xItem.Value, out xMessage);
-										} catch (Exception E){
-											xMessage = E.ToString();
-											xReturn = false;
-										}
+                        var xBuilder = new Builder() {
+                            BuildPath = Options.BuildPath,
+                            UseInternalAssembler = false
+                        };
+                        xBuilder.TargetAssembly = xItem.Key.Assembly;
+                        var xEvent = new AutoResetEvent(false);
+                        xBuilder.CompileCompleted += delegate { xEvent.Set(); };
+                        xBuilder.BeginCompile(DebugMode.None, 0, false);
+                        xEvent.WaitOne();
+                        if (RunKernel) {
+                            xBuilder.Assemble();
+                            xBuilder.Link();
+                            xBuilder.MakeISO();
+                            var xISOFile = Path.Combine(xBuilder.BuildPath, "Cosmos.iso");
+                            // run qemu
+                            xReturn = RunKernel(xItem.Key, xBuilder, xItem.Value, out xMessage);
+                        } else {
+                            xReturn = true;
+                            xMessage = "";
+                        }
+                    } catch (Exception E) {
+                        xMessage = E.ToString();
+                        xReturn = false;
+                    }
                     xResults.Add(new TestResults {
                         Name = xItem.Key.Assembly.GetName().Name,
                         Message = xMessage,
@@ -63,7 +73,7 @@
                 WriteResults(xResults);
             } catch (Exception E) {
                 Console.WriteLine(E.ToString());
-						}
+            }
         }

         private static void WriteResults(List<TestResults> results) {


Release first version of the package.

Release first version of the package.

--- source/Wcf.Behaviors/Properties/AssemblyInfo.cs
+++ source/Wcf.Behaviors/Properties/AssemblyInfo.cs
@@ -8,4 +8,4 @@
 [assembly: AssemblyFileVersion("1.0.0.0")]

 // This version is used by NuGet:
-[assembly: AssemblyInformationalVersion("1.0.0-prerelease01")]+[assembly: AssemblyInformationalVersion("1.0.0")]


updated Exam TYpe

updated Exam TYpe

--- ExamAssessmentSOAPAPI/ExamassessmentWCF/DTO/Examtype.cs
+++ ExamAssessmentSOAPAPI/ExamassessmentWCF/DTO/Examtype.cs
@@ -11,14 +11,12 @@
     {
         public Examtype()
         {
-            ExamTemplates = new List<ExamTemplate>();
         }
         [DataMember]
         public int PKID { get; set; }
         [DataMember]
         public string ExamTypeName { get; set; }

-        [DataMember]
-        public virtual ICollection<ExamTemplate> ExamTemplates { get; set; }
+
     }
 }


Don't send OK when the channel is not ready

In Cordova-WP8 3.7.0 there was a problem that NO_RESULT was treated as error (CB-8580), but this was fixed over a year ago. I'm guessing the current implementation can lead to people having trouble registering (receiving a push token) because of the OK we're sending when the channel is not ready yet. Let's try and use NO_RESULT again (which should work fine with Cordova-WP8 3.8.0 and up).

--- src/wp8/PushPlugin.cs
+++ src/wp8/PushPlugin.cs
@@ -51,8 +51,7 @@
             if (pushChannel.ChannelUri == null)
             {
                 // Wait for the channel to become ready.
-                // Need to respond with OK instead of NO_RESULT because of https://issues.apache.org/jira/browse/CB-8580
-                PluginResult pluginResult = new PluginResult(PluginResult.Status.OK);
+                PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT);
                 pluginResult.KeepCallback = true;
                 this.DispatchCommandResult(pluginResult, this.CurrentCommandCallbackId);
             }
@@ -277,4 +276,4 @@
             public string Message { get; set; }
         }
     }
-}+}


TypeHelper.minimum null review

TypeHelper.minimum null review


Fix other unit test.

Fix other unit test.

--- src/Marten/Linq/DeserializeSelector.cs
+++ src/Marten/Linq/DeserializeSelector.cs
@@ -25,7 +25,7 @@
         {
             if (!typeof(T).IsSimple())
             {
-                var json = reader.As<NpgsqlDataReader>().GetTextReader(0);
+                var json = reader.As<DbDataReader>().GetTextReader(0);
                 return _serializer.FromJson<T>(json);
             }


Update #10

Update #10

--- Samesound.Services/ChannelService.cs
+++ Samesound.Services/ChannelService.cs
@@ -40,10 +40,10 @@
         {
             if (Db.Channels.Any(c =>
                 c.Owner == channel.Owner
-                && channel.DateDeactivated == null))
+                && c.DateDeactivated == null))
             {
                 throw new OwnerAlreadyHasAnActiveChannelException(
-                    "Owner already has an active channel (channel's name:"+ channel.Name + "). To create a new channel, close this one first"
+                    "Owner already has an active channel ("+ channel.Name + "). To create a new channel, close this one first."
                 );
             }


added details popup in orders

added details popup in orders

--- Source/Web/OredersTracker.Web/Views/Orders/Index.cshtml
+++ Source/Web/OredersTracker.Web/Views/Orders/Index.cshtml
@@ -1,36 +1,75 @@
 @using OredersTracker.Web.ViewModels.Orders
 @(Html.Kendo().Grid<OrdersViewModel>().Name("grid").Columns(columns =>
-      {
-          columns.Bound(c => c.Creator).Width(110);
-          columns.Bound(c => c.CreatedOn).Format("{0:dd/MM/yyyy HH:mm}").Width(120);
-          columns.Bound(c => c.ClientEIK).Width(140);
-          columns.Bound(c => c.Deadline).Format("{0:dd/MM/yyyy HH:mm}").Width(120);
-          columns.Bound(c => c.Description).Width(350).HtmlAttributes(new { @rows = "3" });
-          columns.Bound(c => c.OrderPrice).Width(200);
-          columns.Bound(c => c.PaidInAdvance).Width(150);
-          columns.Bound(c => c.BillInCash).Width(150);
-          columns.Bound(c => c.Receipt).Width(160);
-          columns.Bound(c => c.PaidWithCard).Width(150);
-          columns.Bound(c => c.Econt).Width(100);
-          columns.Bound(c => c.PaidInCashWithoutReceipt).Width(200);
-          columns.Bound(c => c.PaidBankTransaction).Width(170);
-          columns.Bound(c => c.LeftToBePaid).Width(130);
-          columns.Bound(c => c.PaidAt).Format("{0:dd/MM/yyyy HH:mm}").Width(120);
-          columns.Bound(c => c.DateOfComplition).Format("{0:dd/MM/yyyy HH:mm}").Width(150);
-          columns.Bound(c => c.Bonuses).Width(100);
-          columns.Bound(c => c.IsComplited).Width(120);
+{
+    columns.Bound(c => c.Creator).Width(110);
+    columns.Bound(c => c.CreatedOn).Format("{0:dd/MM/yyyy HH:mm}").Width(120);
+    columns.Bound(c => c.ClientEIK).Width(140);
+    columns.Bound(c => c.Deadline).Format("{0:dd/MM/yyyy HH:mm}").Width(120);
+    columns.Bound(c => c.Description).Width(350).HtmlAttributes(new { @rows = "3" });
+    columns.Bound(c => c.OrderPrice).Width(200);
+    columns.Bound(c => c.PaidInAdvance).Width(150);
+    columns.Bound(c => c.BillInCash).Width(150);
+    columns.Bound(c => c.Receipt).Width(160);
+    columns.Bound(c => c.PaidWithCard).Width(150);
+    columns.Bound(c => c.Econt).Width(100);
+    columns.Bound(c => c.PaidInCashWithoutReceipt).Width(200);
+    columns.Bound(c => c.PaidBankTransaction).Width(170);
+    columns.Bound(c => c.LeftToBePaid).Width(130);
+    columns.Bound(c => c.PaidAt).Format("{0:dd/MM/yyyy HH:mm}").Width(120);
+    columns.Bound(c => c.DateOfComplition).Format("{0:dd/MM/yyyy HH:mm}").Width(150);
+    columns.Bound(c => c.Bonuses).Width(100);
+    columns.Bound(c => c.IsComplited).Width(120);

-          columns.Command(command =>
-              {
-                  command.Edit();
-                  command.Destroy();
-              }).Width(180);
-      }).ToolBar(toolbar =>
-          {
-              toolbar.Excel();
-              toolbar.Pdf();
-          }).ColumnMenu().Editable(editable => editable.Mode(GridEditMode.PopUp)).HtmlAttributes(new { height = "400" }).Pageable().Sortable(sortable => { sortable.SortMode(GridSortMode.MultipleColumn); }).Filterable().Scrollable(a => a.Height("auto")).DataSource(dataSource => dataSource.Ajax().Model(model => model.Id(p => p.Id)).Read(read => read.Action("Orders_Read", "Orders")).Update(update => update.Action("Orders_Update", "Orders")).Destroy(destroy => destroy.Action("Orders_Destroy", "Orders")))
-      )
+    columns.Command(command =>
+    {
+        command.Edit();
+        command.Destroy();
+        command.Custom("ViewDetails").Click("showDetails");
+    }).Width(180);
+}).ToolBar(toolbar =>
+{
+    toolbar.Excel();
+    toolbar.Pdf();
+}).ColumnMenu().Editable(editable => editable.Mode(GridEditMode.PopUp)).HtmlAttributes(new { height = "400" }).Pageable().Selectable(selectable => selectable
+  .Mode(GridSelectionMode.Multiple)).Sortable(sortable => { sortable.SortMode(GridSortMode.MultipleColumn); }).Filterable().Scrollable(a => a.Height("auto")).DataSource(dataSource => dataSource.Ajax().Model(model => model.Id(p => p.Id)).Read(read => read.Action("Orders_Read", "Orders")).Update(update => update.Action("Orders_Update", "Orders")).Destroy(destroy => destroy.Action("Orders_Destroy", "Orders")))
+)
+@(Html.Kendo().Window().Name("Details")
+        .Title("Order Details")
+        .Visible(false)
+        .Modal(true)
+        .Draggable(true)
+        .Width(300)
+    )
+
 @section customScripts {

+
+
+
+
 }


Persian Date Editor

Persian Date Editor

--- Framework/Source/Tralus.Framework.Module.Web/Editors/PersianDateEditor.cs
+++ Framework/Source/Tralus.Framework.Module.Web/Editors/PersianDateEditor.cs
@@ -8,7 +8,7 @@

 namespace Tralus.Framework.Module.Web.Editors
 {
-    [PropertyEditor(typeof(DateTime?), true)]
+    [PropertyEditor(typeof(DateTime), true)]
     [PropertyEditor(typeof(DateTime?), true)]
     public class PersianDateEditor : WebPropertyEditor
     {


CMF1-1266 Added separate markup for unlimited occurrence constraint, because XPM doesn't understand maxOccurs: -1

--- Sdl.Web.Common/Models/RegionModel.cs
+++ Sdl.Web.Common/Models/RegionModel.cs
@@ -14,7 +14,9 @@
     [Serializable]
     public class RegionModel : ViewModel, ISyndicationFeedItemProvider
     {
-        private const string XpmRegionMarkup = "<!-- Start Region: {{title: \"{0}\", allowedComponentTypes: [{1}], minOccurs: {2}, maxOccurs: {3}}} -->";
+        private const string XpmRegionMarkup = "<!-- Start Region: {{title: \"{0}\", allowedComponentTypes: [{1}], {2}}} -->";
+        private const string occurenceConstraintMarkupUnlimited = "minOccurs: {0}";
+        private const string occurenceConstraintMarkup = "minOccurs: {0}, maxOccurs: {1}";
         private const string XpmComponentTypeMarkup = "{{schema: \"{0}\", template: \"{1}\"}}";

         /// <summary>
@@ -102,14 +104,19 @@
             {
                 return string.Empty;
             }
+
             int minOccurs = xpmRegion.OccurrenceConstraint?.MinOccurs ?? 0;
             int maxOccurs = xpmRegion.OccurrenceConstraint?.MaxOccurs ?? -1;
+            string occurrenceConstraint = "";
+            occurrenceConstraint = maxOccurs == -1
+                ? string.Format(occurenceConstraintMarkupUnlimited, minOccurs)
+                : string.Format(occurenceConstraintMarkup, minOccurs, maxOccurs);
+
             return string.Format(
                 XpmRegionMarkup,
                 Name,
-                string.Join(", ", xpmRegion.ComponentTypes.Select(ct => string.Format(XpmComponentTypeMarkup, ct.Schema, ct.Template))),
-                minOccurs,
-                maxOccurs);
+                string.Join(", ", xpmRegion.ComponentTypes.Select(ct => string.Format(XpmComponentTypeMarkup, ct.Schema, ct.Template))),
+                occurrenceConstraint);
         }

         /// <summary>


Applied patch for NH-1842 (thanks to Lars Corneliussen)

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@4480

--- src/NHibernate/Type/CharBooleanType.cs
+++ src/NHibernate/Type/CharBooleanType.cs
@@ -22,7 +22,7 @@
 		///
 		/// </summary>
 		/// <param name="sqlType"></param>
-		internal CharBooleanType(AnsiStringFixedLengthSqlType sqlType) : base(sqlType)
+		protected CharBooleanType(AnsiStringFixedLengthSqlType sqlType) : base(sqlType)
 		{
 		}


Fixed concurrency issues with callback cancellation.

--- SensusService/SensusServiceHelper.cs
+++ SensusService/SensusServiceHelper.cs
@@ -484,6 +484,7 @@
         {
             lock (_idCallbackCancellationTokenSource)
             {
+                // do we have callback information for the passed callbackId? we might not, in the case where the callback is canceled by the user and the system fires it subsequently.
                 Tuple<Action<CancellationToken>, CancellationTokenSource> callbackCancellationTokenSource;
                 if (_idCallbackCancellationTokenSource.TryGetValue(callbackId, out callbackCancellationTokenSource))
                 {
@@ -491,17 +492,22 @@

                     new Thread(() =>
                         {
-                            if (Monitor.TryEnter(callbackCancellationTokenSource))
+                            Action<CancellationToken> callbackToRaise = callbackCancellationTokenSource.Item1;
+
+                            // callbacks cannot be raised concurrently -- drop the callback if it is already in progress.
+                            if (Monitor.TryEnter(callbackToRaise))
                             {
+                                // initialize a new cancellation token source for this call, since they cannot be reset
+                                CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
+
+                                // set cancellation token source in collection, so that someone can call CancelRaisedCallback
+                                lock(_idCallbackCancellationTokenSource)
+                                    _idCallbackCancellationTokenSource[callbackId] = new Tuple<Action<CancellationToken>, CancellationTokenSource>(callbackToRaise, cancellationTokenSource);
+
                                 try
                                 {
                                     _logger.Log("Raising callback " + callbackId, LoggingLevel.Debug, GetType());
-
-                                    // initialize a new cancellation token source for this call (they cannot be reset from call to call)
-                                    lock(_idCallbackCancellationTokenSource)
-                                        _idCallbackCancellationTokenSource[callbackId] = new Tuple<Action<CancellationToken>, CancellationTokenSource>(callbackCancellationTokenSource.Item1, new CancellationTokenSource());
-
-                                    callbackCancellationTokenSource.Item1(callbackCancellationTokenSource.Item2.Token);
+                                    callbackToRaise(cancellationTokenSource.Token);
                                 }
                                 catch (Exception ex)
                                 {
@@ -509,7 +515,11 @@
                                 }
                                 finally
                                 {
-                                    Monitor.Exit(callbackCancellationTokenSource);
+                                    Monitor.Exit(callbackToRaise);
+
+                                    // reset cancellation token to null since there is nothing to cancel
+                                    lock(_idCallbackCancellationTokenSource)
+                                        _idCallbackCancellationTokenSource[callbackId] = new Tuple<Action<CancellationToken>, CancellationTokenSource>(callbackToRaise, null);
                                 }
                             }
                             else
@@ -534,7 +544,7 @@
             lock (_idCallbackCancellationTokenSource)
             {
                 Tuple<Action<CancellationToken>, CancellationTokenSource> callbackCancellationTokenSource;
-                if (_idCallbackCancellationTokenSource.TryGetValue(callbackId, out callbackCancellationTokenSource) && callbackCancellationTokenSource.Item2 != null)  // the cancellation source might be null if the callback has never been called.
+                if (_idCallbackCancellationTokenSource.TryGetValue(callbackId, out callbackCancellationTokenSource) && callbackCancellationTokenSource.Item2 != null)  // the cancellation source will be null if the callback is not currently being raised
                     callbackCancellationTokenSource.Item2.Cancel();
             }
         }


updated generated

updated generated

--- King.Mapper.Generator.Integration/StoredProcedures.Unit.Test.Generated.cs
+++ King.Mapper.Generator.Integration/StoredProcedures.Unit.Test.Generated.cs
@@ -1,7 +1,7 @@
 // ------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version: 1.0.0.0
+//     Runtime Version: 1.0.0.1
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -416,8 +416,7 @@
 		public void TestbinaryGetSet()
 		{
 			var item = new dboSimulatedSelectStatement();
-			var expected = new byte[128];
-new Random().NextBytes(expected);
+			var expected = new byte[128]; new Random().NextBytes(expected);
 			item.TestBinary = expected;
 			Assert.AreEqual<byte[]>(expected, item.TestBinary);
 		}
@@ -440,8 +439,7 @@
 		public void TestimageGetSet()
 		{
 			var item = new dboSimulatedSelectStatement();
-			var expected = new byte[128];
-new Random().NextBytes(expected);
+			var expected = new byte[128]; new Random().NextBytes(expected);
 			item.TestImage = expected;
 			Assert.AreEqual<byte[]>(expected, item.TestImage);
 		}


remove commented-out code

remove commented-out code

--- Signum.React/Facades/SignumServer.cs
+++ Signum.React/Facades/SignumServer.cs
@@ -81,22 +81,8 @@
         {
             Schema.Current.ApplicationName = hostingEnvironment.ContentRootPath;

-            //app.Services.Replace(typeof(IHttpControllerSelector), new SignumControllerFactory(config, mainAsembly));
-
             SignumControllerFactory.RegisterArea(typeof(EntitiesController));
             SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()!);
-
-
-            //// Web API configuration and services
-            //var appXmlType = app.Formatters.XmlFormatter.SupportedMediaTypes.FirstOrDefault(t => t.MediaType == "application/xml");
-            //app.Formatters.XmlFormatter.SupportedMediaTypes.Remove(appXmlType);
-
-
-            //// Web API routes
-            //app.MapHttpAttributeRoutes();
-
-            //app.Services.Replace(typeof(IBodyModelValidator), new SignumBodyModelValidator());
-

             ReflectionServer.Start();
         }


Fixing the missing mappings. Order -> Done

--- Neemo.Web/Neemo.CartParts.EntityFramework/EntityFrameworkMappingConfig.cs
+++ Neemo.Web/Neemo.CartParts.EntityFramework/EntityFrameworkMappingConfig.cs
@@ -124,11 +124,12 @@
                 .ForMember(m => m.DateDeleted, options => options.Ignore())
                 .ForMember(m => m.GUID, options => options.MapFrom(src => src.GUID))
                 .ForMember(m => m.Handlingcharges, options => options.Ignore())
-                .ForMember(m => m.OrderHeaderID, options => options.Ignore())
+                .ForMember(m => m.OrderHeaderID, options => options.MapFrom(src => src.OrderId))
                 .ForMember(m => m.OrderStatu, options => options.Ignore())
                 .ForMember(m => m.RecordSourceIP, options => options.MapFrom(src => src.SourceIpAddress))
                 .ForMember(m => m.RegistrationID, options => options.Ignore())
                 .ForMember(m => m.UserName, options => options.MapFrom(src => src.UserName))
+                .ForMember(m => m.OrderDetails, options => options.MapFrom(src => src.OrderLineItems))
                 ;

             // Line item
@@ -137,7 +138,7 @@
                 .ForMember(m => m.OrderHeader, options => options.Ignore())
                 .ForMember(m => m.DateCreated, options => options.MapFrom(src => src.CreatedDateTime))
                 .ForMember(m => m.DateDeleted, options => options.Ignore())
-                .ForMember(m => m.OrderHeaderID, options => options.MapFrom(src => src.OrderLineItemId))
+                .ForMember(m => m.OrderHeaderID, options => options.MapFrom(src => src.OrderId))
                 .ForMember(m => m.Product, options => options.Ignore())
                 .ForMember(m => m.ProductID, options => options.MapFrom(src => src.ProductId))
                 .ForMember(m => m.Quantity, options => options.MapFrom(src => src.Quantity))


Config file of backend service is now copied to the new location when upgrading from older versions

--- PART/Source/EventBroker/EventBrokerInstallers/EventBrokerCustomActions.cs
+++ PART/Source/EventBroker/EventBrokerInstallers/EventBrokerCustomActions.cs
@@ -47,6 +47,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.IO;
 using Microsoft.Deployment.WindowsInstaller;
 using CprBroker.Utilities;
 using CprBroker.Installers;
@@ -70,6 +71,11 @@
         private static string GetServiceExeConfigFullFileName(Session session)
         {
             return GetServiceExeFullFileName(session) + ".config";
+        }
+
+        private static string GetOldServiceExeConfigFullFileName(Session session)
+        {
+            return GetOldServiceExeFullFileName(session) + ".config";
         }

         private static Version GetServiceExeFrameworkVersion()
@@ -179,6 +185,7 @@
                 var sourcePath = cprBrokerWebInstallationInfo.GetWebConfigFilePath(PathConstants.CprBrokerWebsiteDirectoryRelativePath);
                 var targetPath = GetServiceExeConfigFullFileName(session);

+                // TODO: Shall we also clone connection strings?
                 Installation.CopyConfigNode("//configuration", "configSections", sourcePath, targetPath, Installation.MergeOption.Overwrite);
                 Installation.CopyConfigNode("//configuration", "dataProvidersGroup", sourcePath, targetPath, Installation.MergeOption.Overwrite);

@@ -195,12 +202,26 @@

         public static void MoveBackendServiceToNewLocation(Session session)
         {
+            var oldConfigPath = GetOldServiceExeConfigFullFileName(session);
+            var newConfigPath = GetServiceExeConfigFullFileName(session);
+
+            // Uninstall service at old location
             try
             {
                 UninstallService(GetOldServiceExeFullFileName(session), GetServiceExeFrameworkVersion());
             }
             catch { }

+            // Copy old config file
+            if (File.Exists(oldConfigPath))
+            {
+                if (File.Exists(newConfigPath))
+                    File.Delete(newConfigPath);
+
+                File.Move(oldConfigPath, newConfigPath);
+            }
+
+            // Install service at new location
             InstallService(GetServiceExeFullFileName(session), GetServiceExeFrameworkVersion());
         }
     }


Part of BO Implementation

Part of BO Implementation

--- PS.Mothership.Core/PS.Mothership.Core.Common/Contracts/IContactService.cs
+++ PS.Mothership.Core/PS.Mothership.Core.Common/Contracts/IContactService.cs
@@ -1,16 +0,0 @@
-using PS.Mothership.Core.Common.Dto.Merchant;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.ServiceModel;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PS.Mothership.Core.Common.Contracts
-{
-    public interface IContactService
-    {
-        [OperationContract]
-        ContactDto GetContact(Guid id);
-    }
-}


Modified client methods to use HTTP v1.0

Some unsuccessful client requests were hanging using HTTP v.1.1.

--- commercetools.NET/Common/Client.cs
+++ commercetools.NET/Common/Client.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Specialized;
 using System.Collections.Generic;
+using System.Net;
 using System.Net.Http;
 using System.Net.Http.Headers;
 using System.Reflection;
@@ -88,8 +89,12 @@
                 client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(this.Token.TokenType, this.Token.AccessToken);
                 client.DefaultRequestHeaders.UserAgent.ParseAdd(this.UserAgent);

-                HttpResponseMessage httpResponseMessage = await client.GetAsync(url);
-
+                HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, new Uri(url))
+                {
+                    Version = HttpVersion.Version10
+                };
+
+                HttpResponseMessage httpResponseMessage = await client.SendAsync(httpRequestMessage);
                 response = await GetResponse<T>(httpResponseMessage);
             }

@@ -129,9 +134,13 @@
                 client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(this.Token.TokenType, this.Token.AccessToken);
                 client.DefaultRequestHeaders.UserAgent.ParseAdd(this.UserAgent);

-                StringContent content = new StringContent(payload, Encoding.UTF8, "application/json");
-                HttpResponseMessage httpResponseMessage = await client.PostAsync(url, content);
-
+                HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, new Uri(url))
+                {
+                    Version = HttpVersion.Version10,
+                    Content = new StringContent(payload, Encoding.UTF8, "application/json")
+                };
+
+                HttpResponseMessage httpResponseMessage = await client.SendAsync(httpRequestMessage);
                 response = await GetResponse<T>(httpResponseMessage);
             }

@@ -171,8 +180,12 @@
                 client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(this.Token.TokenType, this.Token.AccessToken);
                 client.DefaultRequestHeaders.UserAgent.ParseAdd(this.UserAgent);

-                HttpResponseMessage httpResponseMessage = await client.DeleteAsync(url);
-
+                HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Delete, new Uri(url))
+                {
+                    Version = HttpVersion.Version10
+                };
+
+                HttpResponseMessage httpResponseMessage = await client.SendAsync(httpRequestMessage);
                 response = await GetResponse<T>(httpResponseMessage);
             }

@@ -223,8 +236,6 @@
                 new KeyValuePair<string, string>("scope", string.Concat(this.Configuration.Scope.ToEnumMemberString(), ":", this.Configuration.ProjectKey))
             };

-            FormUrlEncodedContent content = new FormUrlEncodedContent(pairs);
-
             string credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(string.Concat(this.Configuration.ClientID, ":", this.Configuration.ClientSecret)));

             using (HttpClient client = new HttpClient(new ClientLoggingHandler(new HttpClientHandler())))
@@ -234,7 +245,13 @@
                 client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);
                 client.DefaultRequestHeaders.UserAgent.ParseAdd(this.UserAgent);

-                HttpResponseMessage httpResponseMessage = await client.PostAsync(this.Configuration.OAuthUrl, content);
+                HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, new Uri(this.Configuration.OAuthUrl))
+                {
+                    Version = HttpVersion.Version10,
+                    Content = new FormUrlEncodedContent(pairs)
+                };
+
+                HttpResponseMessage httpResponseMessage = await client.SendAsync(httpRequestMessage);
                 response = await GetResponse<Token>(httpResponseMessage);
             }

@@ -257,8 +274,6 @@
                 new KeyValuePair<string, string>("refresh_token", refreshToken)
             };

-            FormUrlEncodedContent content = new FormUrlEncodedContent(pairs);
-
             string credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(string.Concat(this.Configuration.ClientID, ":", this.Configuration.ClientSecret)));

             using (HttpClient client = new HttpClient(new ClientLoggingHandler(new HttpClientHandler())))
@@ -268,7 +283,13 @@
                 client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);
                 client.DefaultRequestHeaders.UserAgent.ParseAdd(this.UserAgent);

-                HttpResponseMessage httpResponseMessage = await client.PostAsync(this.Configuration.OAuthUrl, content);
+                HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, new Uri(this.Configuration.OAuthUrl))
+                {
+                    Version = HttpVersion.Version10,
+                    Content = new FormUrlEncodedContent(pairs)
+                };
+
+                HttpResponseMessage httpResponseMessage = await client.SendAsync(httpRequestMessage);
                 response = await GetResponse<Token>(httpResponseMessage);
             }


Added RMS values to LSCVS endpoints

Added RMS values to LSCVS endpoints

--- Source/Applications/openXDA/openXDA/Controllers/WebAPI/LSCVSController.cs
+++ Source/Applications/openXDA/openXDA/Controllers/WebAPI/LSCVSController.cs
@@ -60,6 +60,15 @@
         private static readonly ILog Log = LogManager.GetLogger(typeof(LSCVSController));
         private static readonly DateTime s_epoch = new DateTime(1970, 1, 1);

+        private double FBase
+        {
+            get
+            {
+                using (AdoDataConnection connection = new AdoDataConnection("systemSettigns"))
+                    return double.Parse(connection.ExecuteScalar<string>("SELECT TOP 1 Value FROM Setting WHERE Name = 'DataAnalysis.SystemFrequency' UNION (SELECT '60.0' AS Value)"));
+            }
+        }
+
         [HttpGet, Route("")]
         public IHttpActionResult Get()
         {
@@ -85,11 +94,13 @@

                     VIDataGroup dataGroup = GetDataGroup(meter, eventId);
+                    VICycleDataGroup cycleData = Transform.ToVICycleDataGroup(dataGroup, FBase, true);

                     if (dataGroup.IA != null)
                         list.Add(new SEBrowser.Model.D3Series()
                         {
-                            ChartLabel = "A",
+                            ChartLabel = "A WaveForm",
+                            LegendGroup = "WaveForm",
                             Color = "#FF0000",
                             DataPoints = dataGroup.IA.DataPoints.Select(dataPoint => new double[] {
                             dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
@@ -98,11 +109,25 @@
                             Unit = "A"
                         });

+                    if (cycleData.IA != null)
+                        list.Add(new SEBrowser.Model.D3Series()
+                        {
+                            ChartLabel = "A RMS",
+                            Color = "#FF0000",
+                            LegendGroup = "RMS",
+                            DataPoints = cycleData.IA.RMS.DataPoints.Select(dataPoint => new double[] {
+                            dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
+                            dataPoint.Value
+                        }).ToList(),
+                            Unit = "A"
+                        });
+
                     if (dataGroup.IB != null)
                         list.Add(new SEBrowser.Model.D3Series()
                         {
-                            ChartLabel = "B",
+                            ChartLabel = "B WaveForm",
                             Color = "#0066CC",
+                            LegendGroup = "WaveForm",
                             DataPoints = dataGroup.IB.DataPoints.Select(dataPoint => new double[] {
                             dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
                             dataPoint.Value
@@ -110,12 +135,39 @@
                             Unit = "A"
                         });

+                    if (cycleData.IB != null)
+                        list.Add(new SEBrowser.Model.D3Series()
+                        {
+                            ChartLabel = "B RMS",
+                            Color = "#0066CC",
+                            LegendGroup="RMS",
+                            DataPoints = cycleData.IB.RMS.DataPoints.Select(dataPoint => new double[] {
+                            dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
+                            dataPoint.Value
+                        }).ToList(),
+                            Unit = "A"
+                        });
+
                     if (dataGroup.IC != null)
                         list.Add(new SEBrowser.Model.D3Series()
                         {
-                            ChartLabel = "C",
+                            ChartLabel = "C WaveForm",
                             Color = "#33CC33",
+                            LegendGroup = "WaveForm",
                             DataPoints = dataGroup.IC.DataPoints.Select(dataPoint => new double[] {
+                            dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
+                            dataPoint.Value
+                        }).ToList(),
+                            Unit = "A"
+                        });
+
+                    if (cycleData.IC != null)
+                        list.Add(new SEBrowser.Model.D3Series()
+                        {
+                            ChartLabel = "C RMS",
+                            Color = "#33CC33",
+                            LegendGroup = "RMS",
+                            DataPoints = cycleData.IC.RMS.DataPoints.Select(dataPoint => new double[] {
                             dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
                             dataPoint.Value
                         }).ToList(),
@@ -147,14 +199,15 @@
                     Meter meter = new TableOperations<Meter>(connection).QueryRecordWhere("ID = {0}", evt.MeterID);
                     meter.ConnectionFactory = () => new AdoDataConnection("systemSettings");

-
                     VIDataGroup dataGroup = GetDataGroup(meter, eventId);
+                    VICycleDataGroup cycleData = Transform.ToVICycleDataGroup(dataGroup, FBase, true);

                     if (dataGroup.VA != null)
                         list.Add(new SEBrowser.Model.D3Series()
                         {
-                            ChartLabel = "AN",
+                            ChartLabel = "AN WaveForm",
                             Color = "#A30000",
+                            LegendGroup= "WaveForm",
                             DataPoints = dataGroup.VA.DataPoints.Select(dataPoint => new double[] {
                             dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
                             dataPoint.Value
@@ -162,11 +215,25 @@
                             Unit = "kV"
                         });

+                    if (cycleData.VA != null)
+                        list.Add(new SEBrowser.Model.D3Series()
+                        {
+                            ChartLabel = "AN RMS",
+                            Color = "#A30000",
+                            LegendGroup = "RMS",
+                            DataPoints = cycleData.VA.RMS.DataPoints.Select(dataPoint => new double[] {
+                            dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
+                            dataPoint.Value
+                        }).ToList(),
+                            Unit = "kV"
+                        });
+
                     if (dataGroup.VB != null)
                         list.Add(new SEBrowser.Model.D3Series()
                         {
-                            ChartLabel = "BN",
+                            ChartLabel = "BN WaveForm",
                             Color = "#0029A3",
+                            LegendGroup = "WaveForm",
                             DataPoints = dataGroup.VB.DataPoints.Select(dataPoint => new double[] {
                             dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
                             dataPoint.Value
@@ -174,11 +241,25 @@
                             Unit = "kV"
                         });

+                    if (cycleData.VB != null)
+                        list.Add(new SEBrowser.Model.D3Series()
+                        {
+                            ChartLabel = "BN RMS",
+                            Color = "#0029A3",
+                            LegendGroup = "RMS",
+                            DataPoints = cycleData.VB.RMS.DataPoints.Select(dataPoint => new double[] {
+                            dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
+                            dataPoint.Value
+                        }).ToList(),
+                            Unit = "kV"
+                        });
+
                     if (dataGroup.VC != null)
                         list.Add(new SEBrowser.Model.D3Series()
                         {
-                            ChartLabel = "CN",
+                            ChartLabel = "CN WaveForm",
                             Color = "#007A29",
+                            LegendGroup = "WaveForm",
                             DataPoints = dataGroup.VC.DataPoints.Select(dataPoint => new double[] {
                             dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
                             dataPoint.Value
@@ -186,11 +267,25 @@
                             Unit = "kV"
                         });

+                    if (cycleData.VC != null)
+                        list.Add(new SEBrowser.Model.D3Series()
+                        {
+                            ChartLabel = "CN RMS",
+                            Color = "#007A29",
+                            LegendGroup = "RMS",
+                            DataPoints = cycleData.VC.RMS.DataPoints.Select(dataPoint => new double[] {
+                            dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
+                            dataPoint.Value
+                        }).ToList(),
+                            Unit = "kV"
+                        });
+
                     if (dataGroup.VAB != null)
                         list.Add(new SEBrowser.Model.D3Series()
                         {
-                            ChartLabel = "AB",
+                            ChartLabel = "AB WaveForm",
                             Color = "#A30000",
+                            LegendGroup = "WaveForm",
                             DataPoints = dataGroup.VAB.DataPoints.Select(dataPoint => new double[] {
                             dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
                             dataPoint.Value
@@ -198,11 +293,25 @@
                             Unit = "kV"
                         });

+                    if (cycleData.VAB != null)
+                        list.Add(new SEBrowser.Model.D3Series()
+                        {
+                            ChartLabel = "AB RMS",
+                            Color = "#A30000",
+                            LegendGroup = "RMS",
+                            DataPoints = cycleData.VAB.RMS.DataPoints.Select(dataPoint => new double[] {
+                            dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
+                            dataPoint.Value
+                        }).ToList(),
+                            Unit = "kV"
+                        });
+
                     if (dataGroup.VBC != null)
                         list.Add(new SEBrowser.Model.D3Series()
                         {
-                            ChartLabel = "BC",
+                            ChartLabel = "BC WaveForm",
                             Color = "#0029A3",
+                            LegendGroup = "WaveForm",
                             DataPoints = dataGroup.VBC.DataPoints.Select(dataPoint => new double[] {
                             dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
                             dataPoint.Value
@@ -210,17 +319,45 @@
                             Unit = "kV"
                         });

+                    if (cycleData.VBC != null)
+                        list.Add(new SEBrowser.Model.D3Series()
+                        {
+                            ChartLabel = "BC RMS",
+                            Color = "#0029A3",
+                            LegendGroup = "RMS",
+                            DataPoints = cycleData.VBC.RMS.DataPoints.Select(dataPoint => new double[] {
+                            dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
+                            dataPoint.Value
+                        }).ToList(),
+                            Unit = "kV"
+                        });
+
                     if (dataGroup.VCA != null)
                         list.Add(new SEBrowser.Model.D3Series()
                         {
-                            ChartLabel = "CA",
+                            ChartLabel = "CA WaveForm",
                             Color = "#007A29",
+                            LegendGroup = "WaveForm",
                             DataPoints = dataGroup.VCA.DataPoints.Select(dataPoint => new double[] {
                             dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
                             dataPoint.Value
                         }).ToList(),
                             Unit = "kV"
                         });
+
+                    if (cycleData.VCA != null)
+                        list.Add(new SEBrowser.Model.D3Series()
+                        {
+                            ChartLabel = "CA RMS",
+                            Color = "#007A29",
+                            LegendGroup = "RMS",
+                            DataPoints = cycleData.VCA.RMS.DataPoints.Select(dataPoint => new double[] {
+                            dataPoint.Time.Subtract(s_epoch).TotalMilliseconds,
+                            dataPoint.Value
+                        }).ToList(),
+                            Unit = "kV"
+                        });
+
                 }
                 return Ok(list);
             }
@@ -240,6 +377,7 @@
             dataGroup.FromData(meter, data);
             return new VIDataGroup(dataGroup);
         }
+
     }

 }


Needs to restore global transform after render screen spaced nodes.

--- Source/HelixToolkit.SharpDX.Shared/Render/RenderHost/DefaultRenderHost.cs
+++ Source/HelixToolkit.SharpDX.Shared/Render/RenderHost/DefaultRenderHost.cs
@@ -332,6 +332,7 @@
             {
                 renderer.RenderToPingPongBuffer(RenderContext, ref renderParameter);
                 renderParameter.IsMSAATexture = false;
+                RenderContext.UpdatePerFrameData();
                 renderer.RenderPostProc(RenderContext, postProcNodes, ref renderParameter);
                 renderParameter.CurrentTargetTexture = RenderBuffer.FullResPPBuffer.CurrentTexture;
             }


PhasorWebUI: Updated device save to not override connection string with blank value

--- Source/Libraries/Adapters/PhasorWebUI/Views/AddSynchrophasorDevice.cshtml
+++ Source/Libraries/Adapters/PhasorWebUI/Views/AddSynchrophasorDevice.cshtml
@@ -3361,7 +3361,10 @@
                 if (isEmpty(device.Name))
                     device.Name = device.Acronym;

-                device.ConnectionString = connectionString;
+                // Only update connection string if one has been defined, prevents changing any existing one to blank
+                if (connectionString.length > 0)
+                    device.ConnectionString = connectionString;
+
                 device.AutoStartDataParsingSequence = autoStartDataParsingSequence;
                 device.SkipDisableRealTimeData = skipDisableRealTimeData;
                 device.Enabled = true;


Add regression test for element preceded by attribute

Closes #737

--- StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UnitTests.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UnitTests.cs
@@ -52,6 +52,7 @@

         public string FooValue, BarValue;

+        [Obsolete]
         public enum TestEnum
         {
             Value1,
@@ -120,6 +121,7 @@
             }
         }
         public string FooValue, BarValue;
+        [Obsolete]
         public enum TestEnum
         {
             Value1,
@@ -150,10 +152,10 @@
                 this.CSharpDiagnostic().WithLocation(24, 1),
                 this.CSharpDiagnostic().WithLocation(29, 1),
                 this.CSharpDiagnostic().WithLocation(30, 1),
-                this.CSharpDiagnostic().WithLocation(36, 1),
-                this.CSharpDiagnostic().WithLocation(41, 1),
-                this.CSharpDiagnostic().WithLocation(44, 1),
-                this.CSharpDiagnostic().WithLocation(45, 1)
+                this.CSharpDiagnostic().WithLocation(37, 1),
+                this.CSharpDiagnostic().WithLocation(42, 1),
+                this.CSharpDiagnostic().WithLocation(45, 1),
+                this.CSharpDiagnostic().WithLocation(46, 1)
             };

             await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);


Grouping App will no longer display cohorts that lack a c custom data. This will prevent cohorts from other sources from disrupting the app's functioning.

--- TeamMnMGroupingWebApp/TeamMnMGroupingWebApp/Controllers/HomeController.cs
+++ TeamMnMGroupingWebApp/TeamMnMGroupingWebApp/Controllers/HomeController.cs
@@ -861,7 +861,18 @@
         {
             //Construct a master object to for display purpose
             var data = new GroupingDisplayObject();
-            data.cohorts = cohorts.Result;
+
+            //Remove cohorts that were not created by the grouping app by checking for the presence of a custom field.
+            var valid_cohorts = new List<CohortDisplayObject>(cohorts.Result);
+            foreach (CohortDisplayObject cohort in cohorts.Result)
+            {
+                if (cohort.custom == null)
+                {
+                    valid_cohorts.Remove(cohort);
+                }
+            }
+            data.cohorts = valid_cohorts;
+

             IEnumerable<StudentDisplayObject> studentDisplayObjects = students.Result;
             List<StudentDisplayObject> listOfStudents = studentDisplayObjects.ToList();