Dynamic methods

Dynamic methods

--- Unosquare.Tubular/Common.cs
+++ Unosquare.Tubular/Common.cs
@@ -258,14 +258,18 @@
             return response;
         }

+        public static IQueryable CreateDynamicFilteredSet(this IQueryable dataSource, string fieldName, string filter)
+        {
+            return dataSource.Where(String.Format("{0}.Contains(@0)", fieldName), new[] {filter});
+        }
+
         public static IQueryable CreateTypeAheadList(this IQueryable dataSource, string fieldName, string filter)
         {
             // TODO: I need to connect this to a better platform
-            return
-                dataSource.Where(String.Format("{0}.Contains(@0)", fieldName), new[] {filter})
-                    .Select(fieldName)
-                    .Distinct()
-                    .Take(8);
+            return dataSource.CreateDynamicFilteredSet(fieldName, filter)
+                .Select(fieldName)
+                .Distinct()
+                .Take(8);
         }
     }


ADDED: System - Method for converting the first letter of a string to upper case.

--- Source/Slash.System/Source/Utils/SystemExtensions.cs
+++ Source/Slash.System/Source/Utils/SystemExtensions.cs
@@ -11,6 +11,8 @@
     using System.Runtime.Serialization;
     using System.Runtime.Serialization.Formatters.Binary;
     using System.Text.RegularExpressions;
+
+    using Slash.Diagnostics.ReSharper.Annotations;

     /// <summary>
     ///   Extension methods for classes of the System namespace.
@@ -108,14 +110,36 @@
         /// </summary>
         /// <param name="s">String to split.</param>
         /// <returns>Split string.</returns>
+        [Pure]
         public static string SplitByCapitalLetters(this string s)
         {
-            var r = new Regex(@"(?<=[A-Z])(?=[A-Z][a-z]) |
+            Regex r = new Regex(@"(?<=[A-Z])(?=[A-Z][a-z]) |
                  (?<=[^A-Z])(?=[A-Z]) |
                  (?<=[A-Za-z])(?=[^A-Za-z])", RegexOptions.IgnorePatternWhitespace);
             return r.Replace(s, " ");
         }

+        /// <summary>
+        ///   Returns the specified string, converting the first letter to upper case.
+        /// </summary>
+        /// <param name="s">String to convert the first letter of.</param>
+        /// <returns>Specified string with first letter in upper case.</returns>
+        [Pure]
+        public static string FirstLetterToUpper(this string s)
+        {
+            if (string.IsNullOrEmpty(s))
+            {
+                return s;
+            }
+
+            if (s.Length > 1)
+            {
+                return char.ToUpper(s[0]) + s.Substring(1);
+            }
+
+            return s.ToUpper();
+        }
+
         #endregion
     }
 }


HW 2 A: fast search impl finished!!!

HW 2 A: fast search impl finished!!!


Improve logging of directory operations

Improve logging of directory operations

--- src/Assets/Scripts/AppData/DirectoryOperations.cs
+++ src/Assets/Scripts/AppData/DirectoryOperations.cs
@@ -1,4 +1,5 @@
-using System.IO;
+using System;
+using System.IO;
 using PatchKit.Unity.Patcher.Debug;

 namespace PatchKit.Unity.Patcher.AppData
@@ -21,13 +22,23 @@
         {
             Checks.ArgumentNotNullOrEmpty(path, "path");

-            DebugLogger.Log(string.Format("Creating parent directory for <{0}>.", path));
+            try
+            {
+                DebugLogger.Log(string.Format("Creating parent directory for <{0}>.", path));

-            string dirPath = Path.GetDirectoryName(path);
+                string dirPath = Path.GetDirectoryName(path);

-            if (!string.IsNullOrEmpty(dirPath))
+                if (!string.IsNullOrEmpty(dirPath))
+                {
+                    CreateDirectory(dirPath);
+                }
+
+                DebugLogger.Log("Parent directory created.");
+            }
+            catch (Exception)
             {
-                CreateDirectory(dirPath);
+                DebugLogger.Log("Error while creating parent directory: an exception occured. Rethrowing exception.");
+                throw;
             }
         }

@@ -35,9 +46,19 @@
         {
             Checks.ArgumentNotNullOrEmpty(dirPath, "dirPath");

-            DebugLogger.Log(string.Format("Creating directory <{0}>.", dirPath));
+            try
+            {
+                DebugLogger.Log(string.Format("Creating directory <{0}>.", dirPath));

-            Directory.CreateDirectory(dirPath);
+                Directory.CreateDirectory(dirPath);
+
+                DebugLogger.Log("Directory created.");
+            }
+            catch (Exception)
+            {
+                DebugLogger.Log("Error while creating directory: an exception occured. Rethrowing exception.");
+                throw;
+            }
         }

         public static void Delete(string dirPath, bool recursive)
@@ -45,11 +66,21 @@
             Checks.ArgumentNotNullOrEmpty(dirPath, "dirPath");
             Checks.DirectoryExists(dirPath);

-            DebugLogger.Log(string.Format("Deleting directory {0}<{1}>.",
-                recursive ? "recursively " : string.Empty,
-                dirPath));
+            try
+            {
+                DebugLogger.Log(string.Format("Deleting directory {0}<{1}>.",
+                    recursive ? "recursively " : string.Empty,
+                    dirPath));

-            Directory.Delete(dirPath, recursive);
+                Directory.Delete(dirPath, recursive);
+
+                DebugLogger.Log("Directory deleted.");
+            }
+            catch (Exception)
+            {
+                DebugLogger.Log("Error while deleting directory: an exception occured. Rethrowing exception.");
+                throw;
+            }
         }
     }
 }


Fixed path scope, resolved getFilesAndDirectories() issue and restored uninstall output.

--- FSAddonInstaller/Program.cs
+++ FSAddonInstaller/Program.cs
@@ -70,8 +70,7 @@
             }

             // Class member initialisation
-            path = null;
-            fsxDirectory = null;
+            this.path = path;
             directoryCount = 0;
             fileCount = 0;
             skipCount = 0;
@@ -164,6 +163,9 @@
                     directoryCount++;
                 }
             }
+
+            // Print a summary of operations
+            Console.WriteLine("\r\nDeleted {0} files, {1} directories.\r\nRestored: {2} files.\r\n", fileCount, directoryCount, backupCount);
         }

         /// <summary>
@@ -187,7 +189,7 @@
         private void getFilesAndDirectories(string source) {
             foreach (string file in Directory.GetFiles(source)) {
                 // Get the relative path
-                string relPath = file.Substring(source.Length + 1, file.Length - (source.Length - 1));
+                string relPath = file.Substring(path.Length + 1, (file.Length - path.Length) - 1);
                 Console.WriteLine(Path.Combine(fsxDirectory, relPath));

                 // Copy the file to the new location


added region for new errors

added region for new errors

--- src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
+++ src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
@@ -1501,6 +1501,7 @@
         ERR_NamedArgumentSpecificationBeforeFixedArgumentInDynamicInvocation = 8324,
         #endregion diagnostics introduced for C# 7.2

+        #region diagnostics introduced for `ref readonly`, `ref ternary` and`ref-like` features in C# 7.2
         ERR_RefConditionalAndAwait = 8325,
         ERR_RefConditionalNeedsTwoRefs = 8326,
         ERR_RefConditionalDifferentTypes = 8327,
@@ -1535,5 +1536,6 @@
         ERR_EscapeLocal = 8352,
         ERR_EscapeStackAlloc = 8353,
         ERR_RefReturnThis = 8354,
+        #endregion diagnostics introduced for `ref readonly`, `ref ternary` and`ref-like` features in C# 7.2
     }
 }


Apply suggestions from code review

Apply suggestions from code review

Co-authored-by: Rikki Gibson <1eae18db07d3092e87097fadc13b4f232593c91c@gmail.com>

--- src/Compilers/Core/MSBuildTask/ManagedCompiler.cs
+++ src/Compilers/Core/MSBuildTask/ManagedCompiler.cs
@@ -27,8 +27,8 @@
         private enum CompilationKind
         {
             /// <summary>
-            /// Commpilation occured using the command line tool by normal processes, typically because
-            /// the customer opt'd out of the compiler server
+            /// Commpilation occurred using the command line tool by normal processes, typically because
+            /// the customer opted out of the compiler server
             /// </summary>
             Tool,

@@ -39,7 +39,7 @@
             ToolFallback,

             /// <summary>
-            /// Compilation occured in the compiler server process
+            /// Compilation occurred in the compiler server process
             /// </summary>
             Server,


Precompute stack; find min/max separately

--- 2021/Answers/Solutions/Day24.cs
+++ 2021/Answers/Solutions/Day24.cs
@@ -6,39 +6,58 @@
 [Answer(24, slow: true)]
 class Day24 : IAnswer
 {
+	readonly int[] a = new int[14];
+	readonly int[] b = new int[14];
+	readonly int[] c = new int[14];
+	readonly int[] stackLookup = new int[14];
+
 	public (string Part1, string Part2) Solve(string input)
 	{
 		var lines = input.Split('\n');
-		long part1 = 0;
-		long part2 = long.MaxValue;
-
-		var a = new int[14];
-		var b = new int[14];
-		var c = new int[14];
-		var number = new int[14];
+		var stack = new Stack<int>(7);

 		for (var i = 0; i < 14; i++)
 		{
 			a[i] = ParseNumber(lines[4 + 18 * i]);
 			b[i] = ParseNumber(lines[5 + 18 * i]);
 			c[i] = ParseNumber(lines[15 + 18 * i]);
+
+			if (a[i] == 1)
+			{
+				stack.Push(i);
+			}
+			else
+			{
+				stackLookup[i] = stack.Pop();
+			}
 		}

-		for (var n1 = 1; n1 < 10; n1++)
+		var part1 = Solve(new int[] { 9, 8, 7, 6, 5, 4, 3, 2, 1 });
+		var part2 = Solve(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+
+		return (part1.ToString(), part2.ToString());
+	}
+
+	int ParseNumber(string line) => int.Parse(line[line.LastIndexOf(' ')..]);
+
+	long Solve(int[] range)
+	{
+		var number = new int[14];
+
+		foreach (var n1 in range)
 		{
-			for (var n2 = 1; n2 < 10; n2++)
+			foreach (var n2 in range)
 			{
-				for (var n3 = 1; n3 < 10; n3++)
+				foreach (var n3 in range)
 				{
-					for (var n4 = 1; n4 < 10; n4++)
+					foreach (var n4 in range)
 					{
-						for (var n5 = 1; n5 < 10; n5++)
+						foreach (var n5 in range)
 						{
-							for (var n6 = 1; n6 < 10; n6++)
+							foreach (var n6 in range)
 							{
-								for (var n7 = 1; n7 < 10; n7++)
+								foreach (var n7 in range)
 								{
-									var stack = new Stack<int>();
 									var digit = 0;
 									var bad = false;

@@ -58,11 +77,10 @@
 												_ => throw new NotImplementedException(),
 											};
 											digit++;
-											stack.Push(i);
 										}
 										else
 										{
-											var y = stack.Pop();
+											var y = stackLookup[i];
 											number[i] = number[y] + c[y] + b[i];

 											if (number[i] < 1 || number[i] > 9)
@@ -85,15 +103,7 @@
 										n = 10 * n + number[i];
 									}

-									if (part1 < n)
-									{
-										part1 = n;
-									}
-
-									if (part2 > n)
-									{
-										part2 = n;
-									}
+									return n;
 								}
 							}
 						}
@@ -102,8 +112,6 @@
 			}
 		}

-		return (part1.ToString(), part2.ToString());
+		return 0;
 	}
-
-	int ParseNumber(string line) => int.Parse(line[line.LastIndexOf(' ')..]);
 }


Remove unused

Remove unused

--- src/Components/Server/src/Circuits/CircuitHost.cs
+++ src/Components/Server/src/Circuits/CircuitHost.cs
@@ -91,8 +91,6 @@

         public CircuitSynchronizationContext SynchronizationContext { get; }

-        public CancellationToken ConnectionAborted { get; }
-
         public async Task InitializeAsync(CancellationToken cancellationToken)
         {
             await SynchronizationContext.InvokeAsync(async () =>


Added read test for Excel file.

Added read test for Excel file.

--- src/ConnectQl.Excel.Tests/ExcelFileFormatTests.cs
+++ src/ConnectQl.Excel.Tests/ExcelFileFormatTests.cs
@@ -24,6 +24,8 @@
 {
     using System.IO;
     using System.Threading.Tasks;
+
+    using ConnectQl.AsyncEnumerables;
     using ConnectQl.Interfaces;
     using Moq;
     using OfficeOpenXml;
@@ -67,5 +69,58 @@
                 }
             }
         }
+
+        /// <summary>
+        /// TheSELECT should return a record set.
+        /// </summary>
+        /// <param name="query">
+        /// The query.
+        /// </param>
+        /// <param name="expectedRecordCount">
+        /// The expected record count.
+        /// </param>
+        /// <returns>
+        /// The <see cref="Task"/>.
+        /// </returns>
+        [Theory(DisplayName = "SELECT should return a record set.")]
+        [InlineData("SELECT * FROM FILE('file.xlsx') f", 4)]
+        [InlineData("SELECT * FROM FILE('file.xlsx') f WHERE f.id < 3", 2)]
+        [InlineData("SELECT * FROM FILE('file.xlsx') f WHERE f.value <> 13", 3)]
+        [InlineData("SELECT * FROM FILE('file.xlsx') f WHERE f.value = f.id", 1)]
+        public async Task SelectShouldReturnRecords(string query, int expectedRecordCount)
+        {
+            var resolver = new Mock<IPluginResolver>();
+            var uriResolver = new Mock<IUriResolver>();
+
+            using (var target = new MemoryStream())
+            {
+                var package = new ExcelPackage();
+                var sheet = package.Workbook.Worksheets.Add("Data");
+
+                sheet.Cells[1, 1].Value = "Id";
+                sheet.Cells[2, 1].Value = "1";
+                sheet.Cells[3, 1].Value = "2";
+                sheet.Cells[4, 1].Value = "3";
+                sheet.Cells[5, 1].Value = "4";
+
+                sheet.Cells[1, 2].Value = "Value";
+                sheet.Cells[2, 2].Value = "Test";
+                sheet.Cells[3, 2].Value = "A";
+                sheet.Cells[4, 2].Value = null;
+                sheet.Cells[5, 2].Value = "4";
+
+                package.SaveAs(target);
+
+                target.Seek(0, SeekOrigin.Begin);
+
+                resolver.Setup(pr => pr.EnumerateAvailablePlugins()).Returns(new[] { new Plugin() });
+                uriResolver.Setup(ur => ur.ResolveToStream("file.xlsx", UriResolveMode.Read)).Returns(Task.FromResult<Stream>(target));
+
+                var context = new ConnectQlContext(resolver.Object) { UriResolver = uriResolver.Object };
+                var executeResult = await context.ExecuteAsync($"IMPORT PLUGIN 'Excel' {query}");
+
+                Assert.Equal(expectedRecordCount, await executeResult.QueryResults[0].Rows.CountAsync());
+            }
+        }
     }
 }


