Use PCL compatible Convert.ChangeType overload, use Select instead of List.ForEach and Stream instead of file path arguments

--- EvilDICOM.Core/EvilDICOM.Core/DICOMObject.cs
+++ EvilDICOM.Core/EvilDICOM.Core/DICOMObject.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.IO;
 using System.Linq;
 using EvilDICOM.Core.Element;
@@ -169,7 +170,7 @@
         public List<T> FindAll<T>()
         {
             Type t = typeof (T);
-            return AllElements.Where(el => el is T).Select(el => (T) Convert.ChangeType(el, t)).ToList();
+            return AllElements.Where(el => el is T).Select(el => (T) Convert.ChangeType(el, t, CultureInfo.CurrentCulture)).ToList();
         }

         /// <summary>
@@ -244,9 +245,8 @@
         /// <returns>a list of all elements that meet the search criteria</returns>
         public List<IDICOMElement> FindAll(Tag[] descendingTags)
         {
-            var stringList = new List<string>();
-            descendingTags.ToList().ForEach(t => stringList.Add(t.CompleteID));
-            return FindAll(stringList.ToArray());
+            var stringArray = descendingTags.Select(t => t.CompleteID).ToArray();
+            return FindAll(stringArray);
         }

         /// <summary>
@@ -449,13 +449,13 @@
         /// <summary>
         ///     Reads a DICOM file from a path
         /// </summary>
-        /// <param name="filePath">the path to the file</param>
+        /// <param name="stream">the file stream</param>
         /// <param name="trySyntax">the transfer syntax to use in case there is no metadata explicitly included</param>
         /// <returns></returns>
-        public static DICOMObject Read(string filePath,
+        public static DICOMObject Read(Stream stream,
             TransferSyntax trySyntax = TransferSyntax.IMPLICIT_VR_LITTLE_ENDIAN)
         {
-            return DICOMFileReader.Read(filePath, trySyntax);
+            return DICOMFileReader.Read(stream, trySyntax);
         }

         /// <summary>
@@ -469,10 +469,10 @@
             return DICOMFileReader.Read(file, trySyntax);
         }

-        public void Write(string file, DICOMWriteSettings settings = null)
+        public void Write(Stream stream, DICOMWriteSettings settings = null)
         {
             settings = settings ?? DICOMWriteSettings.Default();
-            DICOMFileWriter.Write(file, settings, this);
+            DICOMFileWriter.Write(stream, settings, this);
         }

         public byte[] GetBytes(DICOMWriteSettings settings = null)


Weirdly, System extensions assembly info isn't being patched.  This might fix it.

--- Extensions/System/Properties/AssemblyInfo.cs
+++ Extensions/System/Properties/AssemblyInfo.cs
@@ -1,15 +1,5 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="AssemblyInfo.cs" company="James Dibble">
-//   Copyright 2012 James Dibble
-// </copyright>
-// <summary>
-//   AssemblyInfo.cs
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-using System;
-using System.Reflection;
-using System.Resources;
+using System.Reflection;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;

 // General Information about an assembly is controlled through the following
@@ -18,9 +8,9 @@
 [assembly: AssemblyTitle("JamesDibble.Extensions.System")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("James Dibble")]
-[assembly: AssemblyProduct("System")]
-[assembly: AssemblyCopyright("Copyright James Dibble ©  2013")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("JamesDibble.Extensions.System")]
+[assembly: AssemblyCopyright("Copyright ©  2013")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -44,5 +34,3 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: NeutralResourcesLanguageAttribute("en-GB")]
-[assembly: CLSCompliant(true)]


tested latex compile; all looks well

tested latex compile; all looks well

