removed non-collection classes from type.isenumerable

--- CodeDom/CodeDomType.cs
+++ CodeDom/CodeDomType.cs
@@ -29,7 +29,7 @@
         public bool IsGeneric => FullName.IndexOf("<", StringComparison.Ordinal) > -1 || IsNullable;
         public bool IsNullable => FullName.StartsWith("System.Nullable<") || FullName.EndsWith("?");
         public bool IsEnum => CodeType.Kind == vsCMElement.vsCMElementEnum;
-        public bool IsEnumerable => FullName != "System.String" && (FullName.StartsWith("System.Collections.") || FullName == "System.Array");
+        public bool IsEnumerable => FullName != "System.String" && (FullName == "System.Array" || IsCollection(FullName));

         private Class baseClass;
         public Class BaseClass => baseClass ?? (baseClass = CodeDomClass.FromCodeElements(CodeType.Bases, this).FirstOrDefault());
@@ -135,6 +135,21 @@
             //}
         }

+        private static bool IsCollection(string fullName)
+        {
+            if (fullName.StartsWith("System.Collections.") == false) return false;
+
+            if (fullName.Contains("Comparer")) return false;
+            if (fullName.Contains("Enumerator")) return false;
+            if (fullName.Contains("Provider")) return false;
+            if (fullName.Contains("Partitioner")) return false;
+            if (fullName.Contains("Structural")) return false;
+            if (fullName.Contains("KeyNotFoundException")) return false;
+            if (fullName.Contains("KeyValuePair")) return false;
+
+            return true;
+        }
+
         public static Type FromCodeElement(CodeVariable2 codeVariable, Item parent)
         {
             return GetType(codeVariable, parent);


Reactive test

Reactive test

--- Core/Data/SimpleRPG.cs
+++ Core/Data/SimpleRPG.cs
@@ -7,11 +7,11 @@
 [Reactive]
 public class SimpleRPG : MonoBehaviour
 {
-	public IntReactiveProp hp = new IntReactiveProp(0);
+	public IntReactiveProp hp = new IntReactiveProp(3);

 	void Start()
 	{
-		hp.SyncWithInspector();
+		// hp.Value = 9;
 	}
 }


Bugfix regarding feature name

Bugfix regarding feature name

--- DBMigrator/DBFolder.cs
+++ DBMigrator/DBFolder.cs
@@ -57,7 +57,7 @@
             {
                 var (order, featureName) = Feature.GetFeatureNameAndOrder(featureFolder.Name);

-                version.AddAndOrGetFeature(featureFolder.Name, order, featureFolder.Name);
+                version.AddAndOrGetFeature(featureName, order, featureFolder.Name);
             }
             foreach (var feature in version.Features)
             {


Added Contains All Non Null

Added Contains All Non Null

--- DLaB.Xrm/Extensions.cs
+++ DLaB.Xrm/Extensions.cs
@@ -180,6 +180,8 @@
             entity.Attributes.Remove(EntityHelper.GetIdAttributeName(entity.LogicalName));
         }

+        #region ContainsAllNonNull
+
         /// <summary>
         /// Checks to see if the Entity Contains the attribute names, and the value is not null
         /// </summary>
@@ -204,6 +206,35 @@
             return ContainsAllNonNull(entity, GetAttributeNamesArray(anonymousTypeInitializer));
         }

+        /// <summary>
+        /// Checks to see if the Entity Contains the attribute names, and the value is not null
+        /// </summary>
+        /// <param name="entity"></param>
+        /// <param name="nullAttributeNames"></param>
+        /// <param name="attributeNames"></param>
+        /// <returns></returns>
+        public static bool ContainsAllNonNull(this Entity entity, out List<string> nullAttributeNames, params string[] attributeNames)
+        {
+            nullAttributeNames = attributeNames.Where(name => !entity.Contains(name) || entity[name] == null).ToList();
+
+            return !nullAttributeNames.Any();
+        }
+
+        /// <summary>
+        /// Checks to see if the Entity Contains the attribute names, and the value is not null
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="entity"></param>
+        /// <param name="nullAttributeNames"></param>
+        /// <param name="anonymousTypeInitializer"></param>
+        /// <returns></returns>
+        public static bool ContainsAllNonNull<T>(this T entity, out List<string> nullAttributeNames, Expression<Func<T, object>> anonymousTypeInitializer)
+            where T : Entity
+        {
+            return ContainsAllNonNull(entity, out nullAttributeNames, GetAttributeNamesArray(anonymousTypeInitializer));
+        }
+
+        #endregion ContainsAllNonNull

         /// <summary>
         /// Checks to see if the Entity Contains any of the attribute names, and the value is not null


Fix bug in SDF and MSDF generation

Fix bug in SDF and MSDF generation

--- MSDFGen/MSDF.cs
+++ MSDFGen/MSDF.cs
@@ -114,7 +114,7 @@
                 windings[i] = shape.Contours[i].Winding;
             }

-            int xStart = Math.Min(Math.Min(0, (int)region.Left), output.Width);
+            int xStart = Math.Min(Math.Max(0, (int)region.Left), output.Width);
             int yStart = Math.Min(Math.Max(0, (int)region.Top), output.Height);
             int xEnd = Math.Min(Math.Max(0, (int)region.Right), output.Width);
             int yEnd = Math.Min(Math.Max(0, (int)region.Bottom), output.Height);
@@ -201,7 +201,7 @@
                 windings[i] = shape.Contours[i].Winding;
             }

-            int xStart = Math.Min(Math.Min(0, (int)region.Left), output.Width);
+            int xStart = Math.Min(Math.Max(0, (int)region.Left), output.Width);
             int yStart = Math.Min(Math.Max(0, (int)region.Top), output.Height);
             int xEnd = Math.Min(Math.Max(0, (int)region.Right), output.Width);
             int yEnd = Math.Min(Math.Max(0, (int)region.Bottom), output.Height);


Throw during one sync step throws sync exception

--- projects/AsyncEnum35Sample/test/AsyncEnum35Sample.Test.Unit/AsyncOperationTest.cs
+++ projects/AsyncEnum35Sample/test/AsyncEnum35Sample.Test.Unit/AsyncOperationTest.cs
@@ -101,6 +101,16 @@
             Assert.Equal(1234, SetResultDuringOneStepOperation.End(result));
         }

+        [Fact]
+        public void Throw_during_one_sync_step_throws_sync_exception()
+        {
+            InvalidTimeZoneException expected = new InvalidTimeZoneException("Expected.");
+            ThrowDuringOneStepOperation op = new ThrowDuringOneStepOperation(expected);
+            InvalidTimeZoneException actual = Assert.Throws<InvalidTimeZoneException>(() => op.Start(null, null));
+
+            Assert.Same(expected, actual);
+        }
+
         private abstract class TestAsyncOperation : AsyncOperation<int>
         {
             protected TestAsyncOperation()
@@ -251,5 +261,33 @@
                     (thisPtr, r) => thisPtr.Result = CompletedAsyncResult<int>.End(r));
             }
         }
+
+        private sealed class ThrowDuringOneStepOperation : TestAsyncOperation
+        {
+            private readonly Exception exception;
+
+            public ThrowDuringOneStepOperation(Exception exception)
+            {
+                this.exception = exception;
+            }
+
+            protected override IEnumerator<Step> Steps()
+            {
+                yield return Step.Await(
+                    this,
+                    (thisPtr, c, s) => thisPtr.ThrowSync(),
+                    (thisPtr, r) => thisPtr.Invalid());
+            }
+
+            private IAsyncResult ThrowSync()
+            {
+                throw this.exception;
+            }
+
+            private void Invalid()
+            {
+                throw new InvalidOperationException("This shouldn't happen.");
+            }
+        }
     }
 }


Update ref data

Update ref data

--- API/OCM.Net/OCM.API.Model/Base/CoreReferenceData.cs
+++ API/OCM.Net/OCM.API.Model/Base/CoreReferenceData.cs
@@ -23,7 +23,10 @@
     public enum StandardOperators
     {
         UnknownOperator = 1,
-        Tesla = 23
+        ChargePoint =5,
+        Blink = 9,
+        Tesla = 23,
+        ChargeFox = 3339
     }

     public enum StandardUsageTypes
@@ -79,11 +82,18 @@
         MennekesType2 = 25,
         MennekesType2Tethered = 1036,
         Schuko = 28,
+        CCSComboType1 = 32,
         CCSComboType2 = 33,
         Nema5_15 = 22,
         Nema5_20 = 9,
         Nema14_50 = 11,
-        TeslaProprietary =30
+        TeslaRoadster =8,
+        TeslaProprietary =30,
+        TeslaSupercharger = 27,
+        Type3 = 26,
+        Europlug= 13,
+        AS3112 = 29,
+        ThreePhaseAU=1041
     }

     public enum StandardCurrentTypes


Slight clean up

Slight clean up

--- Assets/UMA/Editor/TransformEdit/TransformManager.cs
+++ Assets/UMA/Editor/TransformEdit/TransformManager.cs
@@ -15,8 +15,6 @@

         private static bool _SwallowMouse = false;
         private static int _MouseButton;
-
-        private static int _SceneViewControlID;

         // Use this for initialization
         static TransformManager()


Убираем проверку сложности пароля - это лишнее

