Read more sigs

Read more sigs

--- dot10/dotNET/Hi/SignatureReader.cs
+++ dot10/dotNET/Hi/SignatureReader.cs
@@ -1,4 +1,5 @@
-using dot10.IO;
+using System.Collections.Generic;
+using dot10.IO;
 using dot10.dotNET.MD;

 namespace dot10.dotNET.Hi {
@@ -8,6 +9,7 @@
 	class SignatureReader {
 		ModuleDefMD readerModule;
 		IImageStream reader;
+		uint sigLen;

 		/// <summary>
 		/// Reads a signature from the #Blob stream
@@ -40,6 +42,8 @@
 		/// </summary>
 		/// <returns>A new <see cref="ISignature"/> instance</returns>
 		ISignature Read() {
+			if (!reader.ReadCompressedUInt32(out sigLen))
+				return null;
 			var callingConvention = (CallingConvention)reader.ReadByte();
 			switch (callingConvention & CallingConvention.Mask) {
 			case CallingConvention.Default:
@@ -48,16 +52,22 @@
 			case CallingConvention.ThisCall:
 			case CallingConvention.FastCall:
 			case CallingConvention.VarArg:
+				return ReadMethod(callingConvention);
+
+			case CallingConvention.Field:
+				return ReadField(callingConvention);
+
 			case CallingConvention.LocalSig:
+				return ReadLocalSig(callingConvention);
+
 			case CallingConvention.Property:
+				return ReadProperty(callingConvention);
+
 			case CallingConvention.Unmanaged:
 			case CallingConvention.GenericInst:
 			case CallingConvention.NativeVarArg:
 			default:
 				return null;
-
-			case CallingConvention.Field:
-				return ReadField(callingConvention);
 			}
 		}

@@ -67,8 +77,69 @@
 		/// <param name="callingConvention">First byte of signature</param>
 		/// <returns>A new <see cref="FieldSig"/> instance</returns>
 		FieldSig ReadField(CallingConvention callingConvention) {
-			var type = ReadType();
-			return null;
+			return new FieldSig(ReadType(), callingConvention);
+		}
+
+		/// <summary>
+		/// Reads a <see cref="MethodSig"/>
+		/// </summary>
+		/// <param name="callingConvention">First byte of signature</param>
+		/// <returns>A new <see cref="MethodSig"/> instance</returns>
+		MethodSig ReadMethod(CallingConvention callingConvention) {
+			return ReadSig(new MethodSig(callingConvention));
+		}
+
+		/// <summary>
+		/// Reads a <see cref="PropertySig"/>
+		/// </summary>
+		/// <param name="callingConvention">First byte of signature</param>
+		/// <returns>A new <see cref="PropertySig"/> instance</returns>
+		PropertySig ReadProperty(CallingConvention callingConvention) {
+			return ReadSig(new PropertySig(callingConvention));
+		}
+
+		T ReadSig<T>(T methodSig) where T : MethodBaseSig {
+			if (methodSig.Generic) {
+				uint count;
+				if (!reader.ReadCompressedUInt32(out count))
+					return null;
+				methodSig.GenParamCount = count;
+			}
+
+			var parameters = methodSig.Params;
+			uint numParams;
+			if (!reader.ReadCompressedUInt32(out numParams))
+				return null;
+
+			methodSig.RetType = ReadType();
+
+			for (uint i = 0; i < numParams; i++) {
+				var type = ReadType();
+				if (type is SentinelSig && methodSig.ParamsAfterSentinel == null) {
+					methodSig.ParamsAfterSentinel = parameters = new List<ITypeSig>((int)(numParams - i));
+					i--;
+				}
+				else
+					parameters.Add(type);
+			}
+
+			return methodSig;
+		}
+
+		/// <summary>
+		/// Reads a <see cref="LocalVarSig"/>
+		/// </summary>
+		/// <param name="callingConvention">First byte of signature</param>
+		/// <returns>A new <see cref="LocalVarSig"/> instance</returns>
+		LocalVarSig ReadLocalSig(CallingConvention callingConvention) {
+			uint count;
+			if (!reader.ReadCompressedUInt32(out count))
+				return null;
+			var sig = new LocalVarSig(callingConvention, count);
+			var locals = sig.Locals;
+			for (uint i = 0; i < count; i++)
+				locals.Add(ReadType());
+			return sig;
 		}

 		/// <summary>
@@ -99,23 +170,23 @@

 			case ElementType.Ptr: return new PtrSig(ReadType());
 			case ElementType.ByRef: return new ByRefSig(ReadType());
-			case ElementType.ValueType: return new ValueTypeSig(ReadType());
-			case ElementType.Class: return new ClassSig(ReadType());
+			case ElementType.ValueType: return new ValueTypeSig(ReadTypeDefOrRef());
+			case ElementType.Class: return new ClassSig(ReadTypeDefOrRef());
 			case ElementType.SZArray: return new SZArraySig(ReadType());
 			case ElementType.CModReqd: return new CModReqdSig(ReadTypeDefOrRef(), ReadType());
 			case ElementType.CModOpt: return new CModOptSig(ReadTypeDefOrRef(), ReadType());
-			case ElementType.Sentinel: return new SentinelSig(ReadType());
+			case ElementType.Sentinel: return new SentinelSig();
 			case ElementType.Pinned: return new PinnedSig(ReadType());

 			case ElementType.Var:
 				if (!reader.ReadCompressedUInt32(out num))
 					return null;
-				return new VarSig(num);
+				return new GenericVar(num);

 			case ElementType.MVar:
 				if (!reader.ReadCompressedUInt32(out num))
 					return null;
-				return new MVarSig(num);
+				return new GenericMVar(num);

 			case ElementType.Array:
 			case ElementType.GenericInst:
@@ -136,6 +207,7 @@
 			uint codedToken;
 			if (!reader.ReadCompressedUInt32(out codedToken))
 				return null;
+			//TODO: Perhaps we should read this lazily. If so, update ValueTypeSig, etc to take a coded token
 			return readerModule.ResolveTypeDefOrRef(codedToken);
 		}
 	}


Fix nullreferenceexception

Fix nullreferenceexception