--- Famoser.FexCompiler/Services/LatexService.cs
+++ Famoser.FexCompiler/Services/LatexService.cs
@@ -56,31 +56,42 @@
             if (content is Section)
             {
                 var section = (Section)content;
-                var sectionName = "section";
-                if (level == 1)
-                    sectionName = "subsection";
-                else if (level == 2)
-                    sectionName = "subsubsection";
-                else if (level == 3)
-                    sectionName = "paragraph";
-                else if (level == 4)
-                    sectionName = "subparagraph";
-                else if (level > 4)
-                    sectionName = "subsubparagraph";
-
-                var noSubContent = !section.Content.Any();
-                //use only bold when no sub content
-                if (noSubContent)
-                    sectionName = "textbf";
-
-                res += "\\" + sectionName + "{" + ToLatex(section.Header) + "}\n";
-
-                //add section description
-                res += ToLatex(section.TextContent);
-
-                //need to manually add spacing if no sub defined
-                if (noSubContent)
-                    res += "\\mbox{}\\\\\\vspace{" + AfterParagraphSpacing + "pt}";
+
+                if (section.Content.Any())
+                {
+                    var sectionName = "section";
+                    if (level == 1)
+                        sectionName = "subsection";
+                    else if (level == 2)
+                        sectionName = "subsubsection";
+                    else if (level == 3)
+                        sectionName = "paragraph";
+                    else if (level == 4)
+                        sectionName = "subparagraph";
+                    else if (level > 4)
+                        sectionName = "subsubparagraph";
+
+                    res += "\\" + sectionName + "{" + ToLatex(section.Header) + "}\n";
+                }
+                else
+                {
+                    //use bold only when no sub content
+                    res += "\\textbf{" + ToLatex(section.Header) + "}\\\\\n";
+                }
+
+                if (section.TextContent.Any())
+                {
+                    //add section description
+                    res += ToLatex(section.TextContent);
+
+                    //add spacer if bold is following afterwards
+                    if (section.Content.Any() &&
+                        section.Content[0] is Section &&
+                        !((Section) section.Content[0]).Content.Any())
+                    {
+                        res += "\\vspace{" + ParagraphOnParagraphSpacing + "pt}";
+                    }
+                }

                 //add higher levels recursively
                 for (var index = 0; index < section.Content.Count; index++)
@@ -91,7 +102,7 @@
                     //check if spacing needed
                     var beforeSection = baseContent as Section;
                     var afterSection = index + 1 < section.Content.Count ? section.Content[index + 1] as Section : null;
-                    if (beforeSection != null && afterSection != null && level > 1)
+                    if (beforeSection != null && afterSection != null)
                     {
                         //if after is paragraph, need to add spacing
                         if (!afterSection.Content.Any())


CloseEventArgs

CloseEventArgs

--- websocket-sharp.clone/CloseEventArgs.cs
+++ websocket-sharp.clone/CloseEventArgs.cs
@@ -46,8 +46,8 @@
 	public class CloseEventArgs : EventArgs
 	{
 		private readonly byte[] _rawData;
-		private bool _clean;
-		private PayloadData _payloadData;
+
+	    private PayloadData _payloadData;

 		internal CloseEventArgs()
 		{
@@ -81,39 +81,16 @@
 		{
 		}

-		internal PayloadData PayloadData
-		{
-			get
-			{
-				return _payloadData ?? (_payloadData = new PayloadData(_rawData));
-			}
-		}
+		internal PayloadData PayloadData => _payloadData ?? (_payloadData = new PayloadData(_rawData));

-		internal byte[] RawData
-		{
-			get
-			{
-				return _rawData;
-			}
-		}
+	    internal byte[] RawData => _rawData;

-		/// <summary>
+	    /// <summary>
 		/// Gets a value indicating whether the WebSocket connection has been closed cleanly.
 		/// </summary>
 		/// <value>
 		/// <c>true</c> if the WebSocket connection has been closed cleanly; otherwise, <c>false</c>.
 		/// </value>
-		public bool WasClean
-		{
-			get
-			{
-				return _clean;
-			}
-
-			internal set
-			{
-				_clean = value;
-			}
-		}
+		public bool WasClean { get; internal set; }
 	}
 }


- version 0.8

- version 0.8

--- HudsonTrayTracker/Properties/AssemblyInfo.cs
+++ HudsonTrayTracker/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@
 //      Build Number
 //      Revision
 //
-[assembly: AssemblyVersion("0.7.5.0")]
-[assembly: AssemblyFileVersion("0.7.5.0")]
+[assembly: AssemblyVersion("0.8.0.0")]
+[assembly: AssemblyFileVersion("0.8.0.0")]


Edited the right IP

Edited the right IP

--- Ict4Participation/Database_Layer/Database.cs
+++ Ict4Participation/Database_Layer/Database.cs
@@ -21,7 +21,7 @@
     public static class Database
     {
         /// HOST IP
-        private static string host = "25.128.155.180";
+        private static string host = "192.168.20.27";
         /// HOST USERNAME
         private static string username = "PLUMBUM";
         /// HOST PASSWORD


New default value for NullSymbol

New default value for NullSymbol

NullSymbol property now returns DBFFieldType.Unknown if not set (null).

--- DotNetDBF/DBFWriter.cs
+++ DotNetDBF/DBFWriter.cs
@@ -148,7 +148,7 @@

 	public string NullSymbol
         {
-            get { return _nullSymbol; }
+            get { return _nullSymbol ?? DBFFieldType.Unknown; }
             set
             {
                 if (value != null && value.Length != 1)
@@ -458,7 +458,7 @@
                         {
                             dataOutput.Write(
                                 Utils.textPadding(
-                                    NullSymbol ?? DBFFieldType.Unknown,
+                                    NullSymbol,
                                     CharEncoding,
                                     header.FieldArray[j].FieldLength,
                                     Utils.ALIGN_RIGHT
@@ -486,7 +486,7 @@
                         {
                             dataOutput.Write(
                                 Utils.textPadding(
-                                    NullSymbol ?? DBFFieldType.Unknown,
+                                    NullSymbol,
                                     CharEncoding,
                                     header.FieldArray[j].FieldLength,
                                     Utils.ALIGN_RIGHT


git-svn-id: https://jumony.svn.codeplex.com/svn/trunk@69376 2327b42d-5241-43d6-9e2a-de5ac946f064

--- Ivony.Html/Extensions/AttributeExtensions.cs
+++ Ivony.Html/Extensions/AttributeExtensions.cs
@@ -312,7 +312,7 @@
     /// <param name="attributeName">属性名</param>
     /// <param name="evaluator">用于替换属性值的计算函数</param>
     /// <returns></returns>
-    public static IEnumerable<IHtmlElement> SetAttribute( IEnumerable<IHtmlElement> elements, string attributeName, Func<string, string> evaluator )
+    public static IEnumerable<IHtmlElement> SetAttribute( this IEnumerable<IHtmlElement> elements, string attributeName, Func<string, string> evaluator )
     {
       if ( elements == null )
         throw new ArgumentNullException( "elements" );
@@ -338,7 +338,7 @@
     /// <param name="attributeName">属性名</param>
     /// <param name="evaluator">用于替换属性值的计算函数</param>
     /// <returns></returns>
-    public static IEnumerable<IHtmlElement> SetAttribute( IEnumerable<IHtmlElement> elements, string attributeName, Func<int, string, string> evaluator )
+    public static IEnumerable<IHtmlElement> SetAttribute( this IEnumerable<IHtmlElement> elements, string attributeName, Func<int, string, string> evaluator )
     {
       if ( elements == null )
         throw new ArgumentNullException( "elements" );


Don't crash if unable to set mutex security

--- EDDiscovery/Program.cs
+++ EDDiscovery/Program.cs
@@ -60,10 +60,17 @@
             string mutexId = string.Format("Global\\{{{0}}}", appGuid);
             mutex = new Mutex(false, mutexId);

-            var allowEveryoneRule = new MutexAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), MutexRights.FullControl, AccessControlType.Allow);
-            var securitySettings = new MutexSecurity();
-            securitySettings.AddAccessRule(allowEveryoneRule);
-            mutex.SetAccessControl(securitySettings);
+            try
+            {
+                var allowEveryoneRule = new MutexAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), MutexRights.FullControl, AccessControlType.Allow);
+                var securitySettings = new MutexSecurity();
+                securitySettings.AddAccessRule(allowEveryoneRule);
+                mutex.SetAccessControl(securitySettings);
+            }
+            catch (PlatformNotSupportedException)
+            {
+                System.Diagnostics.Trace.WriteLine("Unable to set mutex security");
+            }
         }

         public SingleGlobalInstance(int timeOut)


Handle propertyChanged events as a result of element creations, correct serialization of changes

--- Models/Models/Changes/ModelChangeRecorder.cs
+++ Models/Models/Changes/ModelChangeRecorder.cs
@@ -139,13 +139,22 @@
             int currentIndex = 0;
             var list = changes.Changes;
             while (currentIndex < recordedEvents.Count)
-                list.Add(ParseChange(ref currentIndex));
+            {
+                var parsed = ParseChange(ref currentIndex);
+                if (parsed != null) list.Add(parsed);
+            }
             return changes;
         }

         private IModelChange ParseChange(ref int currentIndex)
         {
-            var currentEvent = recordedEvents[currentIndex++];
+            BubbledChangeEventArgs currentEvent;
+
+            do
+            {
+                currentEvent = recordedEvents[currentIndex++];
+                if (currentIndex == recordedEvents.Count) return null;
+            } while (currentEvent.ChangeType != ChangeType.PropertyChanging && currentEvent.ChangeType != ChangeType.CollectionChanging);

             var childChanges = new List<IModelChange>();
             IModelElement createdElement = null;
@@ -179,6 +188,12 @@
                         transaction.NestedChanges.AddRange(childChanges);
                         return transaction;
                     }
+                }
+                else if ((nextEvent.ChangeType == ChangeType.PropertyChanged || nextEvent.ChangeType == ChangeType.CollectionChanged) && nextEvent.Element == createdElement)
+                {
+                    // These events are opposites of creation messages and can be ignored
+                    currentIndex++;
+                    continue;
                 }
                 else
                 {
@@ -477,7 +492,7 @@
             if (changeSources.TryGetValue(element, out elementSource))
             {
                 var me = elementSource as ModelElement;
-                return me.CreateUriWithFragment("element", false);
+                return me.CreateUriWithFragment("addedElement", false);
             }
             return base.CreateUriForElement(element);
         }


Committing ProfileModel

Committing ProfileModel

--- MultiConsoleExtension/Models/ProfileModel.cs
+++ MultiConsoleExtension/Models/ProfileModel.cs
@@ -11,7 +11,7 @@
         public string AuthHeader { get; set; }
         public int PID { get; set; }
         public bool ProfileIIS { get; set; }
-        public enum Action {Start , Stop, Info};
+        public enum Action {Start , Stop, Info, MiniDump, FullDump, Kill};
         public Action ActionRequested { get; set; }

         public ProfileModel()


Fix incorrect inheritance relationship

Fix incorrect inheritance relationship

--- NQuery.Language/Syntax/SelectClauseSyntax.cs
+++ NQuery.Language/Syntax/SelectClauseSyntax.cs
@@ -3,7 +3,7 @@

 namespace NQuery.Language
 {
-    public sealed class SelectClauseSyntax : QuerySyntax
+    public sealed class SelectClauseSyntax : SyntaxNode
     {
         private readonly SyntaxToken _selectKeyword;
         private readonly SyntaxToken? _distinctAllKeyword;


Create want and need lists for agent data interchange formats.

--- OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -82,6 +82,13 @@
         /// </value>
         protected Dictionary<Type, List<object>> ModuleInterfaces = new Dictionary<Type, List<object>>();

+        /// <summary>
+        /// These two objects hold the information about any formats used
+        /// by modules that hold agent specific data.
+        /// </summary>
+        protected List<UUID> FormatsOffered = new List<UUID>();
+        protected Dictionary<object, List<UUID>> FormatsWanted = new Dictionary<object, List<UUID>>();
+
         protected Dictionary<string, object> ModuleAPIMethods = new Dictionary<string, object>();

         /// <value>
@@ -367,6 +374,31 @@
             return m_moduleCommanders;
         }

+        protected void CheckAndAddAgentDataFormats(object mod)
+        {
+            if (!(mod is IAgentStatefulModule))
+                return;
+
+            IAgentStatefulModule m = (IAgentStatefulModule)mod;
+
+            List<UUID> renderFormats = m.GetRenderStateFormats();
+            List<UUID> acceptFormats = m.GetAcceptStateFormats();
+
+            foreach (UUID render in renderFormats)
+            {
+                if (!(FormatsOffered.Contains(render)))
+                    FormatsOffered.Add(render);
+            }
+
+            if (acceptFormats.Count == 0)
+                return;
+
+            if (FormatsWanted.ContainsKey(mod))
+                return;
+
+            FormatsWanted[mod] = acceptFormats;
+        }
+
         /// <summary>
         /// Register an interface to a region module.  This allows module methods to be called directly as
         /// well as via events.  If there is already a module registered for this interface, it is not replaced
@@ -388,6 +420,8 @@
                 return;

             l.Add(mod);
+
+            CheckAndAddAgentDataFormats(mod);

             if (mod is IEntityCreator)
             {
@@ -401,6 +435,14 @@

         public void UnregisterModuleInterface<M>(M mod)
         {
+            // We can't unregister agent stateful modules because
+            // that would require much more data to be held about formats
+            // and would make that code slower and less efficient.
+            // No known modules are unregistered anyway, ever, unless
+            // the simulator shuts down anyway.
+            if (mod is IAgentStatefulModule)
+                return;
+
             List<Object> l;
             if (ModuleInterfaces.TryGetValue(typeof(M), out l))
             {
@@ -430,6 +472,8 @@
                 return;

             l.Add(mod);
+
+            CheckAndAddAgentDataFormats(mod);

             if (mod is IEntityCreator)
             {


Be smarter about redirected text

Be smarter about redirected text

--- Pixie.Terminal/Devices/TextWriterTerminal.cs
+++ Pixie.Terminal/Devices/TextWriterTerminal.cs
@@ -106,13 +106,16 @@
         {
             if (isRedirected)
             {
-                return new TextWriterTerminal(writer, 80, NoStyleManager.Instance);
-            }
-            else
-            {
                 return new TextWriterTerminal(
                     writer,
-                    Console.BufferWidth,
+                    DefaultTerminalWidth,
+                    NoStyleManager.Instance);
+            }
+            else
+            {
+                return new TextWriterTerminal(
+                    writer,
+                    GetTerminalWidth(),
                     IsAnsiTerminalIdentifier(EnvironmentTerminalIdentifier.ToLowerInvariant())
                         ? (StyleManager)new AnsiStyleManager(writer)
                         : (StyleManager)new ConsoleStyleManager());
@@ -185,6 +188,27 @@
             return identifier.StartsWith("vt")
                 || identifier.StartsWith("xterm")
                 || identifier == "linux";
+        }
+
+        private const int DefaultTerminalWidth = 80;
+
+        private static int GetTerminalWidth()
+        {
+            int result = 0;
+            try
+            {
+                result = Console.BufferWidth;
+            }
+            catch (Exception)
+            {
+                // Console.BufferWidth can throw when using the
+                // .NET framework on Cygwin. We'll just ignore
+                // the error and pick the default size.
+            }
+
+            return result <= 0
+                ? DefaultTerminalWidth
+                : result;
         }
     }


Use specified font for RTF exporting

Use specified font for RTF exporting

--- Plugins/FileTypes/RtfFile/RtfFileExporter.cs
+++ Plugins/FileTypes/RtfFile/RtfFileExporter.cs
@@ -12,7 +12,6 @@
 {
     internal class RtfFileExporter : ITablatureFileExporter
     {
-        private Font _font;
         private RichTextBox _rtb;

         #region Implementation of ITablatureFileExporter
@@ -24,13 +23,10 @@
             get { return new Version("1.0"); }
         }

-        public void Export(ITablatureFile file, string fileName)
+        public void Export(ITablatureFile file, string fileName, TablatureFileExportArguments args)
         {
-            if (_font == null)
-                _font = new Font("Courier New", 9F);
-
             if (_rtb == null)
-                _rtb = new RichTextBox {Font = new Font("Courier New", 9F), Text = file.Contents};
+                _rtb = new RichTextBox {Font = args.Font, Text = file.Contents};

             _rtb.SaveFile(fileName);
             _rtb.SaveFile(fileName); //have to call method twice otherwise empty file is created
@@ -45,9 +41,6 @@

         ~RtfFileExporter()
         {
-            if (_font != null)
-                _font.Dispose();
-
             if (_rtb != null && !_rtb.IsDisposed)
                 _rtb.Dispose();
         }


added tests for adding line items and splits

--- Purchasing.Web/Views/OrderMockup/Test.cshtml
+++ Purchasing.Web/Views/OrderMockup/Test.cshtml
@@ -200,6 +200,30 @@

                 ok(inputs.is(":visible"), "inputs should be visible");
                 ok(inputs.is(":enabled"), "inputs should be enabled");
+            });
+
+            module("line item manipulation");
+
+            test("clicking add new item adds a line", function() {
+                var startingLineItemCount = $(".line-item-row").length;
+
+                $("#add-line-item").trigger('click', { automate: true });
+
+                var newLineItemCount = $(".line-item-row").length;
+
+                equal(newLineItemCount, startingLineItemCount + 1, "clicking add new item should insert new line item row");
+            });
+
+            test("clicking add split adds a new split", function() {
+                var firstLineItemSplitSection = $(".line-item-splits").first();
+
+                var startingSplitRowsCount = $(".sub-line-item-split-body > tr", firstLineItemSplitSection).length;
+
+                $(".add-line-item-split", firstLineItemSplitSection).trigger('click');
+
+                var newSplitRowsCount = $(".sub-line-item-split-body > tr", firstLineItemSplitSection).length;
+
+                equal(newSplitRowsCount, startingSplitRowsCount + 1, "clicking add split should insert a new split for this line item");
             });
         }
     </script>


Make the fundamental domain for the 4C klein bottle appear as a square

This is to help out with Burkard's video.

--- Puzzles/MagicTile/MagicTile/Puzzle/Puzzle.cs
+++ Puzzles/MagicTile/MagicTile/Puzzle/Puzzle.cs
@@ -212,7 +212,7 @@
 			if( callback.Cancelled )
 				return;
 			callback.Status( "adding in cells..." );
-			foreach( Tile t in tiling.Tiles )
+			foreach( Tile t in MasterCandidates( tiling ) )
 			{
 				// Have we already done this tile?
 				if( completed.ContainsKey( t.Center ) )
@@ -282,6 +282,21 @@
 			callback.Status( "Number of tiles:" + tiling.Tiles.Count() );
 			callback.Status( "Number of cells:" + count );
 			callback.Status( "Number of stickers per cell:" + tStickers.Count );
+		}
+
+		private IEnumerable<Tile> MasterCandidates( Tiling tiling )
+		{
+			IEnumerable<Tile> masterCandidates = tiling.Tiles;
+
+			// Hack to make the fundamental region look better for the 4C Klein bottle.
+			if( Config.Geometry == Geometry.Euclidean &&
+				Config.P == 4 && Config.Q == 4 && Config.ExpectedNumColors == 4 )
+			{
+				Tile[] allTiles = tiling.Tiles.ToArray();
+				masterCandidates = new Tile[] { allTiles[0], allTiles[1], allTiles[2], allTiles[5] };
+			}
+
+			return masterCandidates;
 		}

 		private CircleNE SetupTemplateSlicingCircle( Tile template, Distance d, Mobius m )


Added TryGet Bon test.

Added TryGet Bon test.

--- BTDBTest/BonTests.cs
+++ BTDBTest/BonTests.cs
@@ -418,7 +418,7 @@
         builder.FinishDictionary();
         var buffer = builder.Finish();
         Assert.Equal(2, buffer.Length);
-        Assert.Equal("[]",new Bon(buffer).DumpToJson());
+        Assert.Equal("[]", new Bon(buffer).DumpToJson());
     }

     [Fact]
@@ -434,4 +434,36 @@
         var buffer = builder.Finish();
         this.Assent(new Bon(buffer).DumpToJson());
     }
+
+    [Fact]
+    public void CanQuicklyDrillDownIntoBon()
+    {
+        var builder = new BonBuilder();
+        builder.StartObject();
+        builder.WriteKey("first");
+        builder.StartArray();
+        for (var i = 0; i < 10; i++)
+        {
+            builder.Write(i);
+        }
+
+        builder.FinishArray();
+        builder.WriteKey("last");
+        builder.StartArray();
+        for (var i = 0; i < 10; i++)
+        {
+            builder.Write(i + 10);
+        }
+
+        builder.FinishArray();
+        builder.FinishObject();
+        var buffer = builder.Finish();
+        var bon = new Bon(buffer);
+        Assert.True(bon.TryGetObject(out var keyedBon));
+        Assert.True(keyedBon.TryGet("last", out var array));
+        Assert.True(array.TryGetArray(out var items));
+        items.Skip();
+        Assert.True(items.TryGetLong(out var result));
+        Assert.Equal(11, result);
+    }
 }


Add some debug logging for, umm, debugging.

--- Basil/BasilModule.cs
+++ Basil/BasilModule.cs
@@ -255,6 +255,13 @@
             int totalChildren = sog.Parts.GetLength(0);
             foreach (SceneObjectPart sop in sog.Parts) {

+                // DEBUG DEBUG
+                m_log.DebugFormat("{0} SOP {1} wPos={2}, gPos={3}, aPos={4}, oPos={5}, rOff={6}, wRot={7}, scale={8}",
+                        LogHeader, sop.UUID,
+                        sop.GetWorldPosition(),
+                        sop.GroupPosition, sop.AbsolutePosition, sop.OffsetPosition,
+                        sop.RotationOffset, sop.GetWorldRotation(), sop.Scale);
+                // END DEBUG DEBUG
                 OMV.Primitive aPrim = sop.Shape.ToOmvPrimitive();
                 mesher.CreateMeshResource(sog, sop, aPrim, assetFetcher, OMVR.DetailLevel.Highest, stats)
                     .Catch(e => {


Added another language test.

Added another language test.

--- src/cap-net.Tests/Models/InfoTests.cs
+++ src/cap-net.Tests/Models/InfoTests.cs
@@ -17,5 +17,14 @@

             Assert.Equal("en-US", info.Language);
         }
+
+        [Fact]
+        public void LanguageSetsToUserValue()
+        {
+            var info = new Info();
+            info.Language = "en-UK";
+
+            Assert.Equal("en-UK", info.Language);
+        }
     }
 }


(DeleteItemExec): catch -> finally

(DeleteItemExec): catch -> finally

--- GUI/MainWindow.xaml.cs
+++ GUI/MainWindow.xaml.cs
@@ -1136,10 +1136,9 @@
                         GARbro.Shell.File.Delete (file_list);
                         count = file_list.Count();
                     }
-                    catch
+                    finally
                     {
                         ResumeWatchDirectoryChanges();
-                        throw;
                     }
                     RefreshView();
                     SetStatusText (Localization.Format ("MsgDeletedItems", count));


- release v3.1.7

- release v3.1.7

--- Shuttle.Core.Host/Properties/AssemblyInfo.cs
+++ Shuttle.Core.Host/Properties/AssemblyInfo.cs
@@ -17,10 +17,10 @@
 [assembly: AssemblyTitle("Shuttle.Core.Host for .NET Framework 4.5.1")]
 #endif

-[assembly: AssemblyVersion("3.1.6.0")]
-[assembly: AssemblyCopyright("Copyright © Eben Roux 2010-2014")]
+[assembly: AssemblyVersion("3.1.7.0")]
+[assembly: AssemblyCopyright("Copyright © Eben Roux 2010-2015")]
 [assembly: AssemblyProduct("Shuttle.Core")]
 [assembly: AssemblyCompany("Shuttle")]
 [assembly: AssemblyConfiguration("Release")]
-[assembly: AssemblyInformationalVersion("3.1.6")]
+[assembly: AssemblyInformationalVersion("3.1.7")]
 [assembly: ComVisible(false)]


mixins

mixins

--- Signum.Entities.Extensions/SMS/SMSMessage.cs
+++ Signum.Entities.Extensions/SMS/SMSMessage.cs
@@ -17,7 +17,7 @@
     }

     [Serializable, EntityKind(EntityKind.Main)]
-    public class SMSMessageDN : CorruptEntity, IProcessLineDataDN
+    public class SMSMessageDN : Entity, IProcessLineDataDN
     {
         public static string DefaultFrom;


Updated name of inner class

Updated name of inner class

--- SlackHistoryViewer.RemoteMessages/Program.cs
+++ SlackHistoryViewer.RemoteMessages/Program.cs
@@ -24,12 +24,12 @@

             configuration.Bind(AppSettings.Instance);

-            Task.Run(() => new MyClass().Run())
+            Task.Run(() => new RemoteMessages().Run())
                 .Wait();

         }

-        class MyClass
+        class RemoteMessages
         {

             public async Task Run()


#10373 Additional hospital settings in API response

--- SnapMD.VirtualCare.ApiModels/HospitalInfo.cs
+++ SnapMD.VirtualCare.ApiModels/HospitalInfo.cs
@@ -22,6 +22,9 @@
     /// </summary>
     public class HospitalInfo : ProviderBase, IHospitalResponse
     {
+
+        public enum FieldPresence { Mandatory, Optional, Invisible }
+
         /// <summary>
         /// The city in which the hospital resides.
         /// </summary>
@@ -47,6 +50,11 @@
         /// The list of modules enabled for a hospital.
         /// </summary>
         public List<string> EnabledModules { get; set; }
+
+        /// <summary>
+        /// Configuration of mandatory/optional/invisible fields
+        /// </summary>
+        public Dictionary<string, string> FieldsPresence { get; set; }

         /// <summary>
         /// The hospital ID.


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.3.3384.20200517231811-master-304010c

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "a7a376b9e3377f63fab0167a57015a6746bace6f";
+        public static string Commit = "304010c0cdcdd93f3bd2f6dc0130a94b89983a48";

         public static string Version = "1.3";
-        public static string Build   = "3383";
+        public static string Build   = "3384";

         public static int BuildYear   = 2020;
         public static int BuildMonth  = 05;
-        public static int BuildDay    = 12;
-        public static int BuildHour   = 03;
-        public static int BuildMinute = 56;
-        public static int BuildSecond = 02;
+        public static int BuildDay    = 17;
+        public static int BuildHour   = 23;
+        public static int BuildMinute = 18;
+        public static int BuildSecond = 11;
     }
 }


Remove Weighted edge idea; make all edges weighted

--- Graph/IWeightedEdge.cs
+++ Graph/IWeightedEdge.cs
@@ -1,19 +0,0 @@
-using System;
-
-namespace Graph
-{
-    /// <summary>
-    /// Represent an
-    /// </summary>
-    /// <typeparam name="V">
-    /// The type used to create vertex (node) labels.
-    /// </typeparam>
-    /// <typeparam name="W">
-    /// The type used for the edge weight.
-    /// </typeparam>
-    public interface IWeightedEdge<V, W> : IEdge<V>
-        where V : struct, IEquatable<V>
-        where W : struct, IEquatable<W>
-    {
-    }
-}


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.12.3598.20200912162901-master-03d3a13

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "8ddf717fa1596c31ba0bb8267681e092520c0879";
+        public static string Commit = "03d3a136b81e5f40094d262df369d6349a661201";

         public static string Version = "1.12";
-        public static string Build   = "3597";
+        public static string Build   = "3598";

         public static int BuildYear   = 2020;
         public static int BuildMonth  = 09;
-        public static int BuildDay    = 11;
-        public static int BuildHour   = 05;
-        public static int BuildMinute = 05;
-        public static int BuildSecond = 10;
+        public static int BuildDay    = 12;
+        public static int BuildHour   = 16;
+        public static int BuildMinute = 29;
+        public static int BuildSecond = 01;
     }
 }


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.26.3991.20210720063755-master-5da988f

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "62bd4c07fae9452e9fef2159ebb674efc3a9bc33";
+        public static string Commit = "5da988ff5627d226a64bbdca4b73342e79c22486";

-        public static string Version = "1.25";
-        public static string Build   = "3990";
+        public static string Version = "1.26";
+        public static string Build   = "3991";

         public static int BuildYear   = 2021;
         public static int BuildMonth  = 07;
         public static int BuildDay    = 20;
         public static int BuildHour   = 06;
-        public static int BuildMinute = 10;
-        public static int BuildSecond = 30;
+        public static int BuildMinute = 37;
+        public static int BuildSecond = 55;
     }
 }


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.19.3808.20210116211916-master-df25a80

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "ce4ee235871f2053cad854c7bb5df6cecf235ca6";
+        public static string Commit = "df25a80d547be47fe37f6916fa8c09a498715bdc";

         public static string Version = "1.19";
-        public static string Build   = "3807";
+        public static string Build   = "3808";

         public static int BuildYear   = 2021;
         public static int BuildMonth  = 01;
         public static int BuildDay    = 16;
-        public static int BuildHour   = 08;
-        public static int BuildMinute = 31;
-        public static int BuildSecond = 57;
+        public static int BuildHour   = 21;
+        public static int BuildMinute = 19;
+        public static int BuildSecond = 16;
     }
 }