--- BikeMates/BikeMates.Web/Models/AccountViewModels.cs
+++ BikeMates/BikeMates.Web/Models/AccountViewModels.cs
@@ -71,11 +71,11 @@

         [Required]
         [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
-        [DataType(DataType.Password)]
+        //[DataType(DataType.Password)]
         [Display(Name = "Password")]
         public string Password { get; set; }

-        [DataType(DataType.Password)]
+        //[DataType(DataType.Password)]
         [Display(Name = "Confirm password")]
         [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
         public string ConfirmPassword { get; set; }


rollback occasionally changed files 2

rollback occasionally changed files 2

--- resharper/resharper-unity/src/ShaderLab/Psi/Search/ShaderLabUsageSearchFactory.cs
+++ resharper/resharper-unity/src/ShaderLab/Psi/Search/ShaderLabUsageSearchFactory.cs
@@ -28,12 +28,6 @@
         public IDomainSpecificSearcher CreateConstructorSpecialReferenceSearcher(ICollection<IConstructor> constructors)
         {
             return null;
-        }
-
-        public IDomainSpecificSearcher CreateTargetTypedObjectCreationSearcher(IReadOnlyList<IConstructor> constructors, IReadOnlyList<ITypeElement> typeElements,
-            bool findCandidates)
-        {
-            throw new NotImplementedException();
         }

         public IDomainSpecificSearcher CreateMethodsReferencedByDelegateSearcher(IDelegate @delegate)


MODBUS: Bug fix of send data conversion (missing "else" statements)

--- Communication.MODBUSPlug/ModbusBaseClientStation.cs
+++ Communication.MODBUSPlug/ModbusBaseClientStation.cs
@@ -478,7 +478,7 @@
                                     int v = (int)ch.Value;
                                     adr = BitConverter.GetBytes(v);
                                 }
-                                if (ch.Type == typeof(uint))     // ch.ModbusFs2InternalType == ModbusFs2InternalType.Int32)
+                                else if (ch.Type == typeof(uint))     // ch.ModbusFs2InternalType == ModbusFs2InternalType.Int32)
                                 {
                                     uint v = (uint)ch.Value;
                                     adr = BitConverter.GetBytes(v);
@@ -522,7 +522,7 @@
                                     int v = (int)ch.Value;
                                     adr = BitConverter.GetBytes(v);
                                 }
-                                if (ch.Type == typeof(uint))     // ch.ModbusFs2InternalType == ModbusFs2InternalType.Int32)
+                                else if (ch.Type == typeof(uint))     // ch.ModbusFs2InternalType == ModbusFs2InternalType.Int32)
                                 {
                                     uint v = (uint)ch.Value;
                                     adr = BitConverter.GetBytes(v);


Reorder methods, correct docs

Reorder methods, correct docs

--- Core/Loyc.Essentials/Utilities/ByteArrayInString.cs
+++ Core/Loyc.Essentials/Utilities/ByteArrayInString.cs
@@ -29,17 +29,17 @@
 	/// <para/>
 	/// For example:
 	///

-	///   //                    C   a    t       \n  E        A   B   C,  D
+	///   //                    C   a    t       \n  E        A   B   C   D
 	///   var b = new byte[] { 67, 97, 116, 128, 10, 69, 255, 65, 66, 67, 68 };
-	///   Assert.AreEqual(ByteArrayInString.Convert(b), "Cat\b`@iE~p!ABC");
+	///   Assert.AreEqual(ByteArrayInString.Convert(b), "Cat\b`@iE?tEB!CD");
 	///

 	/// A byte sequence such as 128, 10, 69, 255 can be encoded in base 64 as
 	/// illustrated:
 	///

 	///              ---128---    ---10----    ---69----  ---255---
-	///   Bytes:     1000 0000    0000 1010    0100 0101  1111 1111  01000001 01000010
-	///   Base 64:   100000   000000   101001    000101   111111   110100 000101
-	///   Encoded: 01100000 01000000 01101001  01000101 01111111 01110000 01000101
+	///   Bytes:     1000 0000    0000 1010    0100 0101  1111 1111
+	///   Base 64:   100000   000000   101001    000101   111111   110000
+	///   Encoded: 01100000 01000000 01101001  01000101 01111111 01110000
 	///            ---96--- ---64--- --105---  ---69--- --127--- --112---
 	///               `        @        i         E        ~        p
 	///

@@ -53,62 +53,12 @@
 	/// When viewing BAIS strings, another thing to keep in mind is that
 	/// runs of zeroes ('\0') will tend to appear as runs of `@` characters
 	/// in the base 64 encoding, although a single zero is not always enough
-	/// to make a `@` appear. Runs of 255 will tend to appear as runs of `~`.
+	/// to make a `@` appear. Runs of 255 will tend to appear as runs of `?`.
 	/// <para/>
 	/// There are many ways to encode a given byte array as BAIS.
 	/// </remarks>
 	public static class ByteArrayInString
 	{
-		/// Decodes a BAIS string back to a byte array.
-		/// <param name="s">String to decode.</param>
-		/// <returns>Decoded byte array (use <c>Convert(s).ToArray()</c>
-		/// if you need a true array).</returns>
-		public static ArraySlice<byte> Convert(string s)
-		{
-			byte[] b = Encoding.UTF8.GetBytes(s);
-			for (int i = 0; i < s.Length - 1; ++i) {
-				if (b[i] == '\b') {
-					int iOut = i++;
-
-					for (;;) {
-						byte cur;
-						if (i >= b.Length || (uint)((cur = b[i]) - 63) > 63)
-							throw new FormatException("String cannot be interpreted as a byte array".Localized());
-						int digit = (cur - 64) & 63;
-						int zeros = 16 - 6; // number of 0 bits on right side of accum
-						int accum = digit << zeros;
-
-						while (++i  63)
-								break;
-							digit = (cur - 64) & 63;
-							zeros -= 6;
-							accum |= digit << zeros;
-							if (zeros <= 8)
-							{
-								b[iOut++] = (byte)(accum >> 8);
-								accum <<= 8;
-								zeros += 8;
-							}
-						}
-
-						if ((accum & 0xFF00) != 0 || (i < b.Length && b[i] != '!'))
-							throw new FormatException("String cannot be interpreted as byte array".Localized());
-						i++;
-
-						// Start taking bytes verbatim
-						while (i = b.Length)
-							return b.Slice(0, iOut);
-						i++;
-					}
-				}
-			}
-			return b;
-		}
-
 		/// Encodes a byte array to a string with BAIS encoding, which preserves
 		/// runs of ASCII characters unchanged.
 		/// <param name="allowControlChars">If true, control characters under 32 are
@@ -120,9 +70,9 @@
 		/// bytes are encountered, they are encoded as described in the description of
 		/// this class.
 		/// <para/>
-		/// For simplicity, this method's base-64 encoding always encodes groups of three
-		/// bytes as four characters if possible. This decision may unfortunately cut off
-		/// the beginning of some ASCII runs.
+		/// For simplicity, this method's base-64 encoding always encodes groups of
+		/// three bytes if possible (as four characters). This decision may
+		/// unfortunately cut off the beginning of some ASCII runs.
 		/// </remarks>
 		public static string Convert(ArraySlice<byte> bytes, bool allowControlChars = true)
 		{
@@ -168,11 +118,66 @@
 			}
 			return sb.ToString();
 		}
+
+		static bool IsAscii(byte b, bool allowControlChars)
+			=> b < 127 && (b >= 32 || (allowControlChars && b != '\b'));
+
+		/// Decodes a BAIS string back to a byte array.
+		/// <param name="s">String to decode.</param>
+		/// <returns>Decoded byte array (use <c>Convert(s).ToArray()</c>
+		/// if you need a true array).</returns>
+		public static ArraySlice<byte> Convert(string s)
+		{
+			byte[] b = Encoding.UTF8.GetBytes(s);
+			for (int i = 0; i < s.Length - 1; ++i)
+			{
+				if (b[i] == '\b')
+				{
+					int iOut = i++;
+
+					for (; ; )
+					{
+						byte cur;
+						if (i >= b.Length || (uint)((cur = b[i]) - 63) > 63)
+							throw new FormatException("String cannot be interpreted as a byte array".Localized());
+						int digit = (cur - 64) & 63;
+						int zeros = 16 - 6; // number of 0 bits on right side of accum
+						int accum = digit << zeros;
+
+						while (++i  63)
+								break;
+							digit = (cur - 64) & 63;
+							zeros -= 6;
+							accum |= digit << zeros;
+							if (zeros <= 8)
+							{
+								b[iOut++] = (byte)(accum >> 8);
+								accum <<= 8;
+								zeros += 8;
+							}
+						}
+
+						if ((accum & 0xFF00) != 0 || (i < b.Length && b[i] != '!'))
+							throw new FormatException("String cannot be interpreted as byte array".Localized());
+						i++;
+
+						// Start taking bytes verbatim
+						while (i = b.Length)
+							return b.Slice(0, iOut);
+						i++;
+					}
+				}
+			}
+			return b;
+		}
+
+		public static char EncodeBase64Digit(int digit)
+			=> (char)((digit + 1 & 63) + 63);
 		public static int DecodeBase64Digit(char digit)
 			=> (uint)(digit - 63) <= 63 ? (digit - 64) & 63 : -1;
-		public static char EncodeBase64Digit(int digit)
-			=> (char)((digit + 1 & 63) + 63);
-		static bool IsAscii(byte b, bool allowControlChars)
-			=> b < 127 && (b >= 32 || (allowControlChars && b != '\b'));
 	}
 }


Release 1.15

Release 1.15

--- CronExpressionDescriptor/Properties/AssemblyInfo.cs
+++ CronExpressionDescriptor/Properties/AssemblyInfo.cs
@@ -1,36 +1,64 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Cron Expression Descriptor")]
-[assembly: AssemblyDescription("A library that converts cron expressions into human readable strings.  Supports 12 languages: English, Brazillian, Spanish, Norwgian, Turkish, Dutch, Chinese Simplified, Russian, French, German, Ukrainian and Italian.")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Brady Holt")]
-[assembly: AssemblyProduct("CronExpressionDescriptor")]
-[assembly: AssemblyCopyright("Copyright 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3df2e79f-e253-4cb0-ab32-c73710d8278d")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.13.0")]
-[assembly: AssemblyFileVersion("1.13.0")]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Cron Expression Descriptor")]
+[assembly: AssemblyDescription("A library that converts cron expressions into human readable strings.  Supports 12 languages: English, Brazillian, Spanish, Norwgian, Turkish, Dutch, Chinese Simplified, Russian, French, German, Ukrainian and Italian.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Brady Holt")]
+[assembly: AssemblyProduct("CronExpressionDescriptor")]
+[assembly: AssemblyCopyright("Copyright 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("3df2e79f-e253-4cb0-ab32-c73710d8278d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.15.0")]
+[assembly: AssemblyFileVersion("1.15.0")]


Updated `AesCrypto` constructor to throw exceptions if `passphrase` is null, empty, or whitespace, or if `salt` is null or empty.

--- Evbpc.Framework/Utilities/Cryptography/AesCrypto.cs
+++ Evbpc.Framework/Utilities/Cryptography/AesCrypto.cs
@@ -30,12 +30,12 @@
         /// <param name="passphrase">The <see cref="Passphrase"/> used in encryption.</param>
         public AesCrypto(byte[] salt, string passphrase)
         {
-            if (passphrase.Length == 0)
+            if (string.IsNullOrWhiteSpace(passphrase))
             {
                 throw new ArgumentException($"The parameter {nameof(passphrase)} is required.");
             }

-            if (salt.Length == 0)
+            if (salt == null || salt.Length == 0)
             {
                 throw new ArgumentException($"The parameter {nameof(salt)} is required.");
             }


Update CharacterSheet.cs

Update CharacterSheet.cs

Changed willlpower to willpower.

--- EveLib.EveOnline/Models/Character/CharacterSheet.cs
+++ EveLib.EveOnline/Models/Character/CharacterSheet.cs
@@ -279,7 +279,7 @@
         /// <summary>
         /// Total willpower
         /// </summary>
-        [XmlElement("willlpower")]
+        [XmlElement("willpower")]
         public int Willpower { get; set; }
     }

@@ -326,4 +326,4 @@
         [XmlAttribute("titleName")]
         public string TitleName { get; set; }
     }
-}+}


Cleaned things up a bit.

Cleaned things up a bit.

--- FidelityWebDriver.Tests/Pages/PositionsPageTests.cs
+++ FidelityWebDriver.Tests/Pages/PositionsPageTests.cs
@@ -26,7 +26,7 @@
             {"CC", AccountType.CreditCard},
         };

-        private static Dictionary<string, Mock<IWebElement>> _groupDivMocks;
+        private IDictionary<string, Mock<IWebElement>> _groupDivMocks;

         [SetUp]
         public void Setup()
@@ -73,7 +73,7 @@
             }
         }

-        private static Dictionary<string, string> CreateAccountValues(string accountNumber, string accountType, string accountName, string accountValue)
+        private Dictionary<string, string> CreateAccountValues(string accountNumber, string accountType, string accountName, string accountValue)
         {
             return new Dictionary<string, string>
             {
@@ -96,48 +96,44 @@
             return accountGroupDiv.Object;
         }

-        private static IEnumerable<IWebElement> CreateAccountDivs(IEnumerable<IReadOnlyDictionary<string, string>> accountValues, string accountTypeString)
+        private IEnumerable<IWebElement> CreateAccountDivs(IEnumerable<IReadOnlyDictionary<string, string>> accountValues, string accountTypeString)
         {
-            foreach (var values in accountValues)
+            return accountValues.Select(values =>
             {
-                var accountNumberString = values["accountNumber"];
-                var accountNameString = values["accountName"];
-                var accountValueString = values["accountValue"];
-
-                var accountDivMock = CreateAccountDivMock(accountNumberString, accountNameString, accountTypeString,
-                    accountValueString);
-                yield return accountDivMock;
-            }
+                var accountDivMock = new Mock<IWebElement>();
+                accountDivMock.Setup(div => div.GetAttribute("data-acct-number"))
+                    .Returns(values["accountNumber"]);
+                accountDivMock.Setup(div => div.GetAttribute("data-acct-name"))
+                    .Returns(values["accountName"]);
+                accountDivMock.Setup(div => div.GetAttribute(GetValueAttributeName(accountTypeString)))
+                    .Returns(values["accountValue"]);
+                return accountDivMock.Object;
+            });
         }