--- Swashbuckle.Examples/Examples/ExamplesOperationFilter.cs
+++ Swashbuckle.Examples/Examples/ExamplesOperationFilter.cs
@@ -26,7 +26,7 @@
             {
                 var schema = schemaRegistry.GetOrRegister(attr.RequestType);

-                var parameter = operation.parameters.FirstOrDefault(p => p.@in == "body" && (p.schema.@ref == schema.@ref || p.schema.items.@ref == schema.@ref));
+                var parameter = operation.parameters.FirstOrDefault(p => p.@in == "body" && (p.schema?.@ref == schema.@ref || p.schema?.items?.@ref == schema.@ref));

                 if (parameter != null)
                 {


LineLoopRecognizer

LineLoopRecognizer

--- CSharpGL/OpenGLObjects/ColorCodedPicking/PrimivitiveRecognizers/LineLoopRecognizer.cs
+++ CSharpGL/OpenGLObjects/ColorCodedPicking/PrimivitiveRecognizers/LineLoopRecognizer.cs
@@ -12,10 +12,30 @@
             uint lastVertexId, IntPtr pointer, OneIndexBufferPtr oneIndexBufferPtr)
         {
             var lastIndexIdList = new List<RecognizedPrimitiveIndex>();
-            int length = oneIndexBufferPtr.Length;
-            unsafe
-            {
-                var array = (uint*)pointer.ToPointer();
+            switch (oneIndexBufferPtr.Type)
+            {
+                case IndexElementType.UnsignedByte:
+                    RecognizeByte(lastVertexId, pointer, oneIndexBufferPtr, lastIndexIdList);
+                    break;
+                case IndexElementType.UnsignedShort:
+                    RecognizeUShort(lastVertexId, pointer, oneIndexBufferPtr, lastIndexIdList);
+                    break;
+                case IndexElementType.UnsignedInt:
+                    RecognizeUInt(lastVertexId, pointer, oneIndexBufferPtr, lastIndexIdList);
+                    break;
+                default:
+                    throw new NotImplementedException();
+            }
+
+            return lastIndexIdList;
+        }
+
+        private void RecognizeByte(uint lastVertexId, IntPtr pointer, OneIndexBufferPtr oneIndexBufferPtr, List<RecognizedPrimitiveIndex> lastIndexIdList)
+        {
+            int length = oneIndexBufferPtr.Length;
+            unsafe
+            {
+                var array = (byte*)pointer.ToPointer();
                 for (uint i = 1; i < length; i++)
                 {
                     if (array[i - 0] == lastVertexId)
@@ -34,18 +54,89 @@
                     lastIndexIdList.Add(item);
                 }
             }
-
-            return lastIndexIdList;
+        }
+
+        private void RecognizeUShort(uint lastVertexId, IntPtr pointer, OneIndexBufferPtr oneIndexBufferPtr, List<RecognizedPrimitiveIndex> lastIndexIdList)
+        {
+            int length = oneIndexBufferPtr.Length;
+            unsafe
+            {
+                var array = (ushort*)pointer.ToPointer();
+                for (uint i = 1; i < length; i++)
+                {
+                    if (array[i - 0] == lastVertexId)
+                    {
+                        var item = new RecognizedPrimitiveIndex(lastVertexId, i - 0);
+                        item.IndexIdList.Add(array[i - 1]);
+                        item.IndexIdList.Add(array[i - 0]);
+                        lastIndexIdList.Add(item);
+                    }
+                }
+                if (array[0] == lastVertexId)
+                {
+                    var item = new RecognizedPrimitiveIndex(lastVertexId, 0 - 0);
+                    item.IndexIdList.Add(array[length - 1]);
+                    item.IndexIdList.Add(array[0 - 0]);
+                    lastIndexIdList.Add(item);
+                }
+            }
+        }
+
+        private void RecognizeUInt(uint lastVertexId, IntPtr pointer, OneIndexBufferPtr oneIndexBufferPtr,
+            List<RecognizedPrimitiveIndex> lastIndexIdList)
+        {
+            int length = oneIndexBufferPtr.Length;
+            unsafe
+            {
+                var array = (uint*)pointer.ToPointer();
+                for (uint i = 1; i < length; i++)
+                {
+                    if (array[i - 0] == lastVertexId)
+                    {
+                        var item = new RecognizedPrimitiveIndex(lastVertexId, i - 0);
+                        item.IndexIdList.Add(array[i - 1]);
+                        item.IndexIdList.Add(array[i - 0]);
+                        lastIndexIdList.Add(item);
+                    }
+                }
+                if (array[0] == lastVertexId)
+                {
+                    var item = new RecognizedPrimitiveIndex(lastVertexId, 0 - 0);
+                    item.IndexIdList.Add(array[length - 1]);
+                    item.IndexIdList.Add(array[0 - 0]);
+                    lastIndexIdList.Add(item);
+                }
+            }
         }

         public override List<RecognizedPrimitiveIndex> Recognize(
             uint lastVertexId, IntPtr pointer, OneIndexBufferPtr oneIndexBufferPtr, uint primitiveRestartIndex)
         {
             var lastIndexIdList = new List<RecognizedPrimitiveIndex>();
-            int length = oneIndexBufferPtr.Length;
-            unsafe
-            {
-                var array = (uint*)pointer.ToPointer();
+            switch (oneIndexBufferPtr.Type)
+            {
+                case IndexElementType.UnsignedByte:
+                    RecognizeByte(lastVertexId, pointer, oneIndexBufferPtr, lastIndexIdList, primitiveRestartIndex);
+                    break;
+                case IndexElementType.UnsignedShort:
+                    RecognizeUShort(lastVertexId, pointer, oneIndexBufferPtr, lastIndexIdList, primitiveRestartIndex);
+                    break;
+                case IndexElementType.UnsignedInt:
+                    RecognizeUInt(lastVertexId, pointer, oneIndexBufferPtr, lastIndexIdList, primitiveRestartIndex);
+                    break;
+                default:
+                    throw new NotImplementedException();
+            }
+
+            return lastIndexIdList;
+        }
+
+        private void RecognizeByte(uint lastVertexId, IntPtr pointer, OneIndexBufferPtr oneIndexBufferPtr, List<RecognizedPrimitiveIndex> lastIndexIdList, uint primitiveRestartIndex)
+        {
+            int length = oneIndexBufferPtr.Length;
+            unsafe
+            {
+                var array = (byte*)pointer.ToPointer();
                 for (uint i = 1; i < length; i++)
                 {
                     if (array[i - 0] == lastVertexId)
@@ -70,8 +161,70 @@
                     }
                 }
             }
-
-            return lastIndexIdList;
+        }
+
+        private void RecognizeUShort(uint lastVertexId, IntPtr pointer, OneIndexBufferPtr oneIndexBufferPtr, List<RecognizedPrimitiveIndex> lastIndexIdList, uint primitiveRestartIndex)
+        {
+            int length = oneIndexBufferPtr.Length;
+            unsafe
+            {
+                var array = (ushort*)pointer.ToPointer();
+                for (uint i = 1; i < length; i++)
+                {
+                    if (array[i - 0] == lastVertexId)
+                    {
+                        if (array[i - 1] != primitiveRestartIndex)
+                        {
+                            var item = new RecognizedPrimitiveIndex(lastVertexId, i - 0);
+                            item.IndexIdList.Add(array[i - 1]);
+                            item.IndexIdList.Add(array[i - 0]);
+                            lastIndexIdList.Add(item);
+                        }
+                    }
+                }
+                if (array[0] == lastVertexId)
+                {
+                    if (array[length - 1] != primitiveRestartIndex)
+                    {
+                        var item = new RecognizedPrimitiveIndex(lastVertexId, 0 - 0);
+                        item.IndexIdList.Add(array[length - 1]);
+                        item.IndexIdList.Add(array[0 - 0]);
+                        lastIndexIdList.Add(item);
+                    }
+                }
+            }
+        }
+
+        private void RecognizeUInt(uint lastVertexId, IntPtr pointer, OneIndexBufferPtr oneIndexBufferPtr, List<RecognizedPrimitiveIndex> lastIndexIdList, uint primitiveRestartIndex)
+        {
+            int length = oneIndexBufferPtr.Length;
+            unsafe
+            {
+                var array = (uint*)pointer.ToPointer();
+                for (uint i = 1; i < length; i++)
+                {
+                    if (array[i - 0] == lastVertexId)
+                    {
+                        if (array[i - 1] != primitiveRestartIndex)
+                        {
+                            var item = new RecognizedPrimitiveIndex(lastVertexId, i - 0);
+                            item.IndexIdList.Add(array[i - 1]);
+                            item.IndexIdList.Add(array[i - 0]);
+                            lastIndexIdList.Add(item);
+                        }
+                    }
+                }
+                if (array[0] == lastVertexId)
+                {
+                    if (array[length - 1] != primitiveRestartIndex)
+                    {
+                        var item = new RecognizedPrimitiveIndex(lastVertexId, 0 - 0);
+                        item.IndexIdList.Add(array[length - 1]);
+                        item.IndexIdList.Add(array[0 - 0]);
+                        lastIndexIdList.Add(item);
+                    }
+                }
+            }
         }

     }


tracing phase duration

tracing phase duration

--- src/Peachpie.CodeAnalysis/Utilities/CompilerLogSource.cs
+++ src/Peachpie.CodeAnalysis/Utilities/CompilerLogSource.cs
@@ -119,7 +119,10 @@

         public static void TrackMetric(TimeSpanMetric metric)
         {
-            Log.TrackMetric(metric.Source, metric.Message, (long)(DateTime.UtcNow - metric.Start).TotalMilliseconds, "ms");
+            var ms = (long)(DateTime.UtcNow - metric.Start).TotalMilliseconds;
+
+            Trace.WriteLine($"{metric.Message}: {ms} ms");
+            Log.TrackMetric(metric.Source, metric.Message, ms, "ms");
         }

         /// <summary>


add comments in Global.asax to explain what the code does

--- src/RedisStackOverflow/RedisStackOverflow/Global.asax.cs
+++ src/RedisStackOverflow/RedisStackOverflow/Global.asax.cs
@@ -14,7 +14,10 @@

 		public override void Configure(Container container)
 		{
+		    //Show StackTrace in Web Service Exceptions
 			SetConfig(new EndpointHostConfig { DebugMode = true });
+
+			//Register any dependencies you want injected into your services
 			container.Register<IRedisClientsManager>(c => new PooledRedisClientManager());
 			container.Register<IRepository>(c => new Repository(c.Resolve<IRedisClientsManager>()));
 		}


Added seekCodes to GetAdTests since the SEEK codes should also be returned when the advertisement is retrieved.

--- src/SEEK.AdPostingApi.SampleConsumer.Tests/GetAdTests.cs
+++ src/SEEK.AdPostingApi.SampleConsumer.Tests/GetAdTests.cs
@@ -97,6 +97,13 @@
                         standoutBullet1 = "Uzi",
                         standoutBullet2 = "Remington Model",
                         standoutBullet3 = "AK-47",
+                        seekCodes = new[]
+                        {
+                            "SK010001Z",
+                            "SK010010z",
+                            "SK0101OOZ",
+                            "SK910101A"
+                        },
                         additionalProperties = new[] { AdditionalPropertyType.ResidentsOnly.ToString() },
                         _links = new
                         {


use -1 as failure flax decoding password iterations

--- src/BrockAllen.MembershipReboot/Services/Crypto/CryptoHelper.cs
+++ src/BrockAllen.MembershipReboot/Services/Crypto/CryptoHelper.cs
@@ -62,7 +62,7 @@
             {
                 return val;
             }
-            return 0;
+            return -1;
         }

         // from OWASP : https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet


Update GitHubMarkdownProcessor.cs

Update GitHubMarkdownProcessor.cs

--- src/CaptureSnippetsSimple/Processing/GitHubMarkdownProcessor.cs
+++ src/CaptureSnippetsSimple/Processing/GitHubMarkdownProcessor.cs
@@ -43,14 +43,14 @@
         internal static void Run(string targetDirectory, List<string> snippetSourceFiles)
         {
             log($"Searching {snippetSourceFiles.Count} files for snippets");
-            var finder = new FileFinder(path => true, IsSourceMd);
+            var mdFinder = new FileFinder(path => true, IsSourceMd);
             var snippets = FileSnippetExtractor.Read(snippetSourceFiles).ToList();
             log($"Found {snippets.Count} snippets");
             var handling = new GitHubSnippetMarkdownHandling(targetDirectory);
             var processor = new MarkdownProcessor(snippets, handling.AppendGroup);
-            var sourceFiles = finder.FindFiles(targetDirectory);
-            log($"Found {sourceFiles.Count} .source.md files");
-            foreach (var sourceFile in sourceFiles)
+            var sourceMdFiles = mdFinder.FindFiles(targetDirectory);
+            log($"Found {sourceMdFiles.Count} .source.md files");
+            foreach (var sourceFile in sourceMdFiles)
             {
                 ProcessFile(sourceFile, processor);
             }


Added the missing defaults to the ApplicationBarBehaviour Dependency Properties

--- src/Cimbalino.Phone.Toolkit/Behaviors/ApplicationBarBehavior.cs
+++ src/Cimbalino.Phone.Toolkit/Behaviors/ApplicationBarBehavior.cs
@@ -191,7 +191,7 @@
         /// Identifier for the <see cref="IsMenuEnabled" /> dependency property
         /// </summary>
         public static readonly DependencyProperty IsMenuEnabledProperty =
-            DependencyProperty.Register("IsMenuEnabled", typeof(bool), typeof(ApplicationBarBehavior), new PropertyMetadata(OnIsMenuEnabledChanged));
+            DependencyProperty.Register("IsMenuEnabled", typeof(bool), typeof(ApplicationBarBehavior), new PropertyMetadata(true, OnIsMenuEnabledChanged));

         /// <summary>
         /// Called after the menu enabled state of the Application Bar is changed.
@@ -226,7 +226,7 @@
         /// Identifier for the <see cref="IsVisible" /> dependency property
         /// </summary>
         public static readonly DependencyProperty IsVisibleProperty =
-            DependencyProperty.Register("IsVisible", typeof(bool), typeof(ApplicationBarBehavior), new PropertyMetadata(OnIsVisibleChanged));
+            DependencyProperty.Register("IsVisible", typeof(bool), typeof(ApplicationBarBehavior), new PropertyMetadata(true, OnIsVisibleChanged));

         /// <summary>
         /// Called after the visible state of the Application Bar is changed.
@@ -261,7 +261,7 @@
         /// Identifier for the <see cref="Mode" /> dependency property
         /// </summary>
         public static readonly DependencyProperty ModeProperty =
-            DependencyProperty.Register("Mode", typeof(ApplicationBarMode), typeof(ApplicationBarBehavior), new PropertyMetadata(OnModeChanged));
+            DependencyProperty.Register("Mode", typeof(ApplicationBarMode), typeof(ApplicationBarBehavior), new PropertyMetadata(ApplicationBarMode.Default, OnModeChanged));

         /// <summary>
         /// Called after the size of the ApplicationBar is changed.
@@ -296,7 +296,7 @@
         /// Identifier for the <see cref="Opacity" /> dependency property
         /// </summary>
         public static readonly DependencyProperty OpacityProperty =
-            DependencyProperty.Register("Opacity", typeof(double), typeof(ApplicationBarBehavior), new PropertyMetadata(OnOpacityChanged));
+            DependencyProperty.Register("Opacity", typeof(double), typeof(ApplicationBarBehavior), new PropertyMetadata(1.0, OnOpacityChanged));

         /// <summary>
         /// Called after the opacity of the ApplicationBar is changed.


修改UnitOfWork实现

修改UnitOfWork实现

--- src/DDDLite.Repositories.EntityFramework/UnitOfWorkDbContext.cs
+++ src/DDDLite.Repositories.EntityFramework/UnitOfWorkDbContext.cs
@@ -38,9 +38,10 @@
       }
       catch (DbUpdateConcurrencyException ex)
       {
-        foreach (var item in this.ChangeTracker.Entries())
+        var entries = this.ChangeTracker.Entries().ToList();
+        for (var i = 0; i < entries.Count; i++)
         {
-          item.State = EntityState.Detached;
+          entries[0].State = EntityState.Detached;
         }

         throw new ConcurrencyException(ex);


加入发布数据库功能

加入发布数据库功能

--- sqlitemodel/sqlitemodel/Sheet1.cs
+++ sqlitemodel/sqlitemodel/Sheet1.cs
@@ -857,7 +857,80 @@
             saveFileDialog.FilterIndex = 1;
             if (saveFileDialog.ShowDialog() == DialogResult.OK)
             {
-                string fName = openFileDialog.FileName;
+                string fName = saveFileDialog.FileName;
+
+                //  创建一个数据库
+                System.Data.SQLite.SQLiteConnection.CreateFile(fName);
+
+                //  将该新的数据库attach到当前连接，以便可以访问
+                SQLiteCommand sqCommand = this.connection.CreateCommand();
+                sqCommand.CommandText = "attach '" + fName + "' as ReleaseDB";
+
+                sqCommand.ExecuteNonQuery();
+
+
+                ArrayList tableNamelist = new ArrayList();
+                //  查询出所有的数据表
+                sqCommand.CommandText = "select dbtablename from tabledefine group by dbtablename";
+                SQLiteDataReader sqReader = sqCommand.ExecuteReader();
+                while (sqReader.Read())
+                {
+                    string sTableName = sqReader.GetString(0);
+                    tableNamelist.Add(sTableName);
+                }
+                sqReader.Close();
+
+                //  在ReleaseDB中创建所有的数据表
+                for (int i = 0; i < tableNamelist.Count; ++i)
+                {
+                    ArrayList toCreateIndexFieldName = new ArrayList();
+
+                    string sTableName = (string)tableNamelist[i];
+                    string sTableCreateSql = "create table ReleaseDB." + sTableName + " (";
+                    string sCopyDataSql = "insert into ReleaseDB." + sTableName + " select ";
+                    sqCommand.CommandText = "select fieldtype,dbfieldname,iscreateindex from tabledefine where dbtablename='" + sTableName + "'";
+                    sqReader = sqCommand.ExecuteReader();
+                    bool bFirstAdd = true;
+                    while (sqReader.Read())
+                    {
+                        if (bFirstAdd)
+                        {
+                            sTableCreateSql += sqReader.GetString(1) + " " + sqReader.GetString(0) + " not null ";
+                            sCopyDataSql += sqReader.GetString(1);
+                            bFirstAdd = false;
+                        }
+                        else
+                        {
+                            sTableCreateSql += ", " + sqReader.GetString(1) + " " + sqReader.GetString(0) + " not null ";
+                            sCopyDataSql += "," + sqReader.GetString(1);
+                        }
+                        int nCreateIndex = sqReader.GetInt32(2);
+                        if (nCreateIndex == 1)
+                        {
+                            toCreateIndexFieldName.Add(sqReader.GetString(1));
+                        }
+                    }
+                    sqReader.Close();
+
+                    sTableCreateSql += ")";
+                    sCopyDataSql += " from " + sTableName;
+
+                    sqCommand.CommandText = sTableCreateSql;
+                    sqCommand.ExecuteNonQuery();
+
+                    //  创建索引
+                    for (int index = 0; index < toCreateIndexFieldName.Count; ++index)
+                    {
+                        string sToCreateIndexFieldName = (string)toCreateIndexFieldName[index];
+                        sqCommand.CommandText = "create index ReleaseDB." + sTableName + "_" + sToCreateIndexFieldName + " on " + sTableName + "(" + sToCreateIndexFieldName + ")";
+                        sqCommand.ExecuteNonQuery();
+                    }
+
+                    //  拷贝数据
+                    sqCommand.CommandText = sCopyDataSql;
+                    sqCommand.ExecuteNonQuery();
+                }
+                MessageBox.Show("数据发布成功!!!  数据库位置为" + fName, "发布成功！", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
     }


Duplication of items is resolved

Duplication of items is resolved

--- src/DatenMeister/Modules/DefaultTypes/DefaultClassifierHints.cs
+++ src/DatenMeister/Modules/DefaultTypes/DefaultClassifierHints.cs
@@ -153,6 +153,7 @@
             }
             else
             {
+                var hadPackagedElement = false;
                 if (metaClass != null)
                 {
                     var compositing = ClassifierMethods.GetCompositingProperties(metaClass).ToList();
@@ -160,13 +161,22 @@
                     {
                         foreach (var composite in compositing)
                         {
-                            yield return NamedElementMethods.GetName(composite);
+                            var name = NamedElementMethods.GetName(composite);
+                            if (name == _UML._Packages._Package.packagedElement)
+                            {
+                                hadPackagedElement = true;
+                            }
+
+                            yield return name;
                         }
                     }
                 }
-
-
-                yield return _UML._Packages._Package.packagedElement;
+
+                // If we know nothing, then add the packaged element
+                if (!hadPackagedElement)
+                {
+                    yield return _UML._Packages._Package.packagedElement;
+                }
             }
         }


Fix build break

Fix build break

--- src/System.Diagnostics.Tracer/Properties/AssemblyInfo.cs
+++ src/System.Diagnostics.Tracer/Properties/AssemblyInfo.cs
@@ -7,6 +7,6 @@

 [assembly: InternalsVisibleTo("System.Diagnostics.Tracer.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010027dae7b9c059832ce5c6555903c9ca7b39acb047f61d7515b2eee5ccd68b27bf4301b29c2c01e12f0a1a98dd3608a1d5591944bfb831f5e3a89b94bd81eda2fe15a8731bcf1a675052be7f116183f253822f8760fb8c487c38d2dc0dd8e68aeeeb5b6ca739b883a0b443897a39e79e6abab4789852e9f25fa02069f741c364f0")]

-[assembly: AssemblyVersion(ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + ".0)]
+[assembly: AssemblyVersion(ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + ".0")]
 [assembly: AssemblyFileVersion (ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch)]
 [assembly: AssemblyInformationalVersion(ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch + "-" + ThisAssembly.Git.Branch + "+" + ThisAssembly.Git.Commit)]


Fix ordering of arguments in OverlappedTests

--- src/System.Threading.Overlapped/tests/OverlappedTests.cs
+++ src/System.Threading.Overlapped/tests/OverlappedTests.cs
@@ -19,26 +19,26 @@

         Assert.Null(obj.AsyncResult);
         obj.AsyncResult = asyncResult;
-        Assert.Same(obj.AsyncResult, asyncResult);
-
-#pragma warning disable 618
-        Assert.Equal(obj.EventHandle, 0);
+        Assert.Same(asyncResult, obj.AsyncResult);
+
+#pragma warning disable 618
+        Assert.Equal(0, obj.EventHandle);
         obj.EventHandle = 3;
-        Assert.Equal(obj.EventHandle, 3);
+        Assert.Equal(3, obj.EventHandle);
 #pragma warning restore 618

         var _handle = new ManualResetEvent(false).SafeWaitHandle;
-        Assert.NotSame(obj.EventHandleIntPtr, IntPtr.Zero);
+        Assert.NotSame(IntPtr.Zero, obj.EventHandleIntPtr);
         obj.EventHandleIntPtr = _handle.DangerousGetHandle();
-        Assert.Equal(obj.EventHandleIntPtr, _handle.DangerousGetHandle());
-
-        Assert.Equal(obj.OffsetHigh, 0);
+        Assert.Equal(_handle.DangerousGetHandle(), obj.EventHandleIntPtr);
+
+        Assert.Equal(0, obj.OffsetHigh);
         obj.OffsetHigh = 3;
-        Assert.Equal(obj.OffsetHigh, 3);
-
-        Assert.Equal(obj.OffsetLow, 0);
+        Assert.Equal(3, obj.OffsetHigh);
+
+        Assert.Equal(0, obj.OffsetLow);
         obj.OffsetLow = 1;
-        Assert.Equal(obj.OffsetLow, 1);
+        Assert.Equal(1, obj.OffsetLow);
     }

     [Fact]
@@ -50,13 +50,13 @@

 #pragma warning disable 618
         var obj = new Overlapped(1, 3, _event.Handle.ToInt32(), asyncResult);
-        Assert.Equal(obj.EventHandle, _event.Handle.ToInt32());
-#pragma warning restore 618
-
-        Assert.Same(obj.AsyncResult, asyncResult);
-        Assert.Equal(obj.EventHandleIntPtr, _handle.DangerousGetHandle());
-        Assert.Equal(obj.OffsetHigh, 3);
-        Assert.Equal(obj.OffsetLow, 1);
+        Assert.Equal(_event.Handle.ToInt32(), obj.EventHandle);
+#pragma warning restore 618
+
+        Assert.Same(asyncResult, obj.AsyncResult);
+        Assert.Equal(_handle.DangerousGetHandle(), obj.EventHandleIntPtr);
+        Assert.Equal(3, obj.OffsetHigh);
+        Assert.Equal(1, obj.OffsetLow);
     }

     [Fact]
@@ -66,15 +66,15 @@
         var _event = new ManualResetEvent(false);
         var _handle = _event.SafeWaitHandle;
         var obj = new Overlapped(1, 3, _handle.DangerousGetHandle(), asyncResult);
-        Assert.Same(obj.AsyncResult, asyncResult);
-
-#pragma warning disable 618
-        Assert.Equal(obj.EventHandle, _event.Handle.ToInt32());
-#pragma warning restore 618
-
-        Assert.Equal(obj.EventHandleIntPtr, _handle.DangerousGetHandle());
-        Assert.Equal(obj.OffsetHigh, 3);
-        Assert.Equal(obj.OffsetLow, 1);
+        Assert.Same(asyncResult, obj.AsyncResult);
+
+#pragma warning disable 618
+        Assert.Equal(_event.Handle.ToInt32(), obj.EventHandle);
+#pragma warning restore 618
+
+        Assert.Equal(_handle.DangerousGetHandle(), obj.EventHandleIntPtr);
+        Assert.Equal(3, obj.OffsetHigh);
+        Assert.Equal(1, obj.OffsetLow);
     }
     [Fact]
     public static unsafe void PackNegTest()