Update DesignerContext.cs

Update DesignerContext.cs

--- src/Core2D/ViewModels/Designer/DesignerContext.cs
+++ src/Core2D/ViewModels/Designer/DesignerContext.cs
@@ -106,6 +106,8 @@
             // Editor

             Editor = serviceProvider.GetService<ProjectEditorViewModel>();
+            Editor.CurrentTool = Editor.Tools.FirstOrDefault(x => x.Title == "Selection");
+            Editor.CurrentPathTool = Editor.PathTools.FirstOrDefault(x => x.Title == "Line");

             // Recent Projects


Disable regex parsing of generics as it is too slow

--- src/DocNuget.Models.Loader/TransformExtensions.cs
+++ src/DocNuget.Models.Loader/TransformExtensions.cs
@@ -250,18 +250,18 @@
         }

         public static TypeRef ToTypeRef(this string name) {
-            var match = typeRefNameRegex.Match(name);
-            if (match.Success) {
-                return new TypeRef {
-                    Name = match.Groups["name"].Value,
-                    FullName = match.Groups["fullname"].Value,
-                    GenericParameters = genericsRegex.Matches(match.Groups["generics"].Value)
-                        .OfType<Match>()
-                        .Select(m => m.Value.TrimEnd(',', ' ').ToTypeRef()).Where(r => r != null).ToList(),
-                };
-            } else {
-                return null;
-            }
+            // var match = typeRefNameRegex.Match(name);
+            // if (match.Success) {
+            //     return new TypeRef {
+            //         Name = match.Groups["name"].Value,
+            //         FullName = match.Groups["fullname"].Value,
+            //         GenericParameters = genericsRegex.Matches(match.Groups["generics"].Value)
+            //             .OfType<Match>()
+            //             .Select(m => m.Value.TrimEnd(',', ' ').ToTypeRef()).Where(r => r != null).ToList(),
+            //     };
+            // } else {
+            return null;
+            // }
         }

         public static TypeDefinition TryResolve(this TypeReference type) {


Resetter uheldig endring i smoketester

Resetter uheldig endring i smoketester

For å sjekke noe så endret jeg dokumentpakken i en av testene. Nå er det resatt igjen.

--- Difi.SikkerDigitalPost.Klient.Tester/SmokeTestsHelper.cs
+++ Difi.SikkerDigitalPost.Klient.Tester/SmokeTestsHelper.cs
@@ -30,7 +30,7 @@

         public SmokeTestsHelper Create_Digital_Forsendelse_with_multiple_documents()
         {
-            _forsendelse = DomainUtility.GetForsendelseSimple();
+            _forsendelse = DomainUtility.GetDigitalDigitalPostWithNotificationMultipleDocumentsAndHigherSecurity();

             return this;
         }


Fixed Event Subscribing and Creation

Fixed Event Subscribing and Creation

--- 9GUSLauncher/MainWindow.xaml.cs
+++ 9GUSLauncher/MainWindow.xaml.cs
@@ -64,6 +64,7 @@
         public static int result;
         public ProgressDialogController _controller;
         public ProgressDialogController _controller2;
+        public ProgressDialogController pdC;
         public CookieContainer boardCookies = null;
         public List<string> eventListVisible = new List<string>();
         public bool eventUpdating = false;
@@ -539,12 +540,13 @@
             if (modPathDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 modPathTxt.Text = modPathDialog.SelectedPath;
-                if(modPath != modPathDialog.SelectedPath)
+                if (modPath != modPathDialog.SelectedPath)
                 {
                     System.Windows.MessageBox.Show("Mod Path Update. Press OK to restart the Application.", "Restarting...", MessageBoxButton.OK, MessageBoxImage.Information);
                     Process.Start(workingDir + "\\" + assemblyName + ".exe");
                     Environment.Exit(0);
                 }
+
             }
         }
         #endregion
@@ -1218,15 +1220,6 @@
                             modList.Items.Add("Please Select the Mods Path and restart the Application!");
                             eventCreate.IsEnabled = false;
                         }