-        private static Mock<IWebElement> GetOrCreateAccountGroupDiv(string accountTypeString)
+        private string GetValueAttributeName(string accountTypeString)
         {
-            return _groupDivMocks.ContainsKey(accountTypeString) ? _groupDivMocks[accountTypeString] : new Mock<IWebElement>();
-        }
-
-        private static IWebElement CreateAccountDivMock(string accountNumberString, string accountNameString, string accountTypeString,
-            string accountValueString)
-        {
-            var accountDivMock = new Mock<IWebElement>();
-            accountDivMock.Setup(div => div.GetAttribute("data-acct-number")).Returns(accountNumberString);
-            accountDivMock.Setup(div => div.GetAttribute("data-acct-name")).Returns(accountNameString);
+            string valueAttributeName;
             switch (accountTypeString)
             {
                 case "IA":
                 case "RA":
                 case "HS":
                 case "OA":
-                    accountDivMock.Setup(div => div.GetAttribute("data-most-recent-value"))
-                        .Returns(accountValueString);
+                    valueAttributeName = "data-most-recent-value";
                     break;
                 case "CC":
-                    accountDivMock.Setup(div => div.GetAttribute("data-acct-balance"))
-                        .Returns(accountValueString);
+                    valueAttributeName = "data-acct-balance";
                     break;
                 default:
                     throw new ArgumentOutOfRangeException();
             }
-            return accountDivMock.Object;
+            return valueAttributeName;
+        }
+
+        private Mock<IWebElement> GetOrCreateAccountGroupDiv(string accountTypeString)
+        {
+            return _groupDivMocks.ContainsKey(accountTypeString) ? _groupDivMocks[accountTypeString] : new Mock<IWebElement>();
         }
     }
 }


Fix freecam breaking mouse in mod menu

Fix freecam breaking mouse in mod menu

--- YLFreeCamera/src/YLFreeCamera.cs
+++ YLFreeCamera/src/YLFreeCamera.cs
@@ -81,9 +81,17 @@
             fog.fogShader = Shader.Find("Hidden/GlobalFog");
             */

-            _FreeCamera.gameObject.AddComponent<SimpleSmoothMouseLook>();
+            _MouseLook = _FreeCamera.gameObject.AddComponent<SimpleSmoothMouseLook>();

             return _FreeCamera;
+        }
+    }
+    private SimpleSmoothMouseLook _MouseLook;
+    public SimpleSmoothMouseLook MouseLook {
+        get {
+            if (_MouseLook != null)
+                return _MouseLook;
+            return _MouseLook = FreeCamera.GetComponent<SimpleSmoothMouseLook>();
         }
     }

@@ -307,8 +315,8 @@
                 if (PrevCamera != null) {
                     FreeCamera.transform.position = PrevCamera.transform.position;
                     FreeCamera.transform.eulerAngles = new Vector3(0f, PrevCamera.transform.eulerAngles.y, 0f);
-                    FreeCamera.GetComponent<SimpleSmoothMouseLook>().targetDirection = PrevCamera.transform.rotation.eulerAngles;
-                    FreeCamera.GetComponent<SimpleSmoothMouseLook>().mouseAbsolute = Vector2.zero;
+                    MouseLook.targetDirection = PrevCamera.transform.rotation.eulerAngles;
+                    MouseLook.mouseAbsolute = Vector2.zero;
                     FreeCamera.fieldOfView = PrevCamera.fieldOfView;
                     if (FreeCamera.fieldOfView < 10f)
                         FreeCamera.fieldOfView = 75f;
@@ -339,8 +347,13 @@

         GUIInfoGroup.Visible = IsEnabled && IsGUIVisible;

+        if (_FreeCamera != null)
+            MouseLook.enabled = IsEnabled;
+
         if (!IsEnabled)
             return;
+
+        MouseLook.enabled = !ModGUI.MainGroup.Visible;

         if (ModInput.GetButtonDown("FreeCam GUI Toggle"))
             IsGUIVisible = !IsGUIVisible;


BigInteger to Exponential String tweak

BigInteger to Exponential String tweak

--- Framework.Core/System/Numerics/BigInteger.string.cs
+++ Framework.Core/System/Numerics/BigInteger.string.cs
@@ -553,10 +553,11 @@
                 return value.InternalSign.ToString(format, info);
             }

-            return FormatBigIntegerToExponentialStringExtracted(value, info, fmt, ref precision);
-        }
-
-        private static string FormatBigIntegerToExponentialStringExtracted(BigInteger value, NumberFormatInfo info, char fmt, ref int precision)
+            var copy = value;
+            return FormatBigIntegerToExponentialStringExtracted(ref copy, info, fmt, ref precision);
+        }
+
+        private static string FormatBigIntegerToExponentialStringExtracted(ref BigInteger value, NumberFormatInfo info, char fmt, ref int precision)
         {
             var scale = (int)Math.Floor(Log10(value));
             // ---


Make sure pagination can actually be enabled.

--- src/BibleBot.Backend/Controllers/CommandGroups/Settings/FormattingCommandGroup.cs
+++ src/BibleBot.Backend/Controllers/CommandGroups/Settings/FormattingCommandGroup.cs
@@ -37,6 +37,7 @@
                 new FormattingUsage(_userService, _guildService),
                 new FormattingSetVerseNumbers(_userService, _guildService),
                 new FormattingSetTitles(_userService, _guildService),
+                new FormattingSetPagination(_userService, _guildService),
                 new FormattingSetDisplayStyle(_userService, _guildService),
                 new FormattingSetPrefix(_userService, _guildService),
                 new FormattingSetIgnoringBrackets(_userService, _guildService)


Resolve use CurrentValue incorrectly instead of CurrentValueAsString and Value incorrectly instead of CurrentValue in BitSearchBox #1517 (#1519)

--- src/Client/Web/Bit.Client.Web.BlazorUI/Components/SearchBox/BitSearchBox.razor.cs
+++ src/Client/Web/Bit.Client.Web.BlazorUI/Components/SearchBox/BitSearchBox.razor.cs
@@ -167,7 +167,7 @@
         {
             if (IsEnabled is false) return;

-            CurrentValue = string.Empty;
+            CurrentValueAsString = string.Empty;
             await InputRef.FocusAsync();
             await OnClear.InvokeAsync();
         }
@@ -177,8 +177,8 @@
             if (IsEnabled is false) return;
             if (ValueHasBeenSet && ValueChanged.HasDelegate is false) return;

-            CurrentValue = e.Value?.ToString();
-            await OnChange.InvokeAsync(Value);
+            CurrentValueAsString = e.Value?.ToString();
+            await OnChange.InvokeAsync(CurrentValue);
         }

         private async Task HandleOnKeyDown(KeyboardEventArgs eventArgs)
@@ -187,15 +187,15 @@

             if (eventArgs.Code == "Escape")
             {
-                CurrentValue = string.Empty;
+                CurrentValueAsString = string.Empty;
                 await InputRef.FocusAsync();
                 await OnEscape.InvokeAsync();
                 await OnClear.InvokeAsync();
             }
             else if (eventArgs.Code == "Enter")
             {
-                CurrentValue = await JSRuntime.GetProperty(InputRef, "value");
-                await OnSearch.InvokeAsync(Value);
+                CurrentValueAsString = await JSRuntime.GetProperty(InputRef, "value");
+                await OnSearch.InvokeAsync(CurrentValue);
             }
         }


Fix typo in variable name

Fix typo in variable name

--- src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Performance/UseCountProperly.cs
+++ src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Performance/UseCountProperly.cs
@@ -48,7 +48,7 @@

         // CA1827
         private static readonly LocalizableString s_localizableTitle_CA1827 = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.DoNotUseCountWhenAnyCanBeUsedTitle), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources));
-        private static readonly LocalizableString s_localizableMessag_CA1827 = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.DoNotUseCountWhenAnyCanBeUsedMessage), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources));
+        private static readonly LocalizableString s_localizableMessage_CA1827 = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.DoNotUseCountWhenAnyCanBeUsedMessage), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources));
         private static readonly LocalizableString s_localizableDescription_CA1827 = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.DoNotUseCountWhenAnyCanBeUsedDescription), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources));

         // CA1828