@@ -82,31 +82,30 @@
         var helper = new AsyncHelper();
         IOCompletionCallback callback = MyCallback(helper);

+        Overlapped ov = new Overlapped();
+        NativeOverlapped* nativeOverlapped = ov.Pack(new IOCompletionCallback(callback), null);
+
+        try
+        {
+            Assert.True(nativeOverlapped != null);
+            Assert.Throws<InvalidOperationException>(() => ov.Pack(new IOCompletionCallback(callback), null));
+        }
+        finally
+        {
+            Overlapped.Free(nativeOverlapped);
+        }
+    }
+
+
+    [Fact]
+    public static unsafe void PackNegTest1()
+    {
+#pragma warning disable 618
+        var helper = new AsyncHelper();
+        IOCompletionCallback callback = MyCallback(helper);
+
         NativeOverlapped* nativeOverlapped;
         Overlapped ov = new Overlapped();
-        nativeOverlapped = ov.Pack(new IOCompletionCallback(callback), null);
-
-        try
-        {
-            Assert.True(nativeOverlapped != null);
-            Assert.Throws<InvalidOperationException>(() => ov.Pack(new IOCompletionCallback(callback), null));
-        }
-        finally
-        {
-            Overlapped.Free(nativeOverlapped);
-        }
-    }
-
-
-    [Fact]
-    public static unsafe void PackNegTest1()
-    {
-#pragma warning disable 618
-        var helper = new AsyncHelper();
-        IOCompletionCallback callback = MyCallback(helper);
-
-        NativeOverlapped* nativeOverlapped;
-        Overlapped ov = new Overlapped();
         nativeOverlapped = ov.Pack(new IOCompletionCallback(callback));

         try
@@ -135,7 +134,7 @@
             Assert.True(null != nativeOverlapped);

             Overlapped ov1 = Overlapped.Unpack(nativeOverlapped);
-            Assert.Same(ov1, ov);
+            Assert.Same(ov, ov1);
         }
         finally
         {


supports one method subscribing multiple messages.

--- src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs
+++ src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs
@@ -58,13 +58,7 @@
                     continue;
                 }

-                foreach (var method in typeInfo.DeclaredMethods)
-                {
-                    var topicAttr = method.GetCustomAttribute<TopicAttribute>(true);
-                    if (topicAttr == null) continue;
-
-                    executorDescriptorList.Add(InitDescriptor(topicAttr, method, typeInfo));
-                }
+                executorDescriptorList.AddRange(GetTopicAttributesDescription(typeInfo));
             }
             return executorDescriptorList;
         }
@@ -82,16 +76,25 @@
                 //double check
                 if (!Helper.IsController(typeInfo)) continue;