-<<<<<<< HEAD
-=======
-                    }
-                    else
-                    {
-                        modList.Items.Add("Please Select the Mods Path and restart the Application!");
-                        eventCreate.IsEnabled = false;
-                    }
->>>>>>> origin/master

                         if (!Directory.Exists(workingDir + "\\Config"))
                         {
@@ -1269,7 +1262,7 @@
                 {
                     Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(async () =>
                     {
-                        _controller = await this.ShowProgressAsync("Please wait...", "Setting up Events & Configs...\r\n\r\nThis operation may take some minutes...");
+                        _controller = await this.ShowProgressAsync("Please wait...", "Updating Events & Configs...");
                         _controller.SetCancelable(false);
                         if (!string.IsNullOrEmpty(modPath))
                         {
@@ -1288,16 +1281,24 @@
                             eventCreate.IsEnabled = false;
                         }

-                        if (!Directory.Exists(workingDir + "\\Config"))
-                        {
-                            Directory.CreateDirectory(workingDir + "\\Config");
-
-                        }
-                        else
-                        {
-                            Directory.Delete(workingDir + "\\Config", true);
-                            Directory.CreateDirectory(workingDir + "\\Config");
-                        }
+                        while(true)
+                        {
+
+                            if (!Directory.Exists(workingDir + "\\Config"))
+                            {
+                                Directory.CreateDirectory(workingDir + "\\Config");
+                                break;
+                            }
+                            else
+                            {
+                                Directory.Delete(workingDir + "\\Config", true);
+                                Directory.CreateDirectory(workingDir + "\\Config");
+                                break;
+                            }
+
+
+                        }
+

                         if (config.events != null)
@@ -1315,6 +1316,7 @@
                             eventListView.Items.Add(_event.Replace("_", " "));
                         }

+                        eventUpdating = false;
                         pause(5);
                         await _controller.CloseAsync();

@@ -1469,27 +1471,26 @@

         private async void btnSub_Click(object sender, RoutedEventArgs e)
         {
-
-            BackgroundWorker bgWorker = new BackgroundWorker() { WorkerReportsProgress = true };
-            bgWorker.DoWork += (s, ee) =>
-            {
-                try
-                {
-                    Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(async () =>
-                    {
-
+
+            if (txt_eventSubs.Text.Contains(txt_User.Text))
+                MsgBox("Error", "You already subscribed to this event!");
+            else
+            {
+                BackgroundWorker bgWorker = new BackgroundWorker() { WorkerReportsProgress = true };
+                bgWorker.DoWork += (s, ee) =>
+                {
+                    try
+                    {
+                        Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(async () =>
+                        {
+                            eventUpdating = true;
                             string eventSelected = this.eventListView.SelectedItem.ToString().Replace(" ", "_");
                             eventVar _event = JsonConvert.DeserializeObject<eventVar>(System.IO.File.ReadAllText(workingDir + "\\Config\\" + eventSelected));

-                            if(txt_eventSubs.Text.Contains(txt_User.Text))
-                            {
-                                MsgBox("Error", "You already subscribed to this event!");
-                                return;
-                            }

                             txt_eventSubs.Text += txt_User.Text + "; ";
                             List<string> subs = new List<string>();
-                            if(_event.eventSubscribers != null)
+                            if (_event.eventSubscribers != null)
                             {
                                 foreach (string sub in _event.eventSubscribers)
                                 {
@@ -1502,27 +1503,29 @@
                             System.IO.File.Delete(workingDir + "\\Config\\" + eventFileName);
                             Core.Events.MissionFile.Create.File(eventFileName, _event);
                             Core.Events.MissionFile.Upload.File(eventFileName);
-
-
-                    }));
-
-                }
-                catch (Exception ex)
-                { System.Windows.MessageBox.Show(ex.ToString()); }
-            };
-            bgWorker.RunWorkerCompleted += async (s, ee) =>
-            {
-                pause(5);
-                await _controller.CloseAsync();
-            };
-
-            bgWorker.RunWorkerAsync();
-            _controller = await this.ShowProgressAsync("Please wait...", "Subscribing to this Event...");
-            _controller.SetCancelable(false);
-            _controller.SetIndeterminate();
-
+                            eventUpdating = false;
+
+                        }));
+
+                    }
+                    catch (Exception ex)
+                    { System.Windows.MessageBox.Show(ex.ToString()); }
+                };
+                bgWorker.RunWorkerCompleted += async (s, ee) =>
+                {
+                    pause(5);
+                    await pdC.CloseAsync();
+
+
+                };
+
+                bgWorker.RunWorkerAsync();
+                pdC = await this.ShowProgressAsync("Please wait...", "Subscribing to this Event...");
+                pdC.SetCancelable(false);
+                pdC.SetIndeterminate();
+            }
+

-
         }

@@ -1532,4 +1535,4 @@

     }
 }
-
+


Test invoice

Test invoice

--- Digipost.Api.Client.Tests/Unittest/SerializeUtilTests.cs
+++ Digipost.Api.Client.Tests/Unittest/SerializeUtilTests.cs
@@ -1,4 +1,6 @@
-using Digipost.Api.Client.Domain;
+using System;
+using System.Globalization;
+using Digipost.Api.Client.Domain;
 using Digipost.Api.Client.Domain.Enums;
 using Digipost.Api.Client.Domain.Print;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -12,12 +14,12 @@
         [TestClass]
         public class DeserializeMethod
         {
-            private const string MessageBlueprint = @"<?xml version=""1.0"" encoding=""utf-8""?><message xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns=""http://api.digipost.no/schema/v6""><recipient><name-and-address><fullname>Kristian Sæther Enge</fullname><addressline1>Colletts gate 68</addressline1><postalcode>0460</postalcode><city>Oslo</city></name-and-address><print-details><recipient><name>Kristian Sæther Enge</name><norwegian-address><addressline1>Collettsgate 68</addressline1><addressline2>Leil h401</addressline2><addressline3>dør 2</addressline3><zip-code>0460</zip-code><city>Oslo</city></norwegian-address></recipient><return-address><name>Ola Digipost</name><foreign-address><addressline1>svenskegatan 1</addressline1><addressline2> leil h101</addressline2><addressline3>pb 12</addressline3><addressline4>skuff 3</addressline4><country>SE</country></foreign-address></return-address><post-type>B</post-type><color>MONOCHROME</color></print-details></recipient><primary-document><uuid>1222222</uuid><subject>Subject</subject><file-type>txt</file-type><sms-notification><after-hours>2</after-hours></sms-notification><authentication-level>TWO_FACTOR</authentication-level><sensitivity-level>SENSITIVE</sensitivity-level></primary-document><attachment><uuid>123456</uuid><subject>attachment</subject><file-type>txt</file-type><authentication-level>TWO_FACTOR</authentication-level><sensitivity-level>SENSITIVE</sensitivity-level></attachment></message>";
+            private const string MessageBlueprint = @"<?xml version=""1.0"" encoding=""utf-8""?><message xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns=""http://api.digipost.no/schema/v6""><recipient><name-and-address><fullname>Kristian Sæther Enge</fullname><addressline1>Colletts gate 68</addressline1><postalcode>0460</postalcode><city>Oslo</city></name-and-address><print-details><recipient><name>Kristian Sæther Enge</name><norwegian-address><addressline1>Collettsgate 68</addressline1><addressline2>Leil h401</addressline2><addressline3>dør 2</addressline3><zip-code>0460</zip-code><city>Oslo</city></norwegian-address></recipient><return-address><name>Ola Digipost</name><foreign-address><addressline1>svenskegatan 1</addressline1><addressline2> leil h101</addressline2><addressline3>pb 12</addressline3><addressline4>skuff 3</addressline4><country>SE</country></foreign-address></return-address><post-type>B</post-type><color>MONOCHROME</color></print-details></recipient><primary-document><uuid>1222222</uuid><subject>Subject</subject><file-type>txt</file-type><sms-notification><after-hours>2</after-hours></sms-notification><authentication-level>TWO_FACTOR</authentication-level><sensitivity-level>SENSITIVE</sensitivity-level></primary-document><attachment xsi:type=""invoice""><uuid>123456</uuid><subject>Subject</subject><file-type>txt</file-type><sms-notification><after-hours>2</after-hours></sms-notification><authentication-level>TWO_FACTOR</authentication-level><sensitivity-level>SENSITIVE</sensitivity-level><kid>123123123123</kid><amount>100</amount><account>15941432384</account><due-date>2018-01-01</due-date></attachment></message>";

             [TestMethod]
             public void ReturnsProperDeserializedMessage()
             {
-
+                //Arrange
                 var printDetails = new PrintDetails(new PrintRecipient("Kristian Sæther Enge", new NorwegianAddress("0460", "Oslo", "Collettsgate 68", "Leil h401", "dør 2")), new PrintReturnAddress("Ola Digipost", new ForeignAddress(CountryIdentifier.Country, "SE", "svenskegatan 1", " leil h101", "pb 12", "skuff 3")));
                 var recipient =
                     new Recipient(
@@ -25,20 +27,21 @@
                 var document = new Document("Subject", "txt", TestHelper.GetBytes("test"), AuthenticationLevel.TwoFactor,
                     SensitivityLevel.Sensitive) { Guid = "1222222", SmsNotification = new SmsNotification(2) };

-                var attachment = new Document("attachment", "txt", TestHelper.GetBytes("test"), AuthenticationLevel.TwoFactor,
-                    SensitivityLevel.Sensitive) { Guid = "123456" };
+                var attachment =  new Invoice("Subject", "txt", TestHelper.GetBytes("test"),100,"15941432384",DateTime.Parse("2018-01-01"),"123123123123", AuthenticationLevel.TwoFactor,
+                    SensitivityLevel.Sensitive) { Guid = "123456", SmsNotification = new SmsNotification(2) };

                 var message = new Message(recipient, document);
                 message.Attachments.Add(attachment);

+                //Act
                 var serialized = SerializeUtil.Serialize(message);
                 Assert.IsNotNull(serialized);
-
                 var deserializedMessage = SerializeUtil.Deserialize<Message>(serialized);

                 var deserializedMessageBlueprint = SerializeUtil.Deserialize<Message>(MessageBlueprint);

+                //Assert
                 TestHelper.LookLikeEachOther(deserializedMessageBlueprint, deserializedMessage);
             }

@@ -46,7 +49,25 @@

         [TestClass]
         public class SerializeMethod
-        {
+        {
+            private const string InvoiceBlueprint = @"<?xml version=""1.0"" encoding=""utf-8""?><invoice xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns=""http://api.digipost.no/schema/v6""><uuid>123456</uuid><subject>Subject</subject><file-type>txt</file-type><sms-notification><after-hours>2</after-hours></sms-notification><authentication-level>TWO_FACTOR</authentication-level><sensitivity-level>SENSITIVE</sensitivity-level><kid>123123123123</kid><amount>100</amount><account>15941432384</account><due-date>2018-01-01</due-date></invoice>";
+
+            [TestMethod]
+            public void ReturnProperSerializedInvoice()
+            {
+                //Arrange
+                var invoice = new Invoice("Subject", "txt", TestHelper.GetBytes("test"),100,"15941432384",DateTime.Parse("2018-01-01"),"123123123123", AuthenticationLevel.TwoFactor,
+                    SensitivityLevel.Sensitive) { Guid = "123456", SmsNotification = new SmsNotification(2) };
+
+                //Act
+                var serialized = SerializeUtil.Serialize(invoice);
+
+                //Assert
+                Assert.IsNotNull(serialized);
+                Assert.AreEqual(InvoiceBlueprint, serialized);
+
+            }
+
             private const string DocumentBlueprint = @"<?xml version=""1.0"" encoding=""utf-8""?><document xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns=""http://api.digipost.no/schema/v6""><uuid>123456</uuid><subject>Subject</subject><file-type>txt</file-type><sms-notification><after-hours>2</after-hours></sms-notification><authentication-level>TWO_FACTOR</authentication-level><sensitivity-level>SENSITIVE</sensitivity-level></document>";

             [TestMethod]


Disable calculations when in upgrade mode

--- Src/PrecisionEngineering/Data/PrecisionCalculator.cs
+++ Src/PrecisionEngineering/Data/PrecisionCalculator.cs
@@ -25,7 +25,7 @@
 			_measurements.Clear();
 			DebugState = "";

-			if (!netTool.IsEnabled)
+			if (!netTool.IsEnabled || netTool.Mode == NetTool.Mode.Upgrade)
 				return;

 			Segment.CalculateSegmentBranchAngles(netTool, _measurements);


Added some Resharper suppressions to make it go green.

--- EventStreams.Tests/Persistence/EventStreamReaderTests.cs
+++ EventStreams.Tests/Persistence/EventStreamReaderTests.cs
@@ -47,16 +47,20 @@
                         i++;

                     if (s == EventStreamReaderState.Hash && i == 4) {
+                        // ReSharper disable AccessToDisposedClosure
                         ms.Write(new byte[] { 0, 0, 0 }, 0, 3);
                         ms.Position -= 3;
+                        // ReSharper restore AccessToDisposedClosure
                     }
                 };

                 using (var esr = new EventStreamReader(ms, new NullEventReader(), corruptor, null)) {
+                    // ReSharper disable AccessToDisposedClosure
                     Assert.DoesNotThrow(() => esr.Next());
                     Assert.DoesNotThrow(() => esr.Next());
                     Assert.DoesNotThrow(() => esr.Next());
                     Assert.Throws<DataCorruptionPersistenceException>(() => esr.Next());
+                    // ReSharper restore AccessToDisposedClosure
                 }
             }
         }


improve agent actions

improve agent actions

--- Terradue.Tep/Terradue/Tep/WebServer/Agent/Actions.cs
+++ Terradue.Tep/Terradue/Tep/WebServer/Agent/Actions.cs
@@ -86,25 +86,31 @@
                     if (jobresponse is ExecuteResponse) {
                         var execResponse = jobresponse as ExecuteResponse;
                         job.UpdateStatusFromExecuteResponse(execResponse);
+
+                        //if job status not updated and job is older than the max time allowed, we set as failed
+                        if(
+                            (job.Status == WpsJobStatus.ACCEPTED || job.Status == WpsJobStatus.STARTED || job.Status == WpsJobStatus.PAUSED || job.Status == WpsJobStatus.NONE)
+                            & (DateTime.UtcNow.AddDays(-maxDaysJobRefresh) > job.CreatedTime)
+                        ){
+                            job.Status = WpsJobStatus.FAILED;
+                        }
                         job.Store();
                     } else {
-                        if(jobresponse is ExceptionReport){
-                            job.Status = WpsJobStatus.FAILED;
-                            job.Store();
-                        } else if (DateTime.UtcNow.AddDays(- maxDaysJobRefresh) > job.CreatedTime) {//if job is older than a month and makes an exception, we set as failed
+                        //if job is an exception or older than the max time allowed, we set as failed
+                        if(jobresponse is ExceptionReport || DateTime.UtcNow.AddDays(- maxDaysJobRefresh) > job.CreatedTime) {
                             job.Status = WpsJobStatus.FAILED;
                             job.Store();
                         }
                     }
                 }catch(WpsProxyException e){
-                    context.WriteError(string.Format("RefreshWpjobStatus -- '{0}'", e.Message));
+                    context.WriteError(string.Format("RefreshWpjobStatus -- job '{1}'-- '{0}'", e.Message, job.Identifier));
                     if (DateTime.UtcNow.AddDays(- maxDaysJobRefresh) > job.CreatedTime) {//if job is older than a month and makes an exception, we set as failed
                         job.Status = WpsJobStatus.FAILED;
                         job.Store();
                     } else {
                     }
                 }catch(Exception e){
-                    context.WriteError(string.Format("RefreshWpjobStatus -- '{0}'", e.Message));
+                    context.WriteError(string.Format("RefreshWpjobStatus -- job '{1}'-- '{0}'", e.Message, job.Identifier));
                 }
                 context.WriteInfo(string.Format("RefreshWpjobStatus -- job '{0}' -- status = {1} -> {2}", job.Identifier, status, job.StringStatus));
             }
@@ -138,7 +144,7 @@
                 }
                 context.WriteInfo(string.Format("RefreshWpjobResultNb -- job '{0}' -- status = {1} -> {2} results{3}", job.Identifier, job.StringStatus, noset ? "no" : job.NbResults + "", forced ? " (forced)" : ""));
             }
-             jobs = new EntityList<WpsJob>(context);
+            jobs = new EntityList<WpsJob>(context);
             jobs.SetFilter("Status", (int)WpsJobStatus.COORDINATOR + "");
             jobs.Load();
             context.WriteInfo(string.Format("RefreshWpjobResultNb -- found {0} coordinators", jobs.Count));
@@ -146,7 +152,7 @@
                 try{
                     job.UpdateResultCount();
                 } catch (Exception e) {
-                    context.WriteError(string.Format("RefreshWpjobResultNb -- '{0}'", e.Message));
+                    context.WriteError(string.Format("RefreshWpjobResultNb -- job '{1}'-- '{0}'", e.Message, job.Identifier));
                 }
                 context.WriteInfo(string.Format("RefreshWpjobResultNb -- job '{0}' -- status = {1} -> {2} results", job.Identifier, job.StringStatus, job.NbResults));
             }


No need to sync back to ui thread on cloud sync