@@ -69,7 +69,7 @@
         internal static readonly DiagnosticDescriptor s_rule_CA1827 = DiagnosticDescriptorHelper.Create(
             CA1827,
             s_localizableTitle_CA1827,
-            s_localizableMessag_CA1827,
+            s_localizableMessage_CA1827,
             DiagnosticCategory.Performance,
             RuleLevel.IdeSuggestion,
             description: s_localizableDescription_CA1827,


Fixed security issue for ReCaptcha SecretKey (#8312)

Added `autocomplete="off"` to input for SecretKey.

--- src/OrchardCore.Modules/OrchardCore.ReCaptcha/Views/ReCaptchaSettings.Edit.cshtml
+++ src/OrchardCore.Modules/OrchardCore.ReCaptcha/Views/ReCaptchaSettings.Edit.cshtml
@@ -11,7 +11,7 @@

     @T["Secret Key"]
-    <input asp-for="SecretKey" class="form-control" type="text" />
+    <input asp-for="SecretKey" class="form-control" type="text" autocomplete="off" />

     @T["Your Google's reCaptcha Secret Key."]


Guard against ReflectionTypeLoadException in InitializeTypeCache (#2549)

--- src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
+++ src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
@@ -5860,7 +5860,17 @@
             #region Process_LoadedAssemblies

             var assembliesExcludingPSGenerated = ClrFacade.GetAssemblies();
-            var allPublicTypes = assembliesExcludingPSGenerated.SelectMany(assembly => assembly.GetTypes().Where(TypeResolver.IsPublic));
+            var allPublicTypes = assembliesExcludingPSGenerated.SelectMany(assembly =>
+            {
+                try
+                {
+                    return assembly.GetTypes().Where(TypeResolver.IsPublic);
+                }
+                catch (ReflectionTypeLoadException)
+                {
+                }
+                return Type.EmptyTypes;
+            });

             foreach (var type in allPublicTypes)
             {


bump to 3.8.1.554

bump to 3.8.1.554

--- Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs
+++ Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs
@@ -51,4 +51,4 @@
 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
 // 既定値にすることができます:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.8.0.553")]
+[assembly: AssemblyVersion("3.8.1.554")]


#78 - Fix ObjectDisposedException in sample

When loading from XML the explicitly referenced controls were not being
recreated (like the toolbox, etc; where there is a private member
holding a reference to the form).  Solution is to recreate these forms
before attempting to load from XML, just as load from code is doing.

--- DockSample/MainForm.cs
+++ DockSample/MainForm.cs
@@ -14,19 +14,20 @@
     {
         private bool m_bSaveLayout = true;
         private DeserializeDockContent m_deserializeDockContent;
-        private DummySolutionExplorer m_solutionExplorer = new DummySolutionExplorer();
-        private DummyPropertyWindow m_propertyWindow = new DummyPropertyWindow();
-        private DummyToolbox m_toolbox = new DummyToolbox();
-        private DummyOutputWindow m_outputWindow = new DummyOutputWindow();
-        private DummyTaskList m_taskList = new DummyTaskList();
+        private DummySolutionExplorer m_solutionExplorer;
+        private DummyPropertyWindow m_propertyWindow;
+        private DummyToolbox m_toolbox;
+        private DummyOutputWindow m_outputWindow;
+        private DummyTaskList m_taskList;

         public MainForm()
         {
             InitializeComponent();
+
+            CreateStandardControls();

             showRightToLeft.Checked = (RightToLeft == RightToLeft.Yes);
             RightToLeftLayout = showRightToLeft.Checked;
-            m_solutionExplorer = new DummySolutionExplorer();
             m_solutionExplorer.RightToLeftLayout = RightToLeftLayout;
             m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
         }
@@ -426,11 +427,7 @@

             CloseAllDocuments();

-            m_solutionExplorer = new DummySolutionExplorer();
-            m_propertyWindow = new DummyPropertyWindow();
-            m_toolbox = new DummyToolbox();
-            m_outputWindow = new DummyOutputWindow();
-            m_taskList = new DummyTaskList();
+            CreateStandardControls();

             m_solutionExplorer.Show(dockPanel, DockState.DockRight);
             m_propertyWindow.Show(m_solutionExplorer.Pane, m_solutionExplorer);
@@ -450,12 +447,23 @@
             dockPanel.ResumeLayout(true, true);
         }

+        private void CreateStandardControls()
+        {
+            m_solutionExplorer = new DummySolutionExplorer();
+            m_propertyWindow = new DummyPropertyWindow();
+            m_toolbox = new DummyToolbox();
+            m_outputWindow = new DummyOutputWindow();
+            m_taskList = new DummyTaskList();
+        }
+
         private void menuItemLayoutByXml_Click(object sender, System.EventArgs e)
         {
             dockPanel.SuspendLayout(true);

             // In order to load layout from XML, we need to close all the DockContents
             CloseAllContents();
+
+            CreateStandardControls();

             Assembly assembly = Assembly.GetAssembly(typeof(MainForm));
             Stream xmlStream = assembly.GetManifestResourceStream("DockSample.Resources.DockPanel.xml");


Added web.config to bad names.

Added web.config to bad names.

--- JexusManager/Wizards/ConnectionWizard/BrowsePage.cs
+++ JexusManager/Wizards/ConnectionWizard/BrowsePage.cs
@@ -87,7 +87,7 @@
                 }

                 var name = Path.GetFileName(data.FileName);
-                var badNames = new[] { "administration.config", "redirection.config" };
+                var badNames = new[] { "administration.config", "redirection.config", "web.config" };
                 foreach (var bad in badNames)
                 {
                     if (string.Equals(name, bad, StringComparison.OrdinalIgnoreCase))


Dispose test

Dispose test

--- test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs
+++ test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs
@@ -115,6 +115,23 @@
             TestUtilities.AssertFailIfErrors(context);
         }

+        [Fact]
+        public void AesGcm_Dispose()
+        {
+            AuthenticatedEncryptionProvider encryptionProvider = new AuthenticatedEncryptionProvider(Default.SymmetricEncryptionKey256, SecurityAlgorithms.Aes256Gcm);
+            encryptionProvider.Dispose();
+            var expectedException = ExpectedException.ObjectDisposedException;
+
+            try
+            {
+                encryptionProvider.Decrypt(AES_256_GCM.E, AES_256_GCM.A, AES_256_GCM.IV, AES_256_GCM.T);
+            }
+            catch (Exception ex)
+            {
+                expectedException.ProcessException(ex);
+            }
+        }
+
         [Theory, MemberData(nameof(AEPConstructorTheoryData))]
         public void Constructors(string testId, SymmetricSecurityKey key, string algorithm, ExpectedException ee)
         {


polish

polish

--- Dragon/Source/Token.cs
+++ Dragon/Source/Token.cs
@@ -81,16 +81,16 @@
         }

         public readonly static Word
-            and = new Word("&&", Tag.AND),
-            or = new Word("||", Tag.OR),
-            eq = new Word("==", Tag.EQ),
-            ne = new Word("!=", Tag.NE),
-            le = new Word("<=", Tag.LE),
-            ge = new Word(">=", Tag.GE),
-            minus = new Word("minus", Tag.MINUS),
-            True = new Word("true", Tag.TRUE),
-            False = new Word("false", Tag.FALSE),
-            temp = new Word("t", Tag.TEMP);
+            and     = new Word("&&", Tag.AND),
+            or      = new Word("||", Tag.OR),
+            eq      = new Word("==", Tag.EQ),
+            ne      = new Word("!=", Tag.NE),
+            le      = new Word("<=", Tag.LE),
+            ge      = new Word(">=", Tag.GE),
+            minus   = new Word("minus", Tag.MINUS),
+            True    = new Word("true", Tag.TRUE),
+            False   = new Word("false", Tag.FALSE),
+            temp    = new Word("t", Tag.TEMP);
     }


Git is drunk

Git is drunk

Pushing the remaining hook.

--- Pluton/Hooks.cs
+++ Pluton/Hooks.cs
@@ -349,6 +349,11 @@
         public static void PlayerSyringeOther(SyringeWeapon sw, BaseEntity.RPCMessage msg)
         {
             OnPlayerSyringeOther.OnNext(new SyringeUseEvent(sw, msg, false));
+        }
+
+        public static void PlayerHealthChangeEvent(BasePlayer p, float f, float f2)
+        {
+            OnPlayerHealthChange.OnNext(new PlayerHealthChangeEvent(p, f, f2));
         }

         public static void ItemAdded(ItemContainer ic, Item i)


Add failing test for hue jumping when saturation near-zero

--- osu.Framework.Tests/Visual/UserInterface/TestSceneHSVColourPicker.cs
+++ osu.Framework.Tests/Visual/UserInterface/TestSceneHSVColourPicker.cs
@@ -108,6 +108,14 @@
             assertSaturationAndValue(saturation, value);
         }

+        [Test]
+        public void TestHueUnchangedIfSaturationAlmostZero()
+        {
+            AddStep("change colour", () => colourPicker.Current.Value = Colour4.FromHSV(0.5f, 0.5f, 0.5f));
+            AddStep("set saturation to 0", () => colourPicker.SaturationValueControl.Saturation.Value = 0);
+            AddAssert("hue is unchanged", () => colourPicker.HueControl.Hue.Value == 0.5f);
+        }
+
         private void assertHue(float hue, float tolerance = 0.005f)
         {
             AddAssert($"hue selector has {hue}", () => Precision.AlmostEquals(colourPicker.HueControl.Hue.Value, hue, tolerance));


chat.say update

chat.say update

--- Pluton/Hooks.cs
+++ Pluton/Hooks.cs
@@ -107,8 +107,30 @@
                 if (str.Length > 128)
                     str = str.Substring(0, 128);

-                if (chat.serverlog)
-                    Debug.Log(basePlayer.displayName + ": " + str);
+                if (str.Length <= 0) return;
+
+
+                if (chat.serverlog) {
+                    ServerConsole.PrintColoured (new object[] {
+                        ConsoleColor.DarkYellow,
+                        basePlayer.displayName + ": ",
+                        ConsoleColor.DarkGreen,
+                        str
+                    });
+                    server.Log ("Log.Chat.txt", string.Format ("{0}/{1}: {2}\r\n", basePlayer.userID, basePlayer.displayName, str));
+                    Debug.Log (string.Format ("[CHAT] {0}: {1}", basePlayer.displayName, str));
+                }
+
+                string arg2 = "#5af";
+                if (basePlayer.IsAdmin ()) {
+                    arg2 = "#af5";
+                }
+
+                if (DeveloperList.IsDeveloper (basePlayer)) {
+                    arg2 = "#fa5";
+                }
+
+                string text2 = string.Format ("<color={2}>{0}</color>  {1}", basePlayer.displayName.Replace('<', ' ').Replace('>', ' '), str.Replace('<', ' ').Replace('>', ' '), arg2);

                 OnChat.OnNext(pChat);

@@ -117,14 +139,14 @@
                     arg.ReplyWith(pChat.Reply);

                     if (server.globalchat) {
-                        ConsoleSystem.Broadcast("chat.add " + pChat.BroadcastName.QuoteSafe() + " " + pChat.FinalText.QuoteSafe() + " 1.0");
+                        ConsoleSystem.Broadcast("chat.add", basePlayer.userID, text2, 1);
                     } else {
                         float num = 2500;
                         foreach (Connection current in Net.sv.connections) {
                             if (current.player != null) {
                                 float sqrMagnitude = (current.player.transform.position - basePlayer.transform.position).sqrMagnitude;
                                 if (sqrMagnitude <= num) {
-                                    ConsoleSystem.SendClientCommand(current, "chat.add " + pChat.BroadcastName.QuoteSafe() + " " + pChat.FinalText.QuoteSafe() + " " + Mathf.Clamp01(num - sqrMagnitude + 0.2f).ToString("F").Replace(',', '.'));
+                                    ConsoleSystem.SendClientCommand(current, "chat.add", basePlayer.userID, text2, Mathf.Clamp01(num - sqrMagnitude + 0.2f));
                                 }
                             }
                         }


dont use unused usings

dont use unused usings

--- Pluton/Hooks.cs
+++ Pluton/Hooks.cs
@@ -1,13 +1,9 @@
 using System;
 using Network;
-using ProtoBuf;
 using UnityEngine;
 using Pluton.Events;
-using System.Reactive;
-using System.Reactive.Linq;
 using System.Reactive.Subjects;
 using System.Collections.Generic;
-using System.Reactive.Disposables;

 namespace Pluton
 {


Fix for Bug 4 - TMC Charts will now be created for Lane-by-Lane count detectors if they are marked as Pedestrian, Bus, Light rail, or HOV.


Device name unicity for owner account

Device name unicity for owner account

--- MusicPickerService/Controllers/DevicesController.cs
+++ MusicPickerService/Controllers/DevicesController.cs
@@ -77,6 +77,11 @@
                 return BadRequest(ModelState);
             }

+            if (DeviceExists(CurrentUser.Id, input.Name))
+            {
+                return BadRequest(String.Format("Device with name {0} already exists", input.Name));
+            }
+
             DateTime now = DateTime.Now;

             Device device = new Device()
@@ -128,6 +133,20 @@
             return db.Devices.Count(e => e.Id == id) > 0;
         }

+        private bool DeviceExists(string ownerId, string deviceName)
+        {
+            int count = (from device in db.Devices
+                where device.OwnerId == ownerId && device.Name == deviceName
+                select device).Count();
+
+            if (count != 0)
+            {
+                return true;
+            }
+
+            return false;
+        }
+
         private bool isDeviceOwner(Device device)
         {
             if (device.Owner == CurrentUser)


minor: Remove unused System.Linq reference and use ParcelFlags.None instead of 0 from previous commit cb1f28

--- OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -27,7 +27,6 @@

 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Reflection;
 using log4net;
 using OpenMetaverse;
@@ -390,7 +389,7 @@
                         ParcelFlags.DenyAgeUnverified);
             }

-            if (allowedDelta != 0)
+            if (allowedDelta != (uint)ParcelFlags.None)
             {
                 uint preserve = LandData.Flags & ~allowedDelta;
                 newData.Flags = preserve | (args.ParcelFlags & allowedDelta);


Guard against multiple calls to SetOwnerId on one logical ownership change.

--- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2123,11 +2123,13 @@

         public void SetOwnerId(UUID userId)
         {
-                ForEachPart(delegate(SceneObjectPart part)
-                {
-                    part.LastOwnerID = part.OwnerID;
-                    part.OwnerID = userId;
-
+                ForEachPart(delegate(SceneObjectPart part)
+                {
+                    if (OwnerID != userId)
+                    {
+                        part.LastOwnerID = part.OwnerID;
+                        part.OwnerID = userId;
+                    }
                 });
         }


Remove commented code relating to caching and support for batch updates, etc.

--- Orders.com.Web.Api/Controllers/ApiControllerBase.cs
+++ Orders.com.Web.Api/Controllers/ApiControllerBase.cs
@@ -49,17 +49,9 @@
                     if (result.Value == null)
                     {
                         return Request.CreateErrorResponse(HttpStatusCode.NotFound, BuildNotFoundHttpError(id));
-                        //var message = BuildNotFoundResponseMessage(className, id);
-                        //throw new HttpResponseException(message);
                     }
                     var response = Request.CreateResponse(HttpStatusCode.OK, result.Value);
-                    //response.Headers.ETag = new EntityTagHeaderValue(string.Format("\"{0}\"", result.ETagValue(), true));
-                    //response.Content.Headers.LastModified = DateTime.Now.ToUniversalTime(); // result.LastModified.Value.ToUniversalTime();
-
                     return response;
-                    //.AppendCacheControl(36000)
-                    //.AppendExpires(60)
-                    //.AppendLastModified();
                 }

                 return Request.CreateErrorResponse(HttpStatusCode.BadRequest, string.Join("\n", result.Errors));
@@ -100,58 +92,21 @@
             }
         }

-        //// POST api/contracts
-        ///// <remarks>Supports batch inserts</remarks>
-        //public HttpResponseMessage Post(IEnumerable<T> items)
-        //{
-        //    throw new NotImplementedException();
-        //}
-
-        //// POST api/contracts
-        //public async virtual Task<HttpResponseMessage> Post(T value)
-        //{
-        //    if (value == null) return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "The request payload could not be parsed");
-
-        //    var InsertCommand = _businessService.GetInsertAsyncCommand(value);
-
-        //    if (InsertCommand.CanInvoke)
-        //    {
-        //        T newEntity = await InsertCommand.InvokeAsync();
-        //        // http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5
-        //        var responseMessage = Request.CreateResponse(HttpStatusCode.Created, newEntity);
-        //        responseMessage.Headers.Location = new Uri(BuildNewResourceUriString(newEntity.ID));
-        //        return responseMessage;
-        //    }
-
-        //    return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState.ClearFirst().ThenAddRange(InsertCommand.GetValidationErrors(value)));
-        //}
-
-
         // PUT api/contracts/5
         public virtual HttpResponseMessage Put(TKey id, T value)
         {
             if (value == null) return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "The request payload could not be parsed");

-            //if (Request.Headers.IfMatch.Count == 0)
-            //    return Request.CreateErrorResponse(HttpStatusCode.PreconditionFailed, "A PUT request must contain a If-Match header value whose content is the ETag value from a previous GET request");
             try
             {
                 var result = _businessService.UpdateCommand(value).Execute();

                 if (result.Success)
                 {
-                    //if (currentSnapshot.ETagValue() != Request.Headers.IfMatch.First().Tag)
-                    //    return Request.CreateErrorResponse(HttpStatusCode.PreconditionFailed, "A concurrency issue occurred.  Try a GET on the resource and attempt the PUT again.");
-
                     value.ID = id;
                     T updatedEntity = result.Value;
-
                     // http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6
                     var response = Request.CreateResponse(HttpStatusCode.OK, updatedEntity);
-
-                    //response.Headers.ETag = new EntityTagHeaderValue(string.Format("\"{0}\"", result.ETagValue(), true));
-                    //response.Content.Headers.LastModified = DateTime.Now.ToUniversalTime(); // result.LastModified.Value.ToUniversalTime();
-
                     return response;
                 }

@@ -170,13 +125,6 @@
                 return Request.CreateErrorResponse(HttpStatusCode.NotImplemented, ex.Message);
             }
         }
-
-        // PUT api/contracts
-        /// <remarks>Supports batch updates</remarks>
-        //public virtual HttpResponseMessage Put(IEnumerable<T> items)
-        //{
-        //    throw new NotImplementedException();
-        //}

         // DELETE api/contracts/5
         public virtual HttpResponseMessage Delete(TKey id)


Fixed config name

Fixed config name

--- PdmProApiExamples/Services/FileReferencesService.cs
+++ PdmProApiExamples/Services/FileReferencesService.cs
@@ -60,7 +60,7 @@
             fileRef.Traverse(x =>
             {
                 Debug.WriteLine(x.File.Path);
-                listing.AddFileCfg(x.File.Path, DateTime.Now, x.File.Id, "@", (int)EdmListFileFlags.EdmList_Nothing);
+                listing.AddFileCfg(x.File.Path, DateTime.Now, x.File.Id, config, (int)EdmListFileFlags.EdmList_Nothing);
             });

             // create the list


Reduce DB requests from 1+NEmployees*2 to 3

--- R7.University.EmployeeList/ViewEmployeeList.ascx.cs
+++ R7.University.EmployeeList/ViewEmployeeList.ascx.cs
@@ -42,6 +42,10 @@
 			base.OnInit (e);
 		}*/