-                foreach (var method in typeInfo.DeclaredMethods)
-                {
-                    var topicAttr = method.GetCustomAttribute<TopicAttribute>(true);
-                    if (topicAttr == null) continue;
-
-                    executorDescriptorList.Add(InitDescriptor(topicAttr, method, typeInfo));
-                }
+                executorDescriptorList.AddRange(GetTopicAttributesDescription(typeInfo));
             }

             return executorDescriptorList;
+        }
+
+        private static IEnumerable<ConsumerExecutorDescriptor> GetTopicAttributesDescription(TypeInfo typeInfo)
+        {
+            foreach (var method in typeInfo.DeclaredMethods)
+            {
+                var topicAttrs = method.GetCustomAttributes<TopicAttribute>(true);
+
+                if (topicAttrs.Count() == 0) continue;
+
+                foreach (var attr in topicAttrs)
+                {
+                    yield return InitDescriptor(attr, method, typeInfo);
+                }
+            }
         }

         private static ConsumerExecutorDescriptor InitDescriptor(


Fixed the DataRepositoryTests.

Fixed the DataRepositoryTests.

--- src/Tests/Hadouken.UnitTests/Data/DataRepositoryTests.cs
+++ src/Tests/Hadouken.UnitTests/Data/DataRepositoryTests.cs
@@ -61,7 +61,7 @@

             // Deleting
             repo.Delete(s);
-            Assert.IsTrue(!repo.List<Setting>(st => st.Key == "test").Any());
+            Assert.IsTrue(repo.Single<Setting>(st => st.Key == "test2") == null);
         }
     }
 }


Additional tests for wavelet codes list decoder were added

--- src/Tests/WaveletCodesTools.Tests/GsBasedDecoderTests.cs
+++ src/Tests/WaveletCodesTools.Tests/GsBasedDecoderTests.cs
@@ -68,22 +68,26 @@
         static GsBasedDecoderTests()
         {
             var gf7 = new PrimeOrderField(7);
-            var generationPolynomial = new Polynomial(gf7, 4, 2, 6, 4, 3, 4)
+            var generationPolynomial1 = new Polynomial(gf7, 4, 2, 6, 4, 3, 4)
                                         + new Polynomial(gf7, 1, 2, 1, 5, 2, 1).RightShift(2);
+            var gf11 = new PrimeOrderField(11);
+            var generationPolynomial2 = new Polynomial(gf11, 0, 0, 7, 3, 4, 1, 8, 1, 8, 2, 7, 5);
+            var generationPolynomial3 = new Polynomial(gf11, 0, 0, 2, 0, 10, 9, 3, 9, 3, 10, 2, 2);

-            var informationPolynomial1 = new Polynomial(gf7, 4, 0, 2);
-            var informationPolynomial2 = new Polynomial(gf7, 1, 2, 3);
-            var informationPolynomial3 = new Polynomial(gf7, 6, 4, 1);
-            var informationPolynomial4 = new Polynomial(gf7, 0, 2);
-            var informationPolynomial5 = new Polynomial(gf7, 0, 0, 3);
+            var gf13 = new PrimeOrderField(13);
+            var generationPolynomial4 = new Polynomial(gf13, 0, 0, 0, 8, 1, 12, 2, 11, 5, 6, 4, 2, 3, 12, 2, 4);

             DecoderTestsData = new[]
                                {
-                                   PrepareTestData(6, 3, 3, generationPolynomial, informationPolynomial1, 1),
-                                   PrepareTestData(6, 3, 3, generationPolynomial, informationPolynomial2, 1),
-                                   PrepareTestData(6, 3, 3, generationPolynomial, informationPolynomial3, 1),
-                                   PrepareTestData(6, 3, 3, generationPolynomial, informationPolynomial4, 1),
-                                   PrepareTestData(6, 3, 3, generationPolynomial, informationPolynomial5, 1)
+                                   PrepareTestData(6, 3, 3, generationPolynomial1, new Polynomial(gf7, 4, 0, 2), 1),
+                                   PrepareTestData(6, 3, 3, generationPolynomial1, new Polynomial(gf7, 1, 2, 3), 1),
+                                   PrepareTestData(6, 3, 3, generationPolynomial1, new Polynomial(gf7, 6, 4, 1), 1),
+                                   PrepareTestData(6, 3, 3, generationPolynomial1, new Polynomial(gf7, 0, 2), 1),
+                                   PrepareTestData(6, 3, 3, generationPolynomial1, new Polynomial(gf7, 0, 0, 3), 1),
+                                   PrepareTestData(10, 5, 6, generationPolynomial2, new Polynomial(gf11, 1, 2, 3, 4, 5), 3),
+                                   PrepareTestData(10, 5, 5, generationPolynomial3, new Polynomial(gf11, 1, 2, 3, 4, 5), 2),
+                                   PrepareTestData(12, 6, 6, generationPolynomial4, new Polynomial(gf13, 1, 2, 3, 4, 5, 6), 3),
+                                   PrepareTestData(12, 6, 6, generationPolynomial4, new Polynomial(gf13, 0, 2, 0, 2, 11), 3)
                                };
         }


Update IReadOnlyUserGroup.cs

Update IReadOnlyUserGroup.cs

--- src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs
+++ src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs
@@ -36,5 +36,5 @@

     IEnumerable<int> AllowedLanguages => Enumerable.Empty<int>();

-    public bool HasAccessToLanguage( int languageId) => HasAccessToAllLanguages || AllowedLanguages.Any() is false || AllowedLanguages.Contains(languageId);
+    public bool HasAccessToLanguage( int languageId) => HasAccessToAllLanguages || AllowedLanguages.Contains(languageId);
 }


nullref fix

nullref fix

--- src/Umbraco.Web/Install/HttpInstallAuthorizeAttribute.cs
+++ src/Umbraco.Web/Install/HttpInstallAuthorizeAttribute.cs
@@ -27,7 +27,7 @@

         private IRuntimeState RuntimeState => _runtimeState ?? Current.RuntimeState;

-        private UmbracoContext UmbracoContext => _umbracoContextAccessor.UmbracoContext ?? Current.UmbracoContext;
+        private UmbracoContext UmbracoContext => _umbracoContextAccessor?.UmbracoContext ?? Current.UmbracoContext;

         /// <summary>
         /// THIS SHOULD BE ONLY USED FOR UNIT TESTS


making static

making static

--- src/Grace/DependencyInjection/Lifestyle/SingletonPerAncestor.cs
+++ src/Grace/DependencyInjection/Lifestyle/SingletonPerAncestor.cs
@@ -159,7 +159,7 @@
         /// <param name="activationDelegate"></param>
         /// <param name="uniqueId"></param>
         /// <returns></returns>
-        public T GetValueGuaranteeOnce<T>(IExportLocatorScope scope, IDisposalScope disposalScope, IInjectionContext context, ActivationStrategyDelegate activationDelegate, string uniqueId)
+        public static T GetValueGuaranteeOnce<T>(IExportLocatorScope scope, IDisposalScope disposalScope, IInjectionContext context, ActivationStrategyDelegate activationDelegate, string uniqueId)
         {
             var value = context.SharedData.GetExtraData(uniqueId);


Correct test messages

Correct test messages

--- src/Integration.UnitTests/Connection/ConnectionWorkflowTests.cs
+++ src/Integration.UnitTests/Connection/ConnectionWorkflowTests.cs
@@ -184,7 +184,7 @@

             // Verify
             executionEvents.AssertProgressMessages(connectionMessage, Strings.ConnectionResultFailure);
-            Assert.IsFalse(projectChangedCallbackCalled, "Callback should have been called");
+            Assert.IsFalse(projectChangedCallbackCalled, "Callback should not have been called");
             this.sonarQubeService.AssertConnectRequests(1);
             Assert.IsNull(((ISonarQubeServiceWrapper)this.sonarQubeService).CurrentConnection, "Unexpected connection");
             notifications.AssertNotification(NotificationIds.FailedToConnectId, Strings.ConnectionFailed);
@@ -196,7 +196,7 @@

             // Verify
             executionEvents.AssertProgressMessages(connectionMessage, Strings.ConnectionResultFailure);
-            Assert.IsFalse(projectChangedCallbackCalled, "Callback should have been called");
+            Assert.IsFalse(projectChangedCallbackCalled, "Callback should not have been called");
             this.sonarQubeService.AssertConnectRequests(2);
             Assert.IsNull(((ISonarQubeServiceWrapper)this.sonarQubeService).CurrentConnection, "Unexpected connection");
             notifications.AssertNotification(NotificationIds.FailedToConnectId, Strings.ConnectionFailed);
@@ -213,7 +213,7 @@

             // Verify
             executionEvents.AssertProgressMessages(connectionMessage, Strings.ConnectionResultCancellation);
-            Assert.IsFalse(projectChangedCallbackCalled, "Callback should have been called");
+            Assert.IsFalse(projectChangedCallbackCalled, "Callback should not have been called");
             this.sonarQubeService.AssertConnectRequests(3);
             Assert.IsNull(((ISonarQubeServiceWrapper)this.sonarQubeService).CurrentConnection, "Unexpected connection");
             notifications.AssertNotification(NotificationIds.FailedToConnectId, Strings.ConnectionFailed);


If cleverbot is disabled through permissions, let other things execute

--- src/WizBot/Modules/Games/ChatterBot/ChatterbotService.cs
+++ src/WizBot/Modules/Games/ChatterBot/ChatterbotService.cs
@@ -126,7 +126,7 @@
                     Log.Information("{PermissionMessage}", returnMsg);
                 }

-                return true;
+                return false;
             }

             if (await _ccs.TryBlock(sg, usrMsg.Author, CleverBotResponseStr.CLEVERBOT_RESPONSE))


Clarified role naming convention.

Clarified role naming convention.

--- src/Ivento.Dci.Examples.MoneyTransfer/Contexts/MoneyTransfer.cs
+++ src/Ivento.Dci.Examples.MoneyTransfer/Contexts/MoneyTransfer.cs
@@ -5,7 +5,7 @@
     /// </summary>
     public sealed class MoneyTransfer
     {
-        #region Roles and Role Contracts
+        #region Roles and Role Contracts

         // Roles are an identifier within the Context.
         // The first role of the MoneyTransfer Context is SourceAccount.
@@ -25,9 +25,13 @@
             void Withdraw(decimal amount);
         }

+        // Also note the naming convention for roles: If the role name is "ROLE",
+        // the Role Contract type is "ROLERole".
+
         // The second role of the MoneyTransfer Context is DestinationAccount.
         // Same as for the SourceAccount role, if you reason about Roles you
-        // speak only about their names, not their types.
+        // speak only about their names, not their types. This concept is more
+        // obvious in the Transfer method of the source account below.
         //                              vvvvvvvvvvvvvvvvvv
         internal DestinationAccountRole DestinationAccount { get; set; }

@@ -99,7 +103,7 @@
         public static void Transfer(this MoneyTransfer.SourceAccountRole sourceAccount)
         {
             // First get a reference to the context, MoneyTransfer.
-            // The two parameters is a sanity check that the extension parameter for
+            // The two parameters are a sanity check that the extension parameter for
             // the Role "sourceAccount" is actually the same as the Context property.
             //
             // Using this overload of Context.Current, you can be sure that "sourceAccount"


Add Trello provider (not yet working)

Add Trello provider (not yet working)

--- src/Xamarin.Forms.OAuth/Providers/TrelloOAuthProvider.cs
+++ src/Xamarin.Forms.OAuth/Providers/TrelloOAuthProvider.cs
@@ -1,4 +1,6 @@
-namespace Xamarin.Forms.OAuth.Providers
+using System.Collections.Generic;
+
+namespace Xamarin.Forms.OAuth.Providers
 {
     public sealed class TrelloOAuthProvider : OAuthProvider
     {
@@ -20,7 +22,7 @@

         internal override string GetAuthorizationUrl()
         {
-            return base.GetAuthorizationUrl();
+            return BuildUrl(Definition.AuthorizeUrl, new KeyValuePair<string, string>[] { });
         }
     }
 }


Fixed bug in NotifyingViewport Equals

Fixed bug in NotifyingViewport Equals

--- Mapsui/NotifyingViewport.cs
+++ Mapsui/NotifyingViewport.cs
@@ -20,7 +20,7 @@
         {
             get { return _viewport.Center;  }
             set {
-                if (Equals(_viewport.Center, value)) return;
+                if (_viewport.Center.Equals(value)) return;
                 _viewport.Center = value;
                 OnPropertyChanged("Center");
             }
@@ -120,5 +120,7 @@
             var handler = PropertyChanged;
             handler?.Invoke(this, new PropertyChangedEventArgs(propertyName));
         }
+
+
     }
 }