--- Audiotica.Data.Collection/RunTime/CloudSyncService.cs
+++ Audiotica.Data.Collection/RunTime/CloudSyncService.cs
@@ -54,9 +54,9 @@
         public async Task SyncAsync()
         {
             // Start by getting all cloud songs
-            var onlineSongs = await _mobileServiceClient.GetTable<CloudSong>().ToListAsync();
-            var onlineArtists = await _mobileServiceClient.GetTable<CloudArtist>().ToListAsync();
-            var onlineAlbums = await _mobileServiceClient.GetTable<CloudAlbum>().ToListAsync();
+            var onlineSongs = await _mobileServiceClient.GetTable<CloudSong>().ToListAsync().ConfigureAwait(false);
+            var onlineArtists = await _mobileServiceClient.GetTable<CloudArtist>().ToListAsync().ConfigureAwait(false);
+            var onlineAlbums = await _mobileServiceClient.GetTable<CloudAlbum>().ToListAsync().ConfigureAwait(false);

             foreach (var onlineAlbum in onlineAlbums)
             {
@@ -104,7 +104,7 @@
                                  select song)
             {
                 // If the local song is not in the cloud delete it.
-                await _collectionService.DeleteSongAsync(song);
+                await _collectionService.DeleteSongAsync(song).ConfigureAwait(false);
             }
         }

@@ -127,7 +127,7 @@
                 if (collSong != null)
                 {
                     collSong.CloudId = onlineSong.Id;
-                    await _sqlService.UpdateItemAsync(collSong);
+                    await _sqlService.UpdateItemAsync(collSong).ConfigureAwait(false);
                 }
                 else
                 {
@@ -139,7 +139,7 @@
                     };

                     // By setting it to just synced, the app knows it has to match an audio url to it
-                    await _collectionService.AddSongAsync(newSong);
+                    await _collectionService.AddSongAsync(newSong).ConfigureAwait(false);
                 }
             }
         }
@@ -159,7 +159,7 @@
                                        select onlineSong)
             {
                 // Delete it
-                await _mobileServiceClient.GetTable<CloudSong>().DeleteAsync(onlineSong);
+                await _mobileServiceClient.GetTable<CloudSong>().DeleteAsync(onlineSong).ConfigureAwait(false);
             }
         }

@@ -212,7 +212,7 @@
                         Name = collectionSong.Artist.Name,
                         ProviderId = collectionSong.Artist.ProviderId
                     };
-                    await _mobileServiceClient.GetTable<CloudArtist>().InsertAsync(cloudArtist);
+                    await _mobileServiceClient.GetTable<CloudArtist>().InsertAsync(cloudArtist).ConfigureAwait(false);
                 }

                 if (cloudAlbum == null)
@@ -226,7 +226,7 @@
                             Name = collectionSong.Album.PrimaryArtist.Name,
                             ProviderId = collectionSong.Album.PrimaryArtist.ProviderId
                         };
-                        await _mobileServiceClient.GetTable<CloudArtist>().InsertAsync(cloaudAlbumArtist);
+                        await _mobileServiceClient.GetTable<CloudArtist>().InsertAsync(cloaudAlbumArtist).ConfigureAwait(false);
                     }

                     cloudAlbum = new CloudAlbum
@@ -243,9 +243,9 @@
                 cloudSong.ArtistId = cloudArtist.Id;
                 cloudSong.AlbumId = cloudAlbum.Id;

-                await _mobileServiceClient.GetTable<CloudSong>().InsertAsync(cloudSong);
+                await _mobileServiceClient.GetTable<CloudSong>().InsertAsync(cloudSong).ConfigureAwait(false);
                 collectionSong.CloudId = cloudSong.Id;
-                await _sqlService.UpdateItemAsync(collectionSong);
+                await _sqlService.UpdateItemAsync(collectionSong).ConfigureAwait(false);
             }

             LastSyncTime = syncTime;


system.transactions samples

system.transactions samples

--- ADONET/ADONetSamples/SystemTransactionSamples/Program.cs
+++ ADONET/ADONetSamples/SystemTransactionSamples/Program.cs
@@ -20,6 +20,15 @@
                 case "-c":
                     await CommittableTransactionAsync();
                     break;
+                case "-p":
+                    await TransactionPromotionsAsync();
+                    break;
+                case "-d":
+                    DependentTransactions();
+                    break;
+                case "-a":
+                    AmbientTransactions();
+                    break;
                 default:
                     ShowUsage();
                     break;
@@ -31,7 +40,9 @@
         {
             Console.WriteLine("SystemTransactionSamples command");
             Console.WriteLine("\t-c\tCommittable Transactions");
-
+            Console.WriteLine("\t-p\tPromotable Transactions");
+            Console.WriteLine("\t-d\tDepdendent Transactions");
+            Console.WriteLine("\t-a\tAmbient Transactions");
         }

         static void AmbientTransactions()
@@ -46,7 +57,92 @@
             }
         }

+        static void DependentTransactions()
+        {
+            async Task UsingDependentTransactionAsync(object obj)
+            {
+                var dtx = obj as DependentTransaction;
+                dtx.TransactionCompleted += (sender, e) =>
+                    DisplayTransactionInformation("Depdendent TX completed", e.Transaction.TransactionInformation);

+                DisplayTransactionInformation("Dependent Tx", dtx.TransactionInformation);
+
+                await Task.Delay(2000);
+
+                dtx.Complete();
+                DisplayTransactionInformation("Dependent Tx send complete", dtx.TransactionInformation);
+            }
+
+            var tx = new CommittableTransaction();
+            DisplayTransactionInformation("Root Tx created", tx.TransactionInformation);
+
+            try
+            {
+                DependentTransaction depTx = tx.DependentClone(DependentCloneOption.BlockCommitUntilComplete);
+                Task t1 = Task.Run(() => UsingDependentTransactionAsync(depTx));
+
+                if (AbortTx())
+                {
+                    throw new ApplicationException("transaction abort by the user");
+                }
+
+                tx.Commit();
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+                tx.Rollback();
+            }
+
+            DisplayTransactionInformation("TX completed", tx.TransactionInformation);
+        }
+
+        static async Task TransactionPromotionsAsync()
+        {
+            var tx = new CommittableTransaction();
+            DisplayTransactionInformation("TX created", tx.TransactionInformation);
+
+            try
+            {
+                var b = new Book
+                {
+                    Title = "A Cat in The House",
+                    Publisher = "Pet Show",
+                    Isbn = string.Join("", Guid.NewGuid().ToString().ToCharArray().Take(15)),
+                    ReleaseDate = new DateTime(2019, 11, 24)
+                };
+                var data = new BookData();
+                await data.AddBookAsync(b, tx);
+
+                DisplayTransactionInformation("First Connection", tx.TransactionInformation);
+
+                var b2 = new Book
+                {
+                    Title = "A Rabbit in The House",
+                    Publisher = "Pet Show",
+                    Isbn = string.Join("", Guid.NewGuid().ToString().ToCharArray().Take(15)),
+                    ReleaseDate = new DateTime(2020, 11, 24)
+                };
+                var data2 = new BookData();
+                await data2.AddBookAsync(b2, tx);
+
+                DisplayTransactionInformation("Second Connection", tx.TransactionInformation);
+
+                if (AbortTx())
+                {
+                    throw new ApplicationException("transaction abort");
+                }
+                tx.Commit();
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+                Console.WriteLine();
+                tx.Rollback();
+            }
+
+            DisplayTransactionInformation("TX completed", tx.TransactionInformation);
+        }

         static async Task CommittableTransactionAsync()
         {


Eliminated redundant requests to a removed jQuery bundle.

--- BGC.Web/Areas/Public/Views/Shared/PublicLayout.cshtml
+++ BGC.Web/Areas/Public/Views/Shared/PublicLayout.cshtml
@@ -15,7 +15,6 @@
         </header>
         @RenderBody()
         <footer></footer>
-        @Scripts.Render("~/bundles/jquery")
         @RenderSection("scripts", required: false)
     </body>
 </html>


Disable Mono special case in memory map tests

--- src/embed_tests/TestTypeManager.cs
+++ src/embed_tests/TestTypeManager.cs
@@ -54,12 +54,12 @@
             // We can't use compiler flags because we compile with MONO_LINUX
             // while running on the Microsoft .NET Core during continuous
             // integration tests.
-            if (System.Type.GetType ("Mono.Runtime") != null)
+            /* if (System.Type.GetType ("Mono.Runtime") != null)
             {
                 // Mono throws NRE instead of AccessViolationException for some reason.
                 Assert.That(() => { Marshal.WriteInt64(page, 73); }, Throws.TypeOf<System.NullReferenceException>());
                 Assert.That(Marshal.ReadInt64(page), Is.EqualTo(17));
-            }
+            } */
         }
     }
 }


Just added more test cases.

Just added more test cases.


Stop resharper from saying methods are unused.

--- TwitchPlaysAssembly/Src/Commands/CommandAttribute.cs
+++ TwitchPlaysAssembly/Src/Commands/CommandAttribute.cs
@@ -1,7 +1,9 @@
 using System;