+        protected IEnumerable<EmployeeAchievementInfo> CommonTitleAchievements;
+
+        protected IEnumerable<OccupiedPositionInfoEx> CommonOccupiedPositions;
+
 		/// <summary>
 		/// Handles Load event for a control
 		/// </summary>
@@ -80,9 +84,26 @@
 					}
 					else
 					{
-						// set container control visibility to common users
-						Cache_SetContainerVisible (true);
-
+				        var employeeIds = Utils.FormatList (", ", items.Select (em => em.EmployeeID));
+
+                        // get title achievements for all selected employees
+                        // TODO: Use {databaseOwner} and {objectQualifier}
+                        CommonTitleAchievements = EmployeeListController.GetObjects<EmployeeAchievementInfo> (CommandType.Text,
+                            string.Format ("SELECT * FROM dbo.vw_University_EmployeeAchievements WHERE [EmployeeID] IN ({0}) AND [IsTitle] = 1",
+                                employeeIds)
+                        );
+
+                        // get occupied positions for all selected employees
+                        // NOTE: Current division positions go first, then checks IsPrime, then PositionWeight
+                        // REVIEW: add "AND [DivisionID] = @1" to display employee positions only from current division
+                        CommonOccupiedPositions = EmployeeListController.GetObjects<OccupiedPositionInfoEx> (
+                            string.Format ("WHERE [EmployeeID] IN ({0}) ORDER BY (CASE WHEN [DivisionID]={1} THEN 0 ELSE 1 END), [IsPrime] DESC, [PositionWeight] DESC",
+                                employeeIds, EmployeeListSettings.DivisionID)
+                        );
+
+                        // set container control visibility to common users
+                        Cache_SetContainerVisible (true);
+
 						// bind the data
 						listEmployees.DataSource = items;
 						listEmployees.DataBind ();
@@ -205,9 +226,8 @@
 				labelAcademicDegreeAndTitle.Visible = false;
 			*/

-			// Employee titles
-			var achievements = EmployeeListController.GetObjects<EmployeeAchievementInfo> (
-				                   CommandType.Text, "SELECT * FROM dbo.vw_University_EmployeeAchievements WHERE [EmployeeID] = @0 AND [IsTitle] = 1", employee.EmployeeID);
+			// get current employee title achievements
+			var achievements = CommonTitleAchievements.Where (ach => ach.EmployeeID == employee.EmployeeID);

 			var titles = achievements.Select (ach => Utils.FirstCharToLower(ach.DisplayShortTitle)).ToList ();

@@ -265,14 +285,8 @@
 			else
 				linkUserProfile.Visible = false;

-			// occupied positions
-			// NOTE: Current division positions go first, then checks IsPrime, then PositionWeight
-			// TODO: Need to retrieve occupied positions more effectively, e.g. preload them
-			// REVIEW: add "AND [DivisionID] = @1" to display employee positions only from current division
-			var ops = EmployeeListController.GetObjects<OccupiedPositionInfoEx> (
-				          "WHERE [EmployeeID] = @0 ORDER BY (CASE WHEN [DivisionID]=@1 THEN 0 ELSE 1 END), [IsPrime] DESC, [PositionWeight] DESC",
-				          employee.EmployeeID, EmployeeListSettings.DivisionID
-			          );
+			// get current employee occupied positions
+			var ops = CommonOccupiedPositions.Where (op => op.EmployeeID == employee.EmployeeID);

 			// build positions value
 			var positionsVisible = false;


Add date picker toggling.

Add date picker toggling.

--- Ross/ViewControllers/EditTimeEntryViewController.cs
+++ Ross/ViewControllers/EditTimeEntryViewController.cs
@@ -14,6 +14,7 @@
 {
     public class EditTimeEntryViewController : UIViewController
     {
+        private UIView wrapper;
         private StartStopView startStopView;
         private UIDatePicker datePicker;
         private ProjectClientTaskButton projectButton;
@@ -21,6 +22,7 @@
         private UIButton tagsButton;
         private LabelSwitch billableSwitch;
         private UIButton deleteButton;
+        private bool hideDatePicker = true;

         public EditTimeEntryViewController (TimeEntryModel model)
         {
@@ -29,19 +31,20 @@
         public override void LoadView ()
         {
             var scrollView = new UIScrollView ().ApplyStyle (Style.Screen);
-            var wrapper = new UIView () {
-                TranslatesAutoresizingMaskIntoConstraints = false,
-            };
-
-            scrollView.Add (wrapper);
+
+            scrollView.Add (wrapper = new UIView () {
+                TranslatesAutoresizingMaskIntoConstraints = false,
+            });

             wrapper.Add (startStopView = new StartStopView () {
                 TranslatesAutoresizingMaskIntoConstraints = false,
             });
+            startStopView.SelectedChanged += OnStartStopViewSelectedChanged;

             wrapper.Add (datePicker = new UIDatePicker () {
                 TranslatesAutoresizingMaskIntoConstraints = false,
-                Hidden = true,
+                Hidden = hideDatePicker,
+                Alpha = 0,
             }.ApplyStyle (Style.EditTimeEntry.DatePicker));

             wrapper.Add (projectButton = new ProjectClientTaskButton () {
@@ -87,11 +90,61 @@
             View = scrollView;
         }

+        private void OnStartStopViewSelectedChanged (object sender, EventArgs e)
+        {
+            var value = startStopView.Selected == TimeKind.None;
+
+            if (hideDatePicker == value)
+                return;
+
+            hideDatePicker = value;
+
+            if (hideDatePicker) {
+                UIView.AnimateKeyframes (
+                    0.4, 0, 0,
+                    delegate {
+                        UIView.AddKeyframeWithRelativeStartTime (0, 0.4, delegate {
+                            datePicker.Alpha = 0;
+                        });
+                        UIView.AddKeyframeWithRelativeStartTime (0.2, 0.8, delegate {
+                            wrapper.RemoveConstraints (wrapper.Constraints);
+                            wrapper.AddConstraints (VerticalLinearLayout (wrapper));
+                            View.LayoutIfNeeded ();
+                        });
+                    },
+                    delegate {
+                        if (hideDatePicker) {
+                            datePicker.Hidden = true;
+                        }
+                    }
+                );
+            } else {
+                // TODO: Sync date picker value
+                datePicker.Hidden = false;
+
+                UIView.AnimateKeyframes (
+                    0.4, 0, 0,
+                    delegate {
+                        UIView.AddKeyframeWithRelativeStartTime (0, 0.6, delegate {
+                            wrapper.RemoveConstraints (wrapper.Constraints);
+                            wrapper.AddConstraints (VerticalLinearLayout (wrapper));
+                            View.LayoutIfNeeded ();
+                        });
+                        UIView.AddKeyframeWithRelativeStartTime (0.4, 0.8, delegate {
+                            datePicker.Alpha = 1;
+                        });
+                    },
+                    delegate {
+                    }
+                );
+            }
+        }
+
         private IEnumerable<FluentLayout> VerticalLinearLayout (UIView container)
         {
             UIView prev = null;

-            var subviews = container.Subviews.Where (v => !v.Hidden).ToList ();
+            var subviews = container.Subviews.Where (v => !v.Hidden && !(v == datePicker && hideDatePicker)).ToList ();
             foreach (var v in subviews) {
                 var isLast = subviews [subviews.Count - 1] == v;

@@ -223,7 +276,7 @@
                 }
             }

-            private event EventHandler SelectedChanged;
+            public event EventHandler SelectedChanged;

             private void SetStopTimeHidden (bool hidden, bool animate)
             {


Usings sorted in startup.cs

Usings sorted in startup.cs

--- FPL.Console/Startup.cs
+++ FPL.Console/Startup.cs
@@ -1,9 +1,6 @@
 // <copyright file="Startup.cs" company="Primas">
 //     Company copyright tag.
 // </copyright>
-
-using FPL.Data.Models.SummaryStats;
-
 namespace FPL.Console
 {
     using System;
@@ -15,13 +12,14 @@
     using System.Net;
     using System.Text.RegularExpressions;

+    using Newtonsoft.Json;
+
     using FPL.Data;
-    using FPL.Data.Utilities;
     using FPL.Data.Models;
     using FPL.Data.Models.FullStats;
+    using FPL.Data.Models.SummaryStats;
+    using FPL.Data.Utilities;
     using FPL.WebCrawler;
-
-    using Newtonsoft.Json;

     /// <summary>
     /// The startup class of the console


[UNG_002] Volcanosaur

[UNG_002] Volcanosaur

--- SabberStoneCore/CardSets/Standard/UngoroCardsGen.cs
+++ SabberStoneCore/CardSets/Standard/UngoroCardsGen.cs
@@ -2908,11 +2908,10 @@
             // --------------------------------------------------------
             cards.Add("UNG_002", new List<Enchantment>
             {
-                // TODO [UNG_002] Volcanosaur && Test: Volcanosaur_UNG_002
-                new Enchantment
-                {
-                    Activation = EnchantmentActivation.BATTLECRY,
-                    SingleTask = null,
+                new Enchantment
+                {
+                    Activation = EnchantmentActivation.BATTLECRY,
+                    SingleTask = new EnqueueTask(2, new AdaptTask(EntityType.SOURCE))
                 },
             });


Added automatic movement to realms

Added automatic movement to realms

--- FameBot/Core/Plugin.cs
+++ FameBot/Core/Plugin.cs
@@ -54,11 +54,15 @@
         private IntPtr flashPtr;
         private bool followTarget;
         private List<Target> targets;
+        private List<Portal> portals;
         private Dictionary<int, Target> playerPosisions;
         private Client connectedClient;
         private int tickCount;
         private Configuration config;
         private FameBotGUI gui;
+        private bool autoConnect = true;
+        private bool gotoRealm;
+        private bool enabled;

         public static event HealthEventHandler healthChanged;
         public delegate void HealthEventHandler(object sender, HealthChangedEventArgs args);
@@ -129,6 +133,7 @@
         {
             targets = new List<Target>();
             playerPosisions = new Dictionary<int, Target>();
+            portals = new List<Portal>();

             gui = new FameBotGUI();
             PluginUtils.ShowGUI(gui);
@@ -162,8 +167,15 @@
             proxy.ClientConnected += (client) =>
             {
                 connectedClient = client;
-                Stop();
+                targets.Clear();
+                followTarget = false;
+                A_PRESSED = false;
+                D_PRESSED = false;
+                W_PRESSED = false;
+                S_PRESSED = false;
             };
+
+            proxy.HookPacket(PacketType.MAPINFO, OnMapInfo);

             guiEvent += (evt) =>
             {
@@ -212,13 +224,16 @@
             Log("Stopping bot");
             followTarget = false;
             targets.Clear();
+            enabled = false;
         }

         private void Start()
         {
             Log("Starting bot");
             targets.Clear();
-            followTarget = true;
+            if (!autoConnect)
+                followTarget = true;
+            enabled = true;
         }

         private void Escape(Client client)
@@ -254,8 +269,23 @@
                     if (playerPosisions.ContainsKey(obj.Status.ObjectId))
                         playerPosisions.Remove(obj.Status.ObjectId);
                     playerPosisions.Add(obj.Status.ObjectId, new Target(obj.Status.ObjectId, playerData.Name, playerData.Pos));
-
-                    // TODO: add portals. (object id 1810)
+                }
+                if(obj.ObjectType == 1810)
+                {
+                    foreach(var data in obj.Status.Data)
+                    {
+                        if(data.StringValue != null)
+                        {
+                            // TODO: replace with regex
+                            var strArray = data.StringValue.Split(' ');
+                            var strCount = strArray[1].Split('/')[0].Remove(0, 1);
+                            var name = strArray[0].Split('.')[1];
+                            var portal = new Portal(obj.Status.ObjectId, int.Parse(strCount), name);
+                            if (portals.Exists(ptl => ptl.ObjectId == obj.Status.ObjectId))
+                                portals.Remove(portals.Find(ptl => ptl.ObjectId == obj.Status.ObjectId));
+                            portals.Add(portal);
+                        }
+                    }
                 }
             }

@@ -284,6 +314,26 @@
             }
         }

+        private void OnMapInfo(Client client, Packet p)
+        {
+            MapInfoPacket packet = p as MapInfoPacket;
+            if (packet == null)
+                return;
+            Task.Factory.StartNew(async () =>
+            {
+                await Task.Delay(TimeSpan.FromSeconds(10));
+                portals.Clear();
+                if (packet.Name == "Nexus" && autoConnect)
+                    gotoRealm = true;
+                else
+                {
+                    gotoRealm = false;
+                    if (enabled)
+                        followTarget = true;
+                }
+            });
+        }
+
         private void OnHit(Client client, Packet p)
         {
             // Autonexus
@@ -302,6 +352,11 @@
             // Health changed event
             float healthPercentage = (float)client.PlayerData.Health / (float)client.PlayerData.MaxHealth;
             healthChanged?.Invoke(this, new HealthChangedEventArgs(healthPercentage * 100f));
+
+            if(autoConnect && gotoRealm)
+            {
+                MoveToRealms(client, healthPercentage);
+            }

             if(tickCount % config.TickCountThreshold == 0)
             {
@@ -331,7 +386,7 @@
                     playerPosisions[status.ObjectId].UpdatePosition(status.Position);
             }

-            if(!followTarget)
+            if(!followTarget && !gotoRealm)
             {
                 if (W_PRESSED)
                 {
@@ -366,101 +421,134 @@
                     client.SendToServer(tpPacket);
                 }

-                #region Movement
-                // Left or right
-                if (client.PlayerData.Pos.X < targetPosition.X - config.FollowDistanceThreshold)
-                {
-                    // Move right
-                    if (!D_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyDown, (int)Key.D, 0);
-                        D_PRESSED = true;
-                    }
-                    if (A_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.A, 0);
-                        A_PRESSED = false;
-                    }
-                }
-                else if (client.PlayerData.Pos.X <= targetPosition.X + config.FollowDistanceThreshold)
-                {
-                    if (D_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.D, 0);
-                        D_PRESSED = false;
-                    }
-                }
-                if (client.PlayerData.Pos.X > targetPosition.X + config.FollowDistanceThreshold)
-                {
-                    // Move left
-                    if (!A_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyDown, (int)Key.A, 0);
-                        A_PRESSED = true;
-                    }
-                    if (D_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.D, 0);
-                        D_PRESSED = false;
-                    }
-                }
-                else if (client.PlayerData.Pos.X >= targetPosition.X - config.FollowDistanceThreshold)
-                {
-                    if (A_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.A, 0);
-                        A_PRESSED = false;
-                    }
-                }
-
-                // Up or down
-                if (client.PlayerData.Pos.Y < targetPosition.Y - config.FollowDistanceThreshold)
-                {
-                    // Move down
-                    if (!S_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyDown, (int)Key.S, 0);
-                        S_PRESSED = true;
-                    }
-                    if (W_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.W, 0);
-                        W_PRESSED = false;
-                    }
-                }
-                else if (client.PlayerData.Pos.Y <= targetPosition.Y + config.FollowDistanceThreshold)
-                {
-                    if (S_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.S, 0);
-                        S_PRESSED = false;
-                    }
-                }
-                if (client.PlayerData.Pos.Y > targetPosition.Y + config.FollowDistanceThreshold)
-                {
-                    // Move up
-                    if (!W_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyDown, (int)Key.W, 0);
-                        W_PRESSED = true;
-                    }
-                    if (S_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.S, 0);
-                        S_PRESSED = false;
-                    }
-                }
-                else if (client.PlayerData.Pos.Y >= targetPosition.Y - config.FollowDistanceThreshold)
-                {
-                    if (W_PRESSED)
-                    {
-                        PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.W, 0);
-                        W_PRESSED = false;
-                    }
-                }
-                #endregion
+                CalculateMovement(client, targetPosition);
             }
         }
         #endregion