make reporter static

make reporter static

--- MatterControlApplication.cs
+++ MatterControlApplication.cs
@@ -73,7 +73,7 @@

 #if true//!DEBUG
-		RaygunClient _raygunClient = GetCorrectClient();
+		static RaygunClient _raygunClient = GetCorrectClient();
 #endif

 		static RaygunClient GetCorrectClient()


Delete Add/Remove role message and response over time.

--- Modules/ModerationModule.cs
+++ Modules/ModerationModule.cs
@@ -127,17 +127,18 @@
         async Task AddRole(IRole role, IUser user)
         {
             var contextUser = Context.User as SocketGuildUser;
+            await Context.Message.DeleteAsync();

             if (Settings.IsRoleUserAssignable(role) || (Settings.IsRoleModerationAssignable(role) && Settings.IsUserModSquad(contextUser)))
             {
                 var u = user as IGuildUser;
                 await u.AddRoleAsync(role);
-                await ReplyAsync("Role " + role + " has been added to " + user);
+                await ReplyAsync("Role " + role + " has been added to " + user).DeleteAfterTime(minutes: 5);
                 await _logging.LogAction($"{contextUser.Username} has added role {role} to {u.Username}");
                 return;
             }

-            await ReplyAsync("Bot cannot add this role. Administrator must do it manually.");
+            await ReplyAsync($"Bot cannot add {role.Name} role. Administrator must do it manually.").DeleteAfterSeconds(25);
         }

         [Command("removerole"), Summary("Remove a role from a user")]
@@ -146,18 +147,19 @@
         async Task RemoveRole(IRole role, IUser user)
         {
             var contextUser = Context.User as SocketGuildUser;
+            await Context.Message.DeleteAsync();

             if (Settings.IsRoleUserAssignable(role) || (Settings.IsRoleModerationAssignable(role) && Settings.IsUserModSquad(contextUser)))
             {
                 var u = user as IGuildUser;

                 await u.RemoveRoleAsync(role);
-                await ReplyAsync("Role " + role + " has been removed from " + user);
+                await ReplyAsync("Role " + role + " has been removed from " + user).DeleteAfterTime(minutes: 5);
                 await _logging.LogAction($"{contextUser.Username} has removed role {role} from {u.Username}");
                 return;
             }

-            await ReplyAsync("Bot cannot remove this role. Administrator must do it manually.");
+            await ReplyAsync($"Bot cannot remove {role.Name} role. Administrator must do it manually.").DeleteAfterSeconds(25);
         }

         [Command("clear"), Summary("Remove last x messages")]


Tooltip background & foreground color

Tooltip background & foreground color

--- Msiler/UI/MyControl.xaml.cs
+++ Msiler/UI/MyControl.xaml.cs
@@ -185,7 +185,7 @@
         }

         #region Instruction Hint Tooltip
-        ToolTip toolTip = new ToolTip();
+        readonly ToolTip toolTip = new ToolTip();

         string GetWordUnderCursor(Point p) {
             return AvalonEditHelpers.GetWordOnOffset(BytecodeListing, p);
@@ -267,6 +267,14 @@
         public void ShowToolTip(string content, IHighlightingDefinition highlight = null) {
             var displayOptions = Common.Instance.DisplayOptions;
             toolTip.PlacementTarget = this;
+
+            var bgDColor = VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowBackgroundBrushKey);
+            var bgMColor = Color.FromRgb(bgDColor.R, bgDColor.G, bgDColor.B);
+            toolTip.Background = new SolidColorBrush(bgMColor);
+
+            var fgDColor = VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowTextBrushKey);
+            var fgMColor = Color.FromRgb(fgDColor.R, fgDColor.G, fgDColor.B);
+
             toolTip.Content = new TextEditor {
                 Text = content,
                 HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden,
@@ -274,7 +282,8 @@
                 SyntaxHighlighting = highlight,
                 Background = Brushes.Transparent,
                 FontFamily = new FontFamily(displayOptions.FontName),
-                FontSize = displayOptions.FontSize
+                FontSize = displayOptions.FontSize,
+                Foreground = new SolidColorBrush(fgMColor)
             };
             toolTip.IsOpen = true;
         }


Add IsNullOrWhiteSpace as a static function.

--- NameOf.Fody/ModuleWeaver.cs
+++ NameOf.Fody/ModuleWeaver.cs
@@ -178,7 +178,7 @@
 			String name;
 			try {
 				name = terminal();
-				if (String.IsNullOrWhiteSpace(name))
+				if (IsNullOrWhiteSpace(name))
 					throw new Exception("Name not found.");
 			}
 			catch {
@@ -212,6 +212,12 @@
 			if (i.SequencePoint == null)
 				return "No source line information available.";
 			return String.Format("Source: {0} - line {1}", i.SequencePoint.Document.Url, i.SequencePoint.StartLine);
-		}
-	}
+		}
+
+        public static bool IsNullOrWhiteSpace(string value)
+        {
+            if (value == null) return true;
+            return string.IsNullOrEmpty(value.Trim());
+        }
+	}
 }


Removed IsInSMode and added lockdown constants

--- NtApiDotNet/NtSystemInfo.cs
+++ NtApiDotNet/NtSystemInfo.cs
@@ -410,9 +410,9 @@
         Flag4000000 = 0x4000000,
         Flag8000000 = 0x8000000,
         Flag10000000 = 0x10000000,
-        Flag20000000 = 0x20000000,
-        Flag40000000 = 0x40000000,
-        Flag80000000 = 0x80000000
+        ConditionalLockdown = 0x20000000,
+        NoLockdown = 0x40000000,
+        Lockdown = 0x80000000
     }

     [Flags]
@@ -1179,12 +1179,6 @@
         }

         /// <summary>
-        /// Get flag indicating whether we're running in SMode or not.
-        /// </summary>
-        public static bool IsInSMode => (CodeIntegrityPolicy.Options
-            & (SystemCodeIntegrityPolicyOptions.Flag80000000 | SystemCodeIntegrityPolicyOptions.Flag20000000)) != 0;
-
-        /// <summary>
         /// Get code integrity unlock information.
         /// </summary>
         public static int CodeIntegrityUnlock


Fixing test

Fixing test

--- EFCore.BulkExtensions.Tests/EFCoreBulkUnderlyingTest.cs
+++ EFCore.BulkExtensions.Tests/EFCoreBulkUnderlyingTest.cs
@@ -279,7 +279,11 @@
                 // ItemHistories will also be deleted because of Relationship - ItemId (Delete Rule: Cascade)
                 if (isBulkOperation)
                 {
-                    context.BulkDelete(entities);
+                    context.BulkDelete(entities, new BulkConfig()
+                    {
+                        GetUnderlyingConnection = GetUnderlyingConnection,
+                        GetUnderlyingTransaction =  GetUnderlyingTransaction
+                    });
                 }
                 else
                 {


Gift certificate

Gift certificate

--- Web/Areas/EarlyWarning/Views/GiftCertificate/Edit.cshtml
+++ Web/Areas/EarlyWarning/Views/GiftCertificate/Edit.cshtml
@@ -17,11 +17,11 @@

@Html.Translate("Edit Gift Certificate")

 @section LeftBar
 {
-@Html.Partial("_giftLeftBar")}
+    @Html.Partial("_giftLeftBar")}

 @{ViewBag.IsInEditMode = true; }
