Added DATAMODEL indexing with semantic thumbprint calculation

--- Lucene/IndexTool/Program.cs
+++ Lucene/IndexTool/Program.cs
@@ -46,7 +46,7 @@
                     DoReindex((ReindexSubOptions) verbSubOptions);
                     break;
                 case "adddoc":
-                    DoAddDocument((AddDocumentSubOptions) verbSubOptions);
+                    DoAddDocuments((AddDocumentSubOptions) verbSubOptions);
                     break;
                 case "removedoc":
                     DoRemoveDocument((RemoveDocumentSubOptions) verbSubOptions);
@@ -86,7 +86,7 @@
             LuceneSupport.LuceneSupport.RemoveDocuments(verbSubOptions.LuceneIndexRoot, documentID);
         }

-        private static void DoAddDocument(AddDocumentSubOptions verbSubOptions)
+        private static void DoAddDocuments(AddDocumentSubOptions verbSubOptions)
         {
             FileInfo[] files = verbSubOptions.GetDocumentFiles();
             XmlSerializer serializer = new XmlSerializer(typeof(ServiceModelAbstractionType));
@@ -96,23 +96,59 @@
                 ServiceModelAbstractionType serviceModelAbs = (ServiceModelAbstractionType)serializer.Deserialize(file.OpenRead());
                 foreach (var serviceModel in serviceModelAbs.ServiceModel)
                 {
-                    foreach (var operation in serviceModel.Service.SelectMany(ser => ser.Operation))
-                    {
-                        string id = file.Name + "_" + operation.name; //.Replace("-", "").Replace(".", "");
-                        //id = Guid.NewGuid().ToString();
-                        string serviceNameSpace = operation.semanticTypeName;
-                        Document doc = new Document();
-                        doc.Add(new Field("ID", id, Field.Store.YES, Field.Index.NOT_ANALYZED));
-                        doc.Add(new Field("FileName", file.Name, Field.Store.YES, Field.Index.NOT_ANALYZED));
-                        doc.Add(new Field("SemanticTypeName", serviceNameSpace, Field.Store.YES, Field.Index.NOT_ANALYZED));
-                        doc.Add(new Field("OperationName", operation.name, Field.Store.YES, Field.Index.NOT_ANALYZED));
-                        string hashValue = GetCombinedSemanticHashValue(operation);
-                        doc.Add(new Field("SemanticCombinedString", hashValue, Field.Store.YES, Field.Index.NOT_ANALYZED));
-                        string semanticThumbprintSHA256 = CalculateHexThumbprintSha256(hashValue);
-                        doc.Add(new Field("SemanticThumbprint", semanticThumbprintSHA256, Field.Store.YES, Field.Index.NOT_ANALYZED));
-                        if (operation.UsesOperation != null)
-                        {
-                            /*
+                    var operationDocs = GetOperationDocs(serviceModel, file.Name);
+                    docs.AddRange(operationDocs);
+                    var dataModelDocs = GetDataModelDocs(serviceModel, file.Name);
+                    docs.AddRange(dataModelDocs);
+                }
+            }
+            LuceneSupport.LuceneSupport.AddDocuments(verbSubOptions.LuceneIndexRoot, docs.ToArray(), new WhitespaceAnalyzer());
+        }
+
+        private static List<Document> GetDataModelDocs(ServiceModelType serviceModel, string fileName)
+        {
+            List<Document> dataModelDocs = new List<Document>();
+            foreach (var dataModel in serviceModel.DataContract ?? new DataContractType[0])
+            {
+                string id = fileName + "_" + dataModel.name;
+                Document doc = new Document();
+                doc.Add(getField("ID", id));
+                doc.Add(getField("DocType", "DATAMODEL"));
+                string hashValue = GetCombinedSemanticHashValue(dataModel);
+                doc.Add(getField("SemanticCombinedString", hashValue));
+                string semanticThumbprintSHA256 = CalculateHexThumbprintSha256(hashValue);
+                doc.Add(new Field("SemanticThumbprint", semanticThumbprintSHA256, Field.Store.YES, Field.Index.NOT_ANALYZED));
+                dataModelDocs.Add(doc);
+            }
+            return dataModelDocs;
+        }
+
+        private static IFieldable getField(string name, string value, bool analyzed = false)
+        {
+            return new Field(name, value, Field.Store.YES, analyzed ? Field.Index.ANALYZED : Field.Index.NOT_ANALYZED);
+        }
+
+        private static List<Document> GetOperationDocs(ServiceModelType serviceModel, string fileName)
+        {
+            List<Document> operationDocs = new List<Document>();
+            foreach (var operation in serviceModel.Service.SelectMany(ser => ser.Operation))
+            {
+                string id = fileName + "_" + operation.name; //.Replace("-", "").Replace(".", "");
+                //id = Guid.NewGuid().ToString();
+                string serviceNameSpace = operation.semanticTypeName;
+                Document doc = new Document();
+                doc.Add(new Field("ID", id, Field.Store.YES, Field.Index.NOT_ANALYZED));
+                doc.Add(getField("DocType", "SERVICEMODEL"));
+                doc.Add(new Field("FileName", fileName, Field.Store.YES, Field.Index.NOT_ANALYZED));
+                doc.Add(new Field("SemanticTypeName", serviceNameSpace, Field.Store.YES, Field.Index.NOT_ANALYZED));
+                doc.Add(new Field("OperationName", operation.name, Field.Store.YES, Field.Index.NOT_ANALYZED));
+                string hashValue = GetCombinedSemanticHashValue(operation);
+                doc.Add(new Field("SemanticCombinedString", hashValue, Field.Store.YES, Field.Index.NOT_ANALYZED));
+                string semanticThumbprintSHA256 = CalculateHexThumbprintSha256(hashValue);
+                doc.Add(new Field("SemanticThumbprint", semanticThumbprintSHA256, Field.Store.YES, Field.Index.NOT_ANALYZED));
+                if (operation.UsesOperation != null)
+                {
+                    /*
                             string[] semanticTypeFields =
                                 operation.UsesOperation.Select(usesOperation => usesOperation.semanticTypeName)
                                          .ToArray();
@@ -122,18 +158,24 @@

                             doc.Add(field);
                              */
-                            var fields = operation.UsesOperation.Select(usesOperation =>
-                                                                        new Field("UsesOperation",
-                                                                                usesOperation.semanticTypeName,
-                                                                                Field.Store.YES,
-                                                                                Field.Index.NOT_ANALYZED)).ToArray();
-                            Array.ForEach(fields, doc.Add);
-                        }
-                        docs.Add(doc);
-                    }
+                    var fields = operation.UsesOperation.Select(usesOperation =>
+                                                                new Field("UsesOperation",
+                                                                          usesOperation.semanticTypeName,
+                                                                          Field.Store.YES,
+                                                                          Field.Index.NOT_ANALYZED)).ToArray();
+                    Array.ForEach(fields, doc.Add);
                 }
-            }
-            LuceneSupport.LuceneSupport.AddDocuments(verbSubOptions.LuceneIndexRoot, docs.ToArray(), new WhitespaceAnalyzer());
+                operationDocs.Add(doc);
+            }
+            return operationDocs;
+        }
+
+        private static string GetCombinedSemanticHashValue(DataContractType dataContract)
+        {
+            string propertyString = getTechSemanticConcatenation(dataContract.Property);
+            string hashSource = string.Format("MODEL{0}-PROPERTIES{1}",
+                                              dataContract.semanticTypeName, propertyString);
+            return hashSource;
         }

         private static string GetCombinedSemanticHashValue(OperationType operation)
@@ -171,7 +213,7 @@
             DirectoryInfo dirInfo = new DirectoryInfo(verbSubOptions.LuceneIndexRoot);
             dirInfo.Delete(true);
             LuceneSupport.LuceneSupport.CreateIndex(verbSubOptions.LuceneIndexRoot);