+
+        private void MoveToRealms(Client client, float healthPercentage)
+        {
+            Location target = new Location(134, 109);
+            if (healthPercentage < 0.95f)
+                target = new Location(134, 134);
+
+            CalculateMovement(client, target);
+
+            if(client.PlayerData.Pos.Y <= 109 && client.PlayerData.Pos.Y != 0)
+            {
+                gotoRealm = false;
+                Task.Factory.StartNew(() =>
+                {
+                    AttemptConnection(client, portals.OrderByDescending(p => p.PlayerCount).First());
+                });
+            }
+        }
+
+        private async void AttemptConnection(Client client, Portal portal)
+        {
+            UsePortalPacket packet = (UsePortalPacket)Packet.Create(PacketType.USEPORTAL);
+            packet.ObjectId = portal.ObjectId;
+            client.SendToServer(packet);
+            if(client.Connected)
+            {
+                await Task.Delay(TimeSpan.FromSeconds(0.2));
+                AttemptConnection(client, portal);
+            }
+        }
+
+        private void CalculateMovement(Client client, Location targetPosition)
+        {
+            // Left or right
+            if (client.PlayerData.Pos.X < targetPosition.X - config.FollowDistanceThreshold)
+            {
+                // Move right
+                if (!D_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyDown, (int)Key.D, 0);
+                    D_PRESSED = true;
+                }
+                if (A_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.A, 0);
+                    A_PRESSED = false;
+                }
+            }
+            else if (client.PlayerData.Pos.X <= targetPosition.X + config.FollowDistanceThreshold)
+            {
+                if (D_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.D, 0);
+                    D_PRESSED = false;
+                }
+            }
+            if (client.PlayerData.Pos.X > targetPosition.X + config.FollowDistanceThreshold)
+            {
+                // Move left
+                if (!A_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyDown, (int)Key.A, 0);
+                    A_PRESSED = true;
+                }
+                if (D_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.D, 0);
+                    D_PRESSED = false;
+                }
+            }
+            else if (client.PlayerData.Pos.X >= targetPosition.X - config.FollowDistanceThreshold)
+            {
+                if (A_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.A, 0);
+                    A_PRESSED = false;
+                }
+            }
+
+            // Up or down
+            if (client.PlayerData.Pos.Y < targetPosition.Y - config.FollowDistanceThreshold)
+            {
+                // Move down
+                if (!S_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyDown, (int)Key.S, 0);
+                    S_PRESSED = true;
+                }
+                if (W_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.W, 0);
+                    W_PRESSED = false;
+                }
+            }
+            else if (client.PlayerData.Pos.Y <= targetPosition.Y + config.FollowDistanceThreshold)
+            {
+                if (S_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.S, 0);
+                    S_PRESSED = false;
+                }
+            }
+            if (client.PlayerData.Pos.Y > targetPosition.Y + config.FollowDistanceThreshold)
+            {
+                // Move up
+                if (!W_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyDown, (int)Key.W, 0);
+                    W_PRESSED = true;
+                }
+                if (S_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.S, 0);
+                    S_PRESSED = false;
+                }
+            }
+            else if (client.PlayerData.Pos.Y >= targetPosition.Y - config.FollowDistanceThreshold)
+            {
+                if (W_PRESSED)
+                {
+                    PostMessage(flashPtr, (uint)Key.KeyUp, (int)Key.W, 0);
+                    W_PRESSED = false;
+                }
+            }
+        }
     }
 }