-@using (Html.BeginForm("Edit","GiftCertificate",FormMethod.Post,new{id="frm_edit_gift"}))
+@using (Html.BeginForm("Edit", "GiftCertificate", FormMethod.Post, new { id = "frm_edit_gift" }))
 {
     @Html.ValidationSummary(true)

@@ -29,131 +29,131 @@
     @Html.HiddenFor(model => model.rowCount)

-
-

-

-

-                            @Html.LabelFor(model => model.GiftDate, Html.Translate("Gift Date"), new { @class = "cats-date-pref" })
-

-

-                           @Html.TextBoxFor(model => model.GiftDate, new { @class = " cats-datepicker2" })
-                            @Html.ValidationMessageFor(model => model.GiftDate)
-

-

-

-

-                            @Html.LabelFor(model => model.DModeOfTransport, Html.Translate("Mode Of transport"))
-

-

-
-                            @Html.DropDownList("DModeOfTransport", string.Empty)
-
-                            @Html.ValidationMessageFor(model => model.DModeOfTransport)
-

-

-

-

-                            @Html.LabelFor(model => model.ProgramID, Html.Translate("Program"))
-

-

-
-                            @Html.DropDownList("ProgramID", string.Empty)
-                            @Html.ValidationMessageFor(model => model.ProgramID)
-

-

-

-

-                            @Html.LabelFor(model => model.DonorID, Html.Translate("Donor"))
-

-

-
-                            @Html.DropDownList("DonorID", string.Empty)
-                            @Html.ValidationMessageFor(model => model.DonorID)
-

-

-

-

-                            @Html.LabelFor(model => model.DeclarationNumber)
-

-

-
-                            @Html.TextBoxFor(model=>model.DeclarationNumber)
-
-                            @Html.ValidationMessageFor(model => model.DeclarationNumber)
-
-

-

-

-

-                            @Html.LabelFor(model => model.CommodityTypeID, Html.Translate("Commodity Type"))
-

-

-
-                            @Html.DropDownList("CommodityTypeID", string.Empty)
-
-                            @Html.ValidationMessageFor(model => model.CommodityTypeID)
-
-

-

-

-

-

-

-                            @Html.LabelFor(model => model.SINumber, Html.Translate("SI/Batch Number"))
-

-

-                            @Html.TextBoxFor(model => model.SINumber)
-                            @Html.ValidationMessageFor(model => model.SINumber)
-

-

-

-

-                            @Html.LabelFor(model => model.PortName, Html.Translate("Port Name"))
-

-

-                            @Html.TextBoxFor(model => model.PortName)
-                            @Html.ValidationMessageFor(model => model.PortName)
-

-

-

-

-                            @Html.LabelFor(model => model.ReferenceNo, Html.Translate("Reference Number"))
-

-

-                            @Html.TextBoxFor(model => model.ReferenceNo)
-                            @Html.ValidationMessageFor(model => model.ReferenceNo)
-

-

-

-

-                            @Html.LabelFor(model => model.Vessel, Html.Translate("Vessel"))
-

-

-                            @Html.TextBoxFor(model => model.Vessel)
-                            @Html.ValidationMessageFor(model => model.Vessel)
-

-

-

-

-                            @Html.LabelFor(model => model.ETA, Html.Translate("ETA"), new { @class = "cats-date-pref" })
-

-
-

-                         @Html.TextBoxFor(model => model.ETA, new { @class = "cats-datepicker2"})
-                            @Html.ValidationMessageFor(model => model.ETA)
-

-

-

-
+
+

+

+

+                    @Html.LabelFor(model => model.GiftDate, Html.Translate("Gift Date"), new { @class = "cats-date-pref" })
+

+

+                    @Html.TextBoxFor(model => model.GiftDate, new { @class = " cats-datepicker2" })
+                    @Html.ValidationMessageFor(model => model.GiftDate)
+

+

+

+

+                    @Html.LabelFor(model => model.DModeOfTransport, Html.Translate("Mode Of transport"))
+

+

+
+                    @Html.DropDownList("DModeOfTransport", string.Empty)
+
+                    @Html.ValidationMessageFor(model => model.DModeOfTransport)
+

+

+

+

+                    @Html.LabelFor(model => model.ProgramID, Html.Translate("Program"))
+

+

+
+                    @Html.DropDownList("ProgramID", string.Empty)
+                    @Html.ValidationMessageFor(model => model.ProgramID)
+

+

+

+

+                    @Html.LabelFor(model => model.DonorID, Html.Translate("Donor"))
+

+

+
+                    @Html.DropDownList("DonorID", string.Empty)
+                    @Html.ValidationMessageFor(model => model.DonorID)
+

+

+

+

+                    @Html.LabelFor(model => model.DeclarationNumber)
+

+

+
+                    @Html.TextBoxFor(model => model.DeclarationNumber)
+
+                    @Html.ValidationMessageFor(model => model.DeclarationNumber)
+
+

+

+

+

+                    @Html.LabelFor(model => model.CommodityTypeID, Html.Translate("Commodity Type"))
+

+

+
+                    @Html.DropDownList("CommodityTypeID", string.Empty)
+
+                    @Html.ValidationMessageFor(model => model.CommodityTypeID)
+
+

+

+

+

+

+

+                    @Html.LabelFor(model => model.SINumber, Html.Translate("SI/Batch Number"))
+

+

+                    @Html.TextBoxFor(model => model.SINumber)
+                    @Html.ValidationMessageFor(model => model.SINumber)
+

+

+

+

+                    @Html.LabelFor(model => model.PortName, Html.Translate("Port Name"))
+

+

+                    @Html.TextBoxFor(model => model.PortName)
+                    @Html.ValidationMessageFor(model => model.PortName)
+

+

+

+

+                    @Html.LabelFor(model => model.ReferenceNo, Html.Translate("Reference Number"))
+

+

+                    @Html.TextBoxFor(model => model.ReferenceNo)
+                    @Html.ValidationMessageFor(model => model.ReferenceNo)
+

+

+

+

+                    @Html.LabelFor(model => model.Vessel, Html.Translate("Vessel"))
+

+

+                    @Html.TextBoxFor(model => model.Vessel)
+                    @Html.ValidationMessageFor(model => model.Vessel)
+

+

+

+

+                    @Html.LabelFor(model => model.ETA, Html.Translate("ETA"), new { @class = "cats-date-pref" })
+

+
+

+                    @Html.TextBoxFor(model => model.ETA, new { @class = "cats-datepicker2" })
+                    @Html.ValidationMessageFor(model => model.ETA)
+

+

+

+

-   }
-
-   @*
*@
-
-
-                    @(Html.Kendo().Grid<GiftCertificateDetailsViewModel>()
+}
+
+@*
*@
+
+
+@(Html.Kendo().Grid<GiftCertificateDetailsViewModel>()
            .Name("Grid")
            .ToolBar(commands => commands.Create())
            .Editable(editing => editing.Mode(GridEditMode.InCell))
@@ -164,7 +164,7 @@
                                 .Filterable(true);
                             columns.Bound(o => o.BillOfLoading);

-                            columns.Bound(o => o.YearPurchasedPrefered).HtmlAttributes(new { align = "right"}).HeaderHtmlAttributes(new { @class = "cats-date-pref-grid" });
+                            columns.Bound(o => o.YearPurchasedPrefered).HtmlAttributes(new { align = "right" }).HeaderHtmlAttributes(new { @class = "cats-date-pref-grid" });
                             columns.Bound(o => o.AccountNumber).HtmlAttributes(new { align = "right" });
                             columns.Bound(o => o.WeightInMT).Title(Html.Translate("Sent Qty (MT)")).HtmlAttributes(new { align = "right" }).Format("{0:N3}");
                             columns.Bound(o => o.EstimatedPrice).HtmlAttributes(new { align = "right" }).Format("{0:N2}");
@@ -185,10 +185,12 @@
                                        .Create(create => create.Action("GiftCertificateDetail_Create", "GiftCertificate", new { id = Model.GiftCertificateID }))
                                        .Update(update => update.Action("GiftCertificateDetail_Update", "GiftCertificate"))
                                        .Destroy(destroy => destroy.Action("GiftCertificateDetail_Destroy", "GiftCertificate"))
-                                       .Model(m =>  {
-                                                      m.Id(t => t.GiftCertificateDetailID);
-                                                      m.Field(t=>t.CommodityID).DefaultValue(-1);
-                                                  }).Batch(true)
+                                       .Model(m =>
+                                       {
+                                           m.Id(t => t.GiftCertificateDetailID);
+                                           m.Field(t => t.CommodityID).DefaultValue(-1);
+                                       })
+                                                  .Batch(true)
                     .ServerOperation(false)

            )
@@ -198,18 +200,18 @@

                     )
-                    @Html.ValidationMessageFor(model => model.rowCount)
-
-    @*
*@
-
+@Html.ValidationMessageFor(model => model.rowCount)
+
+@*
*@
+


all commented code removed

all commented code removed

--- ExamAssessmentSOAPAPI/ExamassessmentWCF/Service1.svc.cs
+++ ExamAssessmentSOAPAPI/ExamassessmentWCF/Service1.svc.cs
@@ -30,63 +30,63 @@
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spAddExistingCategory(subject, category, myOutputParamInt);
-            //  return int.Parse(myOutputParamInt.Value.ToString());
+
         }
         public void spAddExistingSubtopicToCategory(String subtopic, String category)
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spAddExistingSubtopicToCategory(subtopic, category, myOutputParamInt);
-            //  return int.Parse(myOutputParamInt.Value.ToString());
+
         }
         public void spAddNewCategoryType(String subject, String category)
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spAddExistingSubtopicToCategory(subject, category, myOutputParamInt);
-          //   return int.Parse(myOutputParamInt.Value.ToString());
+
         }
         public void spAddQuestionAsExamQuestion(String ExamQuestionID, int QuestionID, String name, int QuestionType)
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("result", typeof(int));
-          //  myOutputParamInt.Value = 15;
+
             db.spAddQuestionAsExamQuestion(ExamQuestionID, QuestionID,name,QuestionType, myOutputParamInt);
-          //  return 1;//int.Parse(myOutputParamInt.Value.ToString());
+
         }
         public void spAddQuestionCategories(String Categories, int PKID)
         {
             int result = 0;
             db.spAddQuestionCategories(Categories, PKID, result);
-           // return result;
+
         }

         public void spAddQuestionToAnswer(int QuestionID, int AnswerID, bool isCorrect)
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spAddQuestionToAnswer(QuestionID, AnswerID, isCorrect, myOutputParamInt);
-        //    return int.Parse(myOutputParamInt.Value.ToString());
+
         }
         public void spAddQuestionToExam(String ExamID, String ExamQuestionID, int weight)
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spAddQuestionToExam(ExamID, ExamQuestionID, weight, myOutputParamInt);
-          //  return int.Parse(myOutputParamInt.Value.ToString());
+
         }
         public void spAddSubtopicType(string Subtopics, string Category)
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spAddSubtopicType(Subtopics, Category, myOutputParamInt);
-            //return int.Parse(myOutputParamInt.Value.ToString());
+
         }
         public void spDeleteQuestionCategory(String Categories, String ExamID)
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spDeleteQuestionCategory(Categories,ExamID,myOutputParamInt);
-           // return int.Parse(myOutputParamInt.Value.ToString());
+
         }
         public  void spRemoveAnswerFromQuestion(int QuestionID, int AnswerID)
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spRemoveAnswerFromQuestion(QuestionID, AnswerID, myOutputParamInt);
-          //  return int.Parse(myOutputParamInt.Value.ToString());
+
         }

         public void spRemoveQuestionAsExamQuestion(String ExamQuestionID)