-            DoAddDocument(new AddDocumentSubOptions
+            DoAddDocuments(new AddDocumentSubOptions
                 {
                     CatalogueRepositoryRoot = verbSubOptions.CatalogueRepositoryRoot,
                     DocumentFilter = verbSubOptions.DocumentFilter,


added a gamepad keep alive feature

added a gamepad keep alive feature

--- MFIGamepadShared/Gamepad.cs
+++ MFIGamepadShared/Gamepad.cs
@@ -16,6 +16,7 @@
         private readonly HidDeviceLoader _hidDeviceLoader;
         private readonly VGenWrapper _vGenWrapper;
         private Thread _gamepadUpdateThread;
+        private Thread _gamepadAliveThread;
         private IDictionary<XInputGamepadButtons, XInputGamepadButtons> _virtualMappings;

         public Gamepad(GamepadConfiguration config, VGenWrapper vGenWrapper, HidDeviceLoader hidDeviceLoader)
@@ -107,6 +108,49 @@
             ErrorOccuredEvent?.Invoke(this, message);
         }

+        private void _deviceStream(HidDevice device, HidStream stream)
+        {
+            Thread.CurrentThread.IsBackground = true;
+
+            try
+            {
+                using (stream)
+                {
+                    while (true)
+                    {
+                        if (!Thread.CurrentThread.IsAlive)
+                        {
+                            break;
+                        }
+
+                        var bytes = new byte[device.MaxInputReportLength];
+                        int count;
+                        try
+                        {
+                            count = stream.Read(bytes, 0, bytes.Length);
+                        }
+                        catch (TimeoutException)
+                        {
+                            continue;
+                        }
+                        catch (Exception ex)
+                        {
+                            Log(ex.Message);
+                            break;
+                        }
+
+                        if (count > 0)
+                        {
+                            UpdateState(bytes);
+                        }
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                Log(ex.Message);
+            }
+        }
         private bool PlugInToHidDeviceAndStartLoop()
         {
             var device =
@@ -136,49 +180,30 @@
             _gamepadUpdateThread?.Abort();
             _gamepadUpdateThread = new Thread(() =>
             {
-                Thread.CurrentThread.IsBackground = true;
-
-                try
-                {
-                    using (stream)
-                    {
-                        while (true)
-                        {
-                            if (!Thread.CurrentThread.IsAlive)
-                            {
-                                break;
-                            }
-
-                            var bytes = new byte[device.MaxInputReportLength];
-                            int count;
-                            try
-                            {
-                                count = stream.Read(bytes, 0, bytes.Length);
-                            }
-                            catch (TimeoutException)
-                            {
-                                continue;
-                            }
-                            catch (Exception ex)
-                            {
-                                Log(ex.Message);
-                                break;
-                            }
-
-                            if (count > 0)
-                            {
-                                UpdateState(bytes);
-                            }
-                        }
-                    }
-                }
-                catch (Exception ex)
-                {
-                    Log(ex.Message);
-                }
+                _deviceStream(device, stream);
             });
             _gamepadUpdateThread.Start();
-
+            _gamepadAliveThread?.Abort();
+            _gamepadAliveThread = new Thread(() =>
+            {
+                Thread.CurrentThread.IsBackground = true;
+                while (_gamepadUpdateThread.IsAlive)
+                {
+                    _gamepadUpdateThread.Join();
+                    Log($"Lost connection. Waiting for the device...");
+                    while (!device.TryOpen(out stream))
+                    {
+                        Thread.Sleep(1000);
+                    }
+                    _gamepadUpdateThread = new Thread(() =>
+                    {
+                        Log($"Stream was resumed.");
+                        _deviceStream(device, stream);
+                    });
+                    _gamepadUpdateThread.Start();
+                }
+            });
+            _gamepadAliveThread.Start();
             return true;
         }


Android: Intelligent null checking in fragment

--- Source/ZXing.Net.Mobile.Android/ZXingScannerFragment.cs
+++ Source/ZXing.Net.Mobile.Android/ZXingScannerFragment.cs
@@ -103,17 +103,17 @@

 		public void Torch(bool on)
 		{
-			scanner.Torch(on);
+			scanner?.Torch(on);
 		}

         public void AutoFocus()
         {
-            scanner.AutoFocus();
+            scanner?.AutoFocus();
         }

         public void AutoFocus(int x, int y)
 		{
-			scanner.AutoFocus(x, y);
+			scanner?.AutoFocus(x, y);
 		}

         Action<Result> scanCallback;
@@ -134,45 +134,44 @@

         void scan ()
         {
-            if (scanner != null)
-                scanner.StartScanning (scanCallback, ScanningOptions);
+            scanner?.StartScanning (scanCallback, ScanningOptions);
         }

         public void StopScanning ()
         {
-            scanner.StopScanning ();
+            scanner?.StopScanning ();
         }

         public void PauseAnalysis ()
         {
-            scanner.PauseAnalysis ();
+            scanner?.PauseAnalysis ();
         }

         public void ResumeAnalysis ()
         {
-            scanner.ResumeAnalysis ();
+            scanner?.ResumeAnalysis ();
         }

         public void ToggleTorch ()
         {
-            scanner.ToggleTorch ();
+            scanner?.ToggleTorch ();
         }

         public bool IsTorchOn {
             get {
-                return scanner.IsTorchOn;
+                return scanner?.IsTorchOn ?? false;
             }
         }

         public bool IsAnalyzing {
             get {
-                return scanner.IsAnalyzing;
+                return scanner?.IsAnalyzing ?? false;
             }
         }

         public bool HasTorch {
             get {
-                return scanner.HasTorch;
+                return scanner?.HasTorch ?? false;
             }
         }
 	}


update version to use the semantic versioning

--- Sources/ReCommendedExtension/Properties/AssemblyInfo.cs
+++ Sources/ReCommendedExtension/Properties/AssemblyInfo.cs
@@ -14,4 +14,4 @@
 [assembly: AssemblyCulture("")]

 [assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]+[assembly: AssemblyFileVersion("1.0.0")]


Correct spelling

Correct spelling

--- Src/WemManagementStudio.WPF/ViewModels/MainViewModel.cs
+++ Src/WemManagementStudio.WPF/ViewModels/MainViewModel.cs
@@ -169,7 +169,7 @@

             OnPropertyChanged("IsMonitorEnabled");

-            LogInfo("File Monitor Stoped");
+            LogInfo("File Monitor Stopped");
         }

         private void LogInfo(string message)


added a bit more debug code

added a bit more debug code

--- Mage/Archivist/Archivist.cs
+++ Mage/Archivist/Archivist.cs
@@ -131,6 +131,7 @@
 	// Remove a vault value from the cache by it's cache key name
 	public void DeleteCacheItem(string cacheKeyName) {
 		lock ((object)this) {
+			logger.debug("Deleteing cache item: " + cacheKeyName);
 			if (!_cache.ContainsKey(cacheKeyName)) {
 				return;
 			}


Fixed error in LogParser

Fixed error in LogParser

--- Mail/LogMailer/LogParser.cs
+++ Mail/LogMailer/LogParser.cs
@@ -27,7 +27,7 @@

                     Console.WriteLine(stringDate);
-                    var date = DateTime.ParseExact(stringDate, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
+                    var date = DateTime.ParseExact(stringDate, "dd-MM-yyyy HH:mm:ss", CultureInfo.InvariantCulture);

                     if (date < fromDate) break;


added unit tests

added unit tests

--- UnitTests/Test.cs
+++ UnitTests/Test.cs
@@ -159,6 +159,20 @@
 		}

 		[Test]
+		public void ParseSimpleEquationWhiteSpaceNewLines()
+		{
+			equation.Parse("\n1\n +\n1\n");
+			Assert.AreEqual(2.0f, equation.Solve(ParamFunc));
+		}
+
+		[Test]
+		public void ParseSimpleEquationWhiteSpaceTabs()
+		{
+			equation.Parse("\n1\t\n +\n\t\t\n\n\n\t\t\t1\n");
+			Assert.AreEqual(2.0f, equation.Solve(ParamFunc));
+		}
+
+		[Test]
 		public void ParseEquationWithFloats()
 		{
 			equation.Parse("1 + 3.0 * 0.5");


Can now hit all files, but need a /v/ to see md files.

--- Viewer/Startup.cs
+++ Viewer/Startup.cs
@@ -1,6 +1,7 @@
 using Microsoft.Owin.FileSystems;
 using Microsoft.Owin.StaticFiles;
 using Owin;
+using System;
 using System.Web.Http;

 namespace Viewer
@@ -15,7 +16,7 @@
             HttpConfiguration config = new HttpConfiguration();
             config.Routes.MapHttpRoute(
                 name: "DefaultApi",
-                routeTemplate: "{*file}",
+                routeTemplate: "v/{*file}",
                 defaults: new
                 {
                     controller = "File",
@@ -24,15 +25,15 @@

             appBuilder.UseWebApi(config);

-            //var fileSystem = new PhysicalFileSystem(Root);
-            //var options = new FileServerOptions();
-            //
-            //options.EnableDirectoryBrowsing = true;
-            //options.FileSystem = fileSystem;
-            //options.StaticFileOptions.ContentTypeProvider = new CommonMarkContentTypeProvider();
+            var fileSystem = new PhysicalFileSystem(Environment.CurrentDirectory);
+            var options = new FileServerOptions();
+
+            options.EnableDirectoryBrowsing = true;
+            options.FileSystem = fileSystem;
+            options.StaticFileOptions.ContentTypeProvider = new CommonMarkContentTypeProvider();

-            //appBuilder.UseFileServer(options);
+            appBuilder.UseFileServer(options);
         }
     }
 }


Add one unit test

Add one unit test


Core: Add basic support for CallSite

Core: Add basic support for CallSite

--- MonoMod.Utils/MonoModExt.cs
+++ MonoMod.Utils/MonoModExt.cs
@@ -254,6 +254,35 @@

             return builder.ToString();
         }
+
+        public static string GetFindableID(this CallSite method) {
+            StringBuilder builder = new StringBuilder();
+
+            builder
+                .Append(method.ReturnType.GetPatchFullName())
+                .Append(" ");
+
+            builder.Append("(");
+
+            if (method.HasParameters) {
+                Collection<ParameterDefinition> parameters = method.Parameters;
+                for (int i = 0; i < parameters.Count; i++) {
+                    ParameterDefinition parameter = parameters[i];
+                    if (i > 0)
+                        builder.Append(",");
+
+                    if (parameter.ParameterType.IsSentinel)
+                        builder.Append("...,");
+
+                    builder.Append(parameter.ParameterType.GetPatchFullName());
+                }
+            }
+
+            builder.Append(")");
+
+            return builder.ToString();
+        }
+
         public static string GetFindableID(this System.Reflection.MethodBase method, string name = null, string type = null, bool withType = true, bool proxyMethod = false, bool simple = false) {
             while (method is System.Reflection.MethodInfo && method.IsGenericMethod && !method.IsGenericMethodDefinition)
                 method = ((System.Reflection.MethodInfo) method).GetGenericMethodDefinition();
@@ -572,8 +601,7 @@
             if (mtp is MethodReference) return ((MethodReference) mtp).Relink(relinker, context);
             if (mtp is FieldReference) return ((FieldReference) mtp).Relink(relinker, context);
             if (mtp is ParameterDefinition) return ((ParameterDefinition) mtp).Relink(relinker, context);
-            // TODO: relink EventDefinitions
-            // if (mtp is EventDefinition) return ((EventDefinition) mtp).Relink(relinker, context);
+            if (mtp is CallSite) return ((CallSite) mtp).Relink(relinker, context);
             throw new InvalidOperationException($"MonoMod can't handle metadata token providers of the type {mtp.GetType()}");
         }

@@ -675,6 +703,23 @@
             }

             return (MethodReference) relinker(relink, context);
+        }
+
+        public static CallSite Relink(this CallSite method, Relinker relinker, IGenericParameterProvider context) {
+            CallSite relink = new CallSite(method.ReturnType);
+
+            relink.CallingConvention = method.CallingConvention;
+            relink.ExplicitThis = method.ExplicitThis;
+            relink.HasThis = method.HasThis;
+
+            relink.ReturnType = relink.ReturnType?.Relink(relinker, context);
+
+            foreach (ParameterDefinition param in method.Parameters) {
+                param.ParameterType = param.ParameterType.Relink(relinker, context);
+                relink.Parameters.Add(param);
+            }
+
+            return (CallSite) relinker(relink, context);
         }

         public static IMetadataTokenProvider Relink(this FieldReference field, Relinker relinker, IGenericParameterProvider context) {


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
@@ -2948,6 +2948,15 @@
     public void TestMethod_IsPrime_2027()
     {
       const int source = 2027;
+      const bool expected = true;
+      bool result = FunctionsMath.IsPrime(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_IsPrime_2029()
+    {
+      const int source = 2029;
       const bool expected = true;
       bool result = FunctionsMath.IsPrime(source);
       Assert.AreEqual(result, expected);


Update to CreateResourceWithAttachment parameters

--- main/Smartsheet/Api/Internal/AbstractResources.cs
+++ main/Smartsheet/Api/Internal/AbstractResources.cs
@@ -308,8 +308,10 @@
 		/// <param name="object"> the object To create </param>
 		/// <returns> the created resource </returns>
 		/// <exception cref="SmartsheetException"> the SmartsheetClient exception </exception>
-		protected internal virtual T CreateResourceWithAttachment<T>(string path, T comment, string file, string fileType)
+		protected internal virtual T CreateResourceWithAttachment<T>(string path, T @object, string file, string fileType)
 		{
+			Utils.ThrowIfNull(path, @object);
+
 			HttpRequest request = null;
 			try
 			{


Rewrite GenerateByIndex in terms of Sequence

This is a squashed merge of PR #544.

--- MoreLinq/GenerateByIndex.cs
+++ MoreLinq/GenerateByIndex.cs
@@ -19,6 +19,7 @@
 {
     using System;
     using System.Collections.Generic;
+    using System.Linq;

     static partial class MoreEnumerable
     {
@@ -43,19 +44,8 @@
         {
             if (generator == null) throw new ArgumentNullException(nameof(generator));

-            // Would just use Enumerable.Range(0, int.MaxValue).Select(generator) but that doesn't
-            // include int.MaxValue. Picky, I know...
-
-            return _(); IEnumerable<TResult> _()
-            {
-                // Looping over 0...int.MaxValue inclusive is a pain. Simplest is to go exclusive,
-                // then go again for int.MaxValue.
-
-                for (var i = 0; i < int.MaxValue; i++)
-                    yield return generator(i);
-
-                yield return generator(int.MaxValue);
-            }
+            return MoreEnumerable.Sequence(0, int.MaxValue)
+                                 .Select(generator);
         }
     }
 }


Add unit test

Add unit test


In-memory GLB export (#437)

In-memory GLB export (#437)

* add option to do in-memory stream GLB export, allows usage on WebGL

* naming & simplification of in-memory export

Co-Authored-By: Adam Mitchell <c0ca1bd0710a310df8b7af9936006cc99fb682b9@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: Adam Mitchell <c0ca1bd0710a310df8b7af9936006cc99fb682b9@users.noreply.github.com>

--- UnityGLTF/Assets/UnityGLTF/Scripts/GLTFSceneExporter.cs
+++ UnityGLTF/Assets/UnityGLTF/Scripts/GLTFSceneExporter.cs
@@ -142,6 +142,42 @@
 		public void SaveGLB(string path, string fileName)
 		{
 			_shouldUseInternalBufferForImages = true;
+			string fullPath = Path.Combine(path, Path.ChangeExtension(fileName, "glb"));
+
+			using (FileStream glbFile = new FileStream(fullPath, FileMode.Create))
+			{
+				GLBToStream(glbFile, fileName);
+			}
+
+			if (!_shouldUseInternalBufferForImages)
+			{
+				ExportImages(path);
+			}
+		}
+
+		/// <summary>
+		/// In-memory GLB creation helper. Useful for platforms where no filesystem is available (e.g. WebGL).
+		/// </summary>
+		/// <param name="sceneName"></param>
+		/// <returns></returns>
+		public byte[] SaveGLBToByteArray(string sceneName)
+		{
+
+			using (var stream = new MemoryStream())
+			{
+				GLBToStream(stream, sceneName);
+				return stream.ToArray();
+			}
+
+		}
+
+		/// <summary>
+		/// Writes a binary GLB file into a stream (memory stream, filestream, ...)
+		/// </summary>
+		/// <param name="path">File path for saving the binary file</param>
+		/// <param name="fileName">The name of the GLTF file</param>
+		public void SaveGLBToStream(Stream stream, string sceneName)
+		{
 			Stream binStream = new MemoryStream();
 			Stream jsonStream = new MemoryStream();

@@ -149,7 +185,7 @@

 			TextWriter jsonWriter = new StreamWriter(jsonStream, Encoding.ASCII);

-			_root.Scene = ExportScene(fileName, _rootTransforms);
+			_root.Scene = ExportScene(sceneName, _rootTransforms);

 			_buffer.ByteLength = (uint)_bufferWriter.BaseStream.Length;

@@ -165,39 +201,27 @@
 			int glbLength = (int)(GLTFHeaderSize + SectionHeaderSize +
 				jsonStream.Length + SectionHeaderSize + binStream.Length);

-			string fullPath = Path.Combine(path, Path.ChangeExtension(fileName, "glb"));
-
-
-			using (FileStream glbFile = new FileStream(fullPath, FileMode.Create))
-			{
-
-				BinaryWriter writer = new BinaryWriter(glbFile);
-
-				// write header
-				writer.Write(MagicGLTF);
-				writer.Write(Version);
-				writer.Write(glbLength);
-
-				// write JSON chunk header.
-				writer.Write((int)jsonStream.Length);
-				writer.Write(MagicJson);
-
-				jsonStream.Position = 0;
-				CopyStream(jsonStream, writer);
-
-				writer.Write((int)binStream.Length);
-				writer.Write(MagicBin);
-
-				binStream.Position = 0;
-				CopyStream(binStream, writer);
-
-				writer.Flush();
-			}
-
-			if (!_shouldUseInternalBufferForImages)
-			{
-			        ExportImages(path);
-			}
+			BinaryWriter writer = new BinaryWriter(stream);
+
+			// write header
+			writer.Write(MagicGLTF);
+			writer.Write(Version);
+			writer.Write(glbLength);
+
+			// write JSON chunk header.
+			writer.Write((int)jsonStream.Length);
+			writer.Write(MagicJson);
+
+			jsonStream.Position = 0;
+			CopyStream(jsonStream, writer);
+
+			writer.Write((int)binStream.Length);
+			writer.Write(MagicBin);
+
+			binStream.Position = 0;
+			CopyStream(binStream, writer);
+
+			writer.Flush();
 		}

 		/// <summary>


Add constants per GLB specification; initial GLB export

Initial capability only supports mesh data in the bin chunk.

--- UnityGLTF/Assets/UnityGLTF/Scripts/GLTFSceneExporter.cs
+++ UnityGLTF/Assets/UnityGLTF/Scripts/GLTFSceneExporter.cs
@@ -54,6 +54,13 @@
 		private UnityEngine.Material _metalGlossChannelSwapMaterial;
 		private UnityEngine.Material _normalChannelMaterial;

+		private const uint MagicGLTF	= 0x46546C67;
+		private const uint Version		= 2;
+		private const uint MagicJson	= 0x4E4F534A;
+		private const uint MagicBin		= 0x004E4942;
+		private const int GLTFHeaderSize = 12;
+		private const int SectionHeaderSize = 8;
+
 		protected struct PrimKey
 		{
 			public UnityEngine.Mesh Mesh;
@@ -115,6 +122,83 @@
 			return _root;
 		}

+		public void SaveGLB(string path, string fileName)
+		{
+			Stream binStream = new MemoryStream();
+			Stream jsonStream = new MemoryStream();
+
+			_bufferWriter = new BinaryWriter(binStream);
+
+			TextWriter jsonWriter = new StreamWriter(jsonStream, System.Text.Encoding.ASCII);
+
+			_root.Scene = ExportScene(fileName, _rootTransforms);
+
+			_buffer.ByteLength = (int)_bufferWriter.BaseStream.Length;
+
+			_root.Serialize(jsonWriter);
+
+			_bufferWriter.Flush();
+			jsonWriter.Flush();
+
+			// align to 4-byte boundary to comply with spec.
+			AlignToBoundary(jsonStream);
+			AlignToBoundary(binStream, 0x00);
+
+			int glbLength = (int)(GLTFHeaderSize + SectionHeaderSize +
+				jsonStream.Length + SectionHeaderSize + binStream.Length);
+
+			string fullPath = Path.Combine(path, Path.ChangeExtension(fileName, "glb"));
+
+
+			using (FileStream glbFile = new FileStream(fullPath, FileMode.Create))
+			{
+
+				BinaryWriter writer = new BinaryWriter(glbFile);
+
+				// write header
+				writer.Write(MagicGLTF);
+				writer.Write(Version);
+				writer.Write(glbLength);
+
+				// write JSON chunk header.
+				writer.Write((int)jsonStream.Length);
+				writer.Write(MagicJson);
+
+				jsonStream.Position = 0;
+				CopyStream(jsonStream, writer);
+
+				writer.Write((int)binStream.Length);
+				writer.Write(MagicBin);
+
+				binStream.Position = 0;
+				CopyStream(binStream, writer);
+
+				writer.Flush();
+			}
+
+			ExportImages(path);
+		}
+
+		private static void CopyStream(Stream input, BinaryWriter output)
+		{
+			byte[] buffer = new byte[8 * 1024];
+			int length;
+			while ((length = input.Read(buffer, 0, buffer.Length)) > 0)
+			{
+				output.Write(buffer, 0, length);
+			}
+		}
+
+		private void AlignToBoundary(Stream stream, byte pad = (byte)' ', int boundary = 4)
+		{
+			int offset = (int)(stream.Length % boundary);
+			for (int i = 0; i < boundary - offset; i++)
+			{
+				stream.WriteByte(pad);
+			}
+		}
+
+
 		/// <summary>
 		/// Specifies the path and filename for the GLTF Json and binary
 		/// </summary>


Make it obvious if a player is disconnect/invalid instead of just "Kek" (#7185)

--- UnityProject/Assets/Scripts/Managers/ConnectedPlayer.cs
+++ UnityProject/Assets/Scripts/Managers/ConnectedPlayer.cs
@@ -16,7 +16,7 @@
 		Connection = null,
 		gameObject = null,
 		Username = null,
-		name = "kek",
+		name = "Invalid Player",
 		job = JobType.NULL,
 		ClientId = "",
 		UserId = ""


Don't log stacktrace when UpnpDeviceDiscoveringService throws an XmlException

--- Xpressive.Home.Services/UpnpDeviceDiscoveringService.cs
+++ Xpressive.Home.Services/UpnpDeviceDiscoveringService.cs
@@ -6,6 +6,7 @@
 using System.Net.Http;
 using System.Threading;
 using System.Threading.Tasks;
+using System.Xml;
 using log4net;
 using Rssdp;
 using Xpressive.Home.Contracts.Services;
@@ -104,6 +105,10 @@
             {
                 _log.Error($"TaskCanceledException for device {device.DescriptionLocation.OriginalString}");
             }
+            catch (XmlException e)
+            {
+                _log.Error($"Xml exception in {device.DescriptionLocation.OriginalString}: {e.Message}");
+            }
             catch (Exception e)
             {
                 _log.Error(e.Message, e);


Improved error handling.

Improved error handling.

--- Xyperico.Authentication.Web/SimpleMembershipProvider.cs
+++ Xyperico.Authentication.Web/SimpleMembershipProvider.cs
@@ -5,12 +5,16 @@
 using Xyperico.Base.Exceptions;
 using System.Web.Security;
 using CuttingEdge.Conditions;
+using log4net;

 namespace Xyperico.Authentication.Web
 {
   public class SimpleMembershipProvider : ExtendedMembershipProvider
   {
+    static ILog Logger = LogManager.GetLogger(typeof(SimpleMembershipProvider));
+
+
     #region Dependencies

     private IUserRepository _userRepository;
@@ -73,9 +77,12 @@
         User user = new User(userName, password, email);
         UserRepository.Add(user);
       }
-      catch (DuplicateKeyException)
-      {
-        throw new MembershipCreateUserException(MembershipCreateStatus.DuplicateUserName);
+      catch (DuplicateKeyException ex)
+      {
+        if (ex.Key == "UserName")
+          throw new MembershipCreateUserException(MembershipCreateStatus.DuplicateUserName);
+        else
+          throw new MembershipCreateUserException(MembershipCreateStatus.DuplicateEmail);
       }
       return null; // Return what? "A token that can be sent to the user to confirm the user account."
     }
@@ -114,15 +121,22 @@
     {
       try
       {
+        Logger.DebugFormat("CreateOrUpdateOAuthAccount provider = {0}, providerUserId = {1}, userName = {2}", provider, providerUserId, userName);
         User user = new User(userName, null, null);
         UserRepository.Add(user);

         UserAuthRelation rel = new UserAuthRelation(user.Id, provider, providerUserId);
         UserAuthRelationRepository.Add(rel);
       }
-      catch (DuplicateKeyException)
-      {
-        throw new MembershipCreateUserException(MembershipCreateStatus.DuplicateUserName);
+      catch (DuplicateKeyException ex)
+      {
+        Logger.Debug(ex);
+        if (ex.Key == "UserName")
+          throw new MembershipCreateUserException(MembershipCreateStatus.DuplicateUserName);
+        else if (ex.Key == "EMail")
+          throw new MembershipCreateUserException(MembershipCreateStatus.DuplicateEmail);
+        else if (ex.Key == "UserId")
+          throw new MembershipCreateUserException(MembershipCreateStatus.DuplicateProviderUserKey);
       }
     }


Update ResetPosition.cs

Update ResetPosition.cs

--- Yupi/Game/Items/Wired/Handlers/Effects/ResetPosition.cs
+++ Yupi/Game/Items/Wired/Handlers/Effects/ResetPosition.cs
@@ -19,7 +19,6 @@
             OtherExtraString2 = string.Empty;
             Delay = 0;
             Items = new List<RoomItem>();
-            _mBanned = new List<Interaction>();
         }

         public Interaction Type => Interaction.ActionPosReset;


Add warning if handshake fails

Add warning if handshake fails

--- NBXplorer/BitcoinDWaiter.cs
+++ NBXplorer/BitcoinDWaiter.cs
@@ -510,7 +510,16 @@
 						IsRelay = false
 					}))
 					{
-						node.VersionHandshake(handshakeTimeout.Token);
+						try
+						{
+							node.VersionHandshake(handshakeTimeout.Token);
+						}
+						catch (OperationCanceledException) when (handshakeTimeout.IsCancellationRequested)
+						{
+							Logs.Explorer.LogWarning($"{Network.CryptoCode}: NBXplorer could not complete the handshake with the remote node. This is probably because NBXplorer is not whitelisted by your node." +
+								$"You can use \"whitebind\" or \"whitelist\" in your node configuration. (typically whitelist=127.0.0.1 if NBXplorer and the node are on the same machine.)");
+							throw;
+						}
 						handshaked = true;
 						var loadChainTimeout = _Network.NBitcoinNetwork.NetworkType == NetworkType.Regtest ? TimeSpan.FromSeconds(5) : TimeSpan.FromSeconds(15);
 						if(_Chain.Height < 5)


Fix test example tags

Fix test example tags

--- NFleetSDK.Tests/ApiTests.cs
+++ NFleetSDK.Tests/ApiTests.cs
@@ -36,9 +36,6 @@
             //##END EXAMPLE##
             // ReSharper restore UnusedVariable

-            //##BEGIN EXAMPLE oauth##
-            //Fail
-            //##END EXAMPLE##

             responses = ResponseReader.readResponses(responsePath);
             deserializer = new JsonDeserializer();
@@ -104,6 +101,10 @@
             var created = api.Navigate(user.GetLink("create-problem"), new RoutingProblemUpdateRequest {Name = "test"});
             //##BEGIN EXAMPLE accessingproblem##
             var problem = api.Navigate<RoutingProblemData>(created.Location);
+            //##END EXAMPLE##
+
+            //##BEGIN EXAMPLE accessingnewproblem##
+            problem = api.Navigate<RoutingProblemData>(created.Location);
             //##END EXAMPLE##

             var mockProblem = TestUtils.GetMockResponse<RoutingProblemData>(responses["accessingproblemresp"].json);
@@ -397,6 +398,10 @@
             {
                 //##BEGIN EXAMPLE oauth##
                 var result = api.Navigate<ResponseData>(user.GetLink("create-problem"));
+                //##END EXAMPLE##
+
+                //##BEGIN EXAMPLE badrequest##
+                var badRequest = api.Navigate<ResponseData>(user.GetLink("create-problem"));
                 //##END EXAMPLE##
             }
             catch (System.IO.IOException e)
@@ -763,7 +768,7 @@
             var result = api.Navigate<ResponseData>(problem.GetLink("import-data"), request);
             //##END EXAMPLE##

-            //#BEGIN EXAMPLE getimportresults##
+            //##BEGIN EXAMPLE getimportresults##
             var import = api.Navigate<ImportData>(result.Location);
             //##END EXAMPLE##

@@ -878,7 +883,7 @@

             Assert.IsTrue(import.Meta.Find(link => link.Rel.Equals("self")).Enabled);
             Assert.IsTrue(import.Meta.Find(link => link.Rel.Equals("apply-import")).Enabled);
-            //#BEGIN EXAMPLE applyimport##
+            //##BEGIN EXAMPLE applyimport##
             var appyResult = api.Navigate<ResponseData>(import.GetLink("apply-import"));
             //##END EXAMPLE##
             var vehicles = api.Navigate<VehicleDataSet>(problem.GetLink("list-vehicles"));
@@ -944,7 +949,7 @@

             RoutingProblemSettingsData after = null;

-            //##BEGIN EXAMPLE changeproblemsettings##
+            //##BEGIN EXAMPLE updatingroutingproblemsettings##
             var settings = api.Navigate<RoutingProblemSettingsData>( problem.GetLink( "view-settings" ) );
             var updatedSettings = new RoutingProblemSettingsUpdateRequest { DefaultVehicleSpeedFactor = 0.8, DefaultVehicleSpeedProfile = SpeedProfile.Max120Kmh.ToString() };
             //##END EXAMPLE##
@@ -1286,11 +1291,12 @@

             var tasksSet = api.Navigate<TaskDataSet>( problem.GetLink( "list-tasks" ) );
             Assert.AreEqual( 2, tasksSet.Items.Count );
+            //##BEGIN EXAMPLE deletingtask##

             problem = api.Navigate<RoutingProblemData>( problem.GetLink( "self" ) );
             var task = api.Navigate<TaskData>( response.Location );
             api.Navigate<ResponseData>( task.GetLink( "delete" ) );
-
+            //##END EXAMPLE##
             //response = api.Navigate<ResponseData>( problem.GetLink( "delete-tasks" ), new DeleteTasksRequest() );

             tasksSet = api.Navigate<TaskDataSet>( problem.GetLink( "list-tasks" ) );


[#12597] NativeMethodBuilder: don't call NSString.ctor

When a managed method is invoked by the native runtime
that returns a System.String (to be marshalled as an
NSString), if the string value is null, a crash will occur
(ArgumentNullException).

Instead of instantiating NSString, call the explicit operator
which will return null if the source System.String is null,
or NSString otherwise.

--- src/ObjCRuntime/NativeMethodBuilder.cs
+++ src/ObjCRuntime/NativeMethodBuilder.cs
@@ -30,7 +30,7 @@

 namespace MonoMac.ObjCRuntime {
 	internal class NativeMethodBuilder : NativeImplementationBuilder {
-		private static ConstructorInfo newnsstring = typeof (NSString).GetConstructor (new Type [] { typeof (string) });
+		private static MethodInfo creatensstring = typeof (NSString).GetMethod ("op_Explicit", new Type [] { typeof (string) });
 #if !MONOMAC_BOOTSTRAP
 		private static MethodInfo convertstruct = typeof (Marshal).GetMethod ("StructureToPtr", new Type [] { typeof (object), typeof (IntPtr), typeof (bool) });
 		private static MethodInfo buildarray = typeof (NSArray).GetMethod ("FromNSObjects", new Type [] { typeof (NSObject []) });
@@ -93,7 +93,7 @@
 			UpdateByRefArguments (il, 0);

 			if (minfo.ReturnType == typeof (string)) {
-				il.Emit (OpCodes.Newobj, newnsstring);
+				il.Emit (OpCodes.Call, creatensstring);
 #if !MONOMAC_BOOTSTRAP
 			} else if (minfo.ReturnType.IsArray && IsWrappedType (minfo.ReturnType.GetElementType ())) {
 				if (minfo.ReturnType.GetElementType () == typeof (string))


Parse more CHUNK_GameClient

Parse more CHUNK_GameClient

--- src/OpenSage.Game/Data/Sav/SaveFile.cs
+++ src/OpenSage.Game/Data/Sav/SaveFile.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
+using System.Globalization;
 using System.IO;
 using System.Linq;
 using System.Numerics;
@@ -366,7 +367,29 @@

                                     var transform = reader.ReadMatrix4x3Transposed();

-                                    reader.ReadBytes(62);
+                                    var unknownBool = reader.ReadBooleanChecked();
+                                    var unknownBool2 = reader.ReadBooleanChecked();
+                                    if (unknownBool)
+                                    {
+                                        for (var j = 0; j < 9; j++)
+                                        {
+                                            reader.ReadSingle();
+                                        }
+                                        reader.ReadBytes(19);
+                                    }
+
+                                    reader.ReadBytes(56);
+
+                                    var unknownBool3 = reader.ReadBooleanChecked();
+                                    if (unknownBool3)
+                                    {
+                                        for (var j = 0; j < 19; j++)
+                                        {
+                                            reader.ReadSingle();
+                                        }
+                                    }
+
+                                    reader.ReadBytes(3);

                                     var numModules = reader.ReadUInt16();
                                     for (var moduleIndex = 0; moduleIndex < numModules; moduleIndex++)
@@ -379,7 +402,8 @@
                                     reader.ReadBytes(82);
                                 }

-                                //stream.Seek(chunkHeader.DataLength, SeekOrigin.Current);
+                                reader.ReadBytes(5);
+
                                 break;
                             }


Improve message output (#269)

Improve message output (#269)

***NO_CI***

--- nanoFramework.Tools.DebugLibrary.Shared/NFDevice/NanoDeviceBase.cs
+++ nanoFramework.Tools.DebugLibrary.Shared/NFDevice/NanoDeviceBase.cs
@@ -569,7 +569,7 @@
                 return false;
             }

-            progress?.Report($"Start writing to device @ 0x{address:X8}...");
+            progress?.Report($"Writing to device @ 0x{address:X8}...");

             return DeployFile(
                 data,


Fix count check when trying to create new stateless workers (#6988)

--- src/Orleans.Runtime/Catalog/Catalog.cs
+++ src/Orleans.Runtime/Catalog/Catalog.cs
@@ -472,7 +472,7 @@
                     if (result.PlacedUsing is StatelessWorkerPlacement st)
                     {
                         // Check if there is already enough StatelessWorker created
-                        if (LocalLookup(address.Grain, out var local) && local.Count > st.MaxLocal)
+                        if (LocalLookup(address.Grain, out var local) && local.Count >= st.MaxLocal)
                         {
                             // Redirect directly to an already created StatelessWorker
                             // It's a bit hacky since we will return an activation with a different


Peachpie.Compiler.Tools parse fix

Peachpie.Compiler.Tools parse fix

- allows for parameters without value

--- src/Peachpie.Compiler.Tools/Program.cs
+++ src/Peachpie.Compiler.Tools/Program.cs
@@ -66,7 +66,8 @@
                     var opt = ParseOption(arg);
                     if (opt.HasValue)
                     {
-                        var value = opt.Value.Value.ToLowerInvariant();
+                        var rspvalue = opt.Value.Value;
+                        var value = rspvalue?.ToLowerInvariant();

                         switch (opt.Value.Key.ToLowerInvariant())
                         {
@@ -101,12 +102,21 @@
                         }

                         //
-                        var rspvalue = opt.Value.Value;
-                        if (rspvalue.IndexOfAny(new[] { ' ', '\t' }) >= 0)
-                            rspvalue = "\"" + rspvalue + "\"";  // enclose into quotes so 'ParseResponseLines' won't split it into words
+                        if (rspvalue != null)
+                        {
+                            if (rspvalue.IndexOfAny(new[] { ' ', '\t' }) >= 0)
+                            {
+                                rspvalue = "\"" + rspvalue + "\"";  // enclose into quotes so 'ParseResponseLines' won't split it into words
+                            }

-                        //
-                        newargs.Add($"--{opt.Value.Key}:{rspvalue}");
+                            //
+                            newargs.Add($"--{opt.Value.Key}:{rspvalue}");
+                        }
+                        else
+                        {
+                            //
+                            newargs.Add("--" + opt.Value.Key);
+                        }
                     }
                     else
                     {


Fixed stylecop violation.

Fixed stylecop violation.

--- source/JSLintNet.VisualStudio/Extensions/PropertiesExtensions.cs
+++ source/JSLintNet.VisualStudio/Extensions/PropertiesExtensions.cs
@@ -1,5 +1,7 @@
 namespace EnvDTE
 {
+    using System.Diagnostics.CodeAnalysis;
+
     internal static class PropertiesExtensions
     {
         /// <summary>
@@ -10,6 +12,7 @@
         /// <param name="key">The key.</param>
         /// <remarks>This may look like a good candidate for Linq or another functional approach. But manual iteration has proven itself to be the most efficient way to fetch a named item from the very limited <see cref="Properties"/> collection.</remarks>
         /// <returns>The value of the item.</returns>
+        [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Linq is a word.")]
         public static T Get<T>(this Properties properties, string key)
         {
             if (properties != null)


Change the way sorting happens in the GetCombination method so that I don't have to order in the CreateNameProposals method

--- NamR/Naming/NamingHelper.cs
+++ NamR/Naming/NamingHelper.cs
@@ -82,7 +82,7 @@
                 typedResults = typedResults.Select(s => s + "s");
             }

-            return typedResults.Distinct().OrderByDescending(x => x.Length);
+            return typedResults.Distinct();
         }

         internal static string ProposeCommonNames(string typeName)
@@ -153,9 +153,9 @@
         internal static IEnumerable<string> GetCombination(IList<string> list)
         {
             var builder = new StringBuilder();
-            var count = Math.Pow(2, list.Count);
-
-            for (int i = 1; i <= count - 1; i++)
+            var count = (int)Math.Pow(2, list.Count);
+
+            for (var i = count - 1; i >= 1; i--)
             {
                 builder.Clear();


Added method for resetting state

Added method for resetting state

--- System/GameState.cs
+++ System/GameState.cs
@@ -279,6 +279,26 @@

         }

+        public virtual void OnReset()
+        {
+
+        }
+
+        /// <summary>
+        /// Reset the state
+        /// </summary>
+        public void Reset()
+        {
+            if (StateManager.ActiveState == this)
+            {
+                OnDeactivated();
+                OnReset();
+                OnActivated();
+            }
+            else
+                OnReset();
+        }
+
         public virtual void Init()
         {


ViewsFolder check if folder exists

ViewsFolder check if folder exists

--- src/RazorLight/ConfigurationOptions.cs
+++ src/RazorLight/ConfigurationOptions.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using Microsoft.CodeAnalysis;
 using Microsoft.Extensions.FileProviders;

@@ -7,13 +8,28 @@
 {
 	public class ConfigurationOptions
 	{
-		public string ViewsFolder { get; set; }
+		private string viewsFolder;
+		public string ViewsFolder
+		{
+			get
+			{
+				return viewsFolder;
+			}
+			set
+			{
+				if (value == null || !Directory.Exists(value))
+				{
+					throw new DirectoryNotFoundException();
+				}
+				viewsFolder = value;
+			}
+		}

 		public IFileProvider ViewsFileProvider
 		{
 			get
 			{
-				if(!String.IsNullOrEmpty(ViewsFolder))
+				if (!String.IsNullOrEmpty(ViewsFolder))
 					return new PhysicalFileProvider(ViewsFolder);
 				else
 					return new NullFileProvider();
@@ -31,5 +47,5 @@
 		public IList<MetadataReference> AdditionalCompilationReferences { get; } = new List<MetadataReference>();

 		public static ConfigurationOptions Default => new ConfigurationOptions();
-    }
+	}
 }


Use pointer position relative to the scroll gesture recognizer target

--- src/Avalonia.Input/GestureRecognizers/ScrollGestureRecognizer.cs
+++ src/Avalonia.Input/GestureRecognizers/ScrollGestureRecognizer.cs
@@ -85,7 +85,7 @@
         {
             if (e.Pointer == _tracking)
             {
-                var rootPoint = e.GetPosition(null);
+                var rootPoint = e.GetPosition(_target);
                 if (!_scrolling)
                 {
                     if (CanHorizontallyScroll && Math.Abs(_trackedRootPoint.X - rootPoint.X) > ScrollStartDistance)


调整了Register(..) 方法，去掉了里面的 namespace 参数。 :satisfied: :feet:

--- src/Security/ICertificationProvider.cs
+++ src/Security/ICertificationProvider.cs
@@ -38,10 +38,9 @@
 		/// 为指定的用户注册安全凭证。
 		/// </summary>
 		/// <param name="user">指定的用户对象。</param>
-		/// <param name="namespace">指定的凭证所属的命名空间。</param>
 		/// <param name="scene">指定的应用场景，通常为“Web”、“Mobile”等。</param>
 		/// <param name="extendedProperties">扩展属性集合。</param>
-		Certification Register(Membership.User user, string @namespace, string scene, IDictionary<string, object> extendedProperties);
+		Certification Register(Membership.User user, string scene, IDictionary<string, object> extendedProperties = null);

 		/// <summary>
 		/// 从安全凭证容器中注销指定的凭证。


The update shot method was not saving the shot type, so I just converted it to some inline sql.

--- src/BolfTracker.Infrastructure.EntityFramework/ShotRepository.cs
+++ src/BolfTracker.Infrastructure.EntityFramework/ShotRepository.cs
@@ -72,11 +72,11 @@

         public void Update(Shot shot)
         {
-            using (var context = new BolfTrackerContext())
+            using (var connection = BolfTrackerDbConnection.GetProfiledConnection())
             {
-                context.Shots.Attach(shot);
-                context.Entry<Shot>(shot).State = EntityState.Modified;
-                context.SaveChanges();
+                connection.Open();
+
+                connection.Execute("UPDATE Shot SET Points = @Points, ShotTypeId = @ShotTypeId WHERE Id = @Id", new { Id = shot.Id, Points = shot.Points, ShotTypeId = shot.ShotType.Id });
             }
         }


Actual compilation fix.

Actual compilation fix.

--- src/Cedar.EventStore.MsSql2008/Subscriptions/SqlEventsWatcher.cs
+++ src/Cedar.EventStore.MsSql2008/Subscriptions/SqlEventsWatcher.cs
@@ -104,7 +104,7 @@
                     _subscriptions.TryRemove(subscriptionId, out _);
                 });
             _subscriptions.TryAdd(subscriptionId, streamSubscription);
-            return Subscriptions;
+            return streamSubscription;
         }

         private void SetupSqlDependency()


copy all namespaces from _options.XmlNamespacePrefixOverrides to a new instance, to avoid conflicts

--- src/SoapCore/SoapEndpointMiddleware.cs
+++ src/SoapCore/SoapEndpointMiddleware.cs
@@ -807,7 +807,16 @@

 		private XmlNamespaceManager GetXmlNamespaceManager()
 		{
-			var xmlNamespaceManager = _options.XmlNamespacePrefixOverrides ?? new XmlNamespaceManager(new NameTable());
+			var xmlNamespaceManager = new XmlNamespaceManager(new NameTable());
+
+			if (_options.XmlNamespacePrefixOverrides != null)
+			{
+				foreach (var ns in _options.XmlNamespacePrefixOverrides.GetNamespacesInScope(XmlNamespaceScope.Local))
+				{
+					xmlNamespaceManager.AddNamespace(ns.Key, ns.Value);
+				}
+			}
+
 			Namespaces.AddDefaultNamespaces(xmlNamespaceManager);
 			return xmlNamespaceManager;
 		}


More compact implementation of Marshal.GenerateProgIdForType (#22395)

Signed-off-by: dotnet-bot <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>

--- src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs
+++ src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs
@@ -847,21 +847,10 @@
                 throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
             }

-            foreach (CustomAttributeData cad in type.GetCustomAttributesData())
-            {
-                if (cad.Constructor.DeclaringType == typeof(ProgIdAttribute))
-                {
-                    // Retrieve the PROGID string from the ProgIdAttribute.
-                    IList<CustomAttributeTypedArgument> caConstructorArgs = cad.ConstructorArguments;
-                    Debug.Assert(caConstructorArgs.Count == 1, "caConstructorArgs.Count == 1");
-
-                    CustomAttributeTypedArgument progIdConstructorArg = caConstructorArgs[0];
-                    Debug.Assert(progIdConstructorArg.ArgumentType == typeof(string), "progIdConstructorArg.ArgumentType == typeof(string)");
-
-                    string strProgId = (string)progIdConstructorArg.Value;
-
-                    return strProgId ?? string.Empty;
-                }
+            ProgIdAttribute progIdAttribute = type.GetCustomAttribute<ProgIdAttribute>();
+            if (progIdAttribute != null)
+            {
+                return progIdAttribute.Value ?? string.Empty;
             }

             // If there is no prog ID attribute then use the full name of the type as the prog id.


probably need to change

probably need to change

--- src/Compilers/CSharp/Portable/Compilation/MemberSemanticModel.cs
+++ src/Compilers/CSharp/Portable/Compilation/MemberSemanticModel.cs
@@ -1294,7 +1294,11 @@

             for (CSharpSyntaxNode current = node; current != this.Root; current = current.ParentOrStructuredTriviaParent)
             {
-                Debug.Assert(current != null, "How did we get outside the root?");
+                if (current == null)
+                {
+                    // this can happen if this.Root is not parent of given node
+                    return enclosingStatement ?? this.Root;
+                }

                 if (enclosingStatement == null)
                 {


#4229 - If the property do not support variantions, we need to validate the default language

--- src/Umbraco.Core/Models/ContentBase.cs
+++ src/Umbraco.Core/Models/ContentBase.cs
@@ -380,9 +380,22 @@
         {
             var alsoInvariant = culture != null && culture != "*";

-            return Properties.Where(x => // select properties...
-                    x.PropertyType.SupportsVariation(culture, "*", true) && // that support the variation
-                    (!x.IsValid(culture) || (alsoInvariant && !x.IsValid(null)))) // and are not valid
+            return Properties.Where(x =>
+                {
+                    var supportVariation = x.PropertyType.SupportsVariation(culture, "*", true);
+
+                    if (supportVariation)
+                    {
+                        // If the property support variation then we report an error
+                        // when property is invalid for current culture OR property is invalid for invariant
+                        return !x.IsValid(culture) || (alsoInvariant && !x.IsValid(null));
+                    }
+
+                    // Else we report error if the property is invalid for the default language
+                    return !x.IsValid();
+
+
+                })
                 .ToArray();
         }


#H5IS

#H5IS

Helps adding the [TestMethod] attribute :confused:

--- src/UnitTestProject1/Time/TimeTests.cs
+++ src/UnitTestProject1/Time/TimeTests.cs
@@ -694,6 +694,7 @@

         #region EssentialsPartialDate

+        [TestMethod]
         public void EssentialsPartialDateFromDateTime() {

             var samples = new[] {
@@ -715,6 +716,7 @@

         }

+        [TestMethod]
         public void EssentialsPartialDateFromDateTimeOffset() {

             var samples = new[] {
@@ -742,7 +744,8 @@
             }

         }
-
+
+        [TestMethod]
         public void EssentialsPartialDateFromEssentialsDateTime() {

             var samples = new[] {


企业微信返回码更新

企业微信返回码更新

--- src/WeixinSDK.Work/Enums/ReturnCode.cs
+++ src/WeixinSDK.Work/Enums/ReturnCode.cs
@@ -5,349 +5,766 @@
     /// </summary>
     public enum ReturnCode
     {
-#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
+        /// <summary>
+        /// 系统繁忙
+        /// 排查方法：服务器暂不可用，建议稍候重试。建议重试次数不超过3次。
+        /// </summary>
         系统繁忙 = -1,
+
+        /// <summary>
+        /// 请求成功
+        /// 排查方法：接口调用成功
+        /// </summary>
         请求成功 = 0,
-        获取access_token时Secret错误_或者access_token无效 = 40001,
-        不合法的凭证类型 = 40002,
-        不合法的UserID = 40003,
+
+        /// <summary>
+        /// 不合法的secret参数
+        /// 排查方法：secret在应用详情/通讯录管理助手可查看
+        /// </summary>
+        不合法的secret参数 = 40001,
+
+        /// <summary>
+        /// 无效的UserID
+        /// 排查方法：查看帮助
+        /// </summary>
+        无效的UserID = 40003,
+
+        /// <summary>
+        /// 不合法的媒体文件类型
+        /// 排查方法：不满足系统文件要求。参考：上传的媒体文件限制
+        /// </summary>
         不合法的媒体文件类型 = 40004,
-        不合法的文件类型 = 40005,
+
+        /// <summary>
+        /// 不合法的type参数
+        /// 排查方法：合法的type取值，参考：上传临时素材
+        /// </summary>
+        不合法的type参数 = 40005,
+
+        /// <summary>
+        /// 不合法的文件大小
+        /// 排查方法：系统文件要求，参考：上传的媒体文件限制
+        /// </summary>
         不合法的文件大小 = 40006,
-        不合法的媒体文件id = 40007,
-        不合法的消息类型 = 40008,
-        不合法的corpid = 40013,
+
+        /// <summary>
+        /// 不合法的media_id参数
+        /// 排查方法：查看帮助
+        /// </summary>
+        不合法的media_id参数 = 40007,
+
+        /// <summary>
+        /// 不合法的msgtype参数
+        /// 排查方法：合法的msgtype取值，参考：消息类型
+        /// </summary>
+        不合法的msgtype参数 = 40008,
+
+        /// <summary>
+        /// 不合法的CorpID
+        /// 排查方法：需确认CorpID是否填写正确，在 web管理端-设置 可查看
+        /// </summary>
+        不合法的CorpID = 40013,
+
+        /// <summary>
+        /// 不合法的access_token
+        /// 排查方法：查看帮助
+        /// </summary>
         不合法的access_token = 40014,
-        不合法的菜单类型 = 40015,
+
+        /// <summary>
+        /// 不合法的按钮个数
+        /// 排查方法：菜单按钮1-3个
+        /// </summary>
         不合法的按钮个数 = 40016,
+
+        /// <summary>
+        /// 不合法的按钮类型
+        /// 排查方法：支持的类型，参考：按钮类型
+        /// </summary>
         不合法的按钮类型 = 40017,
+
+        /// <summary>
+        /// 不合法的按钮名字长度
+        /// 排查方法：长度应不超过16个字节
+        /// </summary>
         不合法的按钮名字长度 = 40018,
+
+        /// <summary>
+        /// 不合法的按钮KEY长度
+        /// 排查方法：长度应不超过128字节
+        /// </summary>
         不合法的按钮KEY长度 = 40019,
+
+        /// <summary>
+        /// 不合法的按钮URL长度
+        /// 排查方法：长度应不超过1024字节
+        /// </summary>
         不合法的按钮URL长度 = 40020,
-        不合法的菜单版本号 = 40021,
+
+        /// <summary>
+        /// 不合法的子菜单级数
+        /// 排查方法：只能包含一级菜单和二级菜单
+        /// </summary>
         不合法的子菜单级数 = 40022,
+
+        /// <summary>
+        /// 不合法的子菜单按钮个数
+        /// 排查方法：子菜单按钮1-5个
+        /// </summary>
         不合法的子菜单按钮个数 = 40023,
+
+        /// <summary>
+        /// 不合法的子菜单按钮类型
+        /// 排查方法：支持的类型，参考：按钮类型
+        /// </summary>
         不合法的子菜单按钮类型 = 40024,
+
+        /// <summary>
+        /// 不合法的子菜单按钮名字长度
+        /// 排查方法：支持的类型，参考：按钮类型
+        /// </summary>
         不合法的子菜单按钮名字长度 = 40025,
+
+        /// <summary>
+        /// 不合法的子菜单按钮KEY长度
+        /// 排查方法：长度应不超过60个字节
+        /// </summary>
         不合法的子菜单按钮KEY长度 = 40026,
+
+        /// <summary>
+        /// 不合法的子菜单按钮URL长度
+        /// 排查方法：长度应不超过1024字节
+        /// </summary>
         不合法的子菜单按钮URL长度 = 40027,
-        不合法的自定义菜单使用成员 = 40028,
+
+        /// <summary>
+        /// 不合法的oauth_code
+        /// 排查方法：查看帮助
+        /// </summary>
         不合法的oauth_code = 40029,
+
+        /// <summary>
+        /// 不合法的UserID列表
+        /// 排查方法：指定的UserID列表，至少存在一个UserID不在通讯录中
+        /// </summary>
         不合法的UserID列表 = 40031,
+
+        /// <summary>
+        /// 不合法的UserID列表长度
+        /// 排查方法：查看帮助
+        /// </summary>
         不合法的UserID列表长度 = 40032,
-        不合法的请求字符_不能包含_反斜杠uxxxx格式的字符 = 40033,
-        不合法的参数 = 40035,
-        不合法的请求格式 = 40038,
-        不合法的URL长度 = 40039,
-        不合法的插件token = 40040,
-        不合法的插件id = 40041,
-        不合法的插件会话 = 40042,
-        url中包含不合法domain = 40048,
+
+        /// <summary>
+        /// 不合法的请求字符
+        /// 排查方法：不能包含\uxxxx格式的字符
+        /// </summary>
+        不合法的请求字符 = 40033,
+
+        /// <summary>
+        /// 不合法的子菜单url域名
+        /// 排查方法：查看帮助
+        /// </summary>
         不合法的子菜单url域名 = 40054,
-        不合法的按钮url域名 = 40055,
+
+        /// <summary>
+        /// 不合法的菜单url域名
+        /// 排查方法：查看帮助
+        /// </summary>
+        不合法的菜单url域名 = 40055,
+
+        /// <summary>
+        /// 不合法的agentid
+        /// 排查方法：查看帮助
+        /// </summary>
         不合法的agentid = 40056,
+
+        /// <summary>
+        /// 不合法的callbackurl或者callbackurl验证失败
+        /// 排查方法：可自助到开发调试工具重现
+        /// </summary>
         不合法的callbackurl或者callbackurl验证失败 = 40057,
-        不合法的红包参数 = 40058,
+
+        /// <summary>
+        /// 不合法的参数
+        /// 排查方法：传递参数不符合系统要求，需要参照具体API接口说明
+        /// </summary>
+        不合法的参数 = 40058,
+
+        /// <summary>
+        /// 不合法的上报地理位置标志位
+        /// 排查方法：开关标志位只能填 0 或者 1
+        /// </summary>
         不合法的上报地理位置标志位 = 40059,
-        设置上报地理位置标志位时没有设置callbackurl = 40060,
-        设置应用头像失败 = 40061,
-        不合法的应用模式 = 40062,
+
+        /// <summary>
+        /// 参数为空
+        /// 排查方法：查看帮助
+        /// </summary>
         参数为空 = 40063,
-        管理组名字已存在 = 40064,
-        不合法的管理组名字长度 = 40065,
+
+        /// <summary>
+        /// 不合法的部门列表
+        /// 排查方法：部门列表为空，或者至少存在一个部门ID不存在于通讯录中
+        /// </summary>
         不合法的部门列表 = 40066,
-        标题长度不合法 = 40067,
+
+        /// <summary>
+        /// 不合法的标签ID
+        /// 排查方法：标签ID未指定，或者指定的标签ID不存在
+        /// </summary>
         不合法的标签ID = 40068,
-        不合法的标签ID列表 = 40069,
-        列表中所有标签_成员_ID都不合法 = 40070,
-        不合法的标签名字_标签名字已经存在 = 40071,
+
+        /// <summary>
+        /// 不合法的标签名字
+        /// 排查方法：标签名字已经存在
+        /// </summary>
+        不合法的标签名字 = 40071,
+
+        /// <summary>
+        /// 不合法的标签名字长度
+        /// 排查方法：不允许为空，最大长度限制为32个字（汉字或英文字母）
+        /// </summary>
         不合法的标签名字长度 = 40072,
+
+        /// <summary>
+        /// 不合法的openid
+        /// 排查方法：openid不存在，需确认获取来源
+        /// </summary>
         不合法的openid = 40073,
-        news消息不支持指定为高保密消息 = 40074,
-        不合法的预授权码 = 40077,
-        不合法的临时授权码 = 40078,
-        不合法的授权信息 = 40079,
-        不合法的suitesecret = 40080,
-        不合法的suitetoken = 40082,
-        不合法的suiteid = 40083,
-        不合法的永久授权码 = 40084,
-        不合法的suiteticket = 40085,
+
+        /// <summary>
+        /// news消息不支持保密消息类型
+        /// 排查方法：图文消息支持保密类型需改用mpnews
+        /// </summary>
+        news消息不支持保密消息类型 = 40074,
+
+        /// <summary>
+        /// 不合法的pre_auth_code参数
+        /// 排查方法：预授权码不存在，参考：获取预授权码
+        /// </summary>
+        不合法的pre_auth_code参数 = 40077,
+
+        /// <summary>
+        /// 不合法的auth_code参数
+        /// 排查方法：需确认获取来源，并且只能消费一次
+        /// </summary>
+        不合法的auth_code参数 = 40078,
+
+        /// <summary>
+        /// 不合法的suite_secret
+        /// 排查方法：套件secret可在第三方管理端套件详情查看
+        /// </summary>
+        不合法的suite_secret = 40080,
+
+        /// <summary>
+        /// 不合法的suite_token
+        /// 排查方法：查看帮助
+        /// </summary>
+        不合法的suite_token = 40082,
+
+        /// <summary>
+        /// 不合法的suite_id
+        /// 排查方法：suite_id不存在
+        /// </summary>
+        不合法的suite_id = 40083,
+
+        /// <summary>
+        /// 不合法的permanent_code参数
+        /// 排查方法：查看帮助
+        /// </summary>
+        不合法的permanent_code参数 = 40084,
+
+        /// <summary>
+        /// 不合法的的suite_ticket参数
+        /// 排查方法：suite_ticket不存在或者已失效
+        /// </summary>
+        不合法的的suite_ticket参数 = 40085,
+
+        /// <summary>
+        /// 不合法的第三方应用appid
+        /// 排查方法：至少有一个不存在应用id
+        /// </summary>
         不合法的第三方应用appid = 40086,
+
+        /// <summary>
+        /// 导入文件存在不合法的内容
+        /// 排查方法：查看帮助
+        /// </summary>
         导入文件存在不合法的内容 = 40092,
-        不合法的跳转target = 40093,
+
+        /// <summary>
+        /// 不合法的jsapi_ticket参数
+        /// 排查方法：ticket已失效，或者拼写错误
+        /// </summary>
+        不合法的jsapi_ticket参数 = 40093,
+
+        /// <summary>
+        /// 不合法的URL
+        /// 排查方法：缺少主页URL参数
+        /// </summary>
         不合法的URL = 40094,
-        修改失败_并发冲突 = 40095,
-        请勿添加其他公众号的主页链接 = 40155,
+
+        /// <summary>
+        /// 缺少access_token参数
+        /// 排查方法：-
+        /// </summary>
         缺少access_token参数 = 41001,
+
+        /// <summary>
+        /// 缺少corpid参数
+        /// 排查方法：-
+        /// </summary>
         缺少corpid参数 = 41002,
-        缺少refresh_token参数 = 41003,
+
+        /// <summary>
+        /// 缺少secret参数
+        /// 排查方法：-
+        /// </summary>
         缺少secret参数 = 41004,
-        缺少多媒体文件数据 = 41005,
-        缺少media_id参数 = 41006,
-        缺少子菜单数据 = 41007,
-        缺少oauth_code = 41008,
-        缺少UserID = 41009,
-        缺少url = 41010,
-        缺少agentid = 41011,
-        缺少应用头像mediaid = 41012,
-        缺少应用名字 = 41013,
-        缺少应用描述 = 41014,
-        缺少Content = 41015,
-        缺少标题 = 41016,
-        缺少标签ID = 41017,
-        缺少标签名字 = 41018,
-        缺少suiteid = 41021,
-        缺少suitetoken = 41022,
-        缺少suiteticket = 41023,
-        缺少suitesecret = 41024,
-        缺少永久授权码 = 41025,
-        缺少login_ticket = 41034,
-        缺少跳转target = 41035,
-        access_token过期 = 42001,
-        refresh_token过期 = 42002,
-        oauth_code过期 = 42003,
-        插件token过期 = 42004,
-        预授权码失效 = 42007,
-        临时授权码失效 = 42008,
-        suitetoken失效 = 42009,
-        需要GET请求 = 43001,
-        需要POST请求 = 43002,
-        需要HTTPS = 43003,
-        需要成员已关注 = 43004,
-        需要好友关系 = 43005,
-        需要订阅 = 43006,
-        需要授权 = 43007,
-        需要支付授权 = 43008,
-        需要处于接收消息模式 = 43010,
-        需要企业授权 = 43011,
-        应用对成员不可见 = 43013,
-        多媒体文件为空 = 44001,
-        POST的数据包为空 = 44002,
-        图文消息内容为空 = 44003,
-        文本消息内容为空 = 44004,
+
+        /// <summary>
+        /// 缺少auth code参数
+        /// 排查方法：-
+        /// </summary>
+        缺少auth_code参数 = 41008,
+
+        /// <summary>
+        /// 缺少userid参数
+        /// 排查方法：-
+        /// </summary>
+        缺少userid参数 = 41009,
+
+        /// <summary>
+        /// 缺少url参数
+        /// 排查方法：-
+        /// </summary>
+        缺少url参数 = 41010,
+
+        /// <summary>
+        /// 缺少agentid参数
+        /// 排查方法：-
+        /// </summary>
+        缺少agentid参数 = 41011,
+
+        /// <summary>
+        /// 缺少title参数
+        /// 排查方法：-
+        /// </summary>
+        缺少title参数 = 41016,
+
+        /// <summary>
+        /// 缺少tagid参数
+        /// 排查方法：-
+        /// </summary>
+        缺少tagid参数 = 41017,
+
+        /// <summary>
+        /// 缺少suite_id参数
+        /// 排查方法：-
+        /// </summary>
+        缺少suite_id参数 = 41021,
+
+        /// <summary>
+        /// 缺少permanent_code参数
+        /// 排查方法：-
+        /// </summary>
+        缺少permanent_code参数 = 41025,
+
+        /// <summary>
+        /// access_token已过期
+        /// 排查方法：access_token有时效性，需要重新获取一次
+        /// </summary>
+        access_token已过期 = 42001,
+
+        /// <summary>
+        /// pre_auth_code已过期
+        /// 排查方法：pre_auth_code有时效性，需要重新获取一次
+        /// </summary>
+        pre_auth_code已过期 = 42007,
+
+        /// <summary>
+        /// suite_access_token已过期
+        /// 排查方法：suite_access_token有时效性，需要重新获取一次
+        /// </summary>
+        suite_access_token已过期 = 42009,
+
+        /// <summary>
+        /// 指定的userid未关注微信插件
+        /// 排查方法：需要成员关注微信插件才能获取openid
+        /// </summary>
+        指定的userid未关注微信插件 = 43004,
+
+        /// <summary>
+        /// 文本消息content参数为空
+        /// 排查方法：发文本消息content为必填参数，且不能为空
+        /// </summary>
+        文本消息content参数为空 = 44004,
+
+        /// <summary>
+        /// 多媒体文件大小超过限制
+        /// 排查方法：图片不可超过5M；音频不可超过5M；文件不可超过20M
+        /// </summary>
         多媒体文件大小超过限制 = 45001,
+
+        /// <summary>
+        /// 消息内容大小超过限制
+        /// 排查方法：查看帮助
+        /// </summary>
         消息内容大小超过限制 = 45002,
-        标题大小超过限制 = 45003,
-        描述大小超过限制 = 45004,
-        链接长度超过限制 = 45005,
-        图片链接长度超过限制 = 45006,
+
+        /// <summary>
+        /// 应用description参数长度不符合系统限制
+        /// 排查方法：设置应用若带有description参数，则不允许为空
+        /// </summary>
+        应用description参数长度不符合系统限制 = 45004,
+
+        /// <summary>
+        /// 语音播放时间超过限制
+        /// 排查方法：语音播放时长不能超过60秒
+        /// </summary>
         语音播放时间超过限制 = 45007,
-        图文消息的文章数量不能超过8条 = 45008,
+
+        /// <summary>
+        /// 图文消息的文章数量不符合系统限制
+        /// 排查方法：图文消息的文章数量不能超过8条
+        /// </summary>
+        图文消息的文章数量不符合系统限制 = 45008,
+
+        /// <summary>
+        /// 接口调用超过限制
+        /// 排查方法：查看帮助
+        /// </summary>
         接口调用超过限制 = 45009,
-        创建菜单个数超过限制 = 45010,
-        回复时间超过限制 = 45015,
-        系统分组_不允许修改 = 45016,
-        分组名字过长 = 45017,
-        分组数量超过上限 = 45018,
-        应用名字长度不合法_合法长度为2到16个字 = 45022,
+
+        /// <summary>
+        /// 应用name参数长度不符合系统限制
+        /// 排查方法：设置应用若带有name参数，则不允许为空
+        /// </summary>
+        应用name参数长度不符合系统限制 = 45022,
+
+        /// <summary>
+        /// 帐号数量超过上限
+        /// 排查方法：查看帮助
+        /// </summary>
         帐号数量超过上限 = 45024,
-        同一个成员每周只能邀请一次 = 45025,
+
+        /// <summary>
+        /// 触发删除用户数的保护
+        /// 排查方法：限制参考：全量覆盖成员
+        /// </summary>
         触发删除用户数的保护 = 45026,
-        mpnews每天只能发送100次 = 45027,
-        素材数量超过上限 = 45028,
-        media_id对该应用不可见 = 45029,
-        作者名字长度超过限制 = 45032,
-        不存在媒体数据 = 46001,
-        不存在的菜单版本 = 46002,
-        不存在的菜单数据 = 46003,
-        不存在的成员 = 46004,
-        解析JSON_XML内容错误 = 47001,
-        Api未授权 = 48001,
-        Api禁用_一般是管理组类型与Api不匹配_例如普通管理组调用会话服务的Api_ = 48002,
-        suitetoken无效 = 48003,
+
+        /// <summary>
+        /// 图文消息author参数长度超过限制
+        /// 排查方法：最长64个字节
+        /// </summary>
+        图文消息author参数长度超过限制 = 45032,
+
+        /// <summary>
+        /// 菜单未设置
+        /// 排查方法：菜单需发布后才能获取到数据
+        /// </summary>
+        菜单未设置 = 46003,
+
+        /// <summary>
+        /// API接口无权限调用
+        /// 排查方法：查看帮助
+        /// </summary>
+        API接口无权限调用 = 48002,
+
+        /// <summary>
+        /// 不合法的suite_id
+        /// 排查方法：确认suite_access_token由指定的suite_id生成
+        /// </summary>
+        不合法的suite_id_ = 48003,
+
+        /// <summary>
+        /// 授权关系无效
+        /// 排查方法：可能是无授权或授权已被取消
+        /// </summary>
         授权关系无效 = 48004,
-        Api已废弃 = 48005,
-        redirect_uri未授权 = 50001,
+
+        /// <summary>
+        /// API接口已废弃
+        /// 排查方法：接口已不再支持，建议改用新接口或者新方案
+        /// </summary>
+        API接口已废弃 = 48005,
+
+        /// <summary>
+        /// redirect_url未登记可信域名
+        /// 排查方法：查看帮助
+        /// </summary>
+        redirect_url未登记可信域名 = 50001,
+
+        /// <summary>
+        /// 成员不在权限范围
+        /// 排查方法：请检查应用或管理组的权限范围
+        /// </summary>
         成员不在权限范围 = 50002,
-        应用已停用 = 50003,
-        成员状态不正确_需要成员为企业验证中状态 = 50004,
-        企业已禁用 = 50005,
+
+        /// <summary>
+        /// 应用已禁用
+        /// 排查方法：-
+        /// </summary>
+        应用已禁用 = 50003,
+
+        /// <summary>
+        /// 部门长度不符合限制
+        /// 排查方法：部门名称不能为空且长度不能超过64个字
+        /// </summary>
         部门长度不符合限制 = 60001,
-        部门层级深度超过限制 = 60002,
-        部门不存在 = 60003,
+
+        /// <summary>
+        /// 部门ID不存在
+        /// 排查方法：需要确认部门ID是否有带，并且存在通讯录中
+        /// </summary>
+        部门ID不存在 = 60003,
+
+        /// <summary>
+        /// 父部门不存在
+        /// 排查方法：需要确认父亲部门ID是否有带，并且存在通讯录中
+        /// </summary>
         父部门不存在 = 60004,
-        不允许删除有成员的部门 = 60005,
-        不允许删除有子部门的部门 = 60006,
+
+        /// <summary>
+        /// 部门下存在成员
+        /// 排查方法：不允许删除有成员的部门
+        /// </summary>
+        部门下存在成员 = 60005,
+
+        /// <summary>
+        /// 部门下存在子部门
+        /// 排查方法：不允许删除有子部门的部门
+        /// </summary>
+        部门下存在子部门 = 60006,
+
+        /// <summary>
+        /// 不允许删除根部门
+        /// 排查方法：-
+        /// </summary>
         不允许删除根部门 = 60007,
-        部门ID或者部门名称已存在 = 60008,
+
+        /// <summary>
+        /// 部门已存在
+        /// 排查方法：部门ID或者部门名称已存在
+        /// </summary>
+        部门已存在 = 60008,
+
+        /// <summary>
+        /// 部门名称含有非法字符
+        /// 排查方法：不能含有 \:?*“<>| 等字符
+        /// </summary>
         部门名称含有非法字符 = 60009,
+
+        /// <summary>
+        /// 部门存在循环关系
+        /// 排查方法：查看帮助
+        /// </summary>
         部门存在循环关系 = 60010,
-        权限不足_user_department_agent无权限_只有通迅录同步助手才有通迅录写权限_同时要开启写权限_ = 60011,
+
+        /// <summary>
+        /// 指定的成员/部门/标签参数无权限
+        /// 排查方法：查看帮助
+        /// </summary>
+        指定的成员_部门_标签参数无权限 = 60011,
+
+        /// <summary>
+        /// 不允许删除默认应用
+        /// 排查方法：默认应用的id为0
+        /// </summary>
         不允许删除默认应用 = 60012,
-        不允许关闭应用 = 60013,
-        不允许开启应用 = 60014,
-        不允许修改默认应用可见范围 = 60015,
-        不允许删除存在成员的标签 = 60016,
-        不允许设置企业 = 60017,
-        不允许设置应用地理位置上报开关 = 60019,
+
+        /// <summary>
+        /// 访问ip不在白名单之中
+        /// 排查方法：请确认访问ip是否在套件的ip白名单内
+        /// </summary>
         访问ip不在白名单之中 = 60020,
-        已授权的应用不允许企业管理组调用接口修改菜单 = 60023,
-        主页型应用不支持的消息类型 = 60025,
-        不支持第三方修改主页型应用字段 = 60027,
-        应用已授权予第三方_不允许通过接口修改主页url = 60028,
-        应用已授权予第三方_不允许通过接口修改可信域名 = 60029,
-        未设置管理组的登录授权域名 = 60031,
+
+        /// <summary>
+        /// UserID已存在
+        /// 排查方法：-
+        /// </summary>
         UserID已存在 = 60102,
+
+        /// <summary>
+        /// 手机号码不合法
+        /// 排查方法：长度不超过32位，字符仅支持数字，加号和减号
+        /// </summary>
         手机号码不合法 = 60103,
+
+        /// <summary>
+        /// 手机号码已存在
+        /// 排查方法：-
+        /// </summary>
         手机号码已存在 = 60104,
+
+        /// <summary>
+        /// 邮箱不合法
+        /// 排查方法：长度不超过64位，且为有效的email格式
+        /// </summary>
         邮箱不合法 = 60105,
+
+        /// <summary>
+        /// 邮箱已存在
+        /// 排查方法：-
+        /// </summary>
         邮箱已存在 = 60106,
-        微信号不合法 = 60107,
-        微信号已存在 = 60108,
-        QQ号已存在 = 60109,
-        用户同时归属部门超过20个 = 60110,
+
+        /// <summary>
+        /// 用户所属部门数量超过限制
+        /// 排查方法：用户同时归属部门不超过20个
+        /// </summary>
+        用户所属部门数量超过限制 = 60110,
+
+        /// <summary>
+        /// UserID不存在
+        /// 排查方法：UserID参数为空，或者不存在通讯录中
+        /// </summary>
         UserID不存在 = 60111,
-        成员姓名不合法 = 60112,
-        身份认证信息_微信号_手机_邮箱_不能同时为空 = 60113,
-        性别不合法 = 60114,
-        已关注成员微信不能修改 = 60115,
-        扩展属性已存在 = 60116,
-        成员无有效邀请字段_详情参考_邀请成员关注_的接口说明 = 60118,
-        成员已关注 = 60119,
-        成员已禁用 = 60120,
-        找不到该成员 = 60121,
-        邮箱已被外部管理员使用 = 60122,
+
+        /// <summary>
+        /// 成员name参数不合法
+        /// 排查方法：不能为空，且不能超过64字节
+        /// </summary>
+        成员name参数不合法 = 60112,
+
+        /// <summary>
+        /// 无效的部门id
+        /// 排查方法：部门不存在通讯录中
+        /// </summary>
         无效的部门id = 60123,
+
+        /// <summary>
+        /// 无效的父部门id
+        /// 排查方法：父部门不存在通讯录中
+        /// </summary>
         无效的父部门id = 60124,
-        非法部门名字_长度超过限制_重名等_重名包括与csv文件中同级部门重名或者与旧组织架构包含成员的同级部门重名 = 60125,
-        创建部门失败 = 60126,
-        缺少部门id = 60127,
-        字段不合法_可能存在主键冲突或者格式错误 = 60128,
+
+        /// <summary>
+        /// 非法部门名字
+        /// 排查方法：不能为空，且不能超过64字节，且不能含有\:*?”<>|等字符
+        /// </summary>
+        非法部门名字 = 60125,
+
+        /// <summary>
+        /// 缺少department参数
+        /// 排查方法：-
+        /// </summary>
+        缺少department参数 = 60127,
+
+        /// <summary>
+        /// 成员手机和邮箱都为空
+        /// 排查方法：成员手机和邮箱至少有个非空
+        /// </summary>
         成员手机和邮箱都为空 = 60129,
-        不合法的职位长度 = 60131,
-        可信域名不匹配_或者可信域名没有IPC备案_后续将不能在该域名下正常使用jssdk_ = 80001,
+
+        /// <summary>
+        /// 发票已被其他公众号锁定
+        /// 排查方法：查看帮助
+        /// </summary>
+        发票已被其他公众号锁定 = 72023,
+
+        /// <summary>
+        /// 发票状态错误
+        /// 排查方法：reimburse_status状态错误，参考：更新发票状态
+        /// </summary>
+        发票状态错误 = 72024,
+
+        /// <summary>
+        /// 存在发票不属于该用户
+        /// 排查方法：只能批量更新该openid的发票，参考：批量更新发票状态
+        /// </summary>
+        存在发票不属于该用户 = 72037,
+
+        /// <summary>
+        /// 可信域名不正确，或者无ICP备案
+        /// 排查方法：查看帮助
+        /// </summary>
+        可信域名不正确_或者无ICP备案 = 80001,
+
+        /// <summary>
+        /// 部门下的结点数超过限制（3W）
+        /// 排查方法：-
+        /// </summary>
         部门下的结点数超过限制_3W = 81001,
+
+        /// <summary>
+        /// 部门最多15层
+        /// 排查方法：-
+        /// </summary>
         部门最多15层 = 81002,
-        邀请额度已用完 = 81003,
-        部门数量超过上限 = 81004,
+
+        /// <summary>
+        /// 无权限操作标签
+        /// 排查方法：查看帮助
+        /// </summary>
         无权限操作标签 = 81011,
-        发送消息或者邀请的参数全部为空或者全部不合法 = 82001,
+
+        /// <summary>
+        /// 不合法的PartyID列表长度
+        /// 排查方法：发消息，单次不能超过100个部门
+        /// </summary>
         不合法的PartyID列表长度 = 82002,
+
+        /// <summary>
+        /// 不合法的TagID列表长度
+        /// 排查方法：发消息，单次不能超过100个标签
+        /// </summary>
         不合法的TagID列表长度 = 82003,
-        微信版本号过低 = 82004,
+
+        /// <summary>
+        /// 缺少templateid参数
+        /// 排查方法：-
+        /// </summary>
         缺少templateid参数 = 84019,
+
+        /// <summary>
+        /// templateid不存在
+        /// 排查方法：确认参数是否有带，并且已创建
+        /// </summary>
         templateid不存在 = 84020,
+
+        /// <summary>
+        /// 缺少register_code参数
+        /// 排查方法：-
+        /// </summary>
         缺少register_code参数 = 84021,
+
+        /// <summary>
+        /// 无效的register_code参数
+        /// 排查方法：-
+        /// </summary>
         无效的register_code参数 = 84022,
+
+        /// <summary>
+        /// 不允许调用设置通讯录同步完成接口
+        /// 排查方法：-
+        /// </summary>
         不允许调用设置通讯录同步完成接口 = 84023,
+
+        /// <summary>
+        /// 无注册信息
+        /// 排查方法：查看帮助
+        /// </summary>
         无注册信息 = 84024,
+
+        /// <summary>
+        /// 包含不合法的词语
+        /// 排查方法：-
+        /// </summary>
         包含不合法的词语 = 85002,
+
+        /// <summary>
+        /// 每企业每个月设置的可信域名不可超过20个
+        /// 排查方法：-
+        /// </summary>
         每企业每个月设置的可信域名不可超过20个 = 85004,
-        信域名未通过所有权校验 = 85005,
-        不合法的会话ID = 86001,
-        不存在的会话ID = 86003,
-        不合法的会话名 = 86004,
-        不合法的会话管理员 = 86005,
-        不合法的成员列表大小 = 86006,
-        不存在的成员_86007 = 86007,
-        需要会话管理员权限 = 86101,
-        缺少会话ID = 86201,
-        缺少会话名 = 86202,
-        缺少会话管理员 = 86203,
-        缺少成员 = 86204,
-        非法的会话ID长度 = 86205,
-        非法的会话ID数值 = 86206,
-        会话管理员不在用户列表中 = 86207,
-        消息服务未开启 = 86208,
-        缺少操作者 = 86209,
-        缺少会话参数 = 86210,
-        缺少会话类型_单聊或者群聊_ = 86211,
-        缺少发件人 = 86213,
-        非法的会话类型 = 86214,
-        会话已存在 = 86215,
-        非法会话成员 = 86216,
-        会话操作者不在成员列表中 = 86217,
-        非法会话发件人 = 86218,
-        非法会话收件人 = 86219,
-        非法会话操作者 = 86220,
-        单聊模式下_发件人与收件人不能为同一人 = 86221,
-        不允许消息服务访问的API = 86222,
-        不合法的消息类型_86304 = 86304,
-        客服服务未启用 = 86305,
-        缺少发送人 = 86306,
-        缺少发送人类型 = 86307,
-        缺少发送人id = 86308,
-        缺少接收人 = 86309,
-        缺少接收人类型 = 86310,
-        缺少接收人id = 86311,
-        缺少消息类型 = 86312,
-        缺少客服_发送人或接收人类型_必须有一个为kf = 86313,
-        客服不唯一_发送人或接收人类型_必须只有一个为kf = 86314,
-        不合法的发送人类型 = 86315,
-        不合法的发送人id_Userid不存在_openid不存在_kf不存在 = 86316,
-        不合法的接收人类型 = 86317,
-        不合法的接收人id_Userid不存在_openid不存在_kf不存在 = 86318,
-        不合法的客服_kf不在客服列表中 = 86319,
-        不合法的客服类型 = 86320,
-        缺少seq参数 = 88001,
-        缺少offset参数_88002 = 88002,
-        非法seq = 88003,
-        未认证摇一摇周边 = 90001,
-        缺少摇一摇周边ticket参数 = 90002,
-        摇一摇周边ticket参数不合法 = 90003,
-        摇一摇周边ticket过期 = 90004,
-        未开启摇一摇周边服务 = 90005,
-        卡券已被核销 = 91004,
-        无效的code = 91011,
-        缺少卡券详情 = 91014,
-        代金券缺少least_cost或者reduce_cost参数 = 91015,
-        折扣券缺少discount参数 = 91016,
-        礼品券缺少gift参数 = 91017,
-        缺少卡券sku参数 = 91019,
-        缺少卡券有效期 = 91020,
-        缺少卡券有效期类型 = 91021,
-        缺少卡券logo_url = 91022,
-        缺少卡券code类型 = 91023,
-        缺少卡券title = 91025,
-        缺少卡券color = 91026,
-        缺少offset参数_91027 = 91027,
-        缺少count参数 = 91028,
-        缺少card_id = 91029,
-        缺少卡券code = 91030,
-        缺少卡券notice = 91031,
-        缺少卡券description = 91032,
-        缺少ticket类型 = 91033,
-        不合法的有效期 = 91036,
-        变更库存值不合法 = 91038,
-        不合法的卡券id = 91039,
-        不合法的ticket_type = 91040,
-        没有创建_上传卡券logo_以及核销卡券的权限 = 91041,
-        没有该卡券投放权限 = 91042,
-        没有修改或者删除该卡券的权限 = 91043,
-        不合法的卡券参数 = 91044,
-        缺少团购券groupon结构 = 91045,
-        缺少现金券cash结构 = 91046,
-        缺少折扣券discount_结构 = 91047,
-        缺少礼品券gift结构 = 91048,
-        缺少优惠券coupon结构 = 91049,
-        缺少卡券必填字段 = 91050,
-        商户名称超过12个汉字 = 91051,
-        卡券标题超过9个汉字 = 91052,
-        卡券提醒超过16个汉字 = 91053,
-        卡券描述超过1024个汉字 = 91054,
-        卡券副标题长度超过18个汉字 = 91055,
-        应用id已存在 = 301001,
-        accesstoken不允许操作其它应用 = 301002,
-        不允许删除超级管理员 = 301004,
-        消息型应用不允许做此操作 = 301005,
-        不允许禁用超级管理员 = 301006,
-        主页型应用不允许做此操作 = 301008,
-        应用发送消息没有接收主体 = 301009,
-        部门名已存在 = 301010,
-        座机不合法 = 301013,
-        英文名称不合法 = 301014,
-        userid错误 = 301021,
-        获取打卡数据失败 = 301022,
-        useridlist非法或超过限额 = 301023,
-        获取打卡记录时间间隔超限 = 301024,
-        批量同步成员存在userid为空的用户 = 302001,
-        管理员userid不存在 = 302002,
-        存在重复的userid = 302003,
-        /// <summary>
-        /// （1不是一棵树，2 多个一样的partyid，3 partyid空，4 partyid name 空，5 同一个父节点下有两个子节点 部门名字一样 可能是以上情况，请一一排查）
-        /// </summary>
-        组织架构不合法 = 302004,
-
-#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
+
+        /// <summary>
+        /// 可信域名未通过所有权校验
+        /// 排查方法：查看帮助
+        /// </summary>
+        可信域名未通过所有权校验 = 85005,
     }
 }


Remove comment

Remove comment

--- YinYang/Server.cs
+++ YinYang/Server.cs
@@ -21,7 +21,6 @@

 		public async Task RunListenLoop(CancellationToken token)
 		{
-			//_listener.BeginGetContext(ClientAvailable, null);
 			while (!token.IsCancellationRequested)
 			{
 				var context = await Listener.GetContextAsync();


Assembly info updated.

Assembly info updated.

--- src/Controllerless.WebApi.Description/Properties/AssemblyInfo.cs
+++ src/Controllerless.WebApi.Description/Properties/AssemblyInfo.cs
@@ -1,16 +1,17 @@
-using System.Reflection;
+using System.Resources;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;

 // General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
-[assembly: AssemblyTitle("Controllerless.WebApi.Description")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyTitle("SolidServices.Controllerless.WebApi.Description")]
+[assembly: AssemblyDescription("Custom ApiExplorer for genrating API documentation for message based apis.")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany("dotnetjunkie")]
 [assembly: AssemblyProduct("Controllerless.WebApi.Description")]
-[assembly: AssemblyCopyright("Copyright ©  2016")]
+[assembly: AssemblyCopyright("Copyright ©  2016 dotnetjunkie")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -32,5 +33,7 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyFileVersion("0.1.0.0")]
+[assembly: NeutralResourcesLanguage("en-US")]
+


sheduler changes

sheduler changes

--- src/ConveyorBelt.Tooling/Scheduling/MinuteTableShardScheduler.cs
+++ src/ConveyorBelt.Tooling/Scheduling/MinuteTableShardScheduler.cs
@@ -33,7 +33,7 @@
             var ofsted = new DateTimeOffset();
             for (int i = 0; i < totalMinutes; i+=10)
             {
-                ofsted = offset.AddSeconds(i);
+                ofsted = offset.AddSeconds(i + 10);
                 var shardKey = GetShardKey(ofsted);
                 events.Add(new Event(new ShardKeyArrived(){ Source = source.ToSummary(), ShardKey = shardKey}));
                 if(source.MaxItemsInAScheduleRun.HasValue && i >= source.MaxItemsInAScheduleRun)


Moving Scene category adjacent to Map category.

--- src/Desktop/ArcGISRuntimeSamplesDesktopViewer/MainWindow.xaml.cs
+++ src/Desktop/ArcGISRuntimeSamplesDesktopViewer/MainWindow.xaml.cs
@@ -374,7 +374,7 @@
 			get
 			{
 				List<SampleGroup> groups = new List<SampleGroup>();
-				List<string> groupOrder = new List<string>( new [] { "Mapping", "Layers", "Geometry", "Symbology", "Tasks", "Offline", "Printing", "Portal", "Security", "Extras" } );
+				List<string> groupOrder = new List<string>( new [] { "Mapping", "Scene", "Layers", "Geometry", "Symbology", "Tasks", "Offline", "Printing", "Portal", "Security", "Extras" } );
 				var query = (from item in Samples
 							 orderby item.Category
 							 group item by item.Category into g


RestApi Client add UpdateByKey extension

--- src/FCP.Web.Api.Client/Extensions/RestApiClientCRUDExtensions.cs
+++ src/FCP.Web.Api.Client/Extensions/RestApiClientCRUDExtensions.cs
@@ -10,6 +10,9 @@
         #region Helper Functions
         internal static Uri BuildByKeyRequestUri<TKey>(Uri requestUri, TKey keyParam)
         {
+            if (keyParam == null)
+                throw new ArgumentNullException(nameof(keyParam));
+
             var uriBuilder = new FluentUriBuilder().FromUri(requestUri.ToAbsolute())
                 .SegmentParam(TypeHelper.parseString(keyParam));

@@ -37,12 +40,37 @@
         public static Task<RestApiResult<TResult>> GetByKeyAsync<TKey, TResult>(this IRestApiClient restClient, Uri requestUri,
             TKey keyParam, CancellationToken cancellationToken)
         {
-            if (keyParam == null)
-                throw new ArgumentNullException(nameof(keyParam));
-
             var fullRequestUri = BuildByKeyRequestUri(requestUri, keyParam);

             return restClient.GetAsync<TResult>(fullRequestUri, cancellationToken);
+        }
+        #endregion
+
+        #region UpdateByKey
+        public static Task<RestApiResult<TResult>> UpdateByKeyAsync<TKey, TUpdate, TResult>(this IRestApiClient restClient, string requestUrl,
+            TKey keyParam, TUpdate updateParam)
+        {
+            return UpdateByKeyAsync<TKey, TUpdate, TResult>(restClient, requestUrl.ToUri(), keyParam, updateParam);
+        }
+
+        public static Task<RestApiResult<TResult>> UpdateByKeyAsync<TKey, TUpdate, TResult>(this IRestApiClient restClient, Uri requestUri,
+            TKey keyParam, TUpdate updateParam)
+        {
+            return UpdateByKeyAsync<TKey, TUpdate, TResult>(restClient, requestUri, keyParam, updateParam, CancellationToken.None);
+        }
+
+        public static Task<RestApiResult<TResult>> UpdateByKeyAsync<TKey, TUpdate, TResult>(this IRestApiClient restClient, string requestUrl,
+            TKey keyParam, TUpdate updateParam, CancellationToken cancellationToken)
+        {
+            return UpdateByKeyAsync<TKey, TUpdate, TResult>(restClient, requestUrl.ToUri(), keyParam, updateParam, cancellationToken);
+        }
+
+        public static Task<RestApiResult<TResult>> UpdateByKeyAsync<TKey, TUpdate, TResult>(this IRestApiClient restClient, Uri requestUri,
+           TKey keyParam, TUpdate updateParam, CancellationToken cancellationToken)
+        {
+            var fullRequestUri = BuildByKeyRequestUri(requestUri, keyParam);
+
+            return restClient.PutAsJsonAsync<TUpdate, TResult>(fullRequestUri, updateParam, cancellationToken);
         }
         #endregion

@@ -66,9 +94,6 @@
         public static Task<RestApiResult<TResult>> DeleteByKeyAsync<TKey, TResult>(this IRestApiClient restClient, Uri requestUri,
             TKey keyParam, CancellationToken cancellationToken)
         {
-            if (keyParam == null)
-                throw new ArgumentNullException(nameof(keyParam));
-
             var fullRequestUri = BuildByKeyRequestUri(requestUri, keyParam);

             return restClient.DeleteAsync<TResult>(fullRequestUri, cancellationToken);


Username field is now readable

Username field is now readable

--- src/IFS.Web/Areas/Administration/Views/Authenticate/Login.cshtml
+++ src/IFS.Web/Areas/Administration/Views/Authenticate/Login.cshtml
@@ -17,7 +17,7 @@

-            <input asp-for="UserName" type="password" class="form-control" />
+            <input asp-for="UserName" class="form-control" />


Changed so ManualResetEvent is closed, but not disposable yet

Former-commit-id: a8fb66a6441641562b9a867517c2283506dcf6ca

--- src/MassTransit/Internal/RequestResponse/RequestResponseScope.cs
+++ src/MassTransit/Internal/RequestResponse/RequestResponseScope.cs
@@ -22,16 +22,36 @@
 		private readonly IServiceBus _bus;
 		private readonly Action<IServiceBus> _requestAction;
 		private readonly List<IResponseAction> _responseActions = new List<IResponseAction>();
+		private readonly ManualResetEvent _responseReceived = new ManualResetEvent(false);
 		private TimeSpan _responseTimeout = TimeSpan.MaxValue;
-		private readonly ManualResetEvent _responseReceived = new ManualResetEvent(false);
+		private object _state;
 		private Action _timeoutAction;
-		private object _state;
 		private RegisteredWaitHandle _waitHandle;

 		public RequestResponseScope(IServiceBus bus, Action<IServiceBus> requestAction)
 		{
 			_bus = bus;
 			_requestAction = requestAction;
+		}
+
+		public bool IsCompleted
+		{
+			get { return _responseReceived.WaitOne(0, false); }
+		}
+
+		public WaitHandle AsyncWaitHandle
+		{
+			get { return _responseReceived; }
+		}
+
+		public object AsyncState
+		{
+			get { return _state; }
+		}
+
+		public bool CompletedSynchronously
+		{
+			get { return false; }
 		}

 		public void AddResponseAction(IResponseAction responseAction)
@@ -60,6 +80,53 @@
 			}
 		}

+		public RequestResponseScope TimeoutAfter(TimeSpan span)
+		{
+			_responseTimeout = span;
+
+			return this;
+		}
+
+		public void SetResponseReceived<TMessage>(TMessage message)
+			where TMessage : class
+		{
+			_responseReceived.Set();
+		}
+
+		public RequestResponseScope OnTimeout(Action action)
+		{
+			_timeoutAction = action;
+
+			return this;
+		}
+
+		public IAsyncResult BeginSend(AsyncCallback callback, object state)
+		{
+			_state = state;
+
+			UnsubscribeAction unsubscribeToken = () => true;
+			unsubscribeToken = SubscribeToResponseMessages(unsubscribeToken);
+
+			WaitOrTimerCallback timerCallback = (s, timedOut) =>
+				{
+					unsubscribeToken();
+
+					if (timedOut)
+					{
+						if (_timeoutAction != null)
+							_timeoutAction();
+					}
+
+					callback(this);
+				};
+
+			_waitHandle = ThreadPool.RegisterWaitForSingleObject(_responseReceived, timerCallback, state, _responseTimeout, true);
+
+			InvokeRequestAction();
+
+			return this;
+		}
+
 		private bool WaitForResponseAction()
 		{
 			return _responseReceived.WaitOne(_responseTimeout, true);
@@ -79,71 +146,15 @@
 			return unsubscribeToken;
 		}

-		public RequestResponseScope TimeoutAfter(TimeSpan span)
+		~RequestResponseScope()
 		{
-			_responseTimeout = span;
+			if (_waitHandle != null)
+			{
+				_waitHandle.Unregister(_responseReceived);
+				_waitHandle = null;
+			}

-			return this;
-		}
-
-		public void SetResponseReceived<TMessage>(TMessage message)
-			where TMessage : class
-		{
-			_responseReceived.Set();
-		}
-
-		public RequestResponseScope OnTimeout(Action action)
-		{
-			_timeoutAction = action;
-
-			return this;
-		}
-
-		public IAsyncResult BeginSend(AsyncCallback callback, object state)
-		{
-			_state = state;
-
-			UnsubscribeAction unsubscribeToken = () => true;
-			unsubscribeToken = SubscribeToResponseMessages(unsubscribeToken);
-
-			InvokeRequestAction();
-
-			WaitOrTimerCallback timerCallback = (s, timedOut) =>
-				{
-					unsubscribeToken();
-
-					if (timedOut)
-					{
-						if(_timeoutAction != null)
-							_timeoutAction();
-					}
-
-					callback(this);
-				};
-
-			_waitHandle = ThreadPool.RegisterWaitForSingleObject(_responseReceived, timerCallback, state, _responseTimeout, true);
-
-			return this;
-		}
-
-		public bool IsCompleted
-		{
-			get { return _responseReceived.WaitOne(0, false); }
-		}
-
-		public WaitHandle AsyncWaitHandle
-		{
-			get { return _responseReceived; }
-		}
-
-		public object AsyncState
-		{
-			get { return _state; }
-		}
-
-		public bool CompletedSynchronously
-		{
-			get { return false; }
+			_responseReceived.Close();
 		}
 	}
 }


Store and reuse client certificate task (#43270)

--- src/Middleware/HttpOverrides/src/CertificateForwardingFeature.cs
+++ src/Middleware/HttpOverrides/src/CertificateForwardingFeature.cs
@@ -13,7 +13,7 @@
     private readonly ILogger _logger;
     private readonly StringValues _header;
     private readonly CertificateForwardingOptions _options;
-    private X509Certificate2? _certificate;
+    private Task<X509Certificate2?>? _certificateTask;

     public CertificateForwardingFeature(ILogger logger, StringValues header, CertificateForwardingOptions options)
     {
@@ -24,24 +24,29 @@

     public X509Certificate2? ClientCertificate
     {
-        get
-        {
-            if (_certificate == null)
-            {
-                try
-                {
-                    _certificate = _options.HeaderConverter(_header.ToString());
-                }
-                catch (Exception e)
-                {
-                    _logger.NoCertificate(e);
-                }
-            }
-            return _certificate;
-        }
-        set => _certificate = value;
+        get => GetClientCertificateAsync(CancellationToken.None).Result;
+        set => _certificateTask = value is not null ? Task.FromResult<X509Certificate2?>(value) : null;
     }

     public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken)
-        => Task.FromResult(ClientCertificate);
+    {
+        if (_certificateTask == null)
+        {
+            try
+            {
+                var certificate = _options.HeaderConverter(_header.ToString());
+                _certificateTask = Task.FromResult<X509Certificate2?>(certificate);
+                return _certificateTask;
+            }
+            catch (Exception e)
+            {
+                _logger.NoCertificate(e);
+                return Task.FromResult<X509Certificate2?>(null);
+            }
+        }
+        else
+        {
+            return _certificateTask;
+        }
+    }
 }


[All] Set default if 0

[All] Set default if 0

--- src/MobileApps/MyDriving/MyDriving/ViewModel/ProfileViewModel.cs
+++ src/MobileApps/MyDriving/MyDriving/ViewModel/ProfileViewModel.cs
@@ -199,10 +199,10 @@
                     TotalTrips = currentUser.TotalTrips;
                     FuelUsed = currentUser.FuelConsumption;
                     MaxSpeed = currentUser.MaxSpeed;
-#if DEBUG || XTC
+//#if DEBUG || XTC
                     if (currentUser.Rating == 0)
                         DrivingSkills = 86;
-#endif
+//#endif
                     OnPropertyChanged("Stats");
                 }
                 //update stats here.


Add back running state check

Add back running state check

--- osu.Framework/Audio/Track/TrackBass.cs
+++ osu.Framework/Audio/Track/TrackBass.cs
@@ -213,10 +213,12 @@
         {
             base.UpdateState();

+            var running = isRunningState(bassMixer.ChannelIsActive(this));
+
             // because device validity check isn't done frequently, when switching to "No sound" device,
             // there will be a brief time where this track will be stopped, before we resume it manually (see comments in UpdateDevice(int).)
             // this makes us appear to be playing, even if we may not be.
-            isRunning = isPlayed && !hasCompleted;
+            isRunning = running || (isPlayed && !hasCompleted);

             updateCurrentTime();