+using JetBrains.Annotations;

 /// <summary>Marks a method as a command understood by the Twitch Plays system.</summary>
 [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
+[MeansImplicitUse]
 sealed class CommandAttribute : Attribute
 {
 	/// <summary>


Base directory for Avalonia

Base directory for Avalonia

This is for closing #645. We need to wait for the PR
https://github.com/VitalElement/AvalonStudio.Shell/pull/9 to be merged
first.

--- WalletWasabi.Gui/Program.cs
+++ WalletWasabi.Gui/Program.cs
@@ -21,12 +21,12 @@
 			StatusBarViewModel statusBar = null;
 			try
 			{
+				Platform.BaseDirectory = Path.Combine(Global.DataDir, "Gui");
 				BuildAvaloniaApp().BeforeStarting(async builder =>
 				{
 					try
 					{
 						MainWindowViewModel.Instance = new MainWindowViewModel();
-
 						Logger.InitializeDefaults(Path.Combine(Global.DataDir, "Logs.txt"));

 						var configFilePath = Path.Combine(Global.DataDir, "Config.json");


Started doco for IDomainRepository.

Started doco for IDomainRepository.

--- Highway/src/Highway.Data/Interfaces/IDomainRepository.cs
+++ Highway/src/Highway.Data/Interfaces/IDomainRepository.cs
@@ -17,6 +17,9 @@

         event EventHandler<AfterCommand> AfterCommand;

+        /// <summary>
+        /// Gets the contract for a Domain Context
+        /// </summary>
         IDomainContext<T> DomainContext { get; }
     }
 }


Fixed a leak of Locks there are millions of jobs created in memory storage.

--- src/Hangfire.MemoryStorage/Utilities/LocalLock.cs
+++ src/Hangfire.MemoryStorage/Utilities/LocalLock.cs
@@ -8,10 +8,12 @@
     {
         private static readonly ConcurrentDictionary<string, object> Locks = new ConcurrentDictionary<string, object>();
         private readonly object _lock;
+        private readonly string _resource;

         private LocalLock(string resource, TimeSpan timeout)
         {
             _lock = Locks.GetOrAdd(resource, new object());
+            _resource = resource;

             bool hasEntered = Monitor.TryEnter(_lock, timeout);
             if (!hasEntered)
@@ -23,6 +25,8 @@
         public void Dispose()
         {
             Monitor.Exit(_lock);
+
+            Locks.TryRemove(_resource, out object value);
         }

         public static IDisposable AcquireLock(string resource, TimeSpan timeout)


Fix #401: ArgumentNullException after resetting REPL

Add null check for exception in OnError websocket handler.

--- src/Host/Client/Impl/WebSocketMessageTransport.cs
+++ src/Host/Client/Impl/WebSocketMessageTransport.cs
@@ -76,9 +76,11 @@
             base.OnError(e);

             var ex = e.Exception;
-            if (ex is SocketException || ex is WebSocketException) {
+            if (ex == null) {
+                ex = new MessageTransportException();
+            } else if (ex is SocketException || ex is WebSocketException) {
                 ex = new MessageTransportException(ex);
-            }
+            }

             _incomingMessages.Post(Task.FromException<string>(ex));
         }


Added "OPKG" and "DLN1" to SboTable

Added "OPKG" and "DLN1" to SboTable

--- src/ITCO.SboAddon.Framework/Constants/SboTable.cs
+++ src/ITCO.SboAddon.Framework/Constants/SboTable.cs
@@ -8,9 +8,11 @@
         public const string Invoice = "OINV";
         public const string Order = "ORDR";
         public const string DeliveryNote = "ODLN";
+        public const string DeliveryNoteRows = "DLN1";
         public const string DeliveryNotePackage = "DLN7";
         public const string PaymentTerm = "OCTG";
         public const string ShippingType = "OSHP";
+        public const string PackageType = "OPKG";
         /// <summary>
         /// Sales Tax. Non EU Taxes
         /// </summary>


Remove unused return types in LfFooToFdoFoo

We never actually use the returned objects.

--- src/LfMerge/Actions/UpdateFdoFromMongoDbAction.cs
+++ src/LfMerge/Actions/UpdateFdoFromMongoDbAction.cs
@@ -165,7 +165,7 @@
 				source.WriteToFdoMultiString(dest, _servLoc.WritingSystemManager);
 		}

-		private ILexEntry LfLexEntryToFdoLexEntry(LfLexEntry lfEntry)
+		private void LfLexEntryToFdoLexEntry(LfLexEntry lfEntry)
 		{
 			Guid guid = lfEntry.Guid ?? Guid.Empty;
 			ILexEntry fdoEntry = GetOrCreateEntryByGuid(guid);
@@ -176,7 +176,7 @@
 				else
 					// TODO: Log this properly
 					Console.WriteLine("Problem: need to delete FDO entry {0}, but its CanDelete flag is false.", fdoEntry.Guid);
-				return null; // Don't set fields on a deleted entry
+				return; // Don't set fields on a deleted entry
 			}
 			string entryNameForDebugging = String.Join(", ", lfEntry.Lexeme.Values.Select(x => x.Value ?? ""));
 			Console.WriteLine("Checking entry {0} ({1}) in lexicon", guid, entryNameForDebugging);
@@ -216,8 +216,6 @@
 			}

 			_customFieldConverter.SetCustomFieldsForThisCmObject(fdoEntry, "entry", lfEntry.CustomFields, lfEntry.CustomFieldGuids);
-
-			return fdoEntry;
 		}

 		private void SetEtymologyFields(ILexEntry fdoEntry, LfLexEntry lfEntry)
@@ -324,7 +322,7 @@
 			return _translationFactory.Create(owner, typeOfNewTranslation);
 		}

-		private ILexExampleSentence LfExampleToFdoExample(LfExample lfExample, ILexSense owner)
+		private void LfExampleToFdoExample(LfExample lfExample, ILexSense owner)
 		{
 			Guid guid = lfExample.Guid;
 			if (guid == Guid.Empty)
@@ -342,11 +340,9 @@
 			// Ignoring t.Status since LF won't touch it

 			_customFieldConverter.SetCustomFieldsForThisCmObject(fdoExample, "examples", lfExample.CustomFields, lfExample.CustomFieldGuids);
-
-			return fdoExample;
-		}
-
-		private ICmPicture LfPictureToFdoPicture(LfPicture lfPicture, ILexSense owner)
+		}
+
+		private void LfPictureToFdoPicture(LfPicture lfPicture, ILexSense owner)
 		{
 			Guid guid = lfPicture.Guid;
 			KeyValuePair<int, string> kv = lfPicture.Caption.WsIdAndFirstNonEmptyString(_cache);
@@ -354,10 +350,9 @@
 			string caption = kv.Value;
 			ICmPicture fdoPicture = GetOrCreatePictureByGuid(guid, owner, lfPicture.FileName, caption, captionWs);
 			// Ignoring fdoPicture.Description and other fdoPicture fields since LF won't touch them
-			return fdoPicture;
-		}
-
-		private ILexSense LfSenseToFdoSense(LfSense lfSense, ILexEntry owner)
+		}
+
+		private void LfSenseToFdoSense(LfSense lfSense, ILexEntry owner)
 		{
 			Guid guid = lfSense.Guid;
 			if (guid == Guid.Empty)
@@ -419,8 +414,6 @@
 			// fdoSense.UsageTypesRC = lfSense.Usages; // TODO: More complex than that. Handle it correctly.

 			_customFieldConverter.SetCustomFieldsForThisCmObject(fdoSense, "senses", lfSense.CustomFields, lfSense.CustomFieldGuids);
-
-			return fdoSense;
 		}

 		private ILexEtymology CreateOwnedEtymology(ILexEntry owner)


Slightly less elegant way to do it

Slightly less elegant way to do it

Because the IFooRepository class(es) aren't registered as generic
instances for IRepository<IFoo>, and the same for factory classes, we
can't actually do this the very-generic way. Instead, our generic
function needs to be passed three types: the object type, the repository
type, and the factory type. We can, however, make the API look cleaner
by creating four one-line helper functions that will call the generic
function with three appropriate types.