@@ -94,13 +94,13 @@
             int result = 0;
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spRemoveQuestionAsExamQuestion(ExamQuestionID, result);
-          //  return result;
+
         }
         public void spRemoveQuestionFromExam(String ExamID, String ExamQuestionID)
         {
             ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
             db.spRemoveQuestionFromExam(ExamID,ExamQuestionID, myOutputParamInt);
-            //return int.Parse(myOutputParamInt.Value.ToString());
+
         }
         public List<ExamQuestion> GetAllExamQuestion()
         {
@@ -118,7 +118,7 @@

-            //  var dbQuestionID = db.ExamQuestionList.Select(s => s.QuestionID);
+
             for (int i = 0; i < dbExamQuestion.Count(); i++)
             {
                 ExamQuestion question     = new ExamQuestion();
@@ -133,7 +133,7 @@

                     cat.Categories_ID = dbCategories.Where(s => s.Categories_ID == dbExamQuestion.ElementAt(i).ExamQuestion_Categories.ElementAt(j).Categories_ID).First().Categories_ID;
                     cat.Categories_Name = dbCategories.Where(s => s.Categories_ID == dbExamQuestion.ElementAt(i).ExamQuestion_Categories.ElementAt(j).Categories_ID).First().Categories_Name;
-                    // Category cat =  Mapper.Map<Category> (dbCategories.Where(s => s.Categories_ID == dbExamQuestion.ElementAt(i).ExamQuestion_Categories.ElementAt(j).Categories_ID));
+
                     List<int> listofSub = dbCatSub.Where(s => s.Categories_ID == cat.Categories_ID).Select(s => s.Subtopic_ID).ToList();
                     for(int k= 0; k < listofSub.Count(); k++)
                     {
@@ -248,19 +248,11 @@

         }

-        //public void DeleteExamQuestion(ExamQuestion examQuestion)
-        //{
-
-        //}

         public ExamTemplate getExamTemplate(String id)
         {

-            #region
-            /* var ExamTemplate = from TempExamTemplate in db.ExamTemplate
-                                where TempExamTemplate.ExamTemplateID == id
-                                select TempExamTemplate;*/
-            #endregion
+
             List<EAD.ExamTemplate> ExamTemplate = db.ExamTemplate.Where(s => s.ExamTemplateID == id).ToList();
             ExamTemplate exam = new ExamTemplate();
             exam.PKID = ExamTemplate.First().PKID;
@@ -269,17 +261,9 @@
             exam.ExamTemplateID = ExamTemplate.FirstOrDefault().ExamTemplateID;
             exam.ExamType.PKID = ExamTemplate.FirstOrDefault().ExamType.PKID;
             exam.ExamType.ExamTypeName = ExamTemplate.FirstOrDefault().ExamType.ExamTypeName;
-            #region
-            /*var ExamTypes = from TempExamType in db.ExamType
-                           where TempExamType.PKID == ExamTemplate.First().ExamTypeID
-                           select TempExamType;*/
-            #endregion
+

-            #region
-            /* var ExamQuestions = from TempExamQuestions in db.ExamTemplateQuestions
-                                where TempExamQuestions.ExamTemplateID == exam.ExamTemplateID
-                                select TempExamQuestions.ExamQuestionID;*/
-            #endregion
+
             List<EAD.ExamTemplateQuestions> ExamQuestions = db.ExamTemplateQuestions.Where(s => s.ExamTemplateID == exam.ExamTemplateID).ToList();
             if(ExamQuestions.Count() < 1)
             {
@@ -294,48 +278,28 @@
                 var dbanswer = db.Answer.ToList();
                 for (int i = 0; i < ExamQuestions.Count(); i++)
                 {
-                    #region
-                    /* var ExamQuestion = (from TempQuest in dbExamQuestion
-                                         where TempQuest.ExamQuestionID == ExamQuestions.ToList().ElementAt(i)
-                                         select TempQuest);*/
-                    #endregion
+
                     List<EAD.ExamQuestion> ExamQuestion = dbExamQuestion.Where(s => s.ExamQuestionID == ExamQuestions.ElementAt(i).ExamQuestionID).ToList();

                     ExamQuestion ExamQ = new ExamQuestion();
-                    #region
-                    //   String tempe = ExamQuestion.ToArray()[0].ExamQuestionID;
-                    //   var jjd = ExamQuestion;
-                    //  EAD.ExamQuestion t = ExamQuestion;
-                    #endregion
+
                     ExamQ.ExamQuestionID = ExamQuestion.ElementAt(0).ExamQuestionID;
                     ExamQ.ExamQuestionName = ExamQuestion.ElementAt(0).ExamQuestionName;
                     ExamQ.PKID = ExamQuestion.ElementAt(0).PKID;
                     ExamQ.QuestionType.PKID = ExamQuestion.ElementAt(0).QuestionType.PKID;
                     ExamQ.QuestionType.QuestionTypeName = ExamQuestion.ElementAt(0).QuestionType.QuestionTypeName;
-                    #region
-                    /*var ExamQuestionList = from TempQuestion in dbExamQuestionList
-                                   where TempQuestion.ExamQuestionID == ExamQ.ExamQuestionID
-                                   select TempQuestion;*/
-                    #endregion
+
                     var ExamQuestionList = dbExamQuestionList.Where(s => s.ExamQuestionID == ExamQ.ExamQuestionID).ToList();
                     for(int j= 0; j < ExamQuestionList.Count(); j++)
                     {
                         int tempID = ExamQuestionList.ElementAt(j).QuestionID;
-                        #region
-                        /*var Question = from TempQuestion in dbquestion
-                                       where TempQuestion.PKID == tempID
-                                       select TempQuestion;*/
-                        #endregion
+
                         List<EAD.Question> Question = dbquestion.Where(s => s.PKID == tempID).ToList();
                         Question quest = new Question();
                         quest.PKID = Question.ElementAt(0).PKID;
                         quest.Description = Question.ElementAt(0).Description;
-                        #region
-                        /* var AnswersID = from QuestionAnswers in dbQuestionAnswers
-                                         where QuestionAnswers.QuestionID == quest.PKID
-                                         select QuestionAnswers;*/
-                        #endregion
+
                         List<EAD.QuestionAnswers> AnswersID = db.QuestionAnswers.Where(s => s.QuestionID == quest.PKID).ToList();
                         for(int k = 0;  k < AnswersID.Count(); k++)
                         {
@@ -346,9 +310,9 @@
                             Answers ans = new Answers();
                             ans.PKID = TheAnswer.ToArray()[0].PKID;
                             ans.Answer1 = TheAnswer.FirstOrDefault().Answer1;
-                         //   ans.correct = new Correct();
+
                             bool isCorrect = AnswersID.FirstOrDefault().IsCorrect;
-                           // ans.correct.isCorrect = isCorrect;
+
                             quest.Answers.Add(ans);
                         }
                         ExamQ.quest.Add(quest);
@@ -365,23 +329,14 @@
         {
             AutoMapperConfiguration.Configure();
             List<Subject> result = new List<Subject>();
-            #region
-            /* var subjects = from tempSubjects in db.Subject
-                     select tempSubjects; */
-            #endregion
+
             List<EAD.Subject> subjects = db.Subject.ToList();

             for (int i = 0; i < subjects.ToList().Count; i++)
             {
                 Subject newSubject = new Subject();
                 newSubject = Mapper.Map<Subject>(subjects.ElementAt(i));
-                #region
-                /* newSubject.Subject_ID = subjects.ToList().ToArray()[i].Subject_ID;
-                 newSubject.Subject_Name = subjects.ToList().ToArray()[i].Subject_Name;*/
-                /*var categories = (from c in db.Subject_Categories
-                         where c.Subject_ID == newSubject.Subject_ID
-                         select c).ToList();*/
-                #endregion
+

                 List<EAD.Subject_Categories> categories = db.Subject_Categories.Where(c => c.Subject_ID == newSubject.Subject_ID).ToList();
                 if(categories.Count < 1)
@@ -395,20 +350,11 @@
                         int tempID = categories.ElementAt(b).Categories_ID;
                         List<EAD.Categories> categoriesL = db.Categories.Where(c => c.Categories_ID == tempID).ToList();
                         Category Tempcategory = new Category();
-                        #region
-                        /* var Category = (from tempCat in db.Categories
-                                        where tempCat.Categories_ID == categories.ElementAt(b).Categories_ID
-                                        select tempCat).ToList();*/
-                        #endregion
+
                         Tempcategory = new Category();

-                        #region
-                        //  Tempcategory = Mapper.Map<Category>(categories.ToArray()[b]);
-                        /* var category = from c in db.Categories_Subtopic
-                                          where c.Categories_ID == categories.ElementAt(b).Categories_ID
-                                          select c;*/
-                        #endregion
+

                         Tempcategory.Categories_ID = categoriesL.ElementAt(0).Categories_ID;
                         Tempcategory.Categories_Name = categoriesL.ElementAt(0).Categories_Name;
@@ -426,17 +372,12 @@
                             for (int c = 0; c < SubtopicIDs.ToList().Count; c++)
                             {
                                 SubTopic newSub = new SubTopic();
-                                /*var Subtopics = from TempSubtopic in db.Subtopic.ToList()
-                                                   where TempSubtopic.Subtopic_ID == SubtopicIDs.ToList().ElementAt(c)
-                                                   select TempSubtopic;*/
+
                                 int id = SubtopicIDs.ToList().ElementAt(c);
                                 List<EAD.Subtopic> Subtopics = db.Subtopic.Where(s => s.Subtopic_ID == id).ToList();
                                 newSub = new SubTopic();
                                 newSub = Mapper.Map<SubTopic>(Subtopics.ElementAt(0));
-                                #region
-                                // newSub.Subtopic_Name = Subtopics.ElementAt(0).Subtopic_Name;
-                                //newSub.Subtopic_ID = Subtopics.ToList().ElementAt(0).Subtopic_ID;
-                                #endregion
+
                                 Tempcategory.subtopics.Add(newSub);

                             }
@@ -455,32 +396,8 @@
         }

         #region Devonte's Edits
-        #region Devonte Commented out code
-        /* public List<Subject> GetExamSubject(string id)
-        {
-            Database needs a view that has the exam template and subject connected
-
-           var s = db.FullExamTemplateInfo;
-            var slist = from TempSubject in s.ToList()
-                        where TempSubject.ExamTemplateID.Equals(id)
-                        select TempSubject;
-            slist = slist.ToList();
-            AutoMapperConfiguration.Configure();
-            List <Subject> result = new List<Subject>();
-            foreach (var item in slist)
-            {
-                Mapper.Map<Subject>();
-                result.Add(item);
-            }
-
-            return null;
-        }
-        */
-        #endregion
-        //public List<Answers> GetQuestionAnswers(int sqid)
-        //{
-        //    return null;
-        //}
+
+

         public void AddAnswer(int QuestionID, string Answer, bool IC)
         {


tidy part 3

tidy part 3

--- ExamAssessmentSOAPAPI/ExamassessmentWCF/Service1.svc.cs
+++ ExamAssessmentSOAPAPI/ExamassessmentWCF/Service1.svc.cs
@@ -88,12 +88,7 @@
             db.spRemoveAnswerFromQuestion(QuestionID, AnswerID, myOutputParamInt);
           //  return int.Parse(myOutputParamInt.Value.ToString());
         }
-        public void spRemoveCategory(String categoryName)
-        {
-            ObjectParameter myOutputParamInt = new ObjectParameter("myOutputParamInt", typeof(int));
-            db.spRemoveCategory(categoryName, myOutputParamInt);
-            //return int.Parse(myOutputParamInt.Value.ToString());
-        }
+
         public void spRemoveQuestionAsExamQuestion(String ExamQuestionID)
         {
             int result = 0;


Removing extra code

Removing extra code

--- ExtendedMap/ExtendedMap/ExtendedMap.Forms.Plugin.Abstractions/CustomMapContentView.cs
+++ ExtendedMap/ExtendedMap/ExtendedMap.Forms.Plugin.Abstractions/CustomMapContentView.cs
@@ -71,12 +71,7 @@
     {
       get
       {
-        var footerRow = _mapGrid.Children[0];
-
-        Device.OnPlatform(WinPhone: () =>
-        {
-          footerRow = _mapGrid.Children[1];
-        });
+        var footerRow = _mapGrid.Children[1];

         return footerRow;
       }
@@ -101,16 +96,9 @@
         _mapGrid.RowDefinitions[0].Height = new GridLength(height*expandedMapHeight);
         _mapGrid.RowDefinitions[1].Height = new GridLength(footerHeight);

-        Device.OnPlatform(WinPhone: () =>
-        {
           //The rows need to be added in this order for win phone for the footer to display on top of the map
-          _mapGrid.Children.Add(_extendedMap, 0, 0);
-          _mapGrid.Children.Add(CreateFooter(footerHeight), 0, 1);
-        }, Android: () =>
-        {
-          _mapGrid.Children.Add(CreateFooter(footerHeight), 0, 1);
-          _mapGrid.Children.Add(_extendedMap, 0, 0);
-        });
+        _mapGrid.Children.Add(_extendedMap, 0, 0);
+        _mapGrid.Children.Add(CreateFooter(footerHeight), 0, 1);

         Grid.SetRowSpan(_extendedMap, 2);


Fix AtataContext.CleanUp method to handle the case when Driver is null

--- src/Atata/Context/AtataContext.cs
+++ src/Atata/Context/AtataContext.cs
@@ -241,7 +241,7 @@
             UIComponentScopeCache.Clear();

             if (quitDriver)
-                Driver.Dispose();
+                Driver?.Dispose();

             Log.EndSection();


Use ValueTuple to calculate hash.

Use ValueTuple to calculate hash.

--- src/Avalonia.Visuals/Media/Pen.cs
+++ src/Avalonia.Visuals/Media/Pen.cs
@@ -244,14 +244,8 @@

         internal static int GetHashCode(IPen pen)
         {
-            var hashCode = 1181807663;
-            hashCode = hashCode * -1521134295 + EqualityComparer<IBrush>.Default.GetHashCode(pen.Brush);
-            hashCode = hashCode * -1521134295 + pen.Thickness.GetHashCode();
-            hashCode = hashCode * -1521134295 + EqualityComparer<IDashStyle>.Default.GetHashCode(pen.DashStyle);
-            hashCode = hashCode * -1521134295 + pen.LineCap.GetHashCode();
-            hashCode = hashCode * -1521134295 + pen.LineJoin.GetHashCode();
-            hashCode = hashCode * -1521134295 + pen.MiterLimit.GetHashCode();
-            return hashCode;
+            return (pen.Brush, pen.Thickness, pen.DashStyle, pen.LineCap, pen.LineJoin, pen.MiterLimit)
+                .GetHashCode();
         }

         internal static bool PenEquals(IPen a, IPen b)


change config to partial class

change config to partial class

--- src/BugsnagUnity/Configuration.cs
+++ src/BugsnagUnity/Configuration.cs
@@ -6,7 +6,7 @@

 namespace BugsnagUnity
 {
-    public class Configuration : IMetadataEditor, IFeatureFlagStore
+    public partial class Configuration : IMetadataEditor, IFeatureFlagStore
     {

         public string AppType;


add define guild ENABLE_NDINFRA_CUSTOM

add define guild ENABLE_NDINFRA_CUSTOM

--- Unity/ABFetcher/AssetBundleManager/AssetBundleManager.cs
+++ Unity/ABFetcher/AssetBundleManager/AssetBundleManager.cs
@@ -563,10 +563,13 @@
 						keysToRemove.Add(keyValue.Key);
 						continue;
 					}
-
+
+
 					//Debug.Log("Downloading " + keyValue.Key + " is done at frame " + Time.frameCount);
-					string shortKey = RemovePostVariant(keyValue.Key) ;
-
+					string shortKey = keyValue.Key ;
+#if ENABLE_NDINFRA_CUSTOM
+					shortKey = RemovePostVariant(keyValue.Key) ;
+#endif
 					m_LoadedAssetBundles.Add(shortKey,
 					new LoadedAssetBundle(download.assetBundle
 #if ENABLE_NDINFRA_CUSTOM
@@ -647,11 +650,12 @@
 #endif // ENABLE_NDINFRA_DEBUG_INFO

 			AssetBundleLoadAssetOperation operation = null;
-	#if UNITY_EDITOR
+#if UNITY_EDITOR
 			if (SimulateAssetBundleInEditor)
 			{
+#if ENABLE_NDINFRA_CUSTOM
 				assetBundleName = AddNAPostVariant( assetBundleName ) ;
-
+#endif
 				string[] assetPaths = AssetDatabase.GetAssetPathsFromAssetBundleAndAssetName(assetBundleName, assetName);
 				if (assetPaths.Length == 0)
 				{
@@ -664,7 +668,7 @@
 				operation = new AssetBundleLoadAssetOperationSimulation (target);
 			}
 			else
-	#endif
+#endif
 			{
 				assetBundleName = RemapVariantName (assetBundleName);
 				LoadAssetBundle (assetBundleName);


Add UIContext.Run() overloads similar to Task.Run() #36

--- src/Caliburn.Core/UI/UIContext.cs
+++ src/Caliburn.Core/UI/UIContext.cs
@@ -65,7 +65,39 @@
         /// <returns>A <see cref="Task"/> that represents the work queued to execute on the UI thread.</returns>
         public static Task Run(Action action)
         {
-            return Task.Factory.StartNew(action, CancellationToken.None, TaskCreationOptions.None, TaskScheduler);
+            return Task.Factory.StartNew(action, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler);
+        }
+
+        /// <summary>
+        /// Queues the specified work to run on the UI thread and returns a proxy for the <see cref="Task<TResult>"/> returned by function.
+        /// </summary>
+        /// <typeparam name="TResult">The type of the result returned by the proxy task.</typeparam>
+        /// <param name="function">The work to execute asynchronously</param>
+        /// <returns>A <see cref="Task<TResult>"/> that represents a proxy for the <see cref="Task<TResult>"/> returned by function.</returns>
+        public static Task<TResult> Run<TResult>(Func<Task<TResult>> function)
+        {
+            return Task.Factory.StartNew(function, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler).Unwrap();
+        }
+
+        /// <summary>
+        /// Queues the specified work to run on the UI thread and returns a proxy for the task returned by function.
+        /// </summary>
+        /// <param name="function">The work to execute asynchronously</param>
+        /// <returns>A task that represents a proxy for the task returned by function.</returns>
+        public static Task Run(Func<Task> function)
+        {
+            return Task.Factory.StartNew(function, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler).Unwrap();
+        }
+
+        /// <summary>
+        /// Queues the specified work to run on the UI thread and returns a <see cref="Task<TResult>"/> handle for that work.
+        /// </summary>
+        /// <typeparam name="TResult">The result type of the task.</typeparam>
+        /// <param name="function">The work to execute asynchronously</param>
+        /// <returns>A <see cref="Task<TResult>"/> that represents the work queued to execute in the UI thread.</returns>
+        public static Task<TResult> Run<TResult>(Func<TResult> function)
+        {
+            return Task.Factory.StartNew(function, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler);
         }

         #endregion


m_Dependencies also needs to be recorded as short name. Or there will be a problem when remove from m_Dependencies[] by short name.

--- Unity/ABFetcher/AssetBundleManager/AssetBundleManager.cs
+++ Unity/ABFetcher/AssetBundleManager/AssetBundleManager.cs
@@ -485,7 +485,15 @@
 				dependencies[i] = RemapVariantName (dependencies[i]);

 			// Record and load all dependencies.
+
+#if ENABLE_NDINFRA_CUSTOM
+			string shortKey = RemovePostVariant(assetBundleName) ;
+			m_Dependencies.Add(shortKey, dependencies);
+			Log(LogType.Info, shortKey + " has been added to m_Dependencies[]");
+#else
 			m_Dependencies.Add(assetBundleName, dependencies);
+#endif
+
 			for (int i=0;i<dependencies.Length;i++)
 				LoadAssetBundleInternal(dependencies[i], false);
 		}


Fixed text replacement.

Fixed text replacement.

--- src/LogoFX.Tools.Templates.Wizard/ExperimentalSolutionWizard.cs
+++ src/LogoFX.Tools.Templates.Wizard/ExperimentalSolutionWizard.cs
@@ -19,6 +19,7 @@
         private WizardData _wizardData;
         private string _tmpFolder;
         private string _solutionFolder;
+        private Dictionary<string, string> _replacementsDictionary;

         protected override string GetTitle()
         {
@@ -50,9 +51,12 @@

         protected override void RunStartedOverride(Solution4 solution, Dictionary<string, string> replacementsDictionary, object[] customParams)
         {
+            _replacementsDictionary = replacementsDictionary;
+
             var vstemplateName = (string) customParams[0];
             _tmpFolder = Path.GetDirectoryName(vstemplateName);
             _solutionFolder =  replacementsDictionary["$solutiondirectory$"];
+            replacementsDictionary["$saferootprojectname$"] = replacementsDictionary["$safeprojectname$"];

             var wizardDataFileName = Path.Combine(_tmpFolder, WizardDataLoader.WizardDataFielName);
             _wizardData = WizardDataLoader.LoadAsync(wizardDataFileName).Result;
@@ -242,8 +246,18 @@
                     continue;
                 }

-                File.Copy(info.FullName, destFileName);
-            }
+                ReplaceText(info.FullName, destFileName);
+            }
+        }
+
+        private void ReplaceText(string oldFileName, string newFileName)
+        {
+            var str = File.ReadAllText(oldFileName);
+            foreach (var sp in _replacementsDictionary)
+            {
+                str = str.Replace(sp.Key, sp.Value);
+            }
+            File.WriteAllText(newFileName, str);
         }
     }
 }


Players can now fall when dead

Players can now fall when dead

--- UnityProject/Assets/Scripts/Player/ZMPlayerController.cs
+++ UnityProject/Assets/Scripts/Player/ZMPlayerController.cs
@@ -727,7 +727,6 @@
 			StartCoroutine (ScaleTauntText (new Vector3 (1.5f, 1.5f, 1.5f), Vector3.one, 0.05f));
 			Invoke ("HideTauntText", 0.5f);
 		}
-//		DisablePlayer();
 	}

 	private void KillOpponent(ZMPlayerController playerController)


Fix b/64850742: too many vertices in particle mesh

Latent bug exposed by fix for b/64571071.

When copying particle quads, 2 extra verts per quad were getting
appended to the vert array. Particle meshes already near the vert
limit would then go over.

Change-Id: I8b5ccbd397d8e01643ab43f7d72bd9979f252649

--- UnitySDK/Assets/TiltBrush/Scripts/Editor/ParticleMesh.cs
+++ UnitySDK/Assets/TiltBrush/Scripts/Editor/ParticleMesh.cs
@@ -121,6 +121,8 @@

     int i = iiVert;
     int v = m_triangles[i];
+    // AppendQuad assumes that the first index of the quad is the lowest index.
+    // All of these "+n" offsets should be positive.
     if ((m_triangles[i  ] == v   &&
          m_triangles[i+1] == v+1 &&
          m_triangles[i+2] == v+3 &&
@@ -179,19 +181,24 @@
   }

   internal void AppendQuad(ParticleMesh rhs, int iiVert) {
+    // Valid particles are contiguous ranges of 4 verts and 6 indices,
+    // and the first index refers to the first vert.
+
     int rv0 = rhs.m_triangles[iiVert];
     int indexOffset = m_vertices.Count - rv0;
     bool hasNormals = rhs.m_normals != null && rhs.m_normals.Count > 0;
     bool hasTangents = rhs.m_tangents != null && rhs.m_tangents.Count > 0;
-    // Assume IsValidParticle, and therefore [v0, v0+6) should be copied
-    for (int i = 0; i < 6; ++i) {
-      m_vertices.Add (rhs.m_vertices [rv0 + i]);
-      if (hasNormals) { m_normals.Add  (rhs.m_normals  [rv0 + i]); }
-      m_uv0.Add      (rhs.m_uv0      [rv0 + i]);
-      m_uv1.Add      (rhs.m_uv1      [rv0 + i]);
-      m_colors.Add   (rhs.m_colors   [rv0 + i]);
-      if (hasTangents) { m_tangents.Add(rhs.m_tangents[rv0 + i]); }
-      m_triangles.Add(rhs.m_triangles[iiVert + i] + indexOffset);
+    for (int iv = 0; iv < 4; ++iv) {
+      m_vertices.Add(rhs.m_vertices[rv0 + iv]);
+      if (hasNormals) { m_normals.Add(rhs.m_normals[rv0 + iv]); }
+      m_uv0.Add(rhs.m_uv0[rv0 + iv]);
+      m_uv1.Add(rhs.m_uv1[rv0 + iv]);
+      m_colors.Add(rhs.m_colors[rv0 + iv]);
+      if (hasTangents) { m_tangents.Add(rhs.m_tangents[rv0 + iv]); }
+    }
+
+    for (int ii = 0; ii < 6; ++ii) {
+      m_triangles.Add(rhs.m_triangles[iiVert + ii] + indexOffset);
     }
   }


Incremented version to 1.1.2.

Incremented version to 1.1.2.

--- Utility.CommandLine.Arguments/Properties/AssemblyInfo.cs
+++ Utility.CommandLine.Arguments/Properties/AssemblyInfo.cs
@@ -11,5 +11,5 @@
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
 [assembly: Guid("b739dd22-4bd3-4d17-a351-33d129e9fe30")]
-[assembly: AssemblyVersion("1.1.1")]
-[assembly: AssemblyFileVersion("1.1.1")]+[assembly: AssemblyVersion("1.1.2")]
+[assembly: AssemblyFileVersion("1.1.2")]


Revert "Always set selectem item"

Revert "Always set selectem item"

This reverts commit a7da6bf0849c1165d1b2c45d60a7290a8fbf7762.

--- WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
+++ WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
@@ -120,6 +120,11 @@

 		private void Select(NavBarItemViewModel? value)
 		{
+			if (_selectedItem == value)
+			{
+				return;
+			}
+
 			if (_selectedItem is { })
 			{
 				_selectedItem.IsSelected = false;


fix: 修复数据序号器描述类对前缀的解析错误。 :princess:

fix: 修复数据序号器描述类对前缀的解析错误。 :princess:

--- src/Data/DataSequenceAttribute.cs
+++ src/Data/DataSequenceAttribute.cs
@@ -64,7 +64,7 @@
 			if(string.IsNullOrWhiteSpace(keys))
 				throw new ArgumentNullException(nameof(keys));

-			var index = keys.IndexOf(':');
+			var index = keys.LastIndexOf(':');

 			if(index >= 0)
 			{