added a missing aspect type to the sandbox

--- Source/Demos/Sandbox/Systems/RenderSystem.cs
+++ Source/Demos/Sandbox/Systems/RenderSystem.cs
@@ -16,7 +16,7 @@
         private ComponentMapper<Raindrop> _raindropMapper;

         public RenderSystem(GraphicsDevice graphicsDevice)
-            : base(Aspect.All(typeof(Transform2)))
+            : base(Aspect.All(typeof(Transform2), typeof(Raindrop)))
         {
             _graphicsDevice = graphicsDevice;
             _spriteBatch = new SpriteBatch(graphicsDevice);


list fix

list fix

--- Source/OnenoteMarkdownConverter/Converter.cs
+++ Source/OnenoteMarkdownConverter/Converter.cs
@@ -300,7 +300,7 @@
             if (node.Name == "ul" || node.Name == "ol")
             {
                 _inListLevel += isOpen ? 1 : -1;
-                if (!isOpen && _inListLevel == 0)
+                if (_inListLevel == (isOpen ? 1 : 0))
                     _builder.AppendLine();

             }


New: CheckedApply and functional array constructor

--- Helper/ListExtender.cs
+++ Helper/ListExtender.cs
@@ -1,6 +1,26 @@
+//     Compiler for programming language "Reni"
+//     Copyright (C) 2011 Harald Hoyer
+//
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU General Public License as published by
+//     the Free Software Foundation, either version 3 of the License, or
+//     (at your option) any later version.
+//
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU General Public License for more details.
+//
+//     You should have received a copy of the GNU General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//     Comments, bugs and suggestions to hahoyer at yahoo.de
+
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
+using System.Linq.Expressions;
 using HWClassLibrary.Debug;

 namespace HWClassLibrary.Helper
@@ -10,40 +30,34 @@
         public static bool AddDistinct<T>(this IList<T> a, IEnumerable<T> b, Func<T, T, bool> isEqual) { return InternalAddDistinct(a, b, isEqual); }
         public static bool AddDistinct<T>(this IList<T> a, IEnumerable<T> b, Func<T, T, T> combine) where T : class { return InternalAddDistinct(a, b, combine); }

-        private static bool InternalAddDistinct<T>(ICollection<T> a, IEnumerable<T> b, Func<T, T, bool> isEqual)
+        static bool InternalAddDistinct<T>(ICollection<T> a, IEnumerable<T> b, Func<T, T, bool> isEqual)
         {
             var result = false;
             foreach(var bi in b)
-            {
                 if(AddDistinct(a, bi, isEqual))
                     result = true;
-            }
             return result;
         }

-        private static bool InternalAddDistinct<T>(IList<T> a, IEnumerable<T> b, Func<T, T, T> combine) where T : class
+        static bool InternalAddDistinct<T>(IList<T> a, IEnumerable<T> b, Func<T, T, T> combine) where T : class
         {
             var result = false;
             foreach(var bi in b)
-            {
                 if(AddDistinct(a, bi, combine))
                     result = true;
-            }
             return result;
         }

-        private static bool AddDistinct<T>(ICollection<T> a, T bi, Func<T, T, bool> isEqual)
+        static bool AddDistinct<T>(ICollection<T> a, T bi, Func<T, T, bool> isEqual)
         {
             foreach(var ai in a)
-            {
                 if(isEqual(ai, bi))
                     return false;
-            }
             a.Add(bi);
             return true;
         }

-        private static bool AddDistinct<T>(IList<T> a, T bi, Func<T, T, T> combine) where T : class
+        static bool AddDistinct<T>(IList<T> a, T bi, Func<T, T, T> combine) where T : class
         {
             for(var i = 0; i < a.Count; i++)
             {
@@ -99,10 +113,8 @@
             if(x.Count < y.Count)
                 return false;
             for(var i = 0; i < y.Count; i++)
-            {
                 if(!Equals(x[i], y[i]))
                     return false;
-            }
             return true;
         }

@@ -126,5 +138,49 @@
             Tracer.Assert(xx.Length == 1);
             return xx[0];
         }
+
+        public static TResult CheckedApply<T, TResult>(this T target, Func<T, TResult> function)
+            where T : class
+            where TResult : class { return target == default(T) ? default(TResult) : function(target); }
+
+        public static IEnumerable<T> Array<T>(this int count, Func<int, T> getValue) { return new ArrayQuery<T>(count, getValue); }
+
+        sealed class ArrayQuery<T> : IEnumerable<T>
+        {
+            readonly int _count;
+            readonly Func<int, T> _getValue;
+            public ArrayQuery(int count, Func<int, T> getValue)
+            {
+                _count = count;
+                _getValue = getValue;
+            }
+
+            IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<T>) this).GetEnumerator(); }
+            IEnumerator<T> IEnumerable<T>.GetEnumerator() { return new Enumerator(this); }
+
+            sealed class Enumerator : IEnumerator<T>
+            {
+                readonly ArrayQuery<T> _arrayQuery;
+                int? _index;
+                public Enumerator(ArrayQuery<T> arrayQuery) { _arrayQuery = arrayQuery; }
+
+                void IDisposable.Dispose() { }
+                bool IEnumerator.MoveNext()
+                {
+                    if(_index == null)
+                        _index = 0;
+                    else
+                        _index++;
+
+                    return _index < _arrayQuery._count;
+                }
+
+                void IEnumerator.Reset() { _index = null; }
+// ReSharper disable PossibleInvalidOperationException
+                T IEnumerator<T>.Current { get { return _arrayQuery._getValue(_index.Value); } } // should throw an exception if _index is null
+// ReSharper restore PossibleInvalidOperationException
+                object IEnumerator.Current { get { return ((IEnumerator<T>) this).Current; } }
+            }
+        }
     }
 }