--- src/LfMerge/Actions/UpdateFdoFromMongoDbAction.cs
+++ src/LfMerge/Actions/UpdateFdoFromMongoDbAction.cs
@@ -156,7 +156,7 @@
 		private ILexEntry LfLexEntryToFdoLexEntry(LfLexEntry lfEntry)
 		{
 			Guid guid = lfEntry.Guid;
-			ILexEntry fdoEntry = GetOrCreateCmObjectByGuid<ILexEntry>(guid);
+			ILexEntry fdoEntry = GetOrCreateEntryByGuid(guid);
 			var result = NonUndoableUnitOfWorkHelper.Do<ILexEntry>(cache.ActionHandlerAccessor, () =>
 			{
 				// TODO: Set instance fields
@@ -168,7 +168,7 @@
 		private ILexExampleSentence LfExampleToFdoExample(LfExample lfExample)
 		{
 			Guid guid = GuidFromLiftId(lfExample.LiftId);
-			ILexExampleSentence fdoExample = GetOrCreateCmObjectByGuid<ILexExampleSentence>(guid);
+			ILexExampleSentence fdoExample = GetOrCreateExampleByGuid(guid);
 			var result = NonUndoableUnitOfWorkHelper.Do<ILexExampleSentence>(cache.ActionHandlerAccessor, () =>
 			{
 				// TODO: Set instance fields
@@ -180,7 +180,7 @@
 		private ICmPicture LfPictureToFdoPicture(LfPicture lfPicture)
 		{
 			Guid guid = lfPicture.Guid;
-			ICmPicture fdoPicture = GetOrCreateCmObjectByGuid<ICmPicture>(guid);
+			ICmPicture fdoPicture = GetOrCreatePictureByGuid(guid);
 			var result = NonUndoableUnitOfWorkHelper.Do<ICmPicture>(cache.ActionHandlerAccessor, () =>
 			{
 				// TODO: Set instance fields
@@ -193,7 +193,7 @@
 		private ILexSense LfSenseToFdoSense(LfSense lfSense)
 		{
 			Guid guid = GuidFromLiftId(lfSense.LiftId);
-			ILexSense fdoSense = GetOrCreateCmObjectByGuid<ILexSense>(guid);
+			ILexSense fdoSense = GetOrCreateSenseByGuid(guid);
 			var result = NonUndoableUnitOfWorkHelper.Do<ILexSense>(cache.ActionHandlerAccessor, () =>
 			{
 				// TODO: Set instance fields
@@ -202,12 +202,15 @@
 			return result;
 		}

-		private TObject GetOrCreateCmObjectByGuid<TObject>(Guid guid) where TObject : ICmObject
+		private TObject GetOrCreateCmObjectByGuid<TObject, TRepository, TFactory>(Guid guid)
+			where TObject : ICmObject
+			where TRepository : IRepository<TObject>
+			where TFactory : IFdoFactory<TObject>
 		{
 			var result = NonUndoableUnitOfWorkHelper.Do<TObject>(cache.ActionHandlerAccessor, () =>
 			{
-				var repo = cache.ServiceLocator.GetInstance<IRepository<TObject>>();
-				var factory = cache.ServiceLocator.GetInstance<IFdoFactory<TObject>>();
+				var repo = cache.ServiceLocator.GetInstance<TRepository>();
+				var factory = cache.ServiceLocator.GetInstance<TFactory>();
 				TObject cmObject;
 				if (guid == default(Guid))
 				{
@@ -224,6 +227,26 @@
 			return result;
 		}

+		private ILexEntry GetOrCreateEntryByGuid(Guid guid)
+		{
+			return GetOrCreateCmObjectByGuid<ILexEntry, ILexEntryRepository, ILexEntryFactory>(guid);
+		}
+
+		private ILexExampleSentence GetOrCreateExampleByGuid(Guid guid)
+		{
+			return GetOrCreateCmObjectByGuid<ILexExampleSentence, ILexExampleSentenceRepository, ILexExampleSentenceFactory>(guid);
+		}
+
+		private ICmPicture GetOrCreatePictureByGuid(Guid guid)
+		{
+			return GetOrCreateCmObjectByGuid<ICmPicture, ICmPictureRepository, ICmPictureFactory>(guid);
+		}
+
+		private ILexSense GetOrCreateSenseByGuid(Guid guid)
+		{
+			return GetOrCreateCmObjectByGuid<ILexSense, ILexSenseRepository, ILexSenseFactory>(guid);
+		}
+
 		protected override ActionNames NextActionName
 		{
 			get { return ActionNames.None; }


Remove redundant HTML

Remove redundant HTML

Remove HTML leftover from when the navbar wasn't in a partial.

--- src/LondonTravel.Site/Views/Shared/_Layout.cshtml
+++ src/LondonTravel.Site/Views/Shared/_Layout.cshtml
@@ -37,22 +37,7 @@
     </script>

-

-

-

-                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
-                    Toggle navigation
-
-
-
-                </button>
-
-                    <lazyimg alt="London Travel" src="@Url.CdnContent("avatar.png", Options)">
-
-

-            @await Html.PartialAsync("_Navbar")
-

-

+    @await Html.PartialAsync("_Navbar")

         @RenderBody()
         @await Html.PartialAsync("_Footer", Options)


Add help icon to navbar

Add help icon to navbar

Add a help icon to the navbar.

--- src/LondonTravel.Site/Views/Shared/_Navbar.cshtml
+++ src/LondonTravel.Site/Views/Shared/_Navbar.cshtml
@@ -47,7 +47,7 @@

-                                Help & Support
+                                Help & Support


Fixed bug from Redline's pull request

Fixed bug from Redline's pull request

--- UnityProject/Assets/Scripts/Chemistry/ReactionLib.cs
+++ UnityProject/Assets/Scripts/Chemistry/ReactionLib.cs
@@ -102,7 +102,7 @@
 			DoReaction(modifiedReagents, reaction);
 		}

-		RemoveEmptyReagents(modifiedReagents);
+		modifiedReagents = RemoveEmptyReagents(modifiedReagents);

 		return modifiedReagents;
 	}


Assign null to DisposalBin audio source instead of disabling warning


Fix issue with bomb not being picked up...

...in factory room when there is only one bomb.

--- Assets/Scripts/MessageResponders/BombMessageResponder.cs
+++ Assets/Scripts/MessageResponders/BombMessageResponder.cs
@@ -263,7 +263,7 @@
                 _currentBomb = bombs.Length == 1 ? -1 : 0;
                 for (int i = 0; i < bombs.Length; i++)
                 {
-                    SetBomb((MonoBehaviour)bombs[i], i);
+                    SetBomb((MonoBehaviour) bombs[i], _currentBomb == -1 ? -1 : i);
                     _bombHandles[i].nameText.text = string.Format("Bomb {0} of {1}", i + 1, bombs.Length);
                 }
                 StartCoroutine(factory.ReportBombStatus(_bombHandles));


This doesn't actually get used any more

This doesn't actually get used any more

--- Assets/ViveGrip/Scripts/Prefab/ViveGrip_ButtonManager.cs
+++ Assets/ViveGrip/Scripts/Prefab/ViveGrip_ButtonManager.cs
@@ -18,11 +18,6 @@
   public bool Pressed(string action) {
     ulong rawInput = ConvertString(action);
     return Device().GetTouchDown(rawInput);
-  }
-
-  public bool Released(string action) {
-    ulong rawInput = ConvertString(action);
-    return Device().GetTouchUp(rawInput);
   }

   public bool Holding(string action) {


remove direct duplicata (not the flip)

remove direct duplicata (not the flip)

--- Assets/parallax/Script/generator/assetRandomGenerator.cs
+++ Assets/parallax/Script/generator/assetRandomGenerator.cs
@@ -14,12 +14,14 @@

 	public randomSpawnAssetConfiguration[] AssetConfiguation;
 	public bool authoriseRandomFlip = false;
+	public bool removeDirectDuplicata = true;
 	public List<GameObject>[] GameObjectTabOfTypePrefabs = null;

 	public GameObject additionalPrefabAsset;
 	public Vector3 additionalPrefabPosition;

 	private int probabilitySomme;
+	private int previousId = -1;

 	// Use this for initialization
 	public override void clear(){
@@ -41,6 +43,10 @@
 						i += 1;
 					}
 				}
+				if (removeDirectDuplicata && i == previousId && AssetConfiguation.Length > 1) {
+					return getIdOfNextAsset ();
+				}
+				previousId = i;
 				return i;
 			}
 		}


Comparison check for ExtendedControl

Comparison check for ExtendedControl

--- Automatron/Assets/ExtendedEditor/Core/ExtendedControl.cs
+++ Automatron/Assets/ExtendedEditor/Core/ExtendedControl.cs
@@ -6,7 +6,7 @@

 namespace TNRD.Editor.Core {

-    public class ExtendedControl {
+    public class ExtendedControl : IEquatable<ExtendedControl> {

         [IgnoreSerialization]
         public ExtendedWindow Window;
@@ -173,5 +173,23 @@
             guiActions.Add( action );
             Window.Editor.Repaint();
         }
+
+        public bool Equals( ExtendedControl other ) {
+            if ( (object)other == null ) return false;
+            return ID == other.ID;
+        }
+
+        public override bool Equals( object obj ) {
+            if ( obj == null ) return false;
+            if ( obj is ExtendedControl ) {
+                return Equals( obj as ExtendedControl );
+            } else {
+                return false;
+            }
+        }
+
+        public override int GetHashCode() {
+            return ID.GetHashCode();
+        }
     }
 }


Fixed tests.

Fixed tests.

--- BoozeHoundCloud_Test/Services/AccountTypeService_Test.cs
+++ BoozeHoundCloud_Test/Services/AccountTypeService_Test.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using System.Linq.Expressions;
 using NUnit.Framework;
 using Moq;
@@ -52,11 +53,24 @@
     {
       // Set up the mock so that a inter account type transfer mapping will be returned,
       // in other words - any account can transfer to any other account.
-      _interAccountMappings.Setup(x =>
-        x.Get(It.IsAny<Expression<Func<InterAccountTypeTransactionMapping, bool>>>()))
-          .Returns(new InterAccountTypeTransactionMapping());
+      var debitAccountType = new AccountType { Id = 1 };
+      var creditAccountType = new AccountType { Id = 2 };

-      Assert.True(_testObject.IsTransferAllowed(new AccountType(), new AccountType()));
+      var debitAccount = new Account { AccountType = debitAccountType };
+      var creditAccount = new Account { AccountType = creditAccountType };
+
+      _interAccountMappings.Setup(x => x.Get())
+        .Returns(
+          new[]
+          {
+            new InterAccountTypeTransactionMapping
+            {
+              DebitAccountType = debitAccountType,
+              CreditAccountType = creditAccountType
+            }
+          });
+
+      Assert.True(_testObject.IsTransferAllowed(debitAccount.AccountType, creditAccount.AccountType));
     }

     //-------------------------------------------------------------------------
@@ -65,9 +79,8 @@
     [Category("IsTransferAllowed")]
     public void TransferNotAllowedForAccountTypesNotMappedInRepo()
     {
-      _interAccountMappings.Setup(x =>
-          x.Get(It.IsAny<Expression<Func<InterAccountTypeTransactionMapping, bool>>>()))
-        .Returns< InterAccountTypeTransactionMapping>(null);
+      _interAccountMappings.Setup(x => x.Get())
+        .Returns(new List<InterAccountTypeTransactionMapping>());

       Assert.False(_testObject.IsTransferAllowed(new AccountType(), new AccountType()));
     }


Updating MSBuild for dotnet 5 to MSBuild-16.8.0-pre.4.0-30608.117

--- Kudu.Core/Infrastructure/PathUtils/PathWindowsUtility.cs
+++ Kudu.Core/Infrastructure/PathUtils/PathWindowsUtility.cs
@@ -143,7 +143,7 @@
                 Path.Combine(programFiles, "Microsoft Visual Studio", "2019", "BuildTools",   "MSBuild", "Current", "Bin"), // msbuild tools
                 // above is for public kudu, below is for azure
             };
-            probPaths.Add(Path.Combine(programFiles, "MSBuild-16.8.0-pre.3.0-30509.190", "MSBuild", "Current", "Bin"));
+            probPaths.Add(Path.Combine(programFiles, "MSBuild-16.8.0-pre.4.0-30608.117", "MSBuild", "Current", "Bin"));

             return probPaths.FirstOrDefault(path => Directory.Exists(path));
         }


Removed obsolete method

Removed obsolete method

--- AngleSharp/Css/FunctionNames.cs
+++ AngleSharp/Css/FunctionNames.cs
@@ -216,17 +216,5 @@
         /// The perspective function.
         /// </summary>
         public static readonly String Perspective = "perspective";
-
-
-        /// <summary>
-        /// Creates a function call expression from the given strings.
-        /// </summary>
-        /// <param name="function">The name of the function.</param>
-        /// <param name="arguments">The arguments of the function.</param>
-        /// <returns>The CSS function call expression.</returns>
-        public static String Build(String function, params String[] arguments)
-        {
-            return String.Concat(function, "(", String.Join(", ", arguments), ")");
-        }
     }
 }


Changed transaction handling to work with new beta of sql transport.

--- XmlPersistence/SynchronizedStorage/StorageAdapter.cs
+++ XmlPersistence/SynchronizedStorage/StorageAdapter.cs
@@ -1,6 +1,7 @@
 using System.Data.SqlClient;
 using System.Threading.Tasks;
 using System.Transactions;
+using System.Xml;
 using NServiceBus.Extensibility;
 using NServiceBus.Outbox;
 using NServiceBus.Persistence;
@@ -28,21 +29,17 @@
         return EmptyResult;
     }

-    public async Task<CompletableSynchronizedStorageSession> TryAdapt(TransportTransaction transportTransaction, ContextBag context)
+    public Task<CompletableSynchronizedStorageSession> TryAdapt(TransportTransaction transportTransaction, ContextBag context)
     {
-        Transaction ambientTransaction;
-        if (transportTransaction.TryGet(out ambientTransaction))
+        SqlConnection existingSqlConnection;
+        SqlTransaction existingSqlTransaction;
+        //SQL server transport in native TX mode
+        if (transportTransaction.TryGet(out existingSqlConnection) && transportTransaction.TryGet(out existingSqlTransaction))
         {
-            SqlConnection existingSqlConnection;
-            //SQL server transport in ambient TX mode
-            if (transportTransaction.TryGet(out existingSqlConnection))
-            {
-                return new StorageSession(existingSqlConnection, null, false);
-            }
-            //Other transport in ambient TX mode
-            var connection = await SqlHelpers.New(connectionString);
-            return new StorageSession(connection, connection.BeginTransaction(), true);
+            CompletableSynchronizedStorageSession session = new StorageSession(existingSqlConnection, existingSqlTransaction, false);
+            return Task.FromResult(session);
         }
-        return null;
+        //Other modes handled by creating a new session.
+        return EmptyResult;
     }
 }


changed serialization format of guids

changed serialization format of guids

- 9462790d5c44468985425e2dd38ebd98 will now be 9462790D-5C44-4689-8542-5E2DD38EBD98

--- YamlDotNet/Serialization/Converters/GuidConverter.cs
+++ YamlDotNet/Serialization/Converters/GuidConverter.cs
@@ -41,7 +41,7 @@
         public void WriteYaml(Core.IEmitter emitter, object value, System.Type type)
         {
             var guid = (System.Guid) value;
-            emitter.Emit(new Core.Events.Scalar(guid.ToString("N")));
+            emitter.Emit(new Core.Events.Scalar(guid.ToString("D")));
         }
     }
 }


add comments

add comments

--- Assets/Scripts/General/Score.cs
+++ Assets/Scripts/General/Score.cs
@@ -5,26 +5,29 @@

 public class Score : MonoBehaviour {

-    public static double score = 20;
-    public Text labelScore = null;
-    public int pointPerSecond = 1;
+    static double score = 0;
+    public Text labelScore = null;
+    public int pointPerSecond = 1;
+
+    void Update() {

-    // Use this for initialization
-    void Start() {
-
+        addPoints(Time.deltaTime * pointPerSecond); // add percet of points by time
+        labelScore.text = getTemplateUpdated();
     }

-    // Update is called once per frame
-    void Update() {
-        addPoints(Time.deltaTime * pointPerSecond);
-        labelScore.text = changeText();
-    }
-
-    string changeText()
+    /// <summary>
+    /// Template for text Score
+    /// </summary>
+    /// <returns>Temple String of Score</returns>
+    string getTemplateUpdated()
     {
         return "ÌScore-" + ((int)score).ToString() + "Í";
     }

+    /// <summary>
+    /// Method to add Points to the Score this must call by whatever action to add points
+    /// </summary>
+    /// <param name="points"></param>
     public static void addPoints(float points) {
         score += points;
     }


added contract annotations to MustNotBeLessThan

--- Code/Light.GuardClauses/Guard.ComparableAssertions.cs
+++ Code/Light.GuardClauses/Guard.ComparableAssertions.cs
@@ -1,4 +1,5 @@
 using System;
+using JetBrains.Annotations;
 #if (NETSTANDARD2_0 || NETSTANDARD1_0 || NET45 || SILVERLIGHT)
 using System.Runtime.CompilerServices;
 #endif
@@ -20,6 +21,7 @@
 #if (NETSTANDARD2_0 || NETSTANDARD1_0 || NET45 || SILVERLIGHT)
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
 #endif
+        [ContractAnnotation("parameter:null => halt; parameter:notnull => notnull")]
         public static T MustNotBeLessThan<T>(this T parameter, T other, string parameterName = null, string message = null) where T : IComparable<T>
         {
             if (parameter.MustNotBeNullReference(parameterName).CompareTo(other) < 0)
@@ -39,6 +41,7 @@
 #if (NETSTANDARD2_0 || NETSTANDARD1_0 || NET45 || SILVERLIGHT)
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
 #endif
+        [ContractAnnotation("parameter:null => halt; parameter:notnull => notnull")]
         public static T MustNotBeLessThan<T>(this T parameter, T other, Func<T, T, Exception> exceptionFactory, string parameterName = null) where T : IComparable<T>
         {
             if (parameter.MustNotBeNullReference(parameterName).CompareTo(other) < 0)


Reusable wcf authorization.

Reusable wcf authorization.

Standard authorization policy is usualy tweaked just a little.
Mark critical part of it as virtual, so it can be reused in other projects.

--- Code/Server/Revenj.Wcf/StandardAuthorizationPolicy.cs
+++ Code/Server/Revenj.Wcf/StandardAuthorizationPolicy.cs
@@ -16,7 +16,7 @@
 	{
 		private readonly IPrincipalFactory PrincipalFactory = ContainerWcfHost.Resolve<IPrincipalFactory>();
 		private static readonly string DefaultAuthorization = ConfigurationManager.AppSettings["DefaultAuthorization"];
-		private readonly IAuthentication Authentication = ContainerWcfHost.Resolve<IAuthentication>();
+		protected readonly IAuthentication Authentication = ContainerWcfHost.Resolve<IAuthentication>();
 		private static readonly HashSet<string> PublicUrl = new HashSet<string>();
 		private static readonly HashSet<string> PublicTemplate = new HashSet<string>();
 		private static readonly string MissingBasicAuth = "Basic realm=\"" + Environment.MachineName + "\"";
@@ -63,6 +63,27 @@
 			public string Name { get { return name; } }
 		}

+		protected virtual IIdentity GetIdentity(string authHeader)
+		{
+			var splt = authHeader.Split(' ');
+			var authType = splt[0];
+			if (splt.Length != 2)
+				Utility.ThrowError("Invalid authorization header.", HttpStatusCode.Unauthorized);
+
+			var token = Encoding.UTF8.GetString(Convert.FromBase64String(splt[1]));
+			var cred = token.Split(':');
+
+			if (cred.Length != 2)
+				Utility.ThrowError("Invalid authorization header content.", HttpStatusCode.Unauthorized);
+
+			var user = cred[0];
+
+			if (string.IsNullOrEmpty(user))
+				Utility.ThrowError("User not specified in authorization header.", HttpStatusCode.Unauthorized);
+
+			return new RestIdentity(authType, Authentication.IsAuthenticated(user, cred[1]), user);
+		}
+
 		private IIdentity GetClientIdentity(EvaluationContext evaluationContext)
 		{
 			object obj;
@@ -75,21 +96,7 @@
 					Utility.ThrowError("Authorization header not provided.", HttpStatusCode.Unauthorized);
 				}

-				var splt = authorization.Split(' ');
-				var authType = splt[0];
-				if (splt.Length != 2)
-					Utility.ThrowError("Invalid authorization header.", HttpStatusCode.Unauthorized);
-
-				var cred = Encoding.UTF8.GetString(Convert.FromBase64String(splt[1])).Split(':');
-				if (cred.Length != 2)
-					Utility.ThrowError("Invalid authorization header content.", HttpStatusCode.Unauthorized);
-
-				var user = cred[0];
-
-				if (string.IsNullOrEmpty(user))
-					Utility.ThrowError("User not specified in authorization header.", HttpStatusCode.Unauthorized);
-
-				var identity = new RestIdentity(authType, Authentication.IsAuthenticated(user, cred[1]), user);
+				var identity = GetIdentity(authorization);
 				var template = ThreadContext.Request.UriTemplateMatch;
 				if (!identity.IsAuthenticated)
 				{
@@ -97,7 +104,7 @@
 						&& (template.RequestUri != null && PublicUrl.Contains(template.RequestUri.LocalPath)
 						|| template.Template != null && PublicTemplate.Contains(template.Template.ToString())))
 						return identity;
-					Utility.ThrowError("User {0} was not authenticated.".With(user), HttpStatusCode.Forbidden);
+					Utility.ThrowError("User {0} was not authenticated.".With(identity.Name), HttpStatusCode.Forbidden);
 				}
 				else if (template == null)
 				{


fix traitor game mode (#12303)

fix traitor game mode (#12303)

--- Content.Server/GameTicking/Rules/TraitorRuleSystem.cs
+++ Content.Server/GameTicking/Rules/TraitorRuleSystem.cs
@@ -70,13 +70,6 @@
         MakeCodewords();
         if (!RuleAdded)
             return;
-
-        // If the current preset doesn't explicitly contain the traitor game rule, just carry on and remove self.
-        if (_gameTicker.Preset?.Rules.Contains(Prototype) ?? false)
-        {
-            _gameTicker.EndGameRule(_prototypeManager.Index<GameRulePrototype>(Prototype));
-            return;
-        }

         var minPlayers = _cfg.GetCVar(CCVars.TraitorMinPlayers);
         if (!ev.Forced && ev.Players.Length < minPlayers)


Removed not used methods

Removed not used methods

Since WeakHashBucket cannot implement ICollection<KeyValuePair<TKey,
TValue>> then the partial implementations must be removed.

--- Core/Theraot/Collections/ThreadSafe/WeakHashBucket.cs
+++ Core/Theraot/Collections/ThreadSafe/WeakHashBucket.cs
@@ -141,15 +141,6 @@
             }
         }

-        [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "Returns false")]
-        bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
-        {
-            get
-            {
-                return false;
-            }
-        }
-
         protected HashBucket<TNeedle, TValue> Wrapped
         {
             get
@@ -213,11 +204,6 @@
         public int GetHashCode(TKey obj)
         {
             return _comparer.GetHashCode(obj);
-        }
-
-        void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
-        {
-            _wrapped.Add(NeedleHelper.CreateNeedle<TKey, TNeedle>(item.Key), item.Value);
         }

         public bool Remove(TKey key)


Update the robot list every 5 seconds - #10

--- src/MindstormR.Client.Web/Views/Home/Index.cshtml
+++ src/MindstormR.Client.Web/Views/Home/Index.cshtml
@@ -56,22 +56,31 @@

         var robotId = -1;
         $('#logout').hide();
+        CreateDropdown();

-        $(function CreateDropdown() {
+        window.setInterval(function () {
+            CreateDropdown();
+        }, 5000);
+
+
+
+        function CreateDropdown() {
+            var dropdownItems = "";
             $.ajax({
                 cache: false,
                 url: 'http://test.henkmollema.nl/robot/all',
                 dataType: 'jsonp',
                 success: function (data) {
                     for (var i in data) {
-                        $('#robots').append("
" + "Robot " + data[i] + "
");
+                        dropdownItems += "
" + "Robot " + data[i] + "
";
                     }
                     if (data[0] == null) {
-                        $('#robots').append("
Er zijn geen robots online
")
+                        dropdownItems += "
Er zijn geen robots online
";
                     }
+                    $('#robots').html(dropdownItems);
                 }
             });
-        });
+        };

         $(function SelectRobot() {
             $('#robots').on('click', 'a', function () {


Updated the order in which things happen to remove a race condition where double announces could happen.

svn path=/trunk/bitsharp/; revision=75080

--- src/MonoTorrent.Client/Managers/TorrentManager.cs
+++ src/MonoTorrent.Client/Managers/TorrentManager.cs
@@ -289,14 +289,15 @@
                 this.loadedFastResume = false;
             }

+			this.TrackerManager.Scrape();
+			this.trackerManager.Announce(TorrentEvent.Started); // Tell server we're starting
+			ClientEngine.ConnectionManager.RegisterManager(this);
+
             if (this.Progress == 100.0)
                 UpdateState(TorrentState.Seeding);
             else
                 UpdateState(TorrentState.Downloading);

-            this.TrackerManager.Scrape();
-            this.trackerManager.Announce(TorrentEvent.Started); // Tell server we're starting
-            ClientEngine.ConnectionManager.RegisterManager(this);
         }


Added back the quotes.

Added back the quotes.

--- admin/admin.cs
+++ admin/admin.cs
@@ -64,16 +64,16 @@
     {
         if (!API.doesResourceExist(resource))
         {
-            API.sendChatMessageToPlayer(sender, "~r~No such resource found: " + resource + "");
+            API.sendChatMessageToPlayer(sender, "~r~No such resource found: \"" + resource + "\"");
         }
         else if (API.isResourceRunning(resource))
         {
-            API.sendChatMessageToPlayer(sender, "~r~Resource " + resource + " is already running!");
+            API.sendChatMessageToPlayer(sender, "~r~Resource \"" + resource + "\" is already running!");
         }
         else
         {
             API.startResource(resource);
-            API.sendChatMessageToPlayer(sender, "~g~Started resource " + resource + "");
+            API.sendChatMessageToPlayer(sender, "~g~Started resource \"" + resource + "\"");
         }
     }

@@ -82,16 +82,16 @@
     {
         if (!API.doesResourceExist(resource))
         {
-            API.sendChatMessageToPlayer(sender, "~r~No such resource found: " + resource + "");
+            API.sendChatMessageToPlayer(sender, "~r~No such resource found: \"" + resource + "\"");
         }
         else if (!API.isResourceRunning(resource))
         {
-            API.sendChatMessageToPlayer(sender, "~r~Resource " + resource + " is not running!");
+            API.sendChatMessageToPlayer(sender, "~r~Resource \"" + resource + "\" is not running!");
         }
         else
         {
             API.stopResource(resource);
-            API.sendChatMessageToPlayer(sender, "~g~Stopped resource " + resource);
+            API.sendChatMessageToPlayer(sender, "~g~Stopped resource \"" + resource + "\"");
         }
     }

@@ -102,11 +102,11 @@
         {
             API.stopResource(resource);
             API.startResource(resource);
-            API.sendChatMessageToPlayer(sender, "~g~Restarted resource " + resource);
+            API.sendChatMessageToPlayer(sender, "~g~Restarted resource \"" + resource + "\"");
         }
         else
         {
-            API.sendChatMessageToPlayer(sender, "~r~No such resource found: " + resource);
+            API.sendChatMessageToPlayer(sender, "~r~No such resource found: \"" + resource + "\"");
         }
     }


debugging by run on SE

debugging by run on SE

--- MiningStationAutomation/MiningStationAutomationScript.cs
+++ MiningStationAutomation/MiningStationAutomationScript.cs
@@ -9,6 +9,8 @@

 namespace SpaceEngineersScripts.MiningStationAutomation
 {
+    //TODO: use persistant storage
+    //TODO: output to debug
     class MiningStationAutomationScript
     {
         #region programming environment essential inits, DO NOT COPY TO GAME
@@ -26,11 +28,12 @@
         static readonly List<float> DRILL_RADII = new List<float>() { 0f, 3.5f, 7f, 10f }; //Drills can technically do a 5 wide trench, to be sure nu small floating rocks are left, do smaller intervals.
         const bool DEBUG = true;
         const bool FORCEROTOR_TORQUE = true;
-        const bool INIT_FLATTENING = true; // safety precaoution
+        const bool INIT_FLATTENING = true; //safety precaution
         const bool END_FLATTENING = true; //flatten pit bottom to allow cars to drive more easily;

         //BLOCK SETUP
         const string TIMER_NAME = "Timer";
+        const string PROGRAMMABLEBLOCK_NAME = "Programmable Block";
         const string ROTOR_NAME = "Drill Rotor";
         const string H_PISTON_NAME = "Horizontal Piston";
         const string V_PISTON_NAME = "Vertical Piston";
@@ -45,7 +48,7 @@
         {
             if (station == null)
             {
-                station = new DrillStation();
+                station = new DrillStation(GridTerminalSystem, Storage);
             }

             station.Request();
@@ -71,17 +74,12 @@
                     block.GetActionWithName("OnOff_On").Apply(block);
                 });

-                //turn on all containers
-                drillStationBlocks.CargoContainers.ForEach(block =>
-                {
-                    block.GetActionWithName("OnOff_On").Apply(block);
-                });
-
                 //turn on all panels
                 drillStationBlocks.DebugPanels.ForEach(block =>
                 {
                     block.GetActionWithName("OnOff_On").Apply(block);
                 });
+

                 //turn on all drills
                 drillStationBlocks.Drills.ForEach(block =>
@@ -192,7 +190,7 @@

             public string Status(Context context)
             {
-                return string.Format("Flattening [{0}/{1}] ({2}m)", currentCircle + 1, DRILL_RADII.Count, BlockUtils.GetPistonsTotalPosition((context as DrillStation).DrillStationBlocks.VerticalPistons));
+                return string.Format("Flattening [{0}/{1}] ({2:0.##}m)", currentCircle + 1, DRILL_RADII.Count, BlockUtils.GetPistonsTotalPosition((context as DrillStation).DrillStationBlocks.VerticalPistons));
             }
         }

@@ -266,7 +264,7 @@

             public string Status(Context context)
             {
-                return string.Format("Drilling [{0}/{1}] ({2}m/{3}m)", currentCircle + 1, DRILL_RADII.Count, BlockUtils.GetPistonsTotalPosition((context as DrillStation).DrillStationBlocks.VerticalPistons), TARGET_DEPTH);
+                return string.Format("Drilling [{0}/{1}] ({2:0.##}m/{3:0.##}m)", currentCircle + 1, DRILL_RADII.Count, BlockUtils.GetPistonsTotalPosition((context as DrillStation).DrillStationBlocks.VerticalPistons), TARGET_DEPTH);
             }
         }

@@ -391,12 +389,13 @@
             private DrillStationBlocks _drillStationBlocks;

             // Constructor
-            public DrillStation()
-            {
-                if (Storage.Contains("StateName"))
+            public DrillStation(IMyGridTerminalSystem GridTerminalSystem, string storage)
+            {
+                //TODO: use persistant storage
+                /*if (storage.Contains("StateName"))
                 {
                     //get the state from storage
-                    var entries = Storage.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                    var entries = storage.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);

                     entries.ForEach(entry =>
                     {
@@ -436,7 +435,10 @@
                 {
                     //init is the default state
                     State = new InitState();
-                }
+                }*/
+
+                //init is the default state
+                State = new InitState();

                 //build the station blocks
                 this._drillStationBlocks = new DrillStationBlocks(GridTerminalSystem);
@@ -476,7 +478,7 @@
             {
                 Rotor = GridTerminalSystem.GetBlockWithName(ROTOR_NAME) as IMyMotorAdvancedStator;
                 Timer = GridTerminalSystem.GetBlockWithName(TIMER_NAME) as IMyTimerBlock;
-                ProgrammableBlock = Me;
+                ProgrammableBlock = GridTerminalSystem.GetBlockWithName(PROGRAMMABLEBLOCK_NAME) as IMyProgrammableBlock;

                 //HorizontalPiston
                 HorizontalPiston = new List<IMyPistonBase>();
@@ -530,7 +532,7 @@
                 CargoContainers = new List<IMyCargoContainer>();
                 var containerTempList = new List<IMyTerminalBlock>();
                 GridTerminalSystem.GetBlocksOfType<IMyCargoContainer>(containerTempList);
-                containerTempList.ForEach(antenna => CargoContainers.Add(antenna as IMyCargoContainer));
+                containerTempList.ForEach(container => CargoContainers.Add(container as IMyCargoContainer));
             }

             public bool ToPosition(List<IMyPistonBase> pistons1, float pistons1position, float speed1, List<IMyPistonBase> pistons2, float pistons2position, float speed2, IMyMotorAdvancedStator rotor, float rotorPosition, float rpm)
@@ -638,7 +640,7 @@
                 }
                 else
                 {
-                    Echo("The rotor position could not parsed");
+                    //Echo("The rotor position could not parsed");
                     throw new FormatException("The rotor position could not parsed");
                 }
                 return float.Parse(currentposition);
@@ -700,7 +702,7 @@
                 //warn for fuckery if settin values possible out of bounds when not obviously meant to be that way
                 if ((lower < -360 && lower != float.NegativeInfinity) || (upper > 360 && upper != float.PositiveInfinity))
                 {
-                    Echo("[WARN] Setting Rotor limits is doing wierd stuff around or beyond the 360 degree mark, often SE interprets this as infinity");
+                    //Echo("[WARN] Setting Rotor limits is doing wierd stuff around or beyond the 360 degree mark, often SE interprets this as infinity");
                 }

                 rotor.SetValueFloat("LowerLimit", lower);


vs dkm debugger: work-around for 'this.member' evaluation

--- vscode/nullc_debugger_component/LocalComponent.cs
+++ vscode/nullc_debugger_component/LocalComponent.cs
@@ -651,7 +651,13 @@

                 var processData = DebugHelpers.GetOrCreateDataItem<NullcLocalProcessDataItem>(process);

+                string finalExpression = expression.Text;
+
                 // Lets start by simple stand-alone variables
+
+                // Since we don't handle composite expressions yet, we can at least clean-up access to class members (even if this can lead to a wrong result if member is shadowed)
+                if (finalExpression.StartsWith("this."))
+                    finalExpression = finalExpression.Substring(5);

                 // TODO: DkmEvaluationResultCategory Method/Class
                 // TODO: DkmEvaluationResultAccessType Internal
@@ -663,7 +669,7 @@
                 {
                     foreach (var el in activeEntry.function.locals)
                     {
-                        if (el.name == expression.Text)
+                        if (el.name == finalExpression)
                         {
                             var address = processData.dataStackBase + (ulong)(activeEntry.dataOffset + el.offset);

@@ -677,7 +683,7 @@

                     foreach (var el in activeEntry.function.arguments)
                     {
-                        if (el.name == expression.Text)
+                        if (el.name == finalExpression)
                         {
                             var address = processData.dataStackBase + (ulong)(activeEntry.dataOffset + el.offset);

@@ -704,7 +710,7 @@

                                 foreach (var el in classType.nullcMembers)
                                 {
-                                    if (el.name == expression.Text)
+                                    if (el.name == finalExpression)
                                     {
                                         var address = thisValue.Value + el.offset;

@@ -721,7 +727,7 @@
                 // Check globals
                 foreach (var el in processData.bytecode.variables)
                 {
-                    if (el.name == expression.Text)
+                    if (el.name == finalExpression)
                     {
                         var address = processData.dataStackBase + (ulong)(el.offset);


Consider Profile attribute argument for evaluating requirements for Core and ES2 profiles.

--- BindingsGen/RegistryAssembly.cs
+++ BindingsGen/RegistryAssembly.cs
@@ -17,6 +17,7 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Linq;
 using System.Text.RegularExpressions;

 using Mono.Collections.Generic;
@@ -237,10 +238,19 @@

 			foreach (RegistryAssemblyConfiguration.VersionRange cfgFeature in cfg.Features) {
 				if (cfgFeature.Api != null) {
-					string apiRegex = customAttrib.Fields.Count > 0 ? customAttrib.Fields[0].Argument.Value as string : "gl";
+					CustomAttributeNamedArgument apiArg = customAttrib.Fields.FirstOrDefault(delegate(CustomAttributeNamedArgument item) { return (item.Name == "Api"); });
+					string apiRegex = apiArg.Argument.Value != null ? apiArg.Argument.Value as string : "gl";

 					if (Regex.IsMatch(cfgFeature.Api, "^(" + apiRegex + ")$"))
 						compatible |= true;
+				}
+
+				if (cfgFeature.Profile != null) {
+					CustomAttributeNamedArgument apiArg = customAttrib.Fields.FirstOrDefault(delegate(CustomAttributeNamedArgument item) { return (item.Name == "Profile"); });
+					string apiRegex = apiArg.Argument.Value != null ? apiArg.Argument.Value as string : null;
+
+					if (apiRegex != null)
+						compatible &= Regex.IsMatch(cfgFeature.Profile, "^(" + apiRegex + ")$");
 				}

 				if (attribVersion != null) {


todo note

todo note

--- BitSharp.Core/Domain/BlockTx.cs
+++ BitSharp.Core/Domain/BlockTx.cs
@@ -12,6 +12,7 @@
             this.transaction = transaction;
         }

+        //TODO only used by tests
         public BlockTx(int txIndex, Transaction tx)
             : this(txIndex, 0, tx.Hash, false, tx)
         { }


Extract out missing argument detection

Extract out missing argument detection

--- BobTheBuilder/DynamicBuilder.cs
+++ BobTheBuilder/DynamicBuilder.cs
@@ -39,6 +39,22 @@
         public T Build()
         {
             var properties = typeof (T).GetProperties().ToLookup(p => p.Name);
+            var missingArguments = GetMissingArguments(properties);
+
+            if (missingArguments.Any())
+            {
+                var missingMember = missingArguments.First();
+                throw new MissingMemberException(string.Format(@"The property ""{0}"" does not exist on ""{1}""",
+                        missingMember.Name, typeof (T).Name));
+            }
+
+            var instance = CreateInstanceOfType();
+            PopulatePublicSettableProperties(instance);
+            return instance;
+        }
+
+        private IEnumerable<MemberNameAndValue> GetMissingArguments(ILookup<string, PropertyInfo> properties)
+        {
             var argumentLocations = argumentStore.GetAllStoredMembers().GroupBy(member =>
             {
                 if (properties.Contains(member.Name))
@@ -54,14 +70,10 @@
             List<MemberNameAndValue> value;
             if (argumentLocations.TryGetValue(ArgumentLocation.Missing, out value))
             {
-                var missingMember = value.First();
-                throw new MissingMemberException(string.Format(@"The property ""{0}"" does not exist on ""{1}""",
-                        missingMember.Name, typeof (T).Name));
+                return value;
             }

-            var instance = CreateInstanceOfType();
-            PopulatePublicSettableProperties(instance);
-            return instance;
+            return Enumerable.Empty<MemberNameAndValue>();
         }

         private static T CreateInstanceOfType()


Added Size and Point, dirty is now calculated

--- CC.Common.JSON/CCPreferences.cs
+++ CC.Common.JSON/CCPreferences.cs
@@ -5,12 +5,12 @@
 using System.Text;
 using System.IO;
 using System.Windows.Forms;
+using System.Drawing;

 namespace CC.Common.JSON
 {
   public class CCPreferences: IEnumerable
   {
-    internal bool _dirty;
     internal string _fileName;
     internal Hashtable ht;
     internal Hashtable defaults;
@@ -78,13 +78,24 @@
     {
       ht = new Hashtable();
       defaults = new Hashtable();
-      _dirty = false;
-      Load();
+      //Load(); // <-- NEVER DO THIS!
     }

     public bool IsDirty
     {
-      get { return _dirty; }
+      get
+      {
+        bool ret = false;
+        foreach (DictionaryEntry e in ht)
+        {
+          if (!IsDefault((string)e.Key))
+          {
+            ret = true;
+            break;
+          }
+        }
+        return ret;
+      }
     }

     public bool IsDefault(string key)
@@ -113,7 +124,6 @@
           if (ht[key] != value)
           {
             ht[key] = value;
-            _dirty = true;
           }
         }
         else
@@ -121,7 +131,6 @@
           if (value != defaults[key])
           {
             ht[key] = value;
-            _dirty = true;
           }
         }
       }
@@ -140,11 +149,11 @@
           return ht[key];
         else
         {
-          if (defaultValue != null && (!String.IsNullOrEmpty(defaultValue.ToString())))
-          {
-            //defaults.Add(key, defaultValue);
-            _dirty = false;
-          }
+          //if (defaultValue != null && (!String.IsNullOrEmpty(defaultValue.ToString())))
+          //{
+          //  //defaults.Add(key, defaultValue);
+          //  //_dirty = false;
+          //}
           return defaultValue;
         }
       }
@@ -254,6 +263,52 @@
     }
     #endregion

+    #region Size
+    public void Set(string key, Size value)
+    {
+      _set(key, String.Format("[{0}, {1}]", value.Width, value.Height));
+    }
+    public Size Get(string key, Size defaultValue)
+    {
+      Size ret = defaultValue;
+      try
+      {
+        string temp = _get(key, String.Format("[{0}, {1}]", defaultValue.Width, defaultValue.Height)).ToString();
+        string[] data = temp.Replace("[", "").Replace("]", "").Split(',');
+        int width;
+        int height;
+        Int32.TryParse(data[0].Trim(), out width);
+        Int32.TryParse(data[1].Trim(), out height);
+        ret = new Size(width, height);
+      }
+      catch { }
+      return ret;
+    }
+    #endregion
+
+    #region Point
+    public void Set(string key, Point value)
+    {
+      _set(key, String.Format("[{0}, {1}]", value.X, value.Y));
+    }
+    public Point Get(string key, Point defaultValue)
+    {
+      Point ret = defaultValue;
+      try
+      {
+        string temp = _get(key, String.Format("[{0}, {1}]", defaultValue.X, defaultValue.Y)).ToString();
+        string[] data = temp.Replace("[", "").Replace("]", "").Split(',');
+        int x;
+        int y;
+        Int32.TryParse(data[0].Trim(), out x);
+        Int32.TryParse(data[1].Trim(), out y);
+        ret = new Point(x, y);
+      }
+      catch { }
+      return ret;
+    }
+    #endregion
+
     #region Methods
     public void Remove(string key)
     {


TextBox Height Hack

TextBox Height Hack

--- Win32Forms/FormConverter.cs
+++ Win32Forms/FormConverter.cs
@@ -401,6 +401,9 @@
                     styles.Add("ES_CENTER");
                     break;
             }
+            //height hack
+            control.ClientSize = new Size(control.Width, control.Height);
+
             AddControl(control, "EDITTEXT", styles);
         }


Refactor code

Refactor code

--- WinFormTemplate/FormMain.cs
+++ WinFormTemplate/FormMain.cs
@@ -61,6 +61,11 @@
     }

     private void FormMain_Load(object sender, EventArgs e)
+    {
+      LoadSettingsAtStartup();
+    }
+
+    private void LoadSettingsAtStartup()
     {
       DisplayTitle();
       GetWindowValue();
@@ -313,6 +318,7 @@
           searchToolStripMenuItem.Text = languageDicoEn["MenuHelpSearch"];
           aboutToolStripMenuItem.Text = languageDicoEn["MenuHelpAbout"];

+          currentLanguage = "English";
           break;
         case "French":
           frenchToolStripMenuItem.Checked = true;
@@ -344,6 +350,7 @@
           searchToolStripMenuItem.Text = languageDicoFr["MenuHelpSearch"];
           aboutToolStripMenuItem.Text = languageDicoFr["MenuHelpAbout"];

+          currentLanguage = "French";
           break;
       }
     }


Implemented field

Implemented field

--- Zen.Core/Entities/ZClass.cs
+++ Zen.Core/Entities/ZClass.cs
@@ -11,17 +11,6 @@
     {
         public string Name { get; set; }

-        public IZProperty[] Properties
-        {
-            get
-            {
-                throw new NotImplementedException();
-            }
-
-            set
-            {
-                throw new NotImplementedException();
-            }
-        }
+        public IZProperty[] Properties { get; set; }
     }
 }