Update Maybe.cs

Update Maybe.cs

added two new let functions

--- Safely/Maybe.cs
+++ Safely/Maybe.cs
@@ -63,5 +63,16 @@
         {
             return (o == null || !o.ContainsKey(key)) ? (failEvaluator != null ? failEvaluator() : default(TResult)) : o[key];
         }
+
+        public static TResult Let<TInput, TResult>(this TInput o, Func<TInput, TResult> evaluator, TResult failValue)
+            where TInput : class
+        {
+            return (o == null) ? failValue : evaluator(o);
+        }
+
+        public static TResult Let<TKey, TResult>(this IDictionary<TKey, TResult> o, TKey key, TResult failValue)
+        {
+            return (o == null || !o.ContainsKey(key)) ? failValue : o[key];
+        }
     }
 }


Add a few more chained where tests (#876)

--- Shared/Tests.Shared/RealmResults/SimpleLINQtests.cs
+++ Shared/Tests.Shared/RealmResults/SimpleLINQtests.cs
@@ -17,9 +17,7 @@
 ////////////////////////////////////////////////////////////////////////////

 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using IntegrationTests.Shared;
 using NUnit.Framework;
 using Realms;
@@ -568,7 +566,7 @@
         }

         [Test]
-        public void ChainedSearch()
+        public void ChainedWhereFirst()
         {
             var moderateScorers = _realm.All<Person>().Where(p => p.Score >= 20.0f && p.Score <= 100.0f);
             var johnScorer = moderateScorers.Where(p => p.FirstName == "John").First();
@@ -576,5 +574,47 @@
             Assert.That(johnScorer.Score, Is.EqualTo(100.0f));
             Assert.That(johnScorer.FullName, Is.EqualTo("John Doe"));
         }
+
+        [Test]
+        public void ChainedWhereFirstWithPredicate()
+        {
+            var moderateScorers = _realm.All<Person>().Where(p => p.Score >= 20.0f && p.Score <= 100.0f);
+            var johnScorer = moderateScorers.First(p => p.FirstName == "John");
+            Assert.That(johnScorer, Is.Not.Null);
+            Assert.That(johnScorer.Score, Is.EqualTo(100.0f));
+            Assert.That(johnScorer.FullName, Is.EqualTo("John Doe"));
+        }
+
+        [Test]
+        public void ChainedWhereAnyTrue()
+        {
+            var moderateScorers = _realm.All<Person>().Where(p => p.Score >= 20.0f && p.Score <= 100.0f);
+            var hasJohn = moderateScorers.Where(p => p.FirstName == "John").Any();
+            Assert.That(hasJohn, Is.True);
+        }
+
+        [Test]
+        public void ChainedWhereAnyFalse()
+        {
+            var moderateScorers = _realm.All<Person>().Where(p => p.Score >= 20.0f && p.Score <= 100.0f);
+            var hasJohnSmith = moderateScorers.Where(p => p.LastName == "Smith").Any();
+            Assert.That(hasJohnSmith, Is.False);
+        }
+
+        [Test]
+        public void ChainedWhereAnyWithPredicateTrue()
+        {
+            var moderateScorers = _realm.All<Person>().Where(p => p.Score >= 20.0f && p.Score <= 100.0f);
+            var hasJohn = moderateScorers.Any(p => p.FirstName == "John");
+            Assert.That(hasJohn, Is.True);
+        }
+
+        [Test]
+        public void ChainedWhereAnyWithPredicateFalse()
+        {
+            var moderateScorers = _realm.All<Person>().Where(p => p.Score >= 20.0f && p.Score <= 100.0f);
+            var hasJohnSmith = moderateScorers.Any(p => p.LastName == "Smith");
+            Assert.That(hasJohnSmith, Is.False);
+        }
     }
 }


add file exits condition check by default

--- FeedBuilder/frmMain.cs
+++ FeedBuilder/frmMain.cs
@@ -295,6 +295,12 @@
                         task.SetAttribute("version", _with2.FileVersion);

 					conds = doc.CreateElement("Conditions");
+
+                    //File Exists
+                    cond = doc.CreateElement("FileExistsCondition");
+                    cond.SetAttribute("type", "or");
+                    conds.AppendChild(cond);
+

 					//Version
 					if (chkVersion.Checked && !string.IsNullOrEmpty(_with2.FileVersion)) {


US3498: Only return first 3 characters for birth month

--- SignInCheckIn/SignInCheckIn/Services/RoomService.cs
+++ SignInCheckIn/SignInCheckIn/Services/RoomService.cs
@@ -56,7 +56,11 @@
         {
             var ages = _attributeRepository.GetAttributesByAttributeTypeId(_kcAgesAttributeTypeId, authenticationToken);
             var grades = _attributeRepository.GetAttributesByAttributeTypeId(_kcGradesAttributeTypeId, authenticationToken);
-            var birthMonths = _attributeRepository.GetAttributesByAttributeTypeId(_kcBirthMonthsAttributeTypeId, authenticationToken);
+            var birthMonths = _attributeRepository.GetAttributesByAttributeTypeId(_kcBirthMonthsAttributeTypeId, authenticationToken).Select(a =>
+            {
+                a.Name = a.Name.Substring(0, 3);
+                return a;
+            }).ToList();
             var nurseryMonths = _attributeRepository.GetAttributesByAttributeTypeId(_kcNurseryAgesAttributeTypeId, authenticationToken);

             var eventGroups = _eventRepository.GetEventGroupsForEvent(eventId) ?? new List<MpEventGroupDto>();


Added backup writing

Added backup writing

--- SettingsForm.cs
+++ SettingsForm.cs
@@ -382,7 +382,12 @@
                 tw.WriteLine(text);
                 tw.Close();

-                return true;
+				// Let's do a backup too, for safety.
+				TextWriter backupWriter = new StreamWriter(SETTINGS_DIRECTORY + "\\settings.ini.backup");
+				backupWriter.WriteLine(text);
+				backupWriter.Close();
+
+				return true;
             }
             catch
             {


Tried a different format for Google links...

--- SlackCommander/SlackCommander.Web/WebhooksModule.cs
+++ SlackCommander/SlackCommander.Web/WebhooksModule.cs
@@ -48,7 +48,7 @@
                 {
                     slackMessage.text = string.Format(
                         "Unfortunately I'm unable to find any reliable information on who *{0}* is. " +
-                        "I suggest you try <https://google.com/?q={0}|Google>.",
+                        "I suggest you try <https://google.com#q={0}|Google>.",
                         command.text);
                 }
                 else


WIP commit, added two non-db fields and sub-obj get methods to LSCVS records

--- Source/Libraries/openXDA.Model/LSCVS/LSCVSRecord.cs
+++ Source/Libraries/openXDA.Model/LSCVS/LSCVSRecord.cs
@@ -61,13 +61,17 @@
         public DateTime PreEvent { get; set; }
         public DateTime PostEvent { get; set; }
         public double Impact { get; set; }
+        [NonRecordField]
+        public string StartTime { get; set; }
+        [NonRecordField]
+        public string StartDate { get; set; }

         public LSCVSEvent GetEvent()
         {
             return new LSCVSEvent()
             {
                 OpenXDAID = OpenXDAID,
-                EventStart = EventStart,
+                EventStart = DateTime.Parse($"{StartDate} {StartTime}"),
                 Duration = Duration,
                 Magnitude = Magnitude,
                 MeterID = MeterID,


Doc for Out.push in Bot

Doc for Out.push in Bot

--- Skylight/Bot.cs
+++ Skylight/Bot.cs
@@ -126,6 +126,9 @@
             set { _chatPrefix = value; }
         }

+        /// <summary>
+        /// The object where the events go to the server.
+        /// </summary>
         public Out Push { get; internal set; }

         /// <summary>


Opposite, redefined and subsetted properties in red symbols

--- Src/Main/MetaDslx.Core/Immutable/ImmutableModel2.cs
+++ Src/Main/MetaDslx.Core/Immutable/ImmutableModel2.cs
@@ -157,6 +157,12 @@
         bool RemoveValue(ModelProperty property, object value);
     }

+    internal interface IInternalSymbol
+    {
+        bool InternalAddValue(ModelProperty property, object value);
+        bool InternalRemoveValue(ModelProperty property, object value);
+    }
+
     public abstract class GreenSymbol
     {
         public GreenSymbol()
@@ -276,7 +282,7 @@
         }
     }

-    public class RedList : IReadOnlyList<object>
+    public class RedList : IReadOnlyList<object>, IInternalSymbol
     {
         private ListEvaluationState state;
         private RedSymbol parent;
@@ -296,8 +302,11 @@

         public ModelProperty Property { get { return this.property; } }

-        private void Add(object item)
-        {
+        private bool Add(object item)
+        {
+            if (item == null) return false;
+            bool added = false;
+            bool addRelated = false;
             lock (this.redItems)
             {
                 if (this.greenList is GreenList)
@@ -305,19 +314,21 @@
                     if (!this.redItems.Contains(item))
                     {
                         this.redItems.Add(item);
+                        added = true;
+                        addRelated = true;
                     }
                 }
                 else
                 {
                     this.redItems.Add(item);
-                }
-            }
-        }
-
-        internal void InternalAddItem(object item)
-        {
-            this.EvaluateLazyItems();
-            this.Add(item);
+                    added = true;
+                }
+            }
+            if (addRelated)
+            {
+                this.parent.Model.AddValueToRelatedProperties(this.parent, this.property, item as RedSymbol);
+            }
+            return added;
         }

         public object this[int index]
@@ -400,9 +411,22 @@
                 this.Add(value);
             }
         }
-    }
-
-    public class RedSymbol : IImmutableSymbol
+
+        public bool InternalAddValue(ModelProperty property, object value)
+        {
+            if (value == null) return false;
+            this.EvaluateLazyItems();
+            return this.Add(value);
+        }
+
+        public bool InternalRemoveValue(ModelProperty property, object value)
+        {
+            Debug.Assert(false);
+            return false;
+        }
+    }
+
+    public class RedSymbol : IImmutableSymbol, IInternalSymbol
     {
         private RedModel model;
         private GreenSymbol green;
@@ -426,11 +450,63 @@
                 if (this.values.TryGetValue(property, out result)) return result;
             }
             result = this.model.GetValue(this.green, property);
+            if (result == null) return result;
             lock (this.values)
             {
                 this.values.Add(property, result);
-                return result;
-            }
+                foreach (var prop in property.RedefinedProperties)
+                {
+                    this.values.Add(prop, result);
+                }
+                foreach (var prop in property.RedefiningProperties)
+                {
+                    this.values.Add(prop, result);
+                }
+            }
+            this.model.AddValueToRelatedProperties(this, property, result as RedSymbol);
+            return result;
+        }
+
+        public bool InternalAddValue(ModelProperty property, object value)
+        {
+            if (value == null) return false;
+            object oldValue = this.GetValue(property);
+            RedList listValue = oldValue as RedList;
+            if (listValue != null)
+            {
+                return listValue.InternalAddValue(property, value);
+            }
+            if (oldValue == null)
+            {
+                lock (this.values)
+                {
+                    this.values.Add(property, value);
+                    foreach (var prop in property.RedefinedProperties)
+                    {
+                        this.values.Add(prop, value);
+                    }
+                    foreach (var prop in property.RedefiningProperties)
+                    {
+                        this.values.Add(prop, value);
+                    }
+                }
+                this.model.AddValueToRelatedProperties(this, property, value as RedSymbol);
+                return true;
+            }
+            else if (oldValue == value)
+            {
+                return false;
+            }
+            else
+            {
+                throw new ModelException("Cannot reassign value.");
+            }
+        }
+
+        public bool InternalRemoveValue(ModelProperty property, object value)
+        {
+            Debug.Assert(false);
+            return false;
         }
     }

@@ -718,17 +794,24 @@
             {
                 this.EvaluateProperty(prop);
             }
-            foreach (var prop in property.RedefinedProperties)
+            foreach (var prop in property.SubsettingProperties)
             {
                 this.EvaluateProperty(prop);
             }
-            foreach (var prop in property.SubsettingProperties)
-            {
-                this.EvaluateProperty(prop);
-            }
-            foreach (var prop in property.RedefiningProperties)
-            {
-                this.EvaluateProperty(prop);
+        }
+
+        internal void AddValueToRelatedProperties(RedSymbol symbol, ModelProperty property, RedSymbol value)
+        {
+            if (symbol == null) return;
+            if (property == null) return;
+            if (value == null) return;
+            foreach (var prop in property.SubsettedProperties)
+            {
+                symbol.InternalAddValue(prop, value);
+            }
+            foreach (var prop in property.OppositeProperties)
+            {
+                value.InternalAddValue(prop, symbol);
             }
         }


Remove whitespace before TearDown method

--- StressMeasurementSystem.Tests/Models/ContactTest.cs
+++ StressMeasurementSystem.Tests/Models/ContactTest.cs
@@ -130,7 +130,6 @@

         #endregion

-
         [TearDown]
         public void TearDown()
         {


PackageManager Tests #ADD: Added a package restore test for force-removing a shared dependency with differing versions, resulting in a revert to the older version that the other packages actually depend on.

--- Test/Editor/PackageManagement/PackageManagerTest.cs
+++ Test/Editor/PackageManagement/PackageManagerTest.cs
@@ -409,12 +409,14 @@
 			MockPackageSpec pluginA2 = MockPackageSpec.CreateDualityPlugin("AdamsLair.Duality.TestPluginA", new Version(2, 1, 0, 0));
 			MockPackageSpec pluginB1 = MockPackageSpec.CreateDualityPlugin("AdamsLair.Duality.TestPluginB", new Version(1, 0, 2, 0));
 			MockPackageSpec pluginB2 = MockPackageSpec.CreateDualityPlugin("AdamsLair.Duality.TestPluginB", new Version(2, 2, 0, 0));
-			MockPackageSpec pluginC1 = MockPackageSpec.CreateDualityPlugin("AdamsLair.Duality.TestPluginC", new Version(4, 1, 2, 0));
-			MockPackageSpec pluginC2 = MockPackageSpec.CreateDualityPlugin("AdamsLair.Duality.TestPluginC", new Version(5, 2, 1, 0));
+			MockPackageSpec pluginC1 = MockPackageSpec.CreateDualityPlugin("AdamsLair.Duality.TestPluginC", new Version(1, 1, 2, 0));
+			MockPackageSpec pluginC2 = MockPackageSpec.CreateDualityPlugin("AdamsLair.Duality.TestPluginC", new Version(2, 2, 1, 0));
+			MockPackageSpec pluginD1 = MockPackageSpec.CreateDualityPlugin("AdamsLair.Duality.TestPluginD", new Version(1, 1, 3, 0));
 			pluginA1.Dependencies.Add(libraryA1.Name);
 			pluginA2.Dependencies.Add(libraryA2.Name);
 			pluginB1.Dependencies.Add(pluginA1.Name);
 			pluginB2.Dependencies.Add(pluginA2.Name);
+			pluginD1.Dependencies.Add(pluginA1.Name);

 			List<MockPackageSpec> repository = new List<MockPackageSpec>();
 			repository.Add(libraryA1);
@@ -425,6 +427,7 @@
 			repository.Add(pluginB2);
 			repository.Add(pluginC1);
 			repository.Add(pluginC2);
+			repository.Add(pluginD1);

 			List<PackageRestoreTestCase> cases = new List<PackageRestoreTestCase>();

@@ -529,14 +532,32 @@
 				List<PackageName> configSetup = new List<PackageName>();
 				configSetup.Add(pluginB2.Name);

-				cases.Add(new PackageRestoreTestCase(
-					"Partial Uninstall, Dependent",
+				// Duality will first uninstall pluginA2, but then re-install it
+				// while verifying pluginB2, so we expect both an install and an
+				// uninstall for that package.
+				cases.Add(new PackageRestoreTestCase(
+					"Dependency Uninstall, Reinstall",
  					repository,
 					new [] { libraryA2, pluginA2, pluginB2 },
 					configSetup,
 					new [] { libraryA2, pluginA2, pluginB2 },
-					new [] { pluginA2 },
-					new [] { pluginA2 }));
+					new [] { libraryA2, pluginA2 },
+					new [] { libraryA2, pluginA2 }));
+			}
+
+			// Uninstall of a package which has an older version that others depend on
+			{
+				List<PackageName> configSetup = new List<PackageName>();
+				configSetup.Add(pluginD1.Name);
+
+				// Duality will first uninstall pluginA2, but then re-install an
+				// older version of it because pluginD1 requires that as a dependency.
+				cases.Add(new PackageRestoreTestCase(
+					"Dependency Uninstall, Revert to Old",
+ 					repository,
+					new [] { libraryA2, pluginA2, pluginD1 },
+					configSetup,
+					new [] { libraryA1, pluginA1, pluginD1 }));
 			}

 			return cases;


Updated comments and explicitly typed the queries

--- Voyagers.Utilities.ObjectComparer/ObjectComparer.cs
+++ Voyagers.Utilities.ObjectComparer/ObjectComparer.cs
@@ -172,9 +172,19 @@
             List<string> propertyInfosList = propertyInfos.Select(p => p.Name).ToList();
             string propertyNames = String.Join(", ", propertyInfosList);

-            // Boxing here, but we cannot determine what generic type argument the caller will pass
-            var query1 = enumerable1.AsQueryable().GroupBy(String.Format("new ({0})", propertyNames), "it").Select("new (it.Key, it.Count() as Count, it as Value, false as Compared)");
-            var query2 = enumerable2.AsQueryable().GroupBy(String.Format("new ({0})", propertyNames), "it").Select("new (it.Key, it.Count() as Count, it as Value, false as Compared)");
+            // Try to group by properties having the KeyAttribute applied using Dynamic LINQ
+            // IGroupedEnumerable with Key => Anonymous object with the key properties,
+            //                         Count => Count of grouped objects
+            //                         Value => The grouped object themselves
+            //                         Compared => Boolean flag for determining whether we can skip comparisons or not
+            IQueryable query1 =
+                enumerable1.AsQueryable()
+                           .GroupBy(String.Format("new ({0})", propertyNames), "it")
+                           .Select("new (it.Key, it.Count() as Count, it as Value, false as Compared)");
+            IQueryable query2 =
+                enumerable2.AsQueryable()
+                           .GroupBy(String.Format("new ({0})", propertyNames), "it")
+                           .Select("new (it.Key, it.Count() as Count, it as Value, false as Compared)");

             // Make sure if query1 contains more items than query2, or vice versa, can be detected
             foreach (
@@ -241,7 +251,6 @@
             }

             // Try to compare by position
-            // TODO: Continue comparing even if Count is not equal / Use KeyAttribute in comparing
             for (int i = 0; i < value1List.Count; i++)
             {
                 // Optional key object used in here since GetEnumerableVariancesByKey will eventually route to here


[Universal]リセット用コードをコメントアウト

[Universal]リセット用コードをコメントアウト

--- Vulpecula.Universal/ViewModels/MainPageViewModel.cs
+++ Vulpecula.Universal/ViewModels/MainPageViewModel.cs
@@ -38,8 +38,8 @@

         private async Task Initialize()
         {
-            this._accountManager.ResetAccounts();
-            this._columnManager.ClearColumns();
+            // this._accountManager.ResetAccounts();
+            // this._columnManager.ClearColumns();

             await this._accountManager.InitializeAccounts();
             this._columnManager.InitializeColumns();
@@ -141,7 +141,7 @@
         }

         public void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
-            => ((ListBox) sender).SelectedIndex = -1;
+            => ((ListBox)sender).SelectedIndex = -1;

         public void OnClickedSendWhisper()
         {


Update copyright

Update copyright

--- SolutionInfo.cs
+++ SolutionInfo.cs
@@ -1,4 +1,4 @@
-using System.Reflection;
+using System.Reflection;
 using System.Runtime.InteropServices;

 [assembly: AssemblyDescription("FluentAssertions.Autofac")]
@@ -10,8 +10,8 @@
 [assembly: AssemblyConfiguration("Release")]
 #endif

-[assembly: AssemblyCompany("Awesome Incremented")]
-[assembly: AssemblyCopyright("Copyright © Awesome Inc. and Contributors 2017")]
-[assembly: AssemblyTrademark("Awesome Incremented")]
+[assembly: AssemblyCompany("FluentAssertions")]
+[assembly: AssemblyCopyright("Copyright © FluentAssertions and Contributors 2020")]
+[assembly: AssemblyTrademark("FluentAssertions")]
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]


bump ver

bump ver

--- SolutionInfo.cs
+++ SolutionInfo.cs
@@ -9,4 +9,4 @@

 [assembly: NeutralResourcesLanguage("en-GB")]

-[assembly: AssemblyVersion("2.0.0.3")]+[assembly: AssemblyVersion("2.0.0.4")]