- Added missing XML doc comments

- Added missing XML doc comments

--- Source/src/WixSharp/Bootstrapper/Variable.cs
+++ Source/src/WixSharp/Bootstrapper/Variable.cs
@@ -176,8 +176,17 @@
         }
     }

+    /// <summary>
+    /// Extension method class for working with <see cref="Variable"/>.
+    /// </summary>
     public static class Variables
     {
+        /// <summary>
+        /// Converts key/value map into array of <see cref="Variable"/>. The map entry format
+        /// is as follows: <key>=<value>[;<key>=<value>].
+        /// </summary>
+        /// <param name="variablesDefinition">The variables definition.</param>
+        /// <returns></returns>
         public static Variable[] ToStringVariables(this string variablesDefinition)
         {
             return variablesDefinition.ToDictionary()


Added produces, consumes to API and operation

"produces" and "consumes" are string arrays for the API and Operation level that list MIME types that can be produced or consumed. This allows extensions to provide this information for the Swagger UI.

--- Swashbuckle.Core/Swagger/ISwaggerProvider.cs
+++ Swashbuckle.Core/Swagger/ISwaggerProvider.cs
@@ -50,6 +50,12 @@

         [JsonProperty("models")]
         public IDictionary<string, DataType> Models { get; set; }
+
+        [JsonProperty("produces")]
+        public IList<string> Produces { get; set; }
+
+        [JsonProperty("consumes")]
+        public IList<string> Consumes { get; set; }
     }

     public class Api
@@ -95,6 +101,12 @@

         [JsonProperty("responseMessages")]
         public IList<ResponseMessage> ResponseMessages { get; set; }
+
+        [JsonProperty("produces")]
+        public IList<string> Produces { get; set; }
+
+        [JsonProperty("consumes")]
+        public IList<string> Consumes { get; set; }
     }

     public class Parameter
@@ -168,4 +180,4 @@
         [JsonProperty("discriminator")]
         public string Discriminator { get; set; }
     }
-}+}


Extended that test -_-

Extended that test -_-

The implementation for the backport of GroupBy is actually deffered, not
this weakly deffered thing.

--- Tests/System/Linq/EnumerableGroupByTestEx.cs
+++ Tests/System/Linq/EnumerableGroupByTestEx.cs
@@ -1,8 +1,8 @@
-using NUnit.Framework;
-using System.Collections;
+using System.Collections;
 using System.Collections.Generic;
 using System.Globalization;
 using System.Linq;
+using NUnit.Framework;
 using Theraot.Collections;
 using Theraot.Core;

@@ -39,6 +39,12 @@
                 Assert.AreEqual(_src.Total, 10);
             }
             Assert.AreEqual(_src.Total, 10);
+            using (var enumerator = a.GetEnumerator())
+            {
+                // This is a shame, GroupBy is not really deffered
+                Assert.AreEqual(_src.Total, 20);
+            }
+            Assert.AreEqual(_src.Total, 20);
         }

         [Test]


Bump version.

Bump version.

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


新增註解

新增註解

新增註解

--- UartOscilloscope/CSharpFiles/CommandClass.cs
+++ UartOscilloscope/CSharpFiles/CommandClass.cs
@@ -9,5 +9,8 @@
 {                                                                               //	進入UartOscilloscope命名空間
 	private int CommandID;														//	宣告CommandID為指令編號
 	private string Command;                                                     //	宣告Command為指令內容
+	class CommandClass                                                          //	CommandClass指令類別
+	{                                                                           //	進入CommandClass指令類別

-}                                                                               //	結束UartOscilloscope命名空間
+	}                                                                           //	結束CommandClass指令類別
+}                                                                               //	結束UartOscilloscope命名空間


Activate skipped test

Activate skipped test

--- UnitTests/Regressions/IssueReportsFixture.cs
+++ UnitTests/Regressions/IssueReportsFixture.cs
@@ -1603,8 +1603,7 @@

 		public class Issue469
 		{
-			[Fact(Skip =
-				"Temporarily disabled due to a regression in Castle Core, see https://github.com/castleproject/Core/issues/309.")]
+			[Fact]
 			public void Mock_Object_should_be_able_to_mock_interface_with_overloaded_generic_methods_with_generic_parameters()
 			{
 				object dummy = new Mock<IHaveOverloadedGenericMethod>().Object;


Enable IIS FTP installer for version 7.5 (Windows Server 2008 R2)

--- src/main/Clients/IIS/IISClient.cs
+++ src/main/Clients/IIS/IISClient.cs
@@ -105,7 +105,7 @@
         {
             get
             {
-                return Version.Major >= 8 && FtpSites.Count() > 0;
+                return Version >= new Version(7, 5) && FtpSites.Count() > 0;
             }
         }