Fixed partially complete xmldoc comment in TableReader

--- src/TestStack.Seleno/PageObjects/Actions/TableReader.cs
+++ src/TestStack.Seleno/PageObjects/Actions/TableReader.cs
@@ -91,7 +91,8 @@
         /// Retrieve a cell value in grid for specified row number
         /// </summary>
         /// <param name="rowIndex">number of the row in the grid to click on (1 based)</param>
-        /// <returns></returns>
+        /// <param name="propertySelector">An expression that indicates which property to get the value for in the given row</param>
+        /// <returns>The value of the requested cell</returns>
         public TProperty GetCellValueFor<TProperty>(int rowIndex, Expression<Func<TViewModel, TProperty>> propertySelector)
         {
             var property = propertySelector.GetPropertyFromLambda();


Update GetLanguagePermissions to pull out proper backofficeUser if possible

--- src/Umbraco.Core/Models/Mapping/ContentVariantMapper.cs
+++ src/Umbraco.Core/Models/Mapping/ContentVariantMapper.cs
@@ -218,12 +218,23 @@
     {
         context.Items.TryGetValue("CurrentUser", out var currentBackofficeUser);

-        if (currentBackofficeUser is not IUser currentIUserBackofficeUser)
+        IUser? currentUser = null;
+
+        if (currentBackofficeUser is IUser currentIUserBackofficeUser)
+        {
+            currentUser = currentIUserBackofficeUser;
+        }
+        else if(_backOfficeSecurityAccessor.BackOfficeSecurity?.CurrentUser is not null)
+        {
+            currentUser = _backOfficeSecurityAccessor.BackOfficeSecurity.CurrentUser;
+        }
+
+        if (currentUser is null)
         {
             return Enumerable.Empty<string>();
         }

-        IEnumerable<IReadOnlyUserGroup> userGroups = currentIUserBackofficeUser.Groups;
+        IEnumerable<IReadOnlyUserGroup> userGroups = currentUser.Groups;

         // Map allowed actions
         var hasAccess = false;
@@ -274,14 +285,11 @@
         }

         // A bit of a mess, but we need to ensure that all the required values are here AND that they're the right type.
-        if (context.Items.TryGetValue("CurrentUser", out var userObject) &&
-            context.Items.TryGetValue("Permissions", out var permissionsObject) &&
-            userObject is IUser currentUser &&
-            permissionsObject is Dictionary<string, EntityPermissionSet> permissionsDict)
+        if (context.Items.TryGetValue("Permissions", out var permissionsObject) && permissionsObject is Dictionary<string, EntityPermissionSet> permissionsDict)
         {
             // If we already have permissions for a given path,
             // and the current user is the same as was used to generate the permissions, return the stored permissions.
-            if (currentIUserBackofficeUser.Id == currentUser.Id &&
+            if (_backOfficeSecurityAccessor.BackOfficeSecurity?.CurrentUser?.Id == currentUser.Id &&
                 permissionsDict.TryGetValue(path, out EntityPermissionSet? permissions))
             {
                 return permissions.GetAllPermissions();
@@ -292,6 +300,6 @@
         // with the IUmbracoContextAccessor. In the meantime, if used outside of a web app this will throw a null
         // reference exception :(

-        return _userService.GetPermissionsForPath(currentIUserBackofficeUser, path).GetAllPermissions();
+        return _userService.GetPermissionsForPath(currentUser, path).GetAllPermissions();
     }
 }


Remove console spew.

Remove console spew.

git-svn-id: 1800f71f313d917366f95485fa960eed04b40598@1349 33146b6e-df29-0410-a1ca-39be37fb9416

--- src/DbMetal/Generator/Implementation/CodeDomGenerator/AbstractCodeDomGenerator.cs
+++ src/DbMetal/Generator/Implementation/CodeDomGenerator/AbstractCodeDomGenerator.cs
@@ -115,7 +115,6 @@
                 Name            = database.Class,
                 TypeAttributes  = TypeAttributes.Public
             };
-            Console.WriteLine("# database.BaseType={0}", database.BaseType);

             if (database.BaseType != null)
                 _class.BaseTypes.Add(database.BaseType);


Add test.

Add test.

--- src/EditorFeatures/CSharpTest/UseCompoundAssignment/UseCompoundAssignmentTests.cs
+++ src/EditorFeatures/CSharpTest/UseCompoundAssignment/UseCompoundAssignmentTests.cs
@@ -154,5 +154,25 @@
     }
 }");
         }
+
+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCompoundAssignment)]
+        public async Task TestBitwiseOrExpression()
+        {
+            await TestInRegularAndScriptAsync(
+@"public class C
+{
+    void M(int a)
+    {
+        a [||]= a | 10;
+    }
+}",
+@"public class C
+{
+    void M(int a)
+    {
+        a |= 10;
+    }
+}");
+        }
     }
 }


No longer caches short lived element

No longer caches short lived element

IDeclaredElement can be made invalid very easily, usually just by
editing the file. Now caches IDeclaredElementEnvoy which can be used to
retrieve a valid instance of IDeclaredElement

--- src/Extensions/ReSharper/Gallio.ReSharperRunner/Reflection/PsiReflectionPolicy.cs
+++ src/Extensions/ReSharper/Gallio.ReSharperRunner/Reflection/PsiReflectionPolicy.cs
@@ -92,7 +92,8 @@
             this.psiManager = psiManager;
         }
 #endif
-		#region Wrapping
+
+        #region Wrapping
 		/// <summary>
         /// Obtains a reflection wrapper for a declared element.
         /// </summary>
@@ -180,7 +181,7 @@
                 return null;

             StaticDeclaredTypeWrapper declaringType = MakeDeclaredTypeWithoutSubstitution(target.GetContainingType());
-            return new StaticConstructorWrapper(this, target, declaringType);
+            return new StaticConstructorWrapper(this, new DeclaredElementEnvoy<IConstructor>(target), declaringType);
         }

         /// <summary>
@@ -194,7 +195,7 @@
                 return null;

             StaticDeclaredTypeWrapper declaringType = MakeDeclaredTypeWithoutSubstitution(target.GetContainingType());
-            return new StaticMethodWrapper(this, target, declaringType, declaringType, declaringType.Substitution);
+            return new StaticMethodWrapper(this, new DeclaredElementEnvoy<IMethod>(target), declaringType, declaringType, declaringType.Substitution);
         }

         /// <summary>
@@ -208,7 +209,7 @@
                 return null;

             StaticDeclaredTypeWrapper declaringType = MakeDeclaredTypeWithoutSubstitution(target.GetContainingType());
-            return new StaticMethodWrapper(this, target, declaringType, declaringType, declaringType.Substitution);
+            return new StaticMethodWrapper(this, new DeclaredElementEnvoy<IOperator>(target), declaringType, declaringType, declaringType.Substitution);
         }

         /// <summary>
@@ -222,7 +223,7 @@
                 return null;

             StaticDeclaredTypeWrapper declaringType = MakeDeclaredTypeWithoutSubstitution(target.GetContainingType());
-            return new StaticPropertyWrapper(this, target, declaringType, declaringType);
+            return new StaticPropertyWrapper(this, new DeclaredElementEnvoy<IProperty>(target), declaringType, declaringType);
         }

         /// <summary>
@@ -236,7 +237,7 @@
                 return null;

             StaticDeclaredTypeWrapper declaringType = MakeDeclaredTypeWithoutSubstitution(target.GetContainingType());
-            return new StaticFieldWrapper(this, target, declaringType, declaringType);
+            return new StaticFieldWrapper(this, new DeclaredElementEnvoy<IField>(target), declaringType, declaringType);
         }

         /// <summary>
@@ -250,7 +251,7 @@
                 return null;

             StaticDeclaredTypeWrapper declaringType = MakeDeclaredTypeWithoutSubstitution(target.GetContainingType());
-            return new StaticEventWrapper(this, target, declaringType, declaringType);
+            return new StaticEventWrapper(this, new DeclaredElementEnvoy<IEvent>(target), declaringType, declaringType);
         }

         /// <summary>
@@ -267,7 +268,7 @@
             if (member == null)
                 return null;

-            return new StaticParameterWrapper(this, target, member);
+            return new StaticParameterWrapper(this, new DeclaredElementEnvoy<IParameter>(target), member);
         }
         #endregion

@@ -606,7 +607,7 @@
             IDeclaredType declaredTypeHandle = attributeHandle.AttributeType;
             IConstructor constructorHandle = attributeHandle.Constructor;

-            return new StaticConstructorWrapper(this, constructorHandle, MakeDeclaredType(declaredTypeHandle));
+            return new StaticConstructorWrapper(this, new DeclaredElementEnvoy<IConstructor>(constructorHandle), MakeDeclaredType(declaredTypeHandle));
         }

         protected override ConstantValue[] GetAttributeConstructorArguments(StaticAttributeWrapper attribute)
@@ -660,7 +661,7 @@
             {
                 if (ReflectorAttributeUtils.IsAttributeField(field))
                 {
-                    ConstantValue? value = GetAttributeNamedParameter(attributeHandle, (IField)field.Handle);
+                    ConstantValue? value = GetAttributeNamedParameter(attributeHandle, GetDeclaredElement<IField>(field));
                     if (value.HasValue)
                         yield return new KeyValuePair<StaticFieldWrapper, ConstantValue>(field, value.Value);
                 }
@@ -674,7 +675,7 @@
             {
                 if (ReflectorAttributeUtils.IsAttributeProperty(property))
                 {
-                    ConstantValue? value = GetAttributeNamedParameter(attributeHandle, (IProperty) property.Handle);
+                    ConstantValue? value = GetAttributeNamedParameter(attributeHandle, GetDeclaredElement<IProperty>(property));
                     if (value.HasValue)
                         yield return new KeyValuePair<StaticPropertyWrapper, ConstantValue>(property, value.Value);
                 }
@@ -732,13 +733,13 @@
         #region Members
         protected override IEnumerable<StaticAttributeWrapper> GetMemberCustomAttributes(StaticMemberWrapper member)
         {
-            IAttributesOwner memberHandle = (IAttributesOwner)member.Handle;
+            IAttributesOwner memberHandle = GetDeclaredElement<IAttributesOwner>(member);
             return GetAttributesForAttributeOwner(memberHandle);
         }

         protected override string GetMemberName(StaticMemberWrapper member)
         {
-            IDeclaredElement memberHandle = (IDeclaredElement)member.Handle;
+            IDeclaredElement memberHandle = GetDeclaredElement<IDeclaredElement>(member);
             string shortName = memberHandle.ShortName;

             if (shortName == "get_this")
@@ -759,7 +760,7 @@

         protected override CodeLocation GetMemberSourceLocation(StaticMemberWrapper member)
         {
-            IDeclaredElement memberHandle = (IDeclaredElement)member.Handle;
+            IDeclaredElement memberHandle = GetDeclaredElement<IDeclaredElement>(member);
             return GetDeclaredElementSourceLocation(memberHandle);
         }
         #endregion
@@ -772,7 +773,7 @@

         protected override StaticMethodWrapper GetEventAddMethod(StaticEventWrapper @event)
         {
-            IEvent eventHandle = (IEvent)@event.Handle;
+            IEvent eventHandle = GetDeclaredElement<IEvent>(@event);
             if (!eventHandle.IsValid())
                 return null;

@@ -782,7 +783,7 @@

         protected override StaticMethodWrapper GetEventRaiseMethod(StaticEventWrapper @event)
         {
-            IEvent eventHandle = (IEvent)@event.Handle;
+            IEvent eventHandle = GetDeclaredElement<IEvent>(@event);
             if (!eventHandle.IsValid())
                 return null;

@@ -792,7 +793,7 @@

         protected override StaticMethodWrapper GetEventRemoveMethod(StaticEventWrapper @event)
         {
-            IEvent eventHandle = (IEvent)@event.Handle;
+            IEvent eventHandle = GetDeclaredElement<IEvent>(@event);
             if (!eventHandle.IsValid())
                 return null;

@@ -802,7 +803,7 @@

         protected override StaticTypeWrapper GetEventHandlerType(StaticEventWrapper @event)
         {
-            IEvent eventHandle = (IEvent)@event.Handle;
+            IEvent eventHandle = GetDeclaredElement<IEvent>(@event);
             return MakeType(eventHandle.Type);
         }
         #endregion
@@ -810,7 +811,7 @@
         #region Fields
         protected override FieldAttributes GetFieldAttributes(StaticFieldWrapper field)
         {
-            IField fieldHandle = (IField)field.Handle;
+            IField fieldHandle = GetDeclaredElement<IField>(field);

             FieldAttributes flags = 0;
             switch (fieldHandle.GetAccessRights())
@@ -844,7 +845,7 @@

         protected override StaticTypeWrapper GetFieldType(StaticFieldWrapper field)
         {
-            IField fieldHandle = (IField)field.Handle;
+            IField fieldHandle = GetDeclaredElement<IField>(field);
             return MakeType(fieldHandle.Type);
         }
         #endregion
@@ -858,13 +859,13 @@

         protected override StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property)
         {
-            IProperty propertyHandle = (IProperty)property.Handle;
+            IProperty propertyHandle = GetDeclaredElement<IProperty>(property);
             return MakeType(propertyHandle.Type);
         }

         protected override StaticMethodWrapper GetPropertyGetMethod(StaticPropertyWrapper property)
         {
-            IProperty propertyHandle = (IProperty)property.Handle;
+            IProperty propertyHandle = GetDeclaredElement<IProperty>(property);
             if (!propertyHandle.IsValid())
                 return null;

@@ -878,7 +879,7 @@

         protected override StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property)
         {
-            IProperty propertyHandle = (IProperty)property.Handle;
+            IProperty propertyHandle = GetDeclaredElement<IProperty>(property);
             if (!propertyHandle.IsValid())
                 return null;

@@ -894,7 +895,7 @@
         #region Functions
         protected override MethodAttributes GetFunctionAttributes(StaticFunctionWrapper function)
         {
-            IFunction functionHandle = (IFunction)function.Handle;
+            IFunction functionHandle = GetDeclaredElement<IFunction>(function);

             AccessRights accessRights = functionHandle.GetAccessRights();
             if (functionHandle is DefaultConstructor && function.DeclaringType.IsAbstract)
@@ -952,7 +953,7 @@

         protected override CallingConventions GetFunctionCallingConvention(StaticFunctionWrapper function)
         {
-            IFunction functionHandle = (IFunction)function.Handle;
+            IFunction functionHandle = GetDeclaredElement<IFunction>(function);

             // FIXME: No way to determine VarArgs convention.
             CallingConventions flags = CallingConventions.Standard;
@@ -962,13 +963,13 @@

         protected override IList<StaticParameterWrapper> GetFunctionParameters(StaticFunctionWrapper function)
         {
-            IFunction functionHandle = (IFunction)function.Handle;
+            IFunction functionHandle = GetDeclaredElement<IFunction>(function);
             if (!functionHandle.IsValid())
                 return Common.Collections.EmptyArray<StaticParameterWrapper>.Instance;

             return GenericCollectionUtils.ConvertAllToArray<IParameter, StaticParameterWrapper>(functionHandle.Parameters, delegate(IParameter parameter)
             {
-                return new StaticParameterWrapper(this, parameter, function);
+                return new StaticParameterWrapper(this, new DeclaredElementEnvoy<IParameter>(parameter), function);
             });
         }
         #endregion
@@ -976,7 +977,7 @@
         #region Methods
         protected override IList<StaticGenericParameterWrapper> GetMethodGenericParameters(StaticMethodWrapper method)
         {
-            IFunction methodHandle = (IFunction)method.Handle;
+            IFunction methodHandle = GetDeclaredElement<IFunction>(method);
             if (!methodHandle.IsValid())
                 return Common.Collections.EmptyArray<StaticGenericParameterWrapper>.Instance;

@@ -992,12 +993,12 @@
 #endif

             return Array.ConvertAll(parameterHandles, parameter =>
-				StaticGenericParameterWrapper.CreateGenericMethodParameter(this, parameter, method));
+				StaticGenericParameterWrapper.CreateGenericMethodParameter(this, new DeclaredElementEnvoy<ITypeParameter>(parameter), method));
         }

         protected override StaticParameterWrapper GetMethodReturnParameter(StaticMethodWrapper method)
         {
-            IFunction methodHandle = (IFunction)method.Handle;
+            IFunction methodHandle = GetDeclaredElement<IFunction>(method);
             if (!methodHandle.IsValid())
                 return null;

@@ -1017,14 +1018,14 @@
 #else
             var parameter = new Parameter(methodHandle, 0, type, null);
 #endif
-            return new StaticParameterWrapper(this, parameter, method);
+            return new StaticParameterWrapper(this, new DeclaredElementEnvoy<IParameter>(parameter), method);
         }
         #endregion

         #region Parameters
         protected override ParameterAttributes GetParameterAttributes(StaticParameterWrapper parameter)
         {
-            IParameter parameterHandle = (IParameter)parameter.Handle;
+            IParameter parameterHandle = GetDeclaredElement<IParameter>(parameter);

             ParameterAttributes flags = 0;
 #if RESHARPER_60_OR_NEWER
@@ -1040,26 +1041,26 @@

         protected override IEnumerable<StaticAttributeWrapper> GetParameterCustomAttributes(StaticParameterWrapper parameter)
         {
-            IParameter parameterHandle = (IParameter)parameter.Handle;
+            IParameter parameterHandle = GetDeclaredElement<IParameter>(parameter);
             return GetAttributesForAttributeOwner(parameterHandle);
         }

         protected override string GetParameterName(StaticParameterWrapper parameter)
         {
-            IParameter parameterHandle = (IParameter)parameter.Handle;
+            IParameter parameterHandle = GetDeclaredElement<IParameter>(parameter);
             return parameterHandle.ShortName;
         }

         protected override int GetParameterPosition(StaticParameterWrapper parameter)
         {
-            IParameter parameterHandle = (IParameter)parameter.Handle;
+            IParameter parameterHandle = GetDeclaredElement<IParameter>(parameter);
             int parameterIndex = parameterHandle.ContainingParametersOwner.Parameters.IndexOf(parameterHandle);
             return parameterIndex;
         }

         protected override StaticTypeWrapper GetParameterType(StaticParameterWrapper parameter)
         {
-            IParameter parameterHandle = (IParameter)parameter.Handle;
+            IParameter parameterHandle = GetDeclaredElement<IParameter>(parameter);
             StaticTypeWrapper parameterType = MakeType(parameterHandle.Type);

             if (parameterHandle.Kind != ParameterKind.VALUE)
@@ -1072,7 +1073,7 @@
         #region Types
         protected override TypeAttributes GetTypeAttributes(StaticDeclaredTypeWrapper type)
         {
-            ITypeElement typeHandle = (ITypeElement) type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);

             TypeAttributes flags = 0;
             ReflectorFlagsUtils.AddFlagIfTrue(ref flags, TypeAttributes.Interface, typeHandle is IInterface);
@@ -1117,7 +1118,7 @@

         protected override StaticAssemblyWrapper GetTypeAssembly(StaticDeclaredTypeWrapper type)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             return WrapModule(GetModule(typeHandle));
         }

@@ -1146,7 +1147,7 @@

         protected override string GetTypeNamespace(StaticDeclaredTypeWrapper type)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 return "";
             return typeHandle.GetContainingNamespace().QualifiedName;
@@ -1154,7 +1155,7 @@

         protected override StaticDeclaredTypeWrapper GetTypeBaseType(StaticDeclaredTypeWrapper type)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 return null;

@@ -1192,7 +1193,7 @@

         protected override IList<StaticDeclaredTypeWrapper> GetTypeInterfaces(StaticDeclaredTypeWrapper type)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 return Common.Collections.EmptyArray<StaticDeclaredTypeWrapper>.Instance;

@@ -1283,7 +1284,7 @@

         protected override IList<StaticGenericParameterWrapper> GetTypeGenericParameters(StaticDeclaredTypeWrapper type)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 return Common.Collections.EmptyArray<StaticGenericParameterWrapper>.Instance;

@@ -1299,12 +1300,12 @@
                 BuildTypeGenericParameters(ownerType, declaringType, genericParameters);

             foreach (ITypeParameter parameterHandle in typeHandle.TypeParameters)
-                genericParameters.Add(StaticGenericParameterWrapper.CreateGenericTypeParameter(this, parameterHandle, ownerType));
+                genericParameters.Add(StaticGenericParameterWrapper.CreateGenericTypeParameter(this, new DeclaredElementEnvoy<ITypeParameter>(parameterHandle), ownerType));
         }

         protected override IEnumerable<StaticConstructorWrapper> GetTypeConstructors(StaticDeclaredTypeWrapper type)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 yield break;

@@ -1320,7 +1321,7 @@
                         foundDefault = true;
                     }

-                    yield return new StaticConstructorWrapper(this, constructorHandle, type);
+                    yield return new StaticConstructorWrapper(this, new DeclaredElementEnvoy<IConstructor>(constructorHandle), type);
                 }
             }

@@ -1339,20 +1340,20 @@
         protected override IEnumerable<StaticMethodWrapper> GetTypeMethods(StaticDeclaredTypeWrapper type,
             StaticDeclaredTypeWrapper reflectedType)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 yield break;

             foreach (IMethod methodHandle in typeHandle.Methods)
             {
                 if (methodHandle.IsValid())
-                    yield return new StaticMethodWrapper(this, methodHandle, type, reflectedType, type.Substitution);
+                    yield return new StaticMethodWrapper(this, new DeclaredElementEnvoy<IMethod>(methodHandle), type, reflectedType, type.Substitution);
             }

             foreach (IOperator operatorHandle in typeHandle.Operators)
             {
                 if (operatorHandle.IsValid())
-                    yield return new StaticMethodWrapper(this, operatorHandle, type, reflectedType, type.Substitution);
+                    yield return new StaticMethodWrapper(this, new DeclaredElementEnvoy<IOperator>(operatorHandle), type, reflectedType, type.Substitution);
             }

             foreach (StaticPropertyWrapper property in GetTypeProperties(type, reflectedType))
@@ -1377,21 +1378,21 @@
         protected override IEnumerable<StaticPropertyWrapper> GetTypeProperties(StaticDeclaredTypeWrapper type,
             StaticDeclaredTypeWrapper reflectedType)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 yield break;

             foreach (IProperty propertyHandle in typeHandle.Properties)
             {
                 if (propertyHandle.IsValid())
-                    yield return new StaticPropertyWrapper(this, propertyHandle, type, reflectedType);
+                    yield return new StaticPropertyWrapper(this, new DeclaredElementEnvoy<IProperty>(propertyHandle), type, reflectedType);
             }
         }

         protected override IEnumerable<StaticFieldWrapper> GetTypeFields(StaticDeclaredTypeWrapper type,
             StaticDeclaredTypeWrapper reflectedType)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 yield break;

@@ -1401,13 +1402,13 @@
                 foreach (IField fieldHandle in classHandle.Fields)
                 {
                     if (fieldHandle.IsValid())
-                        yield return new StaticFieldWrapper(this, fieldHandle, type, reflectedType);
+                        yield return new StaticFieldWrapper(this, new DeclaredElementEnvoy<IField>(fieldHandle), type, reflectedType);
                 }

                 foreach (IField fieldHandle in classHandle.Constants)
                 {
                     if (fieldHandle.IsValid())
-                        yield return new StaticFieldWrapper(this, fieldHandle, type, reflectedType);
+                        yield return new StaticFieldWrapper(this, new DeclaredElementEnvoy<IField>(fieldHandle), type, reflectedType);
                 }
             }
             else
@@ -1418,13 +1419,13 @@
                     foreach (IField fieldHandle in structHandle.Fields)
                     {
                         if (fieldHandle.IsValid())
-                            yield return new StaticFieldWrapper(this, fieldHandle, type, reflectedType);
+                            yield return new StaticFieldWrapper(this, new DeclaredElementEnvoy<IField>(fieldHandle), type, reflectedType);
                     }

                     foreach (IField fieldHandle in structHandle.Constants)
                     {
                         if (fieldHandle.IsValid())
-                            yield return new StaticFieldWrapper(this, fieldHandle, type, reflectedType);
+                            yield return new StaticFieldWrapper(this, new DeclaredElementEnvoy<IField>(fieldHandle), type, reflectedType);
                     }
                 }
             }
@@ -1433,27 +1434,27 @@
         protected override IEnumerable<StaticEventWrapper> GetTypeEvents(StaticDeclaredTypeWrapper type,
             StaticDeclaredTypeWrapper reflectedType)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 yield break;

             foreach (IEvent eventHandle in typeHandle.Events)
             {
                 if (eventHandle.IsValid())
-                    yield return new StaticEventWrapper(this, eventHandle, type, reflectedType);
+                    yield return new StaticEventWrapper(this, new DeclaredElementEnvoy<IEvent>(eventHandle), type, reflectedType);
             }
         }

         protected override IEnumerable<StaticTypeWrapper> GetTypeNestedTypes(StaticDeclaredTypeWrapper type)
         {
-            ITypeElement typeHandle = (ITypeElement)type.Handle;
+            ITypeElement typeHandle = GetDeclaredElement<ITypeElement>(type);
             if (!typeHandle.IsValid())
                 yield break;

             foreach (ITypeElement nestedTypeHandle in typeHandle.NestedTypes)
             {
                 if (nestedTypeHandle.IsValid())
-                    yield return new StaticDeclaredTypeWrapper(this, nestedTypeHandle, type, type.Substitution);
+                    yield return new StaticDeclaredTypeWrapper(this, new DeclaredElementEnvoy<ITypeElement>(nestedTypeHandle), type, type.Substitution);
             }
         }

@@ -1534,11 +1535,11 @@
             {
                 StaticDeclaredTypeWrapper declaringType = MakeDeclaredType(declaringTypeElementHandle,
                     substitutionHandle);
-                type = new StaticDeclaredTypeWrapper(this, typeElementHandle, declaringType, declaringType.Substitution);
+                type = new StaticDeclaredTypeWrapper(this, new DeclaredElementEnvoy<ITypeElement>(typeElementHandle), declaringType, declaringType.Substitution);
             }
             else
             {
-                type = new StaticDeclaredTypeWrapper(this, typeElementHandle, null, StaticTypeSubstitution.Empty);
+                type = new StaticDeclaredTypeWrapper(this, new DeclaredElementEnvoy<ITypeElement>(typeElementHandle), null, StaticTypeSubstitution.Empty);
             }

 #if ! RESHARPER_50_OR_NEWER
@@ -1581,11 +1582,11 @@
             ITypeElement declaringTypeHandle = typeParameterHandle.OwnerType;
             if (declaringTypeHandle != null)
             {
-                return StaticGenericParameterWrapper.CreateGenericTypeParameter(this, typeParameterHandle, MakeDeclaredTypeWithoutSubstitution(declaringTypeHandle));
+                return StaticGenericParameterWrapper.CreateGenericTypeParameter(this, new DeclaredElementEnvoy<ITypeElement>(typeParameterHandle), MakeDeclaredTypeWithoutSubstitution(declaringTypeHandle));
             }
             else
             {
-                return StaticGenericParameterWrapper.CreateGenericMethodParameter(this, typeParameterHandle, Wrap(typeParameterHandle.OwnerMethod));
+                return StaticGenericParameterWrapper.CreateGenericMethodParameter(this, new DeclaredElementEnvoy<ITypeParameter>(typeParameterHandle), Wrap(typeParameterHandle.OwnerMethod));
             }
         }
         #endregion
@@ -1593,7 +1594,7 @@
         #region Generic Parameters
         protected override GenericParameterAttributes GetGenericParameterAttributes(StaticGenericParameterWrapper genericParameter)
         {
-            ITypeParameter genericParameterHandle = (ITypeParameter)genericParameter.Handle;
+            ITypeParameter genericParameterHandle = GetDeclaredElement<ITypeParameter>(genericParameter);

             GenericParameterAttributes flags = 0;
             ReflectorFlagsUtils.AddFlagIfTrue(ref flags, GenericParameterAttributes.NotNullableValueTypeConstraint, genericParameterHandle.IsValueType);
@@ -1604,7 +1605,7 @@

         protected override int GetGenericParameterPosition(StaticGenericParameterWrapper genericParameter)
         {
-            ITypeParameter genericParameterHandle = (ITypeParameter)genericParameter.Handle;
+            ITypeParameter genericParameterHandle = GetDeclaredElement<ITypeParameter>(genericParameter);
             int parameterIndex = genericParameterHandle.Index;

             // Must also factor in generic parameters of declaring types.
@@ -1626,7 +1627,7 @@

         protected override IList<StaticTypeWrapper> GetGenericParameterConstraints(StaticGenericParameterWrapper genericParameter)
         {
-            ITypeParameter genericParameterHandle = (ITypeParameter)genericParameter.Handle;
+            ITypeParameter genericParameterHandle = GetDeclaredElement<ITypeParameter>(genericParameter);
 			var typeConstraints = genericParameterHandle.TypeConstraints;
 #if RESHARPER_60_OR_NEWER
         	return GenericCollectionUtils.ConvertAllToArray<IType, StaticTypeWrapper>(new List<IType>(typeConstraints), MakeType);
@@ -1639,8 +1640,7 @@
         #region GetDeclaredElementResolver and GetProject
         protected override IDeclaredElementResolver GetDeclaredElementResolver(StaticWrapper element)
         {
-            IDeclaredElement declaredElement = GetDeclaredElement(element);
-            return new DeclaredElementResolver(declaredElement);
+            return new DeclaredElementResolver(element.Handle as IDeclaredElementEnvoy);
         }

         protected override IProject GetProject(StaticWrapper element)
@@ -1649,27 +1649,30 @@
             if (project != null)
                 return project;

-            IDeclaredElement declaredElement = GetDeclaredElement(element);
+            IDeclaredElement declaredElement = GetDeclaredElement<IDeclaredElement>(element);
             return declaredElement != null && declaredElement.IsValid() ? GetModule(declaredElement) as IProject : null;
         }

-        private IDeclaredElement GetDeclaredElement(StaticWrapper element)
-        {
-            return element.Handle as IDeclaredElement;
+
+        private static T GetDeclaredElement<T>(StaticWrapper wrapper)
+            where T : IDeclaredElement
+        {
+            var envoy = wrapper.Handle as IDeclaredElementEnvoy;
+            return envoy != null ? (T)envoy.GetValidDeclaredElement() : default(T);
         }

         private sealed class DeclaredElementResolver : IDeclaredElementResolver
         {
-            private readonly IDeclaredElement declaredElement;
-
-            public DeclaredElementResolver(IDeclaredElement declaredElement)
-            {
-                this.declaredElement = declaredElement;
+            private readonly IDeclaredElementEnvoy declaredElementEnvoy;
+
+            public DeclaredElementResolver(IDeclaredElementEnvoy declaredElementEnvoy)
+            {
+                this.declaredElementEnvoy = declaredElementEnvoy;
             }

             public IDeclaredElement ResolveDeclaredElement()
             {
-                return declaredElement;
+                return declaredElementEnvoy != null ? declaredElementEnvoy.GetValidDeclaredElement() : null;
             }
         }
         #endregion
@@ -1689,7 +1692,7 @@

         private StaticMethodWrapper WrapAccessor(IAccessor accessorHandle, StaticMemberWrapper member)
         {
-            return accessorHandle != null ? new StaticMethodWrapper(this, accessorHandle, member.DeclaringType, member.ReflectedType, member.Substitution) : null;
+            return accessorHandle != null ? new StaticMethodWrapper(this, new DeclaredElementEnvoy<IAccessor>(accessorHandle), member.DeclaringType, member.ReflectedType, member.Substitution) : null;
         }
         #endregion


removed comment

removed comment

--- src/Features/Core/Portable/IntroduceVariable/AbstractIntroduceParameterService.cs
+++ src/Features/Core/Portable/IntroduceVariable/AbstractIntroduceParameterService.cs
@@ -161,7 +161,7 @@
                 return null;
             }

-            using var actionsBuilder = TemporaryArray<CodeAction>.Empty; // .CreateBuilder<CodeAction>();
+            using var actionsBuilder = TemporaryArray<CodeAction>.Empty;
             using var actionsBuilderAllOccurrences = TemporaryArray<CodeAction>.Empty;
             var syntaxFacts = document.GetRequiredLanguageService<ISyntaxFactsService>();
             var singleLineExpression = syntaxFacts.ConvertToSingleLine(expression);


Removed unneccessary config in sample

Removed unneccessary config in sample

--- samples/Sample-AspNet5.Mvc6.Ntlm/Startup.cs
+++ samples/Sample-AspNet5.Mvc6.Ntlm/Startup.cs
@@ -82,7 +82,6 @@
                 AutomaticChallenge = false,
                 AuthenticationScheme = ActiveDirectoryOptions.DefaultAuthenticationScheme,
                 SignInAsAuthenticationScheme = ActiveDirectoryOptions.DefaultAuthenticationScheme,
-                CallbackPath = new PathString("/api/windowsauthentication/ntlm")
             });

             //EXAMPLE: using with a custom action URL


Fixed broken test

Fixed broken test

--- src/IdentityModel.AspNetCore.OAuth2Introspection/OAuth2IntrospectionMiddleware.cs
+++ src/IdentityModel.AspNetCore.OAuth2Introspection/OAuth2IntrospectionMiddleware.cs
@@ -53,7 +53,7 @@

             if (options.Value.DelayLoadDiscoveryDocument == false)
             {
-                var temp = _client.GetValue();
+                _client.GetValue().Wait();
             }
         }


Tweak percentage display

Tweak percentage display

--- Battery-Commander.Web/Models/UnitStatsViewModel.cs
+++ Battery-Commander.Web/Models/UnitStatsViewModel.cs
@@ -26,7 +26,7 @@
             public int Completed { get; set; }

             [DisplayFormat(DataFormatString = SSDStatusModel.Format)]
-            public Decimal Percentage => Assigned > 0 ? (Decimal)Completed / Assigned * 100 : Decimal.Zero;
+            public Decimal Percentage => Assigned > 0 ? (Decimal)Completed / Assigned : Decimal.Zero;
         }

         public class Stat


Use ValueText instead of Text for the generated string literal in C# 5 and earlier (fixes #25)

--- src/NullParameterCheckRefactoring.CSharp/NullParameterCheckRefactoringProvider.cs
+++ src/NullParameterCheckRefactoring.CSharp/NullParameterCheckRefactoringProvider.cs
@@ -116,7 +116,7 @@
             {
                 parameterNameExpression = SyntaxFactory.LiteralExpression(
                     SyntaxKind.StringLiteralExpression,
-                    SyntaxFactory.Literal(parameter.Identifier.Text));
+                    SyntaxFactory.Literal(parameter.Identifier.ValueText));
             }

             ObjectCreationExpressionSyntax objectCreationExpression = SyntaxFactory.ObjectCreationExpression(


Use interface instead of concrete type for filter

--- src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/SwaggerGeneratorOptions.cs
+++ src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/SwaggerGeneratorOptions.cs
@@ -71,7 +71,7 @@
 #if (!NETSTANDARD2_0)
             return
                 actionDescriptor.AttributeRouteInfo?.Name
-                ?? (actionDescriptor.EndpointMetadata.FirstOrDefault(m => m is EndpointNameMetadata) as EndpointNameMetadata)?.EndpointName;
+                ?? (actionDescriptor.EndpointMetadata.FirstOrDefault(m => m is IEndpointNameMetadata) as IEndpointNameMetadata)?.EndpointName;
 #else
             return actionDescriptor.AttributeRouteInfo?.Name;
 #endif


use screen coordinates for the DataGridView cell locations

--- src/UIA.Extensions/AutomationProviders/Defaults/Tables/DataGridCellInformation.cs
+++ src/UIA.Extensions/AutomationProviders/Defaults/Tables/DataGridCellInformation.cs
@@ -37,7 +37,11 @@

         public override Rect Location
         {
-            get { return Cell.DataGridView.GetCellDisplayRectangle(Column, Row, false).AsWindowsRect(); }
+            get
+            {
+                var cellDisplayRectangle = Cell.DataGridView.GetCellDisplayRectangle(Column, Row, false);
+                return Cell.DataGridView.RectangleToScreen(cellDisplayRectangle).AsWindowsRect();
+            }
         }
     }
 }


(specs) Bundled options are atomic

(specs) Bundled options are atomic

A fix was added to
https://github.com/chocolatey/choco/commit/51d59c82e01a8ca0ad6bef918789a58fd2faf441
to make bundled options atomic, so if not all of them set, then none of
them should get set.

--- src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs
+++ src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs
@@ -306,7 +306,7 @@

                 because();

-                config.Debug.ShouldBeTrue();
+                config.Debug.ShouldBeFalse();
                 helpMessageContents.ToString().ShouldNotBeEmpty();
             }
         }


Added Animal class

Added Animal class


Correct copyright/company info

Correct copyright/company info

--- Citrix.Cloudworks.Agent/Properties/AssemblyInfo.cs
+++ Citrix.Cloudworks.Agent/Properties/AssemblyInfo.cs
@@ -5,12 +5,12 @@
 // 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("Citrix.SelfServiceDesktops.WindowsService")]
+[assembly: AssemblyTitle("Citrix Cloudworks Agent")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Hewlett-Packard Company")]
-[assembly: AssemblyProduct("Citrix.SelfServiceDesktops.WindowsService")]
-[assembly: AssemblyCopyright("Copyright © Hewlett-Packard Company 2013")]
+[assembly: AssemblyCompany("Citrix Systems, Inc.")]
+[assembly: AssemblyProduct("Citrix Cloudworks")]
+[assembly: AssemblyCopyright("Copyright © Citrix Systems, Inc. 2014")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -32,5 +32,5 @@
 // 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("14.03.07")]
+[assembly: AssemblyVersion("14.03.26")]
 [assembly: AssemblyFileVersion("14.03.07")]


commented and fixed login related issue.

--- CloudBread/Controllers/CBSelLoginInfoController.cs
+++ CloudBread/Controllers/CBSelLoginInfoController.cs
@@ -39,8 +39,8 @@

         public class InputParams {
             public string memberID;
-            public string memberPWD;        // If using own autehtication, SHA512 from client device.
-            public string LastDeviceID = "";
+            public string memberPWD;        // Consider using 3rd party authentication. If using own autehtication, at least SHA512 from client device.
+            public string LastDeviceID = "";
             public string LastIPaddress = "";
             public string LastMACAddress="";
         }


Removed _Layout page for Manage

Removed _Layout page for Manage

--- CmsEngine.Ui/Areas/Cms/Views/Manage/_Layout.cshtml
+++ CmsEngine.Ui/Areas/Cms/Views/Manage/_Layout.cshtml
@@ -1,23 +0,0 @@
-@{
-    Layout = "/Areas/Cms/Views/Shared/_Layout.cshtml";
-}
-
-
Manage your account

-
-

-
Change your account settings

-

-

-

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

-

-            @RenderBody()
-

-

-

-
-@section Scripts {
-    @RenderSection("Scripts", required: false)
-}
-


Im Done ;)

Im Done ;)

--- ConsoleApplication1/ConsoleApplication1/Program.cs
+++ ConsoleApplication1/ConsoleApplication1/Program.cs
@@ -7,11 +7,6 @@
         Console.WriteLine("Enter Money:");

         decimal money = decimal.Parse(Console.ReadLine());
-
-        if (money >= 50)
-        {
-            Console.WriteLine("I'll give it to IZdislav");
-            return;

             if (money>=50)
             {
@@ -33,8 +28,7 @@

             bool isHappy = true;

-        }
-
+

         Console.WriteLine("I don't have enough money. Sorry! :( ;d");


More query

More query

--- jenkins/Jenkins/Roslyn.Jenkins/DataClient.cs
+++ jenkins/Jenkins/Roslyn.Jenkins/DataClient.cs
@@ -40,6 +40,56 @@

                 var count = (int)command.ExecuteScalar();
                 return count > 0;
+            }
+        }
+
+        public int GetPullRequestId(UniqueJobId id)
+        {
+            var commandText = @"
+                SELECT PullRequestId
+                FROM Jobs
+                WHERE Id=@Id";
+            using (var command = new SqlCommand(commandText, _connection))
+            {
+                command.Parameters.AddWithValue("@Id", id.Key);
+
+                var list = new List<Tuple<UniqueJobId, string>>();
+                using (var reader = command.ExecuteReader())
+                {
+                    if (!reader.Read())
+                    {
+                        throw new Exception("Missing data");
+                    }
+
+                    return reader.GetInt32(0);
+                }
+            }
+        }
+
+        public JobFailureInfo GetFailureInfo(UniqueJobId id)
+        {
+            var commandText = @"
+                SELECT Reason,Messages
+                FROM Failures
+                WHERE Id=@Id";
+            using (var command = new SqlCommand(commandText, _connection))
+            {
+                command.Parameters.AddWithValue("@Id", id.Key);
+
+                var list = new List<Tuple<UniqueJobId, string>>();
+                using (var reader = command.ExecuteReader())
+                {
+                    if (!reader.Read())
+                    {
+                        throw new Exception("Missing data");
+                    }
+
+                    var reason = reader.GetString(0);
+                    var messages = reader.GetString(1).Split(';').ToList();
+                    return new JobFailureInfo(
+                        (JobFailureReason)(Enum.Parse(typeof(JobFailureReason), reason)),
+                        messages);
+                }
             }
         }


bugfix - interactable end of context selection of context

--- Diplomata/Editor/Windows/TalkableMessagesEditor.cs
+++ Diplomata/Editor/Windows/TalkableMessagesEditor.cs
@@ -1807,7 +1807,18 @@
                           effect.endOfContext.Set(tempCharacter.name, ctx.id);
                           break;
                         }
-
+                      }
+                    }
+                    foreach (Interactable tempInteractable in interactables)
+                    {
+                      foreach (Context ctx in tempInteractable.contexts)
+                      {
+
+                        if (DictionariesHelper.ContainsKey(ctx.name, options.currentLanguage).value == contextName)
+                        {
+                          effect.endOfContext.Set(tempInteractable.name, ctx.id);
+                          break;
+                        }
                       }
                     }
                   }


Fixed incorrect use of UI ExtendedControls labelext

--- EDDiscovery/ExportImport/ExportControl.Designer.cs
+++ EDDiscovery/ExportImport/ExportControl.Designer.cs
@@ -47,17 +47,17 @@
             this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
             this.groupBoxCustom2 = new ExtendedControls.GroupBoxCustom();
             this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
-            this.labelExt1 = new ExtendedControls.LabelExt();
+            this.labelExt1 = new System.Windows.Forms.Label();
             this.comboBoxCommander = new ExtendedControls.ComboBoxCustom();
-            this.labelExt2 = new ExtendedControls.LabelExt();
-            this.labelExt3 = new ExtendedControls.LabelExt();
+            this.labelExt2 = new System.Windows.Forms.Label();
+            this.labelExt3 = new System.Windows.Forms.Label();
             this.radioButtonTab = new ExtendedControls.RadioButtonCustom();
             this.radioButtonOther = new ExtendedControls.RadioButtonCustom();
-            this.labelExt4 = new ExtendedControls.LabelExt();
+            this.labelExt4 = new System.Windows.Forms.Label();
             this.textBoxArrivalDate = new ExtendedControls.TextBoxBorder();
-            this.labelExt5 = new ExtendedControls.LabelExt();
-            this.labelExt6 = new ExtendedControls.LabelExt();
-            this.labelExt7 = new ExtendedControls.LabelExt();
+            this.labelExt5 = new System.Windows.Forms.Label();
+            this.labelExt6 = new System.Windows.Forms.Label();
+            this.labelExt7 = new System.Windows.Forms.Label();
             this.textBoxSysName = new ExtendedControls.TextBoxBorder();
             this.textBoxSysNotes = new ExtendedControls.TextBoxBorder();
             this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
@@ -70,11 +70,11 @@
             this.checkBoxCustomAutoOpen = new ExtendedControls.CheckBoxCustom();
             this.groupBoxCustomFormat = new ExtendedControls.GroupBoxCustom();
             this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
-            this.labelExtDataExport = new ExtendedControls.LabelExt();
+            this.labelExtDataExport = new System.Windows.Forms.Label();
             this.comboBoxCustomExportType = new ExtendedControls.ComboBoxCustom();
             this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
             this.checkBoxCustomIncludeHeader = new ExtendedControls.CheckBoxCustom();
-            this.labelExtSeparator = new ExtendedControls.LabelExt();
+            this.labelExtSeparator = new System.Windows.Forms.Label();
             this.radioButtonCustomUSAUK = new ExtendedControls.RadioButtonCustom();
             this.radioButtonCustomEU = new ExtendedControls.RadioButtonCustom();
             this.groupBoxCustom1 = new ExtendedControls.GroupBoxCustom();
@@ -91,8 +91,8 @@
             this.selectImportFileDialog = new System.Windows.Forms.OpenFileDialog();
             this.btnSphereSystems = new ExtendedControls.ButtonExt();
             this.txtsphereRadius = new ExtendedControls.TextBoxBorder();
-            this.labelExt8 = new ExtendedControls.LabelExt();
-            this.labelExt9 = new ExtendedControls.LabelExt();
+            this.labelExt8 = new System.Windows.Forms.Label();
+            this.labelExt9 = new System.Windows.Forms.Label();
             this.tableLayoutPanel1.SuspendLayout();
             this.groupBoxCustom2.SuspendLayout();
             this.tableLayoutPanel4.SuspendLayout();
@@ -884,11 +884,11 @@
         private ExtendedControls.CheckBoxCustom checkBoxCustomAutoOpen;
         private ExtendedControls.GroupBoxCustom groupBoxCustomFormat;
         private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
-        private ExtendedControls.LabelExt labelExtDataExport;
+        private System.Windows.Forms.Label labelExtDataExport;
         private ExtendedControls.ComboBoxCustom comboBoxCustomExportType;
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
         private ExtendedControls.CheckBoxCustom checkBoxCustomIncludeHeader;
-        private ExtendedControls.LabelExt labelExtSeparator;
+        private System.Windows.Forms.Label labelExtSeparator;
         private ExtendedControls.RadioButtonCustom radioButtonCustomUSAUK;
         public ExtendedControls.RadioButtonCustom radioButtonCustomEU;
         private ExtendedControls.GroupBoxCustom groupBoxCustom1;
@@ -901,19 +901,19 @@
         private System.Windows.Forms.ToolTip toolTip;
         private ExtendedControls.GroupBoxCustom groupBoxCustom2;
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
-        private ExtendedControls.LabelExt labelExt1;
+        private System.Windows.Forms.Label labelExt1;
         private ExtendedControls.ComboBoxCustom comboBoxCommander;
-        private ExtendedControls.LabelExt labelExt2;
-        private ExtendedControls.LabelExt labelExt3;
+        private System.Windows.Forms.Label labelExt2;
+        private System.Windows.Forms.Label labelExt3;
         private ExtendedControls.RadioButtonCustom radioButtonTab;
         private ExtendedControls.RadioButtonCustom radioButtonOther;
         private ExtendedControls.TextBoxBorder textBoxDelimiter;
-        private ExtendedControls.LabelExt labelExt4;
+        private System.Windows.Forms.Label labelExt4;
         private ExtendedControls.TextBoxBorder textBoxArrivalDate;
         private ExtendedControls.TextBoxBorder textBoxArrivalTime;
-        private ExtendedControls.LabelExt labelExt5;
-        private ExtendedControls.LabelExt labelExt6;
-        private ExtendedControls.LabelExt labelExt7;
+        private System.Windows.Forms.Label labelExt5;
+        private System.Windows.Forms.Label labelExt6;
+        private System.Windows.Forms.Label labelExt7;
         private ExtendedControls.TextBoxBorder textBoxSysName;
         private ExtendedControls.TextBoxBorder textBoxSysNotes;
         private System.Windows.Forms.OpenFileDialog selectImportFileDialog;
@@ -925,7 +925,7 @@
         private ExtendedControls.CheckBoxCustom checkBoxImpHeader;
         private ExtendedControls.ButtonExt btnSphereSystems;
         private ExtendedControls.TextBoxBorder txtsphereRadius;
-        private ExtendedControls.LabelExt labelExt8;
-        private ExtendedControls.LabelExt labelExt9;
+        private System.Windows.Forms.Label labelExt8;
+        private System.Windows.Forms.Label labelExt9;
     }
 }


Add assertion covering free mod selection mod validity filter

--- osu.Game.Tests/Visual/Multiplayer/TestSceneFreeModSelectScreen.cs
+++ osu.Game.Tests/Visual/Multiplayer/TestSceneFreeModSelectScreen.cs
@@ -1,8 +1,11 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

+using System.Linq;
 using NUnit.Framework;
 using osu.Framework.Graphics.Containers;
+using osu.Framework.Testing;
+using osu.Game.Overlays.Mods;
 using osu.Game.Screens.OnlinePlay;

 namespace osu.Game.Tests.Visual.Multiplayer
@@ -18,6 +21,12 @@
             {
                 State = { Value = Visibility.Visible }
             });
+
+            AddAssert("all visible mods are playable",
+                () => this.ChildrenOfType<ModPanel>()
+                          .Where(panel => panel.IsPresent)
+                          .All(panel => panel.Mod.HasImplementation && panel.Mod.UserPlayable));
+
             AddToggleStep("toggle visibility", visible =>
             {
                 if (freeModSelectScreen != null)


Lambda: public method converted to extension methods

--- source/Karambolo.Common/Lambda.cs
+++ source/Karambolo.Common/Lambda.cs
@@ -18,7 +18,7 @@
                 null;
         }

-        public static MemberExpression GetMemberExpression(LambdaExpression expression, MemberTypes allowedMemberTypes)
+        public static MemberExpression GetMemberExpression(this LambdaExpression expression, MemberTypes allowedMemberTypes)
         {
             if (expression == null)
                 throw new ArgumentNullException(nameof(expression));
@@ -61,12 +61,12 @@
             return GetMemberPath(expression, allowedMemberTypes, expr => expr is ParameterExpression);
         }

-        public static string MemberPath<TProperty>(Expression<Func<TProperty>> expression, MemberTypes allowedMemberTypes = MemberTypes.Property)
+        public static string MemberPath<TProperty>(this Expression<Func<TProperty>> expression, MemberTypes allowedMemberTypes = MemberTypes.Property)
         {
             return string.Join(".", GetMemberPath(expression, allowedMemberTypes).Select(m => m.Name));
         }

-        public static string MemberPath<TRoot, TProperty>(Expression<Func<TRoot, TProperty>> expression, MemberTypes allowedMemberTypes = MemberTypes.Property)
+        public static string MemberPath<TRoot, TProperty>(this Expression<Func<TRoot, TProperty>> expression, MemberTypes allowedMemberTypes = MemberTypes.Property)
         {
             return string.Join(".", GetMemberPath(expression, allowedMemberTypes).Select(m => m.Name));
         }
@@ -107,7 +107,7 @@
             return (PropertyInfo)member.Member;
         }

-        public static MethodCallExpression GetCallExpression(LambdaExpression expression)
+        public static MethodCallExpression GetCallExpression(this LambdaExpression expression)
         {
             if (expression == null)
                 throw new ArgumentNullException(nameof(expression));


Fix output encoding in Nuke.GlobalTool to be UTF-8

--- source/Nuke.GlobalTool/Program.cs
+++ source/Nuke.GlobalTool/Program.cs
@@ -6,6 +6,7 @@
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using System.Text;
 using JetBrains.Annotations;
 using Nuke.Common;
 using Nuke.Common.IO;
@@ -23,6 +24,8 @@

         private static int Main(string[] args)
         {
+            Console.OutputEncoding = Encoding.UTF8;
+
             try
             {
                 var rootDirectory = TryGetRootDirectory();


Restored serialized object update call

Restored serialized object update call

--- Assets/MixedRealityToolkit.SDK/Inspectors/UX/Tooltips/ToolTipConnectorInspector.cs
+++ Assets/MixedRealityToolkit.SDK/Inspectors/UX/Tooltips/ToolTipConnectorInspector.cs
@@ -46,7 +46,7 @@

         public override void OnInspectorGUI()
         {
-            //serializedObject.Update();
+            serializedObject.Update();

             if (multiLineHelpBoxStyle == null)
             {


Registration now locks to prevent double reg.

--- OpenSonos.LocalMusicServer/DiscoveryAndRegistration/SonosPlayerDiscoveryService.cs
+++ OpenSonos.LocalMusicServer/DiscoveryAndRegistration/SonosPlayerDiscoveryService.cs
@@ -1,3 +1,4 @@
+using System;
 using OpenSonos.LocalMusicServer.Bootstrapping;
 using SimpleServices;

@@ -17,16 +18,20 @@

         public void Start(string[] args)
         {
+            var sync = new object();
             var registeredYet = false;

             Players.Discover(_config.ServerIp, sonosPlayer =>
             {
-                if (registeredYet)
+                lock (sync)
                 {
-                    return;
+                    if (registeredYet)
+                    {
+                        return;
+                    }
+
+                    registeredYet = _webInterface.RegisterServer(sonosPlayer, _config.ServerIp).Result;
                 }
-
-                registeredYet = _webInterface.RegisterServer(sonosPlayer, _config.ServerIp).Result;
             });
         }


Add error handler around saving player.dat files

--- source/Craft.Net.Server/ExtensionMethods.cs
+++ source/Craft.Net.Server/ExtensionMethods.cs
@@ -68,42 +68,46 @@
         {
             if (string.IsNullOrEmpty(level.BaseDirectory))
                 return;
-            Directory.CreateDirectory(Path.Combine(level.BaseDirectory, "players"));
-            var file = new NbtFile();
-            file.RootTag.Add(new NbtInt("playerGameType", (int)client.GameMode));
-            file.RootTag.Add(new NbtShort("SelectedItemSlot", client.Entity.SelectedSlot));
-            file.RootTag.Add(new NbtInt("SpawnX", (int)client.Entity.SpawnPoint.X));
-            file.RootTag.Add(new NbtInt("SpawnY", (int)client.Entity.SpawnPoint.Y));
-            file.RootTag.Add(new NbtInt("SpawnZ", (int)client.Entity.SpawnPoint.Z));
-            file.RootTag.Add(new NbtInt("foodLevel", client.Entity.Food));
-            file.RootTag.Add(new NbtFloat("foodExhaustionLevel", client.Entity.FoodExhaustion));
-            file.RootTag.Add(new NbtFloat("foodSaturationLevel", client.Entity.FoodSaturation));
-            file.RootTag.Add(new NbtShort("Health", client.Entity.Health));
-            var inventory = new NbtList("Inventory", NbtTagType.Compound);
-            var slots = client.Entity.Inventory.GetSlots();
-            for (int i = 0; i < slots.Length; i++)
+            try
             {
-                var slot = (ItemStack)slots[i].Clone();
-                slot.Index = Level.NetworkSlotToDataSlot(i);
-                if (!slot.Empty)
-                    inventory.Add(slot.ToNbt());
+                Directory.CreateDirectory(Path.Combine(level.BaseDirectory, "players"));
+                var file = new NbtFile();
+                file.RootTag.Add(new NbtInt("playerGameType", (int)client.GameMode));
+                file.RootTag.Add(new NbtShort("SelectedItemSlot", client.Entity.SelectedSlot));
+                file.RootTag.Add(new NbtInt("SpawnX", (int)client.Entity.SpawnPoint.X));
+                file.RootTag.Add(new NbtInt("SpawnY", (int)client.Entity.SpawnPoint.Y));
+                file.RootTag.Add(new NbtInt("SpawnZ", (int)client.Entity.SpawnPoint.Z));
+                file.RootTag.Add(new NbtInt("foodLevel", client.Entity.Food));
+                file.RootTag.Add(new NbtFloat("foodExhaustionLevel", client.Entity.FoodExhaustion));
+                file.RootTag.Add(new NbtFloat("foodSaturationLevel", client.Entity.FoodSaturation));
+                file.RootTag.Add(new NbtShort("Health", client.Entity.Health));
+                var inventory = new NbtList("Inventory", NbtTagType.Compound);
+                var slots = client.Entity.Inventory.GetSlots();
+                for (int i = 0; i < slots.Length; i++)
+                {
+                    var slot = (ItemStack)slots[i].Clone();
+                    slot.Index = Level.NetworkSlotToDataSlot(i);
+                    if (!slot.Empty)
+                        inventory.Add(slot.ToNbt());
+                }
+                file.RootTag.Add(inventory);
+                var position = new NbtList("Pos", NbtTagType.Double);
+                position.Add(new NbtDouble(client.Entity.Position.X));
+                position.Add(new NbtDouble(client.Entity.Position.Y));
+                position.Add(new NbtDouble(client.Entity.Position.Z));
+                file.RootTag.Add(position);
+                var rotation = new NbtList("Rotation", NbtTagType.Float);
+                rotation.Add(new NbtFloat(client.Entity.Yaw));
+                rotation.Add(new NbtFloat(client.Entity.Pitch));
+                file.RootTag.Add(rotation);
+                var velocity = new NbtList("Motion", NbtTagType.Double);
+                velocity.Add(new NbtDouble(client.Entity.Velocity.X));
+                velocity.Add(new NbtDouble(client.Entity.Velocity.Y));
+                velocity.Add(new NbtDouble(client.Entity.Velocity.Z));
+                file.RootTag.Add(velocity);
+                file.SaveToFile(Path.Combine(level.BaseDirectory, "players", client.Username + ".dat"), NbtCompression.None);
             }
-            file.RootTag.Add(inventory);
-            var position = new NbtList("Pos", NbtTagType.Double);
-            position.Add(new NbtDouble(client.Entity.Position.X));
-            position.Add(new NbtDouble(client.Entity.Position.Y));
-            position.Add(new NbtDouble(client.Entity.Position.Z));
-            file.RootTag.Add(position);
-            var rotation = new NbtList("Rotation", NbtTagType.Float);
-            rotation.Add(new NbtFloat(client.Entity.Yaw));
-            rotation.Add(new NbtFloat(client.Entity.Pitch));
-            file.RootTag.Add(rotation);
-            var velocity = new NbtList("Motion", NbtTagType.Double);
-            velocity.Add(new NbtDouble(client.Entity.Velocity.X));
-            velocity.Add(new NbtDouble(client.Entity.Velocity.Y));
-            velocity.Add(new NbtDouble(client.Entity.Velocity.Z));
-            file.RootTag.Add(velocity);
-            file.SaveToFile(Path.Combine(level.BaseDirectory, "players", client.Username + ".dat"), NbtCompression.None);
+            catch { } // If exceptions happen here, the entire server dies
         }

         private static void CreateNewPlayer(Level level, RemoteClient client)


JS UI Client - Fix - Updated the style of know levels so that it doesn't include the background color. Decided that it looked non-professional.

--- source/Glimpse.Test/Views/Main/Index.cshtml
+++ source/Glimpse.Test/Views/Main/Index.cshtml
@@ -492,10 +492,10 @@
     .glimpse-panel tbody tr.Warn .icon { background-position:-36px -22px; }
     .glimpse-panel tbody tr.Error .icon { background-position:-50px -22px; }
     .glimpse-panel tbody tr.Fail .icon { background-position:-64px -22px; }
-    .glimpse-panel tbody tr.Info { background-color:#C0E6F9; color:#067CE5; }
-    .glimpse-panel tbody tr.Warn { background-color: #FFE596; color:#FE850C; } /*background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255, 255, 255, .2)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.75, rgba(255, 255, 255, .2)), color-stop(.75, transparent), to(transparent)); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); -webkit-background-size: 50px 50px; -moz-background-size: 50px 50px; background-size: 50px 50px;*/
-    .glimpse-panel tbody tr.Error { background-color:#FF8484; color:#490000; }
-    .glimpse-panel tbody tr.Fail { background-color:#B03631; font-weight:bold; }
+    .glimpse-panel tbody tr.Info { /* background-color:#C0E6F9; */ color:#067CE5; }
+    .glimpse-panel tbody tr.Warn { /* background-color: #FFE596; */ color:#FE850C; } /*background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255, 255, 255, .2)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.75, rgba(255, 255, 255, .2)), color-stop(.75, transparent), to(transparent)); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); -webkit-background-size: 50px 50px; -moz-background-size: 50px 50px; background-size: 50px 50px;*/
+    .glimpse-panel tbody tr.Error { /* background-color:#FF8484; */ color:#490000; }
+    .glimpse-panel tbody tr.Fail { /* background-color:#B03631; */ color: #490000; font-weight:bold; }
 </style>
 <style>
     h1, h2 { margin:0; padding:0; }


Fix: Creating OffscreenWebView from SDK with custom user agent fails

--- source/Playnite/WebView/OffscreenWebView.cs
+++ source/Playnite/WebView/OffscreenWebView.cs
@@ -30,11 +30,6 @@
         public OffscreenWebView(WebViewSettings settings)
         {
             this.userAgent = settings.UserAgent;
-            if (!userAgent.IsNullOrEmpty())
-            {
-                browser.RequestHandler = new CustomRequestHandler(userAgent);
-            }
-
             Initialize(new BrowserSettings
             {
                 Javascript = settings.JavaScriptEnabled ? CefState.Enabled : CefState.Disabled
@@ -44,6 +39,11 @@
         private void Initialize(BrowserSettings settings = null)
         {
             browser = new CefSharp.OffScreen.ChromiumWebBrowser(automaticallyCreateBrowser: false);
+            if (!userAgent.IsNullOrEmpty())
+            {
+                browser.RequestHandler = new CustomRequestHandler(userAgent);
+            }
+
             browser.LoadingStateChanged += Browser_LoadingStateChanged;
             browser.BrowserInitialized += Browser_BrowserInitialized;
             if (settings != null)


Minor changes, #67.

Minor changes, #67.

--- source/Zyan.Tests/SrpAuthenticationTests.cs
+++ source/Zyan.Tests/SrpAuthenticationTests.cs
@@ -619,13 +619,27 @@
 			var url = "tcp://localhost:8091/CustomAuthenticationTestHost_TcpSimplex";
 			var protocol = new TcpCustomClientProtocolSetup(true);
 			var credentials = new BrokenSrpCredentials();
-
-			using (var connection = new ZyanConnection(url, protocol, credentials, true, true))
-			{
-				var proxy1 = connection.CreateProxy<ISampleServer>("SampleServer");
-				Assert.AreEqual("Hallo", proxy1.Echo("Hallo"));
-				proxy1 = null;
-			}
+			var conn = new ZyanConnection(url, protocol, credentials, true, true);
+		}
+
+		private class AnotherBrokenSrpCredentials : AuthCredentials
+		{
+			public override void Authenticate(Guid sessionId, IZyanDispatcher dispatcher)
+			{
+				dispatcher.Logon(sessionId, new Hashtable
+				{
+					{ SrpProtocolConstants.SRP_STEP_NUMBER, 3 },
+				});
+			}
+		}
+
+		[TestMethod, ExpectedException(typeof(SecurityException))]
+		public void UnknownAuthenticationStep()
+		{
+			var url = "tcp://localhost:8091/CustomAuthenticationTestHost_TcpSimplex";
+			var protocol = new TcpCustomClientProtocolSetup(true);
+			var credentials = new AnotherBrokenSrpCredentials();
+			var conn = new ZyanConnection(url, protocol, credentials, true, true);
 		}
 	}
 }


removes circular dependency on regex

removes circular dependency on regex

--- libraries/Pliant/Grammars/LexerRule.cs
+++ libraries/Pliant/Grammars/LexerRule.cs
@@ -1,5 +1,4 @@
-using Pliant.Regex;
-using Pliant.Tokens;
+using Pliant.Tokens;

 namespace Pliant.Grammars
 {
@@ -14,12 +13,7 @@
             Grammar = grammar;
             TokenType = new TokenType(leftHandSide.Value);
         }
-
-        private LexerRule(INonTerminal leftHandSide, string regularExpression)
-        {
-            var regexGrammar = new RegexGrammar();
-        }
-
+
         public SymbolType SymbolType
         {
             get { return SymbolType.LexerRule; }


Move initialization of the opQueue to after we have tables

--- Akavache.Sqlite3/SqlitePersistentBlobCacheNext.cs
+++ Akavache.Sqlite3/SqlitePersistentBlobCacheNext.cs
@@ -29,7 +29,7 @@
         public SQLiteConnection Connection { get; private set; }

         readonly IObservable<Unit> _initializer;
-        readonly SqliteOperationQueue opQueue;
+        SqliteOperationQueue opQueue;
         IDisposable queueThread;
         bool disposed = false;

@@ -40,9 +40,6 @@
             BlobCache.EnsureInitialized();

             Connection = new SQLiteConnection(databaseFile, storeDateTimeAsTicks: true);
-            opQueue = new SqliteOperationQueue(Connection, Scheduler);
-            queueThread = opQueue.Start();
-
             _initializer = Initialize();
         }

@@ -174,7 +171,7 @@
             var disp = Interlocked.Exchange(ref queueThread, null);
             if (disp == null) return;

-            Observable.Start(() => queueThread.Dispose(), Scheduler)
+            Observable.Start(() => disp.Dispose(), Scheduler)
                 .Multicast(shutdown)
                 .PermaRef();

@@ -202,6 +199,11 @@

                         Connection.Insert(new SchemaInfo() { Version = 2, });
                     }
+
+                    // NB: We have to do this here because you can't prepare
+                    // statements until you've got the backing table
+                    opQueue = new SqliteOperationQueue(Connection, Scheduler);
+                    queueThread = opQueue.Start();

                     subj.OnNext(Unit.Default);
                     subj.OnCompleted();


update ObjectMappingTest

update ObjectMappingTest

--- test/LinFx.Test/ObjectMapping/ObjectMappingTest.cs
+++ test/LinFx.Test/ObjectMapping/ObjectMappingTest.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using Xunit;

 namespace LinFx.Test.ObjectMapping
@@ -6,7 +7,7 @@
     public class ObjectMappingTest
     {
         [Fact]
-        public void MapToTests()
+        public void MapTo_Tests()
         {
             var person = new Person()
             {
@@ -14,10 +15,28 @@
                 Age = 200,
             };

-            var dto = person.MapTo<PersonDto>(person);
+            var dto = person.MapTo<PersonDto>();

             Assert.Equal(person.Name, dto.Name);
             Assert.Equal(person.Age, dto.Age);
         }
+
+        [Fact]
+        public void MapTo_Array_Tests()
+        {
+            var persions = new List<Person>
+            {
+                new Person { Name = "Lio1", Age = 11 },
+                new Person { Name = "Lio1", Age = 12 },
+                new Person { Name = "Lio1", Age = 13 },
+            }.ToArray();
+
+            var dtos = persions.MapTo<PersonDto[]>();
+            Assert.Equal(persions.Length, dtos.Length);
+
+            var dtos2 = new PersonDto[persions.Length];
+            persions.MapTo(dtos2);
+            Assert.Equal(persions.Length, dtos2.Length);
+        }
     }
 }


Decorate the OpenIddict.Tests methods with [Fact]

--- test/OpenIddict.Tests/OpenIddictExtensionsTests.cs
+++ test/OpenIddict.Tests/OpenIddictExtensionsTests.cs
@@ -15,6 +15,7 @@
 {
     public class OpenIddictExtensionsTests
     {
+        [Fact]
         public void UseDefaultModels_KeyTypeDefaultsToString()
         {
             // Arrange
@@ -34,6 +35,7 @@
             Assert.Equal(typeof(OpenIddictToken), options.DefaultTokenType);
         }

+        [Fact]
         public void UseDefaultModels_KeyTypeCanBeOverriden()
         {
             // Arrange
@@ -41,6 +43,9 @@
             var builder = services.AddOpenIddict().AddCore();

             // Act
+            builder.UseDefaultModels<Guid>();
+
+            // Assert
             var provider = services.BuildServiceProvider();
             var options = provider.GetRequiredService<IOptionsMonitor<OpenIddictCoreOptions>>().CurrentValue;


Changed benchmark to use AsyncCollection instead of AsyncQueue

--- AsyncCollections.Benchmark/AsyncQueueBenchmark.cs
+++ AsyncCollections.Benchmark/AsyncQueueBenchmark.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -33,8 +34,8 @@
 			}
 		}

-		[Benchmark( Description = "HellBrick.AsyncCollections.AsyncQueue" )]
-		public void HellBrickAsyncQueue() => DdosQueue( new AsyncQueue<int>() );
+		[Benchmark( Description = "AsyncCollection( ConcurrentQueue )" )]
+		public void HellBrickAsyncCollection() => DdosQueue( new AsyncCollection<int>( new ConcurrentQueue<int>() ) );

 		[Benchmark( Description = "Nito.AsyncEx.AsyncCollection" )]
 		public void NitoAsyncCollection() => DdosQueue( new NitoAsyncCollectionAdapter<int>() );


Moving test to talk to real object

Moving test to talk to real object

--- test/Orchard.Tests/Events/InternalNotifierTests.cs
+++ test/Orchard.Tests/Events/InternalNotifierTests.cs
@@ -15,109 +15,18 @@
         public void CallingNotifyWillInvokeMethod() {

             var target = new TestEvent1();
-            var notifier = new Notifier(new []{ target });
+            var notifier = new InternalTelemetrySourceAdapter(new DefaultMethodAdaptor());

-            notifier.Subscribe(new EventObserver(target));
+            notifier.EnlistTarget(target);

             Assert.Equal(0, target.Counter);

-            notifier.Notify("ITestEvent_Add", new Dictionary<string, object> {  { "value", 1 } });
+            notifier.WriteTelemetry("ITestEvent_Add", new Dictionary<string, object> {  { "value", 1 } });

             Assert.Equal(1, target.Counter);
         }
     }
-
-    public class Notifier : IObservable<KeyValuePair<string, IDictionary<string, object>>> {
-        private readonly IList<IObserver<KeyValuePair<string, IDictionary<string, object>>>> _observers
-            = new List<IObserver<KeyValuePair<string, IDictionary<string, object>>>>();
-
-        private readonly IEnumerable<IEventHandler> _eventHandlers;
-
-        public Notifier(IEnumerable<IEventHandler> eventHandlers) {
-            _eventHandlers = eventHandlers;
-        }
-
-        public IDisposable Subscribe(IObserver<KeyValuePair<string, IDictionary<string, object>>> observer) {
-            _observers.Add(observer);
-
-            return null;
-        }
-
-        public void Notify(string notificationName, IDictionary<string, object> parameters) {
-            foreach(var observer in _observers) {
-                try {
-
-                    observer.OnNext(
-                        new KeyValuePair<string, IDictionary<string, object>>(notificationName, parameters));
-                }
-                catch (Exception ex) {
-                    observer.OnError(ex);
-                }
-                finally {
-                    observer.OnCompleted();
-                }
-            }
-        }
-    }
-
-
-    public class EventObserver : IObserver<KeyValuePair<string, IDictionary<string, object>>> {
-        private readonly NotificationListenerCache _listeners = new NotificationListenerCache();
-
-        public EventObserver(IEventHandler target) {
-            var typeInfo = target.GetType().GetTypeInfo();
-
-            var methodInfos = typeInfo.DeclaredMethods;
-
-            foreach (var methodInfo in methodInfos) {
-                var parameterNames = methodInfo.GetParameters().Select(x => x.Name);
-                var key = typeInfo.FullName + "_" + methodInfo.Name + "_" + string.Join("_", parameterNames);
-
-                Enlist(key, target, methodInfo);
-            }
-        }
-
-        private void Enlist(string notificationName, object target, MethodInfo methodInfo) {
-            var entries = _listeners.GetOrAdd(
-                notificationName,
-                _ => new ConcurrentBag<ListenerEntry>());
-
-            entries.Add(new ListenerEntry(target, methodInfo));
-        }
-
-        public void OnCompleted() {
-        }
-
-        public void OnError(Exception error) {
-        }
-
-        public void OnNext(KeyValuePair<string, IDictionary<string, object>> value) {
-            var notificationName = value.Key;
-            ConcurrentBag<ListenerEntry> entries;
-            if (_listeners.TryGetValue(notificationName, out entries)) {
-                foreach (var entry in entries) {
-                    // Do Something!
-                }
-            }
-        }
-
-        private class NotificationListenerCache : ConcurrentDictionary<string, ConcurrentBag<ListenerEntry>> {
-            public NotificationListenerCache()
-                : base(StringComparer.Ordinal) {
-            }
-        }
-
-        private class ListenerEntry {
-            public ListenerEntry(object target, MethodInfo methodInfo) {
-                Target = target;
-                MethodInfo = methodInfo;
-            }
-
-            public MethodInfo MethodInfo { get; }
-
-            public object Target { get; }
-        }
-    }
+

     public interface ITestEvent : IEventHandler {
         int Counter { get; set; }


Missed a compile error.

Missed a compile error.

--- Aurora/Modules/InterWorldComms/InterWorldComms.cs
+++ Aurora/Modules/InterWorldComms/InterWorldComms.cs
@@ -260,7 +260,7 @@
             response.Value = responseData;

             #region Callback on the connecting server
-            List<ConnectionIdentifier> NewlyConnectedToWorlds = new List<ConnectionIdentifier>(;
+            List<ConnectionIdentifier> NewlyConnectedToWorlds = new List<ConnectionIdentifier>();
             foreach (ConnectionIdentifier connection in UnsuccessfulConnectedToWorlds)
             {
                 string[] IPs = connection.Connection.Split(':');


Try an updated pdf version

Try an updated pdf version

--- Battery-Commander.Web/Views/Shared/_Layout.cshtml
+++ Battery-Commander.Web/Views/Shared/_Layout.cshtml
@@ -90,10 +90,9 @@
     <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
     <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
-    <script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.27/build/vfs_fonts.js"></script>
-    <script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.27/build/pdfmake.min.js"></script>
+    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.31/vfs_fonts.js"></script>
+    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.31/pdfmake.min.js"></script>
     <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
-    <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>

     @RenderSection("Scripts", required: false)


Fixed composing factory

Fixed composing factory

--- CSharp/IoCAutoFac/IoCAutoFac/AutoFacAttributes.cs
+++ CSharp/IoCAutoFac/IoCAutoFac/AutoFacAttributes.cs
@@ -32,10 +32,9 @@
                  .WithMetadata<PriorityMeta>((a) => a.For((arg) => arg.Priority, 5000));

             // Primary factory creation
-            builder.RegisterType<ServiceFactory>()
-                .AutoActivate();
+            builder.RegisterType<ServiceFactory>().AsSelf().AutoActivate();

-            builder.RegisterType<EuropeanCalendar>().As<ICalendar>().InstancePerDependency();
+            builder.RegisterType<EuropeanCalendar>().As<ICalendar>().AutoActivate();
             builder.RegisterType<GenericCalendar>().As<ICalendar>().InstancePerDependency().AutoActivate();

             // Autowire selected property


Bug fix - Crash when displaying help (Closes #14)

--- AVDump3CL/AVD3CLModuleSettings.cs
+++ AVDump3CL/AVD3CLModuleSettings.cs
@@ -192,7 +192,7 @@
 				//A bit odd at first, but with this we make Consumers==null the special case (i.e. list the consumers)
 				return obj != null ? (lst.Count == 0 ? null : string.Join(",", lst)) : "";
 			}
-			return obj.ToString();
+			return obj == null ? "<null>" : obj.ToString();
 		}

 		object ICLConvert.FromCLString(SettingsProperty property, string str) {
@@ -274,7 +274,7 @@
 				//A bit odd at first, but with this we make Reports==null the special case (i.e. list the consumers)
 				return obj != null ? (lst.Count == 0 ? null : string.Join(",", lst)) : "";
 			}
-			return obj.ToString();
+			return obj == null ? "<null>" : obj.ToString();
 		}

 		object ICLConvert.FromCLString(SettingsProperty property, string str) {
@@ -405,7 +405,7 @@
 					":" + nullStreamTestSettings.StreamLength +
 					":" + nullStreamTestSettings.ParallelStreamCount;
 			}
-			return obj.ToString();
+			return obj == null ? "<null>" : obj.ToString();
 		}

 		public object FromCLString(SettingsProperty property, string str) {


build: increment patch version,

build: increment patch version,

to indicate that treating Albedo as indirect reference is a fix.

--- build/CommonAssemblyInfo.cs
+++ build/CommonAssemblyInfo.cs
@@ -10,8 +10,8 @@
 [assembly: ComVisible(false)]
 [assembly: NeutralResourcesLanguage("en-US")]
 [assembly: AssemblyProduct("")]
-[assembly: AssemblyVersion("0.18.1")]
-[assembly: AssemblyInformationalVersion("0.18.1")]
+[assembly: AssemblyVersion("0.18.2")]
+[assembly: AssemblyInformationalVersion("0.18.2")]

 /*
  * Version 0.18.2


build: increment pre-release version,

build: increment pre-release version,

to test ilmerge on CI server.

--- build/CommonAssemblyInfo.cs
+++ build/CommonAssemblyInfo.cs
@@ -10,8 +10,8 @@
 [assembly: ComVisible(false)]
 [assembly: NeutralResourcesLanguage("en-US")]
 [assembly: AssemblyProduct("")]
-[assembly: AssemblyVersion("0.23.4")]
-[assembly: AssemblyInformationalVersion("0.23.4")]
+[assembly: AssemblyVersion("0.23.5")]
+[assembly: AssemblyInformationalVersion("0.23.5-pre01")]

 /*
  * Version 0.23.5


docs: added the release note for ExceptionUnwrappingCommand.

--- build/CommonAssemblyInfo.cs
+++ build/CommonAssemblyInfo.cs
@@ -21,4 +21,7 @@
  *
  * - [FIX] fixed an exception thrown when verifying member initialization for
  *   the field 'value__' of enum types.
+ *
+ * - [FIX] unwarpped TargetInvocationException thrown by the delegate of
+ *   TestCase.
  */


Converted API to lowercase. Implemented a state machine to coordinate the Job process. Much cleaner. Can roll up statuses.

--- Cogito.Core/Threading/TaskEnumerableExtensions.cs
+++ Cogito.Core/Threading/TaskEnumerableExtensions.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics.Contracts;
 using System.Linq;
 using System.Threading.Tasks;

@@ -9,29 +10,173 @@
     public static class TaskEnumerableExtensions
     {

-        public static Task<T[]> WhenAll<T>(this IEnumerable<Task<T>> source)
+        /// <summary>
+        /// Returns a <see cref="Task"/> that waits for all of the individual tasks to be complete.
+        /// </summary>
+        /// <param name="source"></param>
+        /// <returns></returns>
+        public static Task WaitAllAsync(this IEnumerable<Task> source)
         {
+            Contract.Requires<ArgumentNullException>(source != null);
+
+            return Task.WhenAll(source);
+        }
+
+        /// <summary>
+        /// Returns a <see cref="Task{T}"/> that waits for all of the individual <see cref="Task{T}"/> to be complete.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="source"></param>
+        /// <returns></returns>
+        public static Task<T[]> ToArrayAsync<T>(this IEnumerable<Task<T>> source)
+        {
+            Contract.Requires<ArgumentNullException>(source != null);
+
             return Task.WhenAll<T>(source);
         }

-        public static Task WhenAll(this IEnumerable<Task> source)
+        /// <summary>
+        /// Returns <c>true</c> if all of the items in <paramref name="source"/> match <paramref name="predicate"/>.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="source"></param>
+        /// <param name="predicate"></param>
+        /// <returns></returns>
+        public static async Task<bool> AllAsync<T>(this IEnumerable<T> source, Func<T, Task<bool>> predicate)
         {
-            return Task.WhenAll(source);
+            Contract.Requires<ArgumentNullException>(source != null);
+            Contract.Requires<ArgumentNullException>(predicate != null);
+
+            foreach (var i in await source.Select(predicate).ToArrayAsync())
+                if (!i)
+                    return false;
+
+            return true;
         }

-        public static Task<TResult[]> SelectAsync<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, Task<TResult>> selector)
+        /// <summary>
+        /// Returns <c>true</c> if all of the items in <paramref name="source"/> match <paramref name="predicate"/>.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="source"></param>
+        /// <param name="predicate"></param>
+        /// <returns></returns>
+        public static async Task<bool> AllAsync<T>(this IEnumerable<Task<T>> source, Func<Task<T>, Task<bool>> predicate)
         {
-            return source.Select(selector).WhenAll();
+            Contract.Requires<ArgumentNullException>(source != null);
+            Contract.Requires<ArgumentNullException>(predicate != null);
+
+            foreach (var i in await source.Select(predicate).ToArrayAsync())
+                if (!i)
+                    return false;
+
+            return true;
         }

-        public static Task<TResult[]> SelectManyAsync<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<Task<TResult>>> selector)
+        /// <summary>
+        /// Returns <c>true</c> if all of the items in <paramref name="source"/> match <paramref name="predicate"/>.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="source"></param>
+        /// <param name="predicate"></param>
+        /// <returns></returns>
+        public static async Task<bool> AllAsync<T>(this IEnumerable<Task<T>> source, Func<T, bool> predicate)
         {
-            return source.SelectMany(selector).WhenAll();
+            Contract.Requires<ArgumentNullException>(source != null);
+            Contract.Requires<ArgumentNullException>(predicate != null);
+
+            foreach (var i in await source.Select(async j => predicate(await j)).ToArrayAsync())
+                if (!i)
+                    return false;
+
+            return true;
         }

+        /// <summary>
+        /// Returns <c>true</c> if all of the items in <paramref name="source"/> are <c>true</c>.
+        /// </summary>
+        /// <param name="source"></param>
+        /// <returns></returns>
+        public static async Task<bool> AllAsync(this IEnumerable<Task<bool>> source)
+        {
+            Contract.Requires<ArgumentNullException>(source != null);
+
+            foreach (var i in await source.ToArrayAsync())
+                if (!i)
+                    return false;
+
+            return true;
+        }
+
+        /// <summary>
+        /// Returns <c>true</c> if any of the items in <paramref name="source"/> match <paramref name="predicate"/>.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="source"></param>
+        /// <param name="predicate"></param>
+        /// <returns></returns>
+        public static async Task<bool> AnyAsync<T>(this IEnumerable<T> source, Func<T, Task<bool>> predicate)
+        {
+            Contract.Requires<ArgumentNullException>(source != null);
+            Contract.Requires<ArgumentNullException>(predicate != null);
+
+            foreach (var i in await source.Select(predicate).ToArrayAsync())
+                if (i)
+                    return true;
+
+            return false;
+        }
+
+        /// <summary>
+        /// Returns <c>true</c> if any of the items in <paramref name="source"/> match <paramref name="predicate"/>.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="source"></param>
+        /// <param name="predicate"></param>
+        /// <returns></returns>
+        public static async Task<bool> AnyAsync<T>(this IEnumerable<Task<T>> source, Func<Task<T>, Task<bool>> predicate)
+        {
+            Contract.Requires<ArgumentNullException>(source != null);
+            Contract.Requires<ArgumentNullException>(predicate != null);
+
+
+            foreach (var i in await source.Select(predicate).ToArrayAsync())
+                if (i)
+                    return true;
+
+            return false;
+        }
+
+        /// <summary>
+        /// Returns <c>true</c> if any of the items in <paramref name="source"/> are <c>true</c>.
+        /// </summary>
+        /// <param name="source"></param>
+        /// <returns></returns>
+        public static async Task<bool> AnyAsync(this IEnumerable<Task<bool>> source)
+        {
+            Contract.Requires<ArgumentNullException>(source != null);
+
+
+            foreach (var i in await source.ToArrayAsync())
+                if (i)
+                    return true;
+
+            return false;
+        }
+
+        /// <summary>
+        /// Executes <paramref name="action"/> for each item in the collection.
+        /// </summary>
+        /// <typeparam name="TSource"></typeparam>
+        /// <param name="source"></param>
+        /// <param name="action"></param>
+        /// <returns></returns>
         public static Task ForEachAsync<TSource>(this IEnumerable<TSource> source, Func<TSource, Task> action)
         {
-            return source.Select(action).WhenAll();
+            Contract.Requires<ArgumentNullException>(source != null);
+            Contract.Requires<ArgumentNullException>(action != null);
+
+            return source.Select(action).WaitAllAsync();
         }

     }


Progress bar, async training (does not block the UI)

--- Aiv.Research.Visualizer2D/Main.cs
+++ Aiv.Research.Visualizer2D/Main.cs
@@ -20,7 +20,7 @@
     //I have implemented a hand written digit recognizer using MNIST dataset alone.It gives accuracy comparable to that of the latest OCR software.
     //I have used the full MNIST (60000 + 10000 examples) augmented with additional two versions of MNIST, altered using elastic deformations explained here : Distorting the MNIST Image Data Set
     //I have used a deep convolution neural network with two convolution-subsampling layers and an additional two hidden layer MLP.As this is a deep architecture, the more data you use for training, the better.
-    //The real challenge lies not in building the classifier, but preprocessing of data. You should make sure that the images you prepare for classification should be as close to that of MNIST, because MNIST the most cleanest dataset in terms of Image quality. You should crop your image well, add padding and remove noises, though CNN can deal with noise to some extent.
+    //-The real challenge lies not in building the classifier, but preprocessing of data. You should make sure that the images you prepare for classification should be as close to that of MNIST, because MNIST the most cleanest dataset in terms of Image quality. You should crop your image well, add padding and remove noises, though CNN can deal with noise to some extent.
     public partial class Main : Form
     {
         private PenDrawer       m_hPenDrawer;


Delete methods use TDocument instead of ICloudSearchDocument

--- AmazingCloudSearch/CloudSearch.cs
+++ AmazingCloudSearch/CloudSearch.cs
@@ -34,8 +34,8 @@
         AddResult Add(List<TDocument> toAdd);
         AddResult Add(TDocument toAdd);
         UpdateResult Update(TDocument toUpdate);
-        DeleteResult Delete(ICloudSearchDocument toDelete);
-        DeleteResult Delete(List<ICloudSearchDocument> toDelete);
+        DeleteResult Delete(TDocument toDelete);
+        DeleteResult Delete(List<TDocument> toDelete);
         SearchResult<TDocument> Search(SearchQuery<TDocument> query);
     }

@@ -157,14 +157,14 @@
 			return Add<UpdateResult>(toUpdate);
 		}

-        public DeleteResult Delete(ICloudSearchDocument toDelete)
+        public DeleteResult Delete(TDocument toDelete)
         {
             var action = _actionBuilder.BuildDeleteAction(new CloudSearchDocument { id = toDelete.id }, ActionType.DELETE);

             return PerformDocumentAction<DeleteResult>(action);
         }

-        public DeleteResult Delete(List<ICloudSearchDocument> toDelete)
+        public DeleteResult Delete(List<TDocument> toDelete)
         {
             var action = toDelete.Select(x => _actionBuilder.BuildDeleteAction(new CloudSearchDocument { id = x.id }, ActionType.DELETE));


Prevent players from late joining as role banned jobs (#6853)

--- Content.Server/GameTicking/GameTicker.Spawning.cs
+++ Content.Server/GameTicking/GameTicker.Spawning.cs
@@ -112,6 +112,9 @@
         {
             var character = GetPlayerProfile(player);

+            var jobBans = _roleBanManager.GetJobBans(player.UserId);
+            if (jobBans == null || (jobId != null && jobBans.Contains(jobId)))
+                return;
             SpawnPlayer(player, character, station, jobId, lateJoin);
             UpdateJobsAvailable();
         }


Remove unused field.

Remove unused field.

--- Source/HelixToolkit.SharpDX.Shared/Utilities/Octrees/StaticOctrees/StaticOctree.cs
+++ Source/HelixToolkit.SharpDX.Shared/Utilities/Octrees/StaticOctrees/StaticOctree.cs
@@ -9,6 +9,7 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;

 #if NETFX_CORE
 namespace HelixToolkit.UWP
@@ -20,16 +21,15 @@
     public abstract class StaticOctree<T> : IOctreeBasic where T : struct
     {
         public const int OctantSize = 8;
-
+        [StructLayout(LayoutKind.Sequential)]
         protected struct Octant
-        {
+        {
             public BoundingBox Bound { private set; get; }
+            private int c0, c1, c2, c3, c4, c5, c6, c7;
             public int Parent { private set; get; }
-            public int Index { private set; get; }
-            private int c0, c1, c2, c3, c4, c5, c6, c7;
+            public int Index { private set; get; }
             public int Start { set; get; }
             public int End { set; get; }
-            public bool IsValid { set; get; }
             public bool IsBuilt { set; get; }
             public byte ActiveNode { private set; get; }
             public bool HasChildren { get { return ActiveNode != 0; } }
@@ -42,7 +42,6 @@
                 Index = index;
                 Bound = bound;
                 Start = End = 0;
-                IsValid = true;
                 ActiveNode = 0;
                 IsBuilt = false;
                 c0 = c1 = c2 = c3 = c4 = c5 = c6 = c7 = -1;
@@ -54,7 +53,6 @@
                 Index = index;
                 Bound = new BoundingBox();
                 Start = End = 0;
-                IsValid = true;
                 ActiveNode = 0;
                 IsBuilt = false;
                 c0 = c1 = c2 = c3 = c4 = c5 = c6 = c7 = -1;
@@ -123,6 +121,7 @@
                 octant.End = length;
                 array[0] = octant;
                 ++Count;
+                //var size = System.Runtime.InteropServices.Marshal.SizeOf(octant);
             }
             /// <summary>
             /// Adds the specified parent index.
@@ -164,8 +163,6 @@
                     array = newArray;
                 }
             }
-
-            private Octant InvalidOctant = new Octant() { IsValid = false };

             [MethodImpl(MethodImplOptions.AggressiveInlining)]
             public ref Octant Get(int i)
@@ -521,7 +518,7 @@
                         if (Parameter.RecordHitPathBoundingBoxes && nodeHit)
                         {
                             var n = octant;
-                            while (n.IsValid)
+                            while (true)
                             {
                                 hitPathBoundingBoxes.Add(n.Bound);
                                 if (n.Parent >= 0)


clear

clear

--- Demos/CSharpGL.Demos/00GLCanvas/Form00GLCanvas.cs
+++ Demos/CSharpGL.Demos/00GLCanvas/Form00GLCanvas.cs
@@ -31,8 +31,8 @@
             var builder = new StringBuilder();
             int[] maxTextureSize = new int[1];
             OpenGL.GetInteger(GetTarget.MaxTextureSize, maxTextureSize);
+            this.content.Add(string.Format("FPS: {0}", this.glCanvas1.FPS));
             this.content.Add(string.Format("Max Texture Width: {0}", maxTextureSize[0]));
-            this.content.Add(string.Format("FPS: {0}", this.glCanvas1.FPS));
         }

         void glCanvas1_MouseMove(object sender, MouseEventArgs e)