Decrease notification font size

Decrease notification font size

--- osu.Game/Overlays/Notifications/SimpleNotification.cs
+++ osu.Game/Overlays/Notifications/SimpleNotification.cs
@@ -59,7 +59,7 @@
                 }
             });

-            Content.Add(textDrawable = new OsuTextFlowContainer(t => t.TextSize = 16)
+            Content.Add(textDrawable = new OsuTextFlowContainer(t => t.TextSize = 14)
             {
                 Colour = OsuColour.Gray(128),
                 AutoSizeAxes = Axes.Y,


Proper IDisposable implementation for RegistryRedirector

--- Code/Foundation/Windows/Registry/RegistryRedirector.cs
+++ Code/Foundation/Windows/Registry/RegistryRedirector.cs
@@ -38,6 +38,7 @@
         public void Dispose()
         {
             Dispose(true);
+            GC.SuppressFinalize(this);
         }

         /// <summary>


fix empty (non null) strings on transients

--- Core/NakedObjects.Core/spec/OneToOneAssociationSpec.cs
+++ Core/NakedObjects.Core/spec/OneToOneAssociationSpec.cs
@@ -162,7 +162,7 @@

         private INakedObjectAdapter GetAssociation(INakedObjectAdapter fromObjectAdapter) {
             object obj = GetFacet<IPropertyAccessorFacet>().GetProperty(fromObjectAdapter);
-            if (obj == null) {
+            if (obj == null || (obj is string && string.IsNullOrEmpty(obj as string))) {
                 return null;
             }
             var spec = (IObjectSpec) MetamodelManager.GetSpecification(obj.GetType());


FIx for MemberExpression.EmitPropertyAccess.

Fixed incorrect else clause as pointed by siteatis

--- Core/System/Linq/Expressions/MemberExpression.net30.cs
+++ Core/System/Linq/Expressions/MemberExpression.net30.cs
@@ -62,10 +62,7 @@
             {
                 emitContext.EmitLoadSubject(_expression);
             }
-            else
-            {
-                emitContext.EmitCall(getter);
-            }
+            emitContext.EmitCall(getter);
         }
     }
 }


Fixed a conflict

Fixed a conflict

--- CoursesAPI.Services/Services/CoursesServiceProvider.cs
+++ CoursesAPI.Services/Services/CoursesServiceProvider.cs
@@ -236,6 +236,9 @@

 		#region project and grading methods

+        /// <summary>
+        /// TODO
+        /// </summary>
         public void AddProjectToCourse(int id, AddProjectViewModel model)
         {
             var course = _courseInstances.All().SingleOrDefault(c => c.ID == id);
@@ -268,6 +271,9 @@
             _uow.Save();
         }

+        /// <summary>
+        /// TODO
+        /// </summary>
         public void MakeProjectGroup(AddProjectGroupViewModel model)
         {
             if(model == null)
@@ -294,6 +300,7 @@
             _projectGroups.Add(group);
             _uow.Save();
         }
+

 		public void MakeFinalGradeComp(int courseInstanceId, AddFinalGradeCompositionViewModel model)
 		{
@@ -340,6 +347,9 @@
 			_uow.Save();
 		}

+        /// <summary>
+        /// TODO
+        /// </summary>
 		public void AddGrade(int courseInstanceID, int projectID, AddGradeViewModel viewModel)
 		{
 			if(viewModel == null){
@@ -411,11 +421,18 @@
 			}
 		}

+        /// <summary>
+        /// TODO
+        /// </summary>
 		public List<Project> GetProjectsForCourse(int id)
         {
             return _projects.All().ToList();
         }

+        /// <summary>
+        /// Get student grade in project and return his grade, position based on all students grades
+        /// and how many students have been graded
+        /// </summary>
         public GradeDTO GetProjectGrade(int courseInstanceId, int projectId, String ssn)
         {
 			//See if the courseInstance exists
@@ -466,7 +483,10 @@
 				return returnValue;
 			}
         }
-
+
+        /// <summary>
+        /// TODO
+        /// </summary>
 		private FinalGradeDTO GetFinalGrade(int courseInstanceID, String personSSN)
 		{
 			if(personSSN == null){
@@ -572,6 +592,9 @@
 			return returnValue;
 		}

+        /// <summary>
+        /// TODO
+        /// </summary>
 		public FinalGradeDTO GetFinalGradeForOneStudent(int courseInstanceID, String personSSN)
 		{
 			List<FinalGradeDTO> allFinalGrades = GetAllFinalGrades(courseInstanceID);
@@ -580,6 +603,9 @@
 			return allFinalGrades.SingleOrDefault(f => f.PersonSSN == personSSN);
 		}

+        /// <summary>
+        /// TODO
+        /// </summary>
 		public List<FinalGradeDTO> GetAllFinalGrades(int courseInstanceId)
 		{
 			//See if the courseInstance exists
@@ -636,6 +662,9 @@
 			return finalGrades;
 		}

+        /// <summary>
+        /// Get all students grades in projectID and return as List<PersonsGrade>
+        /// </summary>
         // TODO: just a simple return with all grades without any other info
         public List<PersonsGrade> GetAllGrades(int projectId)
         {


修改 T的类型

修改 T的类型

--- ToolGood.ReadyGo3/SqlHelper.object.cs
+++ ToolGood.ReadyGo3/SqlHelper.object.cs
@@ -18,36 +18,36 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public T Single<T>(object condition)
-        {
-            return Single<T>(ConditionObjectToWhere(condition));
+        public T1 Single<T1>(object condition) where T1 : class
+        {
+            return Single<T1>(ConditionObjectToWhere(condition));
         }
         /// <summary>
         /// 根据条件查询唯一项
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public T SingleOrDefault<T>(object condition)
-        {
-            return SingleOrDefault<T>(ConditionObjectToWhere(condition));
+        public T1 SingleOrDefault<T1>(object condition) where T1 : class
+        {
+            return SingleOrDefault<T1>(ConditionObjectToWhere(condition));
         }
         /// <summary>
         /// 根据条件查询第一个
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public T First<T>(object condition)
-        {
-            return First<T>(ConditionObjectToWhere(condition));
+        public T1 First<T1>(object condition) where T1 : class
+        {
+            return First<T1>(ConditionObjectToWhere(condition));
         }
         /// <summary>
         /// 根据条件查询第一个
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public T FirstOrDefault<T>(object condition)
-        {
-            return FirstOrDefault<T>(ConditionObjectToWhere(condition));
+        public T1 FirstOrDefault<T1>(object condition) where T1 : class
+        {
+            return FirstOrDefault<T1>(ConditionObjectToWhere(condition));
         }

@@ -58,39 +58,94 @@
         /// <param name="offset"></param>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public List<T1> Select<T1>(int limit, int offset, object condition)
+        public List<T1> Select<T1>(int limit, int offset, object condition) where T1 : class
         {
             if (null == condition || condition.GetType() == typeof(string)) {
                 return Select<T1>(limit, offset, (string)condition);
             }
             return Select<T1>(limit, offset, ConditionObjectToWhere(condition));
         }
-        /// <summary>
-        /// 根据条件查询
-        /// </summary>
-        /// <param name="limit"></param>
-        /// <param name="condition"></param>
-        /// <returns></returns>
-        public List<T1> Select<T1>(int limit, object condition)
+
+        /// <summary>
+        /// 根据条件查询
+        /// </summary>
+        /// <param name="limit"></param>
+        /// <param name="condition"></param>
+        /// <returns></returns>
+        public List<T1> Select<T1>(int limit, object condition) where T1 : class
         {
             if (null == condition || condition.GetType() == typeof(string)) {
                 return Select<T1>(limit, (string)condition);
             }
             return Select<T1>(limit, ConditionObjectToWhere(condition));
         }
+
         /// <summary>
         /// 根据条件查询
         /// </summary>
         /// <typeparam name="T1"></typeparam>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public List<T1> Select<T1>(object condition)
+        public List<T1> Select<T1>(object condition) where T1 : class
         {
             if (null == condition || condition.GetType() == typeof(string)) {
                 return Select<T1>((string)condition);
             }
             return Select<T1>(ConditionObjectToWhere(condition));
         }
+
+        /// <summary>
+        /// 根据条件查询
+        /// </summary>
+        /// <param name="limit"></param>
+        /// <param name="offset"></param>
+        /// <param name="condition"></param>
+        /// <param name="orderField"></param>
+        /// <param name="ascOrDesc"></param>
+        /// <returns></returns>
+        public List<T1> SelectWithOrderBy<T1>(int limit, int offset, object condition, string orderField = null, string ascOrDesc = "ASC")
+             where T1 : class
+        {
+            if (string.IsNullOrWhiteSpace(orderField)) {
+                return Select<T1>(limit, offset, ConditionObjectToWhere(condition));
+            }
+            return Select<T1>(limit, offset, ConditionObjectToWhere(condition) + " ORDER BY " + orderField + " " + ascOrDesc);
+        }
+
+        /// <summary>
+        /// 根据条件查询
+        /// </summary>
+        /// <param name="limit"></param>
+        /// <param name="condition"></param>
+        /// <param name="orderField"></param>
+        /// <param name="ascOrDesc"></param>
+        /// <returns></returns>
+        public List<T1> SelectWithOrderBy<T1>(int limit, object condition, string orderField = null, string ascOrDesc = "ASC")
+             where T1 : class
+        {
+            if (string.IsNullOrWhiteSpace(orderField)) {
+                return Select<T1>(limit, ConditionObjectToWhere(condition));
+            }
+            return Select<T1>(limit, ConditionObjectToWhere(condition) + " ORDER BY " + orderField + " " + ascOrDesc);
+        }
+
+        /// <summary>
+        /// 根据条件查询
+        /// </summary>
+        /// <typeparam name="T1"></typeparam>
+        /// <param name="condition"></param>
+        /// <param name="orderField"></param>
+        /// <param name="ascOrDesc"></param>
+        /// <returns></returns>
+        public List<T1> SelectWithOrderBy<T1>(object condition, string orderField = null, string ascOrDesc = "ASC")
+             where T1 : class
+        {
+            if (string.IsNullOrWhiteSpace(orderField)) {
+                return Select<T1>(ConditionObjectToWhere(condition));
+            }
+            return Select<T1>(ConditionObjectToWhere(condition) + " ORDER BY " + orderField + " " + ascOrDesc);
+        }
+
         /// <summary>
         /// 根据条件查询页
         /// </summary>
@@ -98,13 +153,32 @@
         /// <param name="itemsPerPage"></param>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Page<T> Page<T>(int page, int itemsPerPage, object condition)
+        public Page<T1> Page<T1>(int page, int itemsPerPage, object condition)
+            where T1 : class
         {
             if (null == condition || typeof(string) == condition.GetType()) {
-                return Page<T>(page, itemsPerPage, (string)condition, new object[0]);
-            }
-            return Page<T>(page, itemsPerPage, ConditionObjectToWhere(condition));
-        }
+                return Page<T1>(page, itemsPerPage, (string)condition, new object[0]);
+            }
+            return Page<T1>(page, itemsPerPage, ConditionObjectToWhere(condition));
+        }
+
+        /// <summary>
+        /// 根据条件查询页
+        /// </summary>
+        /// <param name="page"></param>
+        /// <param name="itemsPerPage"></param>
+        /// <param name="condition"></param>
+        /// <param name="orderField"></param>
+        /// <param name="ascOrDesc"></param>
+        /// <returns></returns>
+        public Page<T1> PageWithOrderBy<T1>(int page, int itemsPerPage, object condition, string orderField = null, string ascOrDesc = "ASC")
+            where T1 : class
+        {
+            return this.Where<T1>().Where(ConditionObjectToWhere(condition))
+                   .IfSet(orderField).OrderBy(orderField, ascOrDesc)
+                   .Page(page, itemsPerPage);
+        }
+

         /// <summary>
         /// 根据条件更新对象
@@ -113,7 +187,7 @@
         /// <param name="condition"></param>
         /// <param name="ignoreFields"></param>
         /// <returns></returns>
-        public int Update<T1>(object set, object condition, params string[] ignoreFields)
+        public int Update<T1>(object set, object condition, params string[] ignoreFields) where T1 : class
         {
             return Update<T1>(ConditionObjectToUpdateSetWhere(set, condition, ignoreFields));
         }
@@ -123,9 +197,9 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public int Delete<T>(object condition)
-        {
-            return Delete<T>(ConditionObjectToWhere(condition));
+        public int Delete<T1>(object condition) where T1 : class
+        {
+            return Delete<T1>(ConditionObjectToWhere(condition));
         }

         /// <summary>
@@ -133,9 +207,9 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public int Count<T>(object condition)
-        {
-            return Count<T>(ConditionObjectToWhere(condition));
+        public int Count<T1>(object condition) where T1 : class
+        {
+            return Count<T1>(ConditionObjectToWhere(condition));
         }

         /// <summary>
@@ -143,12 +217,12 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public bool Exists<T>(object condition)
+        public bool Exists<T1>(object condition) where T1 : class
         {
             if (condition.GetType().IsClass) {
-                return Exists<T>(ConditionObjectToWhere(condition));
+                return Exists<T1>(ConditionObjectToWhere(condition));
             } else {
-                var pd = PocoData.ForType(typeof(T));
+                var pd = PocoData.ForType(typeof(T1));
                 var table = _provider.GetTableName(pd);
                 var pk = _provider.EscapeSqlIdentifier(pd.TableInfo.PrimaryKey);
                 var sql = $"SELECT COUNT(*) FROM {table} WHERE {pk}=@0";
@@ -167,9 +241,9 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Task<T> FirstAsync<T>(object condition)
-        {
-            return FirstAsync<T>(ConditionObjectToWhere(condition));
+        public Task<T1> FirstAsync<T1>(object condition) where T1 : class
+        {
+            return FirstAsync<T1>(ConditionObjectToWhere(condition));
         }

         /// <summary>
@@ -177,9 +251,9 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Task<T> FirstOrDefaultAsync<T>(object condition)
-        {
-            return FirstOrDefaultAsync<T>(ConditionObjectToWhere(condition));
+        public Task<T1> FirstOrDefaultAsync<T1>(object condition) where T1 : class
+        {
+            return FirstOrDefaultAsync<T1>(ConditionObjectToWhere(condition));
         }

         /// <summary>
@@ -187,9 +261,9 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Task<T> SingleAsync<T>(object condition)
-        {
-            return SingleAsync<T>(ConditionObjectToWhere(condition));
+        public Task<T1> SingleAsync<T1>(object condition) where T1 : class
+        {
+            return SingleAsync<T1>(ConditionObjectToWhere(condition));
         }

         /// <summary>
@@ -197,9 +271,9 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Task<T> SingleOrDefaultAsync<T>(object condition)
-        {
-            return SingleOrDefaultAsync<T>(ConditionObjectToWhere(condition));
+        public Task<T1> SingleOrDefaultAsync<T1>(object condition) where T1 : class
+        {
+            return SingleOrDefaultAsync<T1>(ConditionObjectToWhere(condition));
         }

         /// <summary>
@@ -209,29 +283,85 @@
         /// <param name="offset"></param>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Task<List<T>> SelectAsync<T>(int limit, int offset, object condition)
-        {
-            return SelectAsync<T>(limit, offset, ConditionObjectToWhere(condition));
-        }
-        /// <summary>
-        /// 根据条件查询
-        /// </summary>
-        /// <param name="limit"></param>
-        /// <param name="condition"></param>
-        /// <returns></returns>
-        public Task<List<T>> SelectAsync<T>(int limit, object condition)
-        {
-            return SelectAsync<T>(limit, ConditionObjectToWhere(condition));
+        public Task<List<T1>> SelectAsync<T1>(int limit, int offset, object condition) where T1 : class
+        {
+            if (null == condition || condition.GetType() == typeof(string)) {
+                return SelectAsync<T1>(limit, offset, (string)condition);
+            }
+            return SelectAsync<T1>(limit, offset, ConditionObjectToWhere(condition));
+        }
+        /// <summary>
+        /// 根据条件查询
+        /// </summary>
+        /// <param name="limit"></param>
+        /// <param name="condition"></param>
+        /// <returns></returns>
+        public Task<List<T1>> SelectAsync<T1>(int limit, object condition) where T1 : class
+        {
+            if (null == condition || condition.GetType() == typeof(string)) {
+                return SelectAsync<T1>(limit, (string)condition);
+            }
+            return SelectAsync<T1>(limit, ConditionObjectToWhere(condition));
         }
         /// <summary>
         /// 根据条件查询，异步操作
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Task<List<T>> SelectAsync<T>(object condition)
-        {
-            return SelectAsync<T>(ConditionObjectToWhere(condition));
-        }
+        public Task<List<T1>> SelectAsync<T1>(object condition) where T1 : class
+        {
+            if (null == condition || condition.GetType() == typeof(string)) {
+                return SelectAsync<T1>((string)condition);
+            }
+            return SelectAsync<T1>(ConditionObjectToWhere(condition));
+        }
+
+        /// <summary>
+        /// 根据条件查询，异步操作
+        /// </summary>
+        /// <param name="limit"></param>
+        /// <param name="offset"></param>
+        /// <param name="condition"></param>
+        /// <param name="orderField"></param>
+        /// <param name="ascOrDesc"></param>
+        /// <returns></returns>
+        public Task<List<T1>> SelectWithOrderByAsync<T1>(int limit, int offset, object condition, string orderField = null, string ascOrDesc = "ASC") where T1 : class
+        {
+            if (string.IsNullOrWhiteSpace(orderField)) {
+                return SelectAsync<T1>(limit, offset, ConditionObjectToWhere(condition));
+            }
+            return SelectAsync<T1>(limit, offset, ConditionObjectToWhere(condition) + " ORDER BY " + orderField + " " + ascOrDesc);
+        }
+        /// <summary>
+        /// 根据条件查询
+        /// </summary>
+        /// <param name="limit"></param>
+        /// <param name="condition"></param>
+        /// <param name="orderField"></param>
+        /// <param name="ascOrDesc"></param>
+        /// <returns></returns>
+        public Task<List<T1>> SelectWithOrderByAsync<T1>(int limit, object condition, string orderField = null, string ascOrDesc = "ASC") where T1 : class
+        {
+            if (string.IsNullOrWhiteSpace(orderField)) {
+                return SelectAsync<T1>(limit, ConditionObjectToWhere(condition));
+            }
+            return SelectAsync<T1>(limit, ConditionObjectToWhere(condition) + " ORDER BY " + orderField + " " + ascOrDesc);
+        }
+        /// <summary>
+        /// 根据条件查询，异步操作
+        /// </summary>
+        /// <param name="condition"></param>
+        /// <param name="orderField"></param>
+        /// <param name="ascOrDesc"></param>
+        /// <returns></returns>
+        public Task<List<T1>> SelectWithOrderByAsync<T1>(object condition, string orderField = null, string ascOrDesc = "ASC") where T1 : class
+        {
+            if (string.IsNullOrWhiteSpace(orderField)) {
+                return SelectAsync<T1>(ConditionObjectToWhere(condition));
+            }
+            return SelectAsync<T1>(ConditionObjectToWhere(condition) + " ORDER BY " + orderField + " " + ascOrDesc);
+        }
+
         /// <summary>
         ///  根据条件查询页，异步操作
         /// </summary>
@@ -239,13 +369,30 @@
         /// <param name="itemsPerPage"></param>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Task<Page<T>> PageAsync<T>(int page, int itemsPerPage, object condition)
+        public Task<Page<T1>> PageAsync<T1>(int page, int itemsPerPage, object condition)
+            where T1 : class
         {
             if (null == condition || typeof(string) == condition.GetType()) {
-                return PageAsync<T>(page, itemsPerPage, (string)condition, new object[0]);
-            }
-            return PageAsync<T>(page, itemsPerPage, ConditionObjectToWhere(condition));
-        }
+                return PageAsync<T1>(page, itemsPerPage, (string)condition, new object[0]);
+            }
+            return PageAsync<T1>(page, itemsPerPage, ConditionObjectToWhere(condition));
+        }
+
+        /// <summary>
+        ///  根据条件查询页，异步操作
+        /// </summary>
+        /// <param name="page"></param>
+        /// <param name="itemsPerPage"></param>
+        /// <param name="condition"></param>
+        /// <returns></returns>
+        public Task<Page<T1>> PageWithOrderByAsync<T1>(int page, int itemsPerPage, object condition, string orderField = null, string ascOrDesc = "ASC")
+             where T1 : class
+        {
+            return this.Where<T1>().Where(ConditionObjectToWhere(condition))
+                       .IfSet(orderField).OrderBy(orderField, ascOrDesc)
+                       .PageAsync(page, itemsPerPage);
+        }
+

         /// <summary>
         /// 根据条件更新对象
@@ -254,7 +401,7 @@
         /// <param name="condition"></param>
         /// <param name="ignoreFields"></param>
         /// <returns></returns>
-        public Task<int> UpdateAsync<T1>(object set, object condition, params string[] ignoreFields)
+        public Task<int> UpdateAsync<T1>(object set, object condition, params string[] ignoreFields) where T1 : class
         {
             return UpdateAsync<T1>(ConditionObjectToUpdateSetWhere(set, condition, ignoreFields));
         }
@@ -264,9 +411,9 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Task<int> DeleteAsync<T>(object condition)
-        {
-            return DeleteAsync<T>(ConditionObjectToWhere(condition));
+        public Task<int> DeleteAsync<T1>(object condition) where T1 : class
+        {
+            return DeleteAsync<T1>(ConditionObjectToWhere(condition));
         }

         /// <summary>
@@ -274,21 +421,21 @@
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public Task<int> CountAsync<T>(object condition)
-        {
-            return CountAsync<T>(ConditionObjectToWhere(condition));
+        public Task<int> CountAsync<T1>(object condition) where T1 : class
+        {
+            return CountAsync<T1>(ConditionObjectToWhere(condition));
         }
         /// <summary>
         /// 根据条件是判断否存在，异步操作
         /// </summary>
         /// <param name="condition"></param>
         /// <returns></returns>
-        public async Task<bool> ExistsAsync<T>(object condition)
+        public async Task<bool> ExistsAsync<T1>(object condition) where T1 : class
         {
             if (condition.GetType().IsClass) {
-                return await ExistsAsync<T>(ConditionObjectToWhere(condition));
+                return await ExistsAsync<T1>(ConditionObjectToWhere(condition));
             } else {
-                var pd = PocoData.ForType(typeof(T));
+                var pd = PocoData.ForType(typeof(T1));
                 var table = _provider.GetTableName(pd);
                 var pk = _provider.EscapeSqlIdentifier(pd.TableInfo.PrimaryKey);
                 var sql = $"SELECT COUNT(*) FROM {table} WHERE {pk}=@0";
@@ -331,7 +478,7 @@
         {
             if (condition is IEnumerable) { throw new ArgumentException("condition is IEnumerable object!"); }
             bool hasColumn = false;
-
+
             var type = condition.GetType();
             var pis = type.GetProperties();
             for (int i = 0; i < pis.Length; i++) {


Replace CollectionBase with List<>

Replace CollectionBase with List<>

CollectionBase is not available in .NET Standard, but its use here can be replaced with List<>

--- DocumentFormat.OpenXml/src/Framework/OpenXmlPackage.cs
+++ DocumentFormat.OpenXml/src/Framework/OpenXmlPackage.cs
@@ -29,77 +29,11 @@
     /// <summary>
     /// Defines the base class for PackageRelationshipPropertyCollection and PackagePartRelationshipPropertyCollection objects.
     /// </summary>
-    abstract internal class RelationshipCollection : CollectionBase
+    abstract internal class RelationshipCollection : List<RelationshipProperty>
     {
         protected PackageRelationshipCollection BasePackageRelationshipCollection { get; set; }

-        private bool _strictTranslation = false;
-        internal bool StrictTranslation
-        {
-            get
-            {
-               return this._strictTranslation;
-            }
-            set
-            {
-               this._strictTranslation = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the relationship properties of the element at the specified index in the collection.
-        /// </summary>
-        public RelationshipProperty this[int index]
-        {
-            get
-            {
-                return (RelationshipProperty)this.List[index];
-            }
-            set
-            {
-                this.List[index] = value;
-            }
-        }
-
-        /// <summary>
-        /// Adds the specified relationship properties to the collection.
-        /// </summary>
-        public int Add(RelationshipProperty value)
-        {
-            return this.List.Add(value);
-        }
-
-        /// <summary>
-        /// Gets the index of the specified relationship properties in the collection.
-        /// </summary>
-        public int IndexOf(RelationshipProperty value)
-        {
-            return this.List.IndexOf(value);
-        }
-
-        /// <summary>
-        /// Inserts the specified relationship properties at the specified index in the collection.
-        /// </summary>
-        public void Insert(int index, RelationshipProperty value)
-        {
-            this.List.Insert(index, value);
-        }
-
-        /// <summary>
-        /// Removes the specified relationship properties from the collection.
-        /// </summary>
-        public void Remove(RelationshipProperty value)
-        {
-            this.List.Remove(value);
-        }
-
-        /// <summary>
-        /// Gets a value that indicates whether the collection contains the specified relationship properties.
-        /// </summary>
-        public bool Contains(RelationshipProperty value)
-        {
-            return this.List.Contains(value);
-        }
+        internal bool StrictTranslation { get; set; }

         /// <summary>
         /// This method fills the collection with PackageRels from the PackageRelationshipCollection that is given in the sub class.


Rewrote a query to use cartesian product instead of inner join

--- Duplicati/Library/Main/Database/LocalBackupDatabase.cs
+++ Duplicati/Library/Main/Database/LocalBackupDatabase.cs
@@ -133,7 +133,7 @@
             m_selectfileSimpleCommand.CommandText = string.Format(@"SELECT ""FileID"", ""Scantime"" FROM ""{0}"" WHERE ""Path"" = ?", m_scantimelookupTablename);
             m_selectfileSimpleCommand.AddParameters(1);

-            m_selectfileHashCommand.CommandText = @"SELECT ""Blockset"".""Fullhash"" FROM ""Blockset"" INNER JOIN ""File"" ON ""Blockset"".""ID"" = ""File"".""BlocksetID"" WHERE ""File"".""ID"" = ?  ";
+            m_selectfileHashCommand.CommandText = @"SELECT ""Blockset"".""Fullhash"" FROM ""Blockset"", ""File"" WHERE ""Blockset"".""ID"" = ""File"".""BlocksetID"" AND ""File"".""ID"" = ?  ";
             m_selectfileHashCommand.AddParameters(1);

             m_selectblocklistHashesCommand.CommandText = @"SELECT ""Hash"" FROM ""BlocklistHash"" WHERE ""BlocksetID"" = ? ORDER BY ""Index"" ASC ";


(OGG): another tag for ogg streams embedded into WAV files.

--- ArcFormats/AudioOGG.cs
+++ ArcFormats/AudioOGG.cs
@@ -147,7 +147,7 @@
                 uint fmt_size = header.ToUInt32 (0x10);
                 long fmt_pos = file.Position;
                 ushort format = file.ReadUInt16();
-                if (format != 0x6770 && format != 0x6771)
+                if (format != 0x676F && format != 0x6770 && format != 0x6771)
                     return null;
                 // interpret WAVE 'data' section as Ogg stream
                 file.Position = fmt_pos + ((fmt_size + 1) & ~1);


force commit for merge vanlek source

force commit for merge vanlek source

--- ECheckerSource/ApiApp/Controllers/CheckedController.cs
+++ ECheckerSource/ApiApp/Controllers/CheckedController.cs
@@ -50,24 +50,39 @@
         // GET /checked/{vehicle-id}/readystatus
         public string ReadyStatus(string vehicleid)
         {
+            throw new NotImplementedException();
+        }
+
+        [Route("{vehicleid}/done")]
+        /// <summary>
+        /// Update the modified value.
+        /// </summary>
+        /// <param name="id">The ref id.</param>
+        /// <param name="value">The new value to be updated.</param>
+        // PUT /checked/{vehicle-id}/done
+        public void Put(Checked currentChecked)
+        {
+            //TODO: compute status
             //check critical first!!
-            var amissedList = this._CheckingRepo.GetAmissedByVehicleId(vehicleid);
-            if (amissedList.Any(x => x.IsCritical == true))
-            {
-                return "ไม่พร้อมใช้งาน";
-            }
-            //sum calculate damage
-            else
-            {
-                if (amissedList.Sum(x => x.DamagePercent) > 60)
-                {
-                    return "พร้อมใช้งาน";
-                }
-                else
-                {
-                    return "ไม่พร้อมใช้งาน";
-                }
-            }
+            //var amissedList = this._CheckingRepo.GetAmissedByVehicleId(vehicleid);
+            //if (amissedList.Any(x => x.IsCritical == true))
+            //{
+            //    return "ไม่พร้อมใช้งาน";
+            //}
+            ////sum calculate damage
+            //else
+            //{
+            //    if (amissedList.Sum(x => x.DamagePercent) > 60)
+            //    {
+            //        return "พร้อมใช้งาน";
+            //    }
+            //    else
+            //    {
+            //        return "ไม่พร้อมใช้งาน";
+            //    }
+            //}
+
+            //TODO: update checked[] to done
         }
     }
 }


mark various FileBuffer members protected/virtual

--- Archives/FileBuffer.cs
+++ Archives/FileBuffer.cs
@@ -37,14 +37,14 @@
         private Stream _file;
         // Used to lock when writing to/reading from the
         // filestream.
-        private object _lockbox;
+        protected object _lockbox;
         // ICollection requires IsReadOnly to be implemented, so we
         // might as well add functionality for making it read-only.
         private bool _readonly,
             // Whether the file buffer has been disposed.
             _disposed;

-        private void _checkReadOnly()
+        protected void _checkReadOnly()
         {
             if (_readonly)
             {
@@ -53,7 +53,7 @@
                     );
             }
         }
-        private void _checkDisposed()
+        protected void _checkDisposed()
         {
             if (_disposed)
             {
@@ -62,7 +62,7 @@
                     );
             }
         }
-        private void _checkCanModify()
+        protected void _checkCanModify()
         {
             _checkDisposed();
             _checkReadOnly();
@@ -192,7 +192,7 @@
         /// <exception cref="System.ObjectDisposedException">
         ///     Thrown when the buffer has been disposed.
         /// </exception>
-        public void Add(IEnumerable<byte> bytes)
+        public virtual void Add(IEnumerable<byte> bytes)
         {
             _checkCanModify();

@@ -312,7 +312,7 @@
         /// <exception cref="System.ObjectDisposedException">
         ///     Thrown when the buffer has been disposed.
         /// </exception>
-        public void Clear()
+        public virtual void Clear()
         {
             _checkCanModify();

@@ -341,7 +341,7 @@
         /// <summary>
         /// Releases the resources used by the buffer.
         /// </summary>
-        public void Dispose()
+        public virtual void Dispose()
         {
             if (!_disposed)
             {
@@ -372,7 +372,7 @@
         /// <summary>
         /// Whether the file buffer has been disposed.
         /// </summary>
-        public bool Disposed
+        public virtual bool Disposed
         {
             get { return _disposed; }
         }


Don't pass a null system to BuildSystemInfo

--- EDDiscovery/UserControls/ScansStars/UserControlScan.cs
+++ EDDiscovery/UserControls/ScansStars/UserControlScan.cs
@@ -178,7 +178,8 @@
             else
             {
                 SetControlText(data == null ? "No Scan".Tx() : data.system.Name);
-                BuildSystemInfo(data);
+                if (data != null)
+                    BuildSystemInfo(data);
             }

         }


Better error message after time out. Fixes #182

--- AtlasSSH/SSHConnection.cs
+++ AtlasSSH/SSHConnection.cs
@@ -261,11 +261,17 @@
             Trace.WriteLine("ExecuteCommand: " + command, "SSHConnection");
             if (!dumpOnly)
             {
-                _shell.Value.WriteLine(command);
-                DumpTillFind(_shell.Value, command.Substring(0, Math.Min(TerminalWidth - 30, command.Length)), crlfExpectedAtEnd: true, secondsTimeout: 10, failNow: failNow); // The command is (normally) repeated back to us...
-                if (WaitForCommandResult)
-                {
-                    DumpTillFind(_shell.Value, _prompt, output, secondsTimeout: secondsTimeout, refreshTimeout: refreshTimeout, failNow: failNow, seeAndRespond: seeAndRespond);
+                try
+                {
+                    _shell.Value.WriteLine(command);
+                    DumpTillFind(_shell.Value, command.Substring(0, Math.Min(TerminalWidth - 30, command.Length)), crlfExpectedAtEnd: true, secondsTimeout: 10, failNow: failNow); // The command is (normally) repeated back to us...
+                    if (WaitForCommandResult)
+                    {
+                        DumpTillFind(_shell.Value, _prompt, output, secondsTimeout: secondsTimeout, refreshTimeout: refreshTimeout, failNow: failNow, seeAndRespond: seeAndRespond);
+                    }
+                } catch (TimeoutException e)
+                {
+                    throw new TimeoutException($"{e.Message} - occured while executing command {command}.", e);
                 }
             }
             return this;


tweaks

tweaks

--- MediaQuery.cs
+++ MediaQuery.cs
@@ -72,7 +72,7 @@
           media="(windows)"
               // applies to only systems that identify themselves as 'Windows'

-          media="(windows) not (windows.architecture:x64)"
+          media="(windows) not (architecture:x64)"
               // applies to only systems that identify
               // themselves as windows and are not for an x64 cpu


refactor

refactor

--- Assets/ImportScript.cs
+++ Assets/ImportScript.cs
@@ -8,26 +8,18 @@
 using System.Net.Sockets;
 using System.Threading;

+/*
+ * v0.1 2015/09/13
+ *  - checked with udpTimeGraph import
+ */
+
 public class ImportScript : MonoBehaviour {

 	public InputField IFipadr;
 	public InputField IFport;
 	public Text rcvText; // recieved text
 	public string sendCommand;
-
-	UdpClient client;
-	int port;
-	string lastRcvd;
-
-	void Start() {
-	}
-
-	void Update() {
-	}
-
-	string getIpadr() {
-		return IFipadr.text;
-	}
+
 	int getPort() {
 		int res = Convert.ToInt16 (IFport.text);
 		if (res < 0) {
@@ -37,10 +29,10 @@
 	}

 	void procComm() {
-		port = getPort();
-		string ipadr = getIpadr ();
-
-		client = new UdpClient ();
+		int port = getPort();
+		string ipadr = IFipadr.text;
+
+		UdpClient client = new UdpClient ();

 		// send
 		string sendstr = sendCommand + System.Environment.NewLine;
@@ -58,7 +50,7 @@
 		// receive
 		client.Client.ReceiveTimeout = 2000; // msec
 		IPEndPoint remoteIP = new IPEndPoint(IPAddress.Any, 0);
-		lastRcvd = "";
+		string rcvdstr = "";

 		while (true) {
 			try {
@@ -68,7 +60,7 @@
 					return;
 				}
 				string text = Encoding.ASCII.GetString (data);
-				lastRcvd += text;
+				rcvdstr += text;

 				if (text.Contains("EOT")) {
 					break;
@@ -82,8 +74,8 @@

 		client.Close ();

-		if (lastRcvd.Length > 0) {
-			System.IO.File.WriteAllText("import.csv", lastRcvd);
+		if (rcvdstr.Length > 0) {
+			System.IO.File.WriteAllText("import.csv", rcvdstr);
 			rcvText.text = "recvd to csv";
 		}
 	}


Forgot to add [TypeDecoderMethod] to inverse color typedecoder.

--- Uiml/Rendering/SWF/SWFTypeDecoders.cs
+++ Uiml/Rendering/SWF/SWFTypeDecoders.cs
@@ -432,6 +432,7 @@
 			return System.Drawing.Color.FromArgb(Int32.Parse(coords[0]), Int32.Parse(coords[1]), Int32.Parse(coords[2]));
 		}

+        [TypeDecoderMethod]
         public static string DecodeColorInverse(Color col)
         {
             if (col.IsKnownColor)


Fix UnicodeCharInfo for non assigned characters.

--- UnicodeInformation/UnicodeCharInfo.cs
+++ UnicodeInformation/UnicodeCharInfo.cs
@@ -20,28 +20,30 @@
 		{
 			get
 			{
-				return unicodeCharacterData.Name == null || unicodeCharacterData.CodePointRange.IsSingleCodePoint ?
-					unicodeCharacterData.Name :
-					unicodeCharacterData.Name + "-" + codePoint.ToString("X4");
+				return unicodeCharacterData != null ?
+					unicodeCharacterData.Name == null || unicodeCharacterData.CodePointRange.IsSingleCodePoint ?
+						unicodeCharacterData.Name :
+						unicodeCharacterData.Name + "-" + codePoint.ToString("X4") :
+					null;
 			}
 		}

-		public UnicodeCategory Category { get { return unicodeCharacterData != null ? unicodeCharacterData.Category : UnicodeCategory.OtherNotAssigned; } }
+		public UnicodeCategory Category { get { return unicodeCharacterData?.Category ?? UnicodeCategory.OtherNotAssigned; } }
 		public string Block { get { return block ?? "No_Block"; } }
-		public CanonicalCombiningClass CanonicalCombiningClass { get { return unicodeCharacterData.CanonicalCombiningClass; } }
-		public BidirectionalClass BidirectionalClass { get { return unicodeCharacterData.BidirectionalClass; } }
-		public CompatibilityFormattingTag DecompositionType { get { return unicodeCharacterData.DecompositionType; } }
-		public string DecompositionMapping { get { return unicodeCharacterData.DecompositionMapping; } }
-		public UnicodeNumericType NumericType { get { return unihanCharacterData != null ? unihanCharacterData.NumericType != UnihanNumericType.None ? UnicodeNumericType.Numeric : UnicodeNumericType.None : unicodeCharacterData.NumericType; } }
+		public CanonicalCombiningClass CanonicalCombiningClass { get { return unicodeCharacterData?.CanonicalCombiningClass ?? CanonicalCombiningClass.NotReordered; } }
+		public BidirectionalClass BidirectionalClass { get { return unicodeCharacterData?.BidirectionalClass ?? BidirectionalClass.LeftToRight; } }
+		public CompatibilityFormattingTag DecompositionType { get { return unicodeCharacterData?.DecompositionType ?? CompatibilityFormattingTag.Canonical; } }
+		public string DecompositionMapping { get { return unicodeCharacterData?.DecompositionMapping; } }
+		public UnicodeNumericType NumericType { get { return unihanCharacterData != null ? unihanCharacterData.NumericType != UnihanNumericType.None ? UnicodeNumericType.Numeric : UnicodeNumericType.None : unicodeCharacterData?.NumericType ?? UnicodeNumericType.None; } }
 		public UnihanNumericType UnihanNumericType { get { return unihanCharacterData != null ? unihanCharacterData.NumericType : UnihanNumericType.None; } }
-		public UnicodeRationalNumber? NumericValue { get { return unihanCharacterData != null && unihanCharacterData.NumericType != UnihanNumericType.None ? new UnicodeRationalNumber(unihanCharacterData.NumericValue, 1) : unicodeCharacterData.NumericValue; } }
-		public bool BidirectionalMirrored { get { return unicodeCharacterData.BidirectionalMirrored; } }
-		public string OldName { get { return unicodeCharacterData.OldName; } }
-		public string SimpleUpperCaseMapping { get { return unicodeCharacterData.SimpleUpperCaseMapping; } }
-		public string SimpleLowerCaseMapping { get { return unicodeCharacterData.SimpleLowerCaseMapping; } }
-		public string SimpleTitleCaseMapping { get { return unicodeCharacterData.SimpleTitleCaseMapping; } }
-		public ContributoryProperties ContributoryProperties { get { return unicodeCharacterData.ContributoryProperties; } }
-		public CoreProperties CoreProperties { get { return unicodeCharacterData.CoreProperties; } }
+		public UnicodeRationalNumber? NumericValue { get { return unihanCharacterData != null && unihanCharacterData.NumericType != UnihanNumericType.None ? new UnicodeRationalNumber(unihanCharacterData.NumericValue, 1) : unicodeCharacterData?.NumericValue; } }
+		public bool BidirectionalMirrored { get { return unicodeCharacterData?.BidirectionalMirrored ?? false; } }
+		public string OldName { get { return unicodeCharacterData?.OldName; } }
+		public string SimpleUpperCaseMapping { get { return unicodeCharacterData?.SimpleUpperCaseMapping; } }
+		public string SimpleLowerCaseMapping { get { return unicodeCharacterData?.SimpleLowerCaseMapping; } }
+		public string SimpleTitleCaseMapping { get { return unicodeCharacterData?.SimpleTitleCaseMapping; } }
+		public ContributoryProperties ContributoryProperties { get { return unicodeCharacterData?.ContributoryProperties ?? 0; } }
+		public CoreProperties CoreProperties { get { return unicodeCharacterData?.CoreProperties ?? 0; } }

 		public string Definition { get { return unihanCharacterData?.Definition; } }
 		public string MandarinReading { get { return unihanCharacterData?.MandarinReading; } }


delete directory after test

delete directory after test

--- UnitTestTranslatorHelper/UnitTest1.cs
+++ UnitTestTranslatorHelper/UnitTest1.cs
@@ -78,6 +78,7 @@
       const string Result2 = @"C:\Temp\_testForUnitTestVS\test991.txt";
       Assert.AreEqual(Result2, FormMain.IncreaseFileName(FilePath2));
       File.Delete(FilePath2);
+      Directory.Delete(@"C:\Temp\_testForUnitTestVS\");
     }

     [TestMethod]


Added unit test for I18NLEVEL

Added unit test for I18NLEVEL

--- UnitTests/Net/Imap/ImapClientTests.cs
+++ UnitTests/Net/Imap/ImapClientTests.cs
@@ -364,11 +364,11 @@
 				}

 				Assert.AreEqual (DovecotAuthenticatedCapabilities, client.Capabilities);
-
+				Assert.AreEqual (1, client.InternationalizationLevel, "Expected I18NLEVEL=1");
 				Assert.IsTrue (client.ThreadingAlgorithms.Contains (ThreadingAlgorithm.OrderedSubject), "Expected THREAD=ORDEREDSUBJECT");
 				Assert.IsTrue (client.ThreadingAlgorithms.Contains (ThreadingAlgorithm.References), "Expected THREAD=REFERENCES");

-				// TODO: verify CONTEXT=SEARCH and CONTEXT=SORT
+				// TODO: verify CONTEXT=SEARCH

 				try {
 					await client.EnableQuickResyncAsync ();


Update SmtpClientTests.cs

Update SmtpClientTests.cs

--- UnitTests/Net/Smtp/SmtpClientTests.cs
+++ UnitTests/Net/Smtp/SmtpClientTests.cs
@@ -1787,8 +1787,6 @@

 				var mailbox = new MailboxAddress (string.Empty, "úßerñame@example.com");
 				var message = CreateEightBitMessage ();
-				var options = FormatOptions.Default.Clone ();
-				options.International = true;

 				try {
 					client.Authenticate ("username", "password");
@@ -1797,7 +1795,7 @@
 				}

 				try {
-					client.Send (options, message, mailbox, new MailboxAddress[] { mailbox });
+					client.Send (message, mailbox, new MailboxAddress[] { mailbox });
 				} catch (Exception ex) {
 					Assert.Fail ("Did not expect an exception in Send: {0}", ex);
 				}
@@ -1806,7 +1804,7 @@
 				client.Capabilities &= ~SmtpCapabilities.UTF8;

 				try {
-					client.Send (options, message, mailbox, new MailboxAddress[] { mailbox });
+					client.Send (message, mailbox, new MailboxAddress[] { mailbox });
 				} catch (Exception ex) {
 					Assert.Fail ("Did not expect an exception in Send: {0}", ex);
 				}
@@ -1860,8 +1858,6 @@

 				var mailbox = new MailboxAddress (string.Empty, "úßerñame@example.com");
 				var message = CreateEightBitMessage ();
-				var options = FormatOptions.Default.Clone ();
-				options.International = true;

 				try {
 					await client.AuthenticateAsync ("username", "password");
@@ -1870,7 +1866,7 @@
 				}

 				try {
-					await client.SendAsync (options, message, mailbox, new MailboxAddress[] { mailbox });
+					await client.SendAsync (message, mailbox, new MailboxAddress[] { mailbox });
 				} catch (Exception ex) {
 					Assert.Fail ("Did not expect an exception in Send: {0}", ex);
 				}
@@ -1879,7 +1875,7 @@
 				client.Capabilities &= ~SmtpCapabilities.UTF8;

 				try {
-					await client.SendAsync (options, message, mailbox, new MailboxAddress[] { mailbox });
+					await client.SendAsync (message, mailbox, new MailboxAddress[] { mailbox });
 				} catch (Exception ex) {
 					Assert.Fail ("Did not expect an exception in Send: {0}", ex);
 				}


Hardcoded constants removed

Hardcoded constants removed

--- Assets/Scripts/Boid.cs
+++ Assets/Scripts/Boid.cs
@@ -11,6 +11,8 @@
   const float optDistance = 0.1f;
   const float minSpeed = 0.1f * speedMultipliyer;
   const float inclineFactor = 300.0f / speedMultipliyer;
+  const float aligmentForcePart = 0.003f;
+  const float totalForceultipliyer = 12;

   public Vector3 velocity = Vector3.zero;

@@ -160,9 +162,9 @@
     //Debug.DrawRay( transform.position, centeroid, Color.magenta );
     //Debug.DrawRay( transform.position, collisionAvoidance, Color.green );

-    var positionForce = 1.0f * speedMultipliyer * (centeroid + collisionAvoidance);
-    var alignmentForce = 0.001f * avgSpeed / Time.deltaTime;
-    var totalForce = 12 * (positionForce + alignmentForce);
+    var positionForce = (1.0f - aligmentForcePart) * speedMultipliyer * (centeroid + collisionAvoidance);
+    var alignmentForce = aligmentForcePart * avgSpeed / Time.deltaTime;
+    var totalForce = totalForceultipliyer * (positionForce + alignmentForce);

     velocity = CalcNewVelocity( velocity, totalForce * Time.deltaTime, transform.rotation * Vector3.forward );
     gameObject.transform.rotation = CalcRotation( velocity, totalForce );


fix #2

fix #2

--- Assets/Scripts/Menu.cs
+++ Assets/Scripts/Menu.cs
@@ -74,11 +74,11 @@
         {
             if (!value && (this.Interactable || this.uninitialized))
             {
-                SetChildComponents<Selectable>(false);
+                SetChildComponents<Selectable>(c => c.interactable = false);
             }
             else if (value && (!this.Interactable || this.uninitialized))
             {
-                SetChildComponents<Selectable>(true, skipMenus: true);
+                SetChildComponents<Selectable>(c => c.interactable = true, skipMenus: true);
             }

             this.Interactable = value;
@@ -109,9 +109,9 @@
         /// Internal helper to enable/disable child <see cref="Behaviour"/>s
         /// </summary>
         /// <typeparam name="TComp">component type</typeparam>
-        /// <param name="value">new state</param>
+        /// <param name="setter">a function capable of setting</param>
         /// <param name="skipMenus">indicates if we should include of exclude children with <see cref="Menu"/> components</param>
-        private void SetChildComponents<TComp>(bool value, bool skipMenus = false) where TComp : Behaviour
+        private void SetChildComponents<TComp>(Action<TComp> setter, bool skipMenus = false) where TComp : Behaviour
         {
             foreach (var comp in this.GetComponentsInChildren<TComp>())
             {
@@ -120,7 +120,7 @@
                     continue;
                 }

-                comp.enabled = value;
+                setter(comp);
             }
         }


Fixing issue with items registered with multiple service keys

--- AutoDI/ContainerMap.cs
+++ AutoDI/ContainerMap.cs
@@ -25,49 +25,41 @@

         public void Add(IServiceCollection services)
         {
-            foreach (ServiceDescriptor descriptor in services)
-            {
-                Add(descriptor);
-            }
             ////TODO: This re-grouping seems off somewhere...
-            //foreach (IGrouping<Type, ServiceDescriptor> serviceDescriptors in
-            //            from ServiceDescriptor service in services
-            //            let autoDIService = service as AutoDIServiceDescriptor
-            //            group service by autoDIService?.TargetType
-            //            into @group
-            //            select @group
-            //)
-            //{
-            //    DelegateContainer container = null;
-            //    foreach (ServiceDescriptor serviceDescriptor in serviceDescriptors)
-            //    {
-            //        //Build up the container if it has not been generated or we do not have multiple AutoDI target types
-            //        if (container == null || serviceDescriptors.Key == null)
-            //        {
-            //            container = AddInternal(serviceDescriptor);
-            //        }
-            //
-            //        _accessors[serviceDescriptor.ServiceType] = container;
-            //    }
-            //}
+            foreach (IGrouping<Type, ServiceDescriptor> serviceDescriptors in
+                     from ServiceDescriptor service in services
+                     let autoDIService = service as AutoDIServiceDescriptor
+                     group service by autoDIService?.TargetType into @group
+                     select @group)
+            {
+                DelegateContainer container = null;
+                foreach (ServiceDescriptor serviceDescriptor in serviceDescriptors)
+                {
+                    //Build up the container if it has not been generated or we do not have multiple AutoDI target types
+                    if (container == null || serviceDescriptors.Key == null)
+                    {
+                        container = new DelegateContainer(serviceDescriptor);
+                    }
+
+                    AddInternal(container, serviceDescriptor.ServiceType);
+                }
+            }
         }

         public void Add(ServiceDescriptor serviceDescriptor)
         {
-            AddInternal(serviceDescriptor);
-        }
-
-        private void AddInternal(ServiceDescriptor serviceDescriptor)
-        {
-            var container = new DelegateContainer(serviceDescriptor);
-
-            if (_accessors.TryGetValue(serviceDescriptor.ServiceType, out IDelegateContainer existing))
-            {
-                _accessors[serviceDescriptor.ServiceType] = existing + container;
+            AddInternal(new DelegateContainer(serviceDescriptor), serviceDescriptor.ServiceType);
+        }
+
+        private void AddInternal(DelegateContainer container, Type key)
+        {
+            if (_accessors.TryGetValue(key, out IDelegateContainer existing))
+            {
+                _accessors[key] = existing + container;
             }
             else
             {
-                _accessors[serviceDescriptor.ServiceType] = container;
+                _accessors[key] = container;
             }
         }

@@ -227,8 +219,8 @@

             public DelegateContainer(ServiceDescriptor serviceDescriptor)
                 : this(GetLifetime(serviceDescriptor),
-                      GetTargetType(serviceDescriptor),
-                      GetFactory(serviceDescriptor))
+                       GetTargetType(serviceDescriptor),
+                       GetFactory(serviceDescriptor))
             {
                 _serviceDescriptor = serviceDescriptor ?? throw new ArgumentNullException(nameof(serviceDescriptor));
             }


Kommentare

Kommentare

--- BBT/MainWindow.xaml.cs
+++ BBT/MainWindow.xaml.cs
@@ -115,6 +115,11 @@
                 this.DockPanel.Children.Insert(1, Toolbox);
             }
         }
+        /// <summary>
+        /// Toolbox hinzufügen Event
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ToolboxAdd_Click(object sender, RoutedEventArgs e)
         {
             ToolboxAdd();
@@ -129,6 +134,11 @@
                 this.DockPanel.Children.Remove(Toolbox);
             }
         }
+        /// <summary>
+        /// Toolbox entfernen Event
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ToolboxRemove_Click(object sender, RoutedEventArgs e)
         {
             ToolboxRemove();
@@ -178,7 +188,11 @@
         {
             this.Close();
         }
-
+        /// <summary>
+        /// Wenn Taste gedrückt wird
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void KeyPressed(object sender, System.Windows.Input.KeyEventArgs e)
         {
             if (e.Key == Key.Escape && this.WindowStyle == System.Windows.WindowStyle.None)
@@ -203,7 +217,11 @@
             }

         }
-
+        /// <summary>
+        /// Zeichenfarben mit ColorDialog wählen
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ChooseColor_Click(object sender, RoutedEventArgs e)
         {
             ColorDialog MyDialog = new ColorDialog();
@@ -229,9 +247,8 @@
                 _currentMarkedNode.endUpdate();
             }
         }
-
-        /// <summary>
-        /// Hintergrundfarbe vom Canvas wird geändert
+        /// <summary>
+        /// Hintergrundfarbe vom Canvas mit ColorDialog wählen
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
@@ -278,6 +295,11 @@
             }
         }

+        /// <summary>
+        /// FillCheckbox wird gecheckt
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void fillCheckBox_Checked(object sender, RoutedEventArgs e)
         {
             //Ausgewählten Knoten updaten
@@ -295,7 +317,11 @@
                 _currentMarkedNode.endUpdate();
             }
         }
-
+        /// <summary>
+        /// FillCheckbox wird ungecheckt
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void fillCheckBox_Unchecked(object sender, RoutedEventArgs e)
         {
             //Ausgewählten Knoten updaten
@@ -313,7 +339,11 @@
                 _currentMarkedNode.endUpdate();
             }
         }
-
+        /// <summary>
+        /// Text im Werkzeugkasten wird geändert
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void nodeText_TextChanged(object sender, TextChangedEventArgs e)
         {
             //Ausgewählten Knoten updaten
@@ -333,14 +363,15 @@
                 }
             }
         }
-
+        /// <summary>
+        /// Neuen Knoten hinzufügen
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void addNode_Click(object sender, RoutedEventArgs e)
         {
             ANode node = new Node();
-
-
             node.changeNodeEvent += this.handleNodeChanges;
-
             node.beginUpdate();
             try
             {
@@ -355,7 +386,6 @@
                     default:
                         break;
                 }
-
                 //Punkte bestimmen
                 //Links
                 Rect rLeft = new Rect(new Point(_currentMarkedNode.getRectangle().TopLeft.X + 150, _currentMarkedNode.getRectangle().TopLeft.Y), new Point(_currentMarkedNode.getRectangle().BottomRight.X + 150, _currentMarkedNode.getRectangle().BottomRight.Y));
@@ -409,7 +439,11 @@
         public delegate void changedActiveNodeEventHandler(object sender, ANode node);

         public event changedActiveNodeEventHandler changeActiveNodeEvent;
-
+        /// <summary>
+        /// Wenn sich der aktive Knoten ändert
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="node"></param>
         private void activeNodeChangedHandler(object sender, ANode node)
         {
             if (this._currentMarkedNode != node)
@@ -417,10 +451,11 @@
                 if (this._currentMarkedNode != null)
                     this._currentMarkedNode.getStyle().setActivated(false);
                 this._currentMarkedNode = node;
+
                 this._currentMarkedNode.getStyle().setActivated(true);

                 this.nodeText.Text = this._currentMarkedNode.getText();
-
+
                 this.FontSlider.Value = this._currentMarkedNode.getStyle().getFontsize();

                 var converter = new System.Windows.Media.BrushConverter();
@@ -445,7 +480,11 @@

             }
         }
-
+        /// <summary>
+        /// Form wird in Toolbox geändert
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ChooseForm_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
             if (_currentMarkedNode != null)
@@ -475,48 +514,16 @@

         private void removeNOde_Click(object sender, RoutedEventArgs e)
         {
-            this._mindmap.removeNode(_currentMarkedNode);
-        }
-
-        private void MindMapCanvas_MouseDown(object sender, MouseButtonEventArgs e)
-        {
-            this.MindMapCanvas.Focusable = true;
-            this.MindMapCanvas.Focus();
-        }
-
-        private void Button_Click(object sender, RoutedEventArgs e)
-        {
-            // Create OpenFileDialog
-            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
-
-            // Set filter for file extension and default file extension
-            dlg.DefaultExt = ".png";
-            dlg.Filter = "Pictures (.png)|*.png";
-
-            // Display OpenFileDialog by calling ShowDialog method
-            Nullable<bool> result = dlg.ShowDialog();
-
-            // Get the selected file name and display in a TextBox
-            if (result == true)
-            {
-                // Open document
-                string filename = dlg.FileName;
-                //FileNameTextBox.Text = filename;
-
-
-                //Image finalImage = new Image();
-
-                BitmapImage logo = new BitmapImage();
-                logo.BeginInit();
-                logo.UriSource = new Uri(filename);
-                logo.EndInit();
-
-                this.IconImage.Source = logo;
-                this._currentMarkedNode.getStyle().setICon(logo);
-
-            }
-        }
-
+            ANode an = _currentMarkedNode;
+            changeActiveNode(this, _currentMarkedNode.getParent());
+            this._mindmap.removeNode(an, true);
+
+        }
+        /// <summary>
+        /// MausradEvent Zoom
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void MindMapCanvas_MouseWheel(object sender, MouseWheelEventArgs e)
         {
             if (e.Delta > 0)
@@ -542,7 +549,11 @@

             }
         }
-
+        /// <summary>
+        /// Add Icon
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void AddIcon_MouseDown(object sender, MouseButtonEventArgs e)
         {
             // Create OpenFileDialog
@@ -564,6 +575,8 @@
                 BitmapImage logo = new BitmapImage();
                 logo.BeginInit();
                 logo.UriSource = new Uri(filename);
+                logo.DecodePixelWidth = 14;
+                logo.DecodePixelHeight = 14;
                 logo.EndInit();
                 this.IconImage.Source = logo;
                 this._currentMarkedNode.getStyle().setICon(logo);
@@ -573,8 +586,8 @@
                 sp.Orientation = System.Windows.Controls.Orientation.Horizontal;

                 Image img = new Image();
-                img.Width = 20;
-                img.Height = 20;
+                img.Width = 16;
+                img.Height = 16;
                 img.Source = logo;
                 sp.Children.Add(img);


Fixed Test Case

Fixed Test Case

--- King.Service.Tests/Data/StorageQueueAutoScalerTests.cs
+++ King.Service.Tests/Data/StorageQueueAutoScalerTests.cs
@@ -41,6 +41,7 @@
             {
                 Priority = QueuePriority.High,
                 Name = Guid.NewGuid().ToString(),
+                Processor = () => { return Substitute.For<IProcessor<object>>(); },
             };
             var connection = new QueueConnection<object>()
             {


Remove the index.lock file from the .git folder before checkout.

--- Kudu.Core/SourceControl/Git/GitDeploymentRepository.cs
+++ Kudu.Core/SourceControl/Git/GitDeploymentRepository.cs
@@ -1,5 +1,6 @@
 using System.IO;
 using System.Linq;
+using Kudu.Contracts.Tracing;
 using Kudu.Core.Tracing;

 namespace Kudu.Core.SourceControl.Git
@@ -9,7 +10,7 @@
         private readonly GitExecutable _gitExe;
         private readonly ITraceFactory _traceFactory;
         private readonly GitExeRepository _repository;
-
+
         public GitDeploymentRepository(string path, ITraceFactory traceFactory)
         {
             _gitExe = new GitExecutable(path);
@@ -85,12 +86,28 @@

         public void Update()
         {
+            EnsureNoLockFile();
             _repository.Update();
         }

         public void Update(string id)
         {
+            EnsureNoLockFile();
             _repository.Update(id);
+        }
+
+        private void EnsureNoLockFile()
+        {
+            ITracer tracer = _traceFactory.GetTracer();
+
+            // Delete the lock file from the .git folder
+            string lockFilePath = Path.Combine(_gitExe.WorkingDirectory, ".git", "index.lock");
+            if (File.Exists(lockFilePath))
+            {
+                tracer.TraceWarning("Deleting left over index.lock file");
+                File.Delete(lockFilePath);
+            }
+
         }
     }
 }


Fix test-time of NS2 file types visibility

--- Lib/NetStandard2.Split/File/Properties/AssemblyInfo.cs
+++ Lib/NetStandard2.Split/File/Properties/AssemblyInfo.cs
@@ -40,8 +40,7 @@
 [assembly: AssemblyInformationalVersion("9.4.2.0")]

 #if SIGN
-[assembly: InternalsVisibleTo(
-    "Microsoft.Azure.Storage.Test., PublicKey=" +
+[assembly: InternalsVisibleTo("Microsoft.Azure.Storage.Test, PublicKey=" +
     "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67" +
     "871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0b" +
     "d333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307" +


Only update Rainbow Splits 10 times per second

--- LiveSplit/LiveSplit.Core/Model/LiveSplitStateHelper.cs
+++ LiveSplit/LiveSplit.Core/Model/LiveSplitStateHelper.cs
@@ -193,7 +193,8 @@
         {
             if (state.LayoutSettings.UseRainbowColor)
             {
-                var rainbowColor = ColorExtensions.FromHSV((DateTime.Now.TimeOfDay.TotalMilliseconds / 10) % 360, 1, 1);
+                var hue = (((int)DateTime.Now.TimeOfDay.TotalMilliseconds / 100) % 36) * 10;
+                var rainbowColor = ColorExtensions.FromHSV(hue, 1, 1);
                 return Color.FromArgb((rainbowColor.R*2 + 255*1) / 3, (rainbowColor.G*2 + 255*1) / 3, (rainbowColor.B*2 + 255*1) / 3);
             }


Changed the explicit GetEnumerator() to an implicit one.

--- Easy.Common/EasyDictionary.cs
+++ Easy.Common/EasyDictionary.cs
@@ -225,12 +225,13 @@
         /// Return an enumerator that iterates through the dictionary.
         /// </summary>
         /// <returns></returns>
-        public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => _dictionary.GetEnumerator();
+        IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
+            => _dictionary.GetEnumerator();

         /// <summary>
         /// Returns an enumerator that iterates through the collection.
         /// </summary>
-        IEnumerator<TValue> IEnumerable<TValue>.GetEnumerator() => _dictionary.Values.GetEnumerator();
+        public IEnumerator<TValue> GetEnumerator() => _dictionary.Values.GetEnumerator();

         /// <summary>
         /// Returns an enumerator that iterates through the sequence.


Respect enabled on widget

Respect enabled on widget

--- MatterControlLib/ApplicationView/Themes/ThemeConfig.cs
+++ MatterControlLib/ApplicationView/Themes/ThemeConfig.cs
@@ -437,7 +437,8 @@
 							{
 								Border = new BorderDouble(1, 0, 0, 0),
 								BorderColor = this.MinimalShade,
-								HoverColor = this.AccentMimimalOverlay
+								HoverColor = this.AccentMimimalOverlay,
+								Enabled = actionButton.IsEnabled()
 							};

 							content.AddChild(button);


Added Abs and Sign to Math

Added Abs and Sign to Math

--- Elementary/Elementary/Math.cs
+++ Elementary/Elementary/Math.cs
@@ -14,6 +14,35 @@
             rnd = new Random();
         }

+        public static sbyte Abs(this sbyte value)
+        {
+            return (sbyte)(value >= 0 ? value : -value);
+        }
+        public static short Abs(this short value)
+        {
+            return (short)(value >= 0 ? value : -value);
+        }
+        public static int Abs(this int value)
+        {
+            return (value >= 0 ? value : -value);
+        }
+        public static long Abs(this long value)
+        {
+            return (value >= 0 ? value : -value);
+        }
+        public static float Abs(this float value)
+        {
+            return (value >= 0 ? value : -value);
+        }
+        public static double Abs(this double value)
+        {
+            return (value >= 0 ? value : -value);
+        }
+        public static decimal Abs(this decimal value)
+        {
+            return (value >= 0 ? value : -value);
+        }
+
         public static sbyte Clamp(this sbyte value, sbyte min, sbyte max)
         {
             if (value < min)
@@ -251,6 +280,63 @@
         public static decimal Remap(this decimal value, decimal inputMin, decimal inputMax, decimal outputMin, decimal outputMax)
         {
             return (value - inputMin) / (outputMin - inputMin) * (outputMax - inputMax) + inputMax;
+        }
+
+        public static sbyte Sign(this sbyte value)
+        {
+            if (value > 0)
+                return 1;
+            else if (value < 0)
+                return -1;
+            return 0;
+        }
+        public static sbyte Sign(this short value)
+        {
+            if (value > 0)
+                return 1;
+            else if (value < 0)
+                return -1;
+            return 0;
+        }
+        public static sbyte Sign(this int value)
+        {
+            if (value > 0)
+                return 1;
+            else if (value < 0)
+                return -1;
+            return 0;
+        }
+        public static sbyte Sign(this long value)
+        {
+            if (value > 0)
+                return 1;
+            else if (value < 0)
+                return -1;
+            return 0;
+        }
+        public static sbyte Sign(this float value)
+        {
+            if (value > 0)
+                return 1;
+            else if (value < 0)
+                return -1;
+            return 0;
+        }
+        public static sbyte Sign(this double value)
+        {
+            if (value > 0)
+                return 1;
+            else if (value < 0)
+                return -1;
+            return 0;
+        }
+        public static sbyte Sign(this decimal value)
+        {
+            if (value > 0)
+                return 1;
+            else if (value < 0)
+                return -1;
+            return 0;
         }
     }
 }


* More peformance improvements

* More peformance improvements

--- NUlid/Ulid.cs
+++ NUlid/Ulid.cs
@@ -292,7 +292,11 @@
         /// <returns>A 16-element byte array.</returns>
         public byte[] ToByteArray()
         {
-            return tdata.Concat(rdata).ToArray();
+            return new[] {
+                tdata[0], tdata[1], tdata[2], tdata[3], tdata[4], tdata[5],
+                rdata[0], rdata[1], rdata[2], rdata[3], rdata[4],
+                rdata[5], rdata[6], rdata[7], rdata[8], rdata[9]
+            };
         }

         /// <summary>
@@ -364,8 +368,8 @@
                 return this.Time.CompareTo(other.Time);
             for (int i = 0; i < 10; i++)
             {
-                if (this.Random[i] != other.Random[i])
-                    return this.Random[i].CompareTo(other.Random[i]);
+                if (rdata[i] != other.rdata[i])
+                    return rdata[i].CompareTo(other.rdata[i]);
             }
             return 0;
         }
@@ -418,7 +422,12 @@
         /// <returns>true if x and y are equal; otherwise, false.</returns>
         public static bool operator ==(Ulid x, Ulid y)
         {
-            return (x.Time == y.Time) && x.Random.SequenceEqual(y.Random);
+            if (x.Time != y.Time)
+                return false;
+            for (var i = 0; i < 10; i++)
+                if (x.rdata[i] != y.rdata[i])
+                    return false;
+            return true;
         }

         /// <summary>
@@ -443,8 +452,8 @@
                 int hash = (int)2166136261;
                 // Suitable nullity checks etc, of course :)
                 hash = (hash * 16777619) ^ Time.GetHashCode();
-                for (int i = 0; i < Random.Length; i++)
-                    hash = (hash * 16777619) ^ Random[i];
+                for (int i = 0; i < 10; i++)
+                    hash = (hash * 16777619) ^ rdata[i];
                 return hash;
             }
         }


Enable directly binding to properties

Enable directly binding to properties

--- NET/Libraries/Treehopper.Libraries/Input/WiiNunchuk.cs
+++ NET/Libraries/Treehopper.Libraries/Input/WiiNunchuk.cs
@@ -2,6 +2,7 @@
  */

 using System;
+using System.ComponentModel;
 using System.Linq;
 using System.Numerics;
 using System.Threading.Tasks;
@@ -128,9 +129,16 @@

             ((DigitalInPeripheralPin) Z.Input).DigitalValue = (response[5] & 0x01) == 0;
             ((DigitalInPeripheralPin) C.Input).DigitalValue = (response[5] & 0x02) == 0;
+
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Joystick)));
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Accelerometer)));
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(C)));
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Z)));
+
         }

         public event JoystickChangedDelegate JoystickChanged;
+        public event PropertyChangedEventHandler PropertyChanged;

         public class JoystickEventArgs : EventArgs
         {


Added an Add() that will copy the appropriate byte range from another TransportPacket.

--- GTBase/Net/TransportPacket.cs
+++ GTBase/Net/TransportPacket.cs
@@ -212,39 +212,7 @@
             }

             TransportPacket subset = new TransportPacket();
-            int subsetEnd = subsetStart + count - 1;    // index of last byte of interest
-            int segmentStart = 0; // index of first byte of current <segment>
-            foreach (ArraySegment<byte> segment in list)
-            {
-                int segmentEnd = segmentStart + segment.Count - 1; // index of last byte
-
-                // This segment is of interest if
-                // listStart <= segmentEnd && listEnd >= segmentStart
-                // IF: segmentEnd < subsetStart then we're too early
-                // IF: subsetEnd < segmentStart then we've gone past
-                if (segmentEnd >= subsetStart)
-                {
-                    // if this segment appears after the area of interest then we're finished:
-                    // none of the remaining segments can possibly be in our AOI
-                    if (segmentStart > subsetEnd)
-                    {
-                        break;
-                    }
-                    if (subsetStart <= segmentStart && segmentEnd <= subsetEnd)
-                    {
-                        subset.AddSegment(segment);  // not subset's responsibility
-                    }
-                    else
-                    {
-                        int aoiStart = Math.Max(subsetStart, segmentStart);
-                        int aoiEnd = Math.Min(subsetEnd, segmentEnd);
-                        subset.AddSegment(new ArraySegment<byte>(segment.Array,
-                            segment.Offset + (int)(aoiStart - segmentStart),
-                            (int)(aoiEnd - aoiStart + 1)));  // not subset's responsibility
-                    }
-                }
-                segmentStart += segment.Count;
-            }
+            subset.Add(this, subsetStart, count);
             return subset;
         }

@@ -317,6 +285,48 @@
                 Buffer.BlockCopy(source, offset + count - segSize, segment.Array, segment.Offset, segSize);
                 PrependSegment(segment);
                 count -= segSize;
+            }
+        }
+
+        /// <summary>
+        /// Add the appropriate segments of <see cref="packet"/> to this instance.
+        /// </summary>
+        /// <param name="source"></param>
+        /// <param name="offset"></param>
+        /// <param name="count"></param>
+        public void Add(TransportPacket source, int offset, int count) {
+            int subsetEnd = offset + count - 1;    // index of last byte of interest
+            int segmentStart = 0; // index of first byte of current <segment>
+            foreach (ArraySegment<byte> segment in source.list)
+            {
+                int segmentEnd = segmentStart + segment.Count - 1; // index of last byte
+
+                // This segment is of interest if
+                // listStart <= segmentEnd && listEnd >= segmentStart
+                // IF: segmentEnd < subsetStart then we're too early
+                // IF: subsetEnd < segmentStart then we've gone past
+                if (segmentEnd >= offset)
+                {
+                    // if this segment appears after the area of interest then we're finished:
+                    // none of the remaining segments can possibly be in our AOI
+                    if (segmentStart > subsetEnd)
+                    {
+                        break;
+                    }
+                    if (offset <= segmentStart && segmentEnd <= subsetEnd)
+                    {
+                        AddSegment(segment);  // not subset's responsibility
+                    }
+                    else
+                    {
+                        int aoiStart = Math.Max(offset, segmentStart);
+                        int aoiEnd = Math.Min(subsetEnd, segmentEnd);
+                        AddSegment(new ArraySegment<byte>(segment.Array,
+                            segment.Offset + (int)(aoiStart - segmentStart),
+                            (int)(aoiEnd - aoiStart + 1)));  // not subset's responsibility
+                    }
+                }
+                segmentStart += segment.Count;
             }
         }


ログ出力を追加

ログ出力を追加

--- NotifyForm.cs
+++ NotifyForm.cs
@@ -379,6 +379,7 @@
         /* ----------------------------------------------------------------- */
         protected override void OnShowing(CancelEventArgs e)
         {
+            Logger.DebugFormat("Title:{0}\tDescription:{1}", Title, Description);
             SetLocation();
             SetStyle();
             base.OnShowing(e);


Deal with null values

Deal with null values

--- Gu.Wpf.DataGrid2D/Selected.cs
+++ Gu.Wpf.DataGrid2D/Selected.cs
@@ -1,4 +1,4 @@
-#pragma warning disable SA1202
+#pragma warning disable SA1202
 namespace Gu.Wpf.DataGrid2D
 {
     using System.ComponentModel;
@@ -149,7 +149,8 @@
                             var index = new RowColumnIndex(r, c);
                             dataGrid.SetIndex(index);
                             var cell = dataGrid.GetCell(index);
-                            cell.SetCurrentValue(DataGridCell.IsSelectedProperty, true);
+                            if(cell != null)
+                                cell.SetCurrentValue(DataGridCell.IsSelectedProperty, true);
                             return;
                         }
                     }
@@ -251,12 +252,15 @@

             var dataGridColumn = dataGrid.Columns[index.Column];
             var row = (DataGridRow)dataGrid.ItemContainerGenerator.ContainerFromIndex(index.Row);
-            var content = dataGridColumn.GetCellContent(row);
-            var cell = content.Ancestors()
-                              .OfType<DataGridCell>()
-                              .FirstOrDefault();
-
-            return cell;
+            if (row != null)
+            {
+                var content = dataGridColumn.GetCellContent(row);
+                var cell = content.Ancestors()
+                                  .OfType<DataGridCell>()
+                                  .FirstOrDefault();
+                return cell;
+            }
+            return null;
         }

         private static void UpdateSelectedCellItemFromView(DataGrid dataGrid)


private

private

--- xamarin/FHXamarinIOSSDK/Services/Network/IosRegistration.cs
+++ xamarin/FHXamarinIOSSDK/Services/Network/IosRegistration.cs
@@ -32,7 +32,7 @@
             });
         }

-        public static Dictionary<string, string> Convert(NSDictionary nativeDict)
+        private static Dictionary<string, string> Convert(NSDictionary nativeDict)
         {
             return nativeDict.ToDictionary<KeyValuePair<NSObject, NSObject>, string, string>(
                 item => (NSString) item.Key, item => item.Value.ToString());


Gracefully handle additional failures in emulation scanner

--- source/Playnite/Emulators/Scanner.cs
+++ source/Playnite/Emulators/Scanner.cs
@@ -475,7 +475,7 @@
                 return new List<ScannedGame>();
             }

-            var platforms = profile.Platforms?.Select(a => database.Platforms[a].SpecificationId).Where(a => !a.IsNullOrEmpty()).ToList();
+            var platforms = profile.Platforms?.Select(a => database.Platforms[a]?.SpecificationId).Where(a => !a.IsNullOrEmpty()).ToList();
             return ScanDirectory(
                 directory,
                 profile.ImageExtensions.Select(a => a.Trim()).ToList(),
@@ -612,6 +612,11 @@
                         if (cancelToken.IsCancellationRequested)
                         {
                             return;
+                        }
+
+                        if (!File.Exists(childPath))
+                        {
+                            continue;
                         }

                         fileScanCallback?.Invoke(childPath);


fix blank line issue when no namespace is declared

--- compiler/src/Brickred.Exchange.Compiler/CppCodeGenerator.cs
+++ compiler/src/Brickred.Exchange.Compiler/CppCodeGenerator.cs
@@ -169,15 +169,17 @@
             sb.Append(dontEditComment);
             sb.Append(includeFileDecl);
             sb.Append(this.newLineStr);
-            sb.Append(namespaceDeclStart);
-            if (implList.Count > 0) {
+            if (namespaceDeclStart != "") {
+                sb.Append(namespaceDeclStart);
                 sb.Append(this.newLineStr);
             }
             sb.Append(string.Join(this.newLineStr, implList));
-            if (implList.Count > 0) {
-                sb.Append(this.newLineStr);
-            }
-            sb.Append(namespaceDeclEnd);
+            if (namespaceDeclEnd != "") {
+                if (implList.Count > 0) {
+                    sb.Append(this.newLineStr);
+                }
+                sb.Append(namespaceDeclEnd);
+            }

             return sb.ToString();
         }


Converted LongSpam and SelfSpam's LINQ to more imperative code to improve readability.

--- Dbot.Processor/Banner.cs
+++ Dbot.Processor/Banner.cs
@@ -172,23 +172,27 @@
     //todo: remove duplicate spaces and other characters with http://stackoverflow.com/questions/4429995/how-do-you-remove-repeated-characters-in-a-string
     public Mute LongSpam() {
       var longMessages = _context.TakeLast(Settings.LongSpamContextLength).Where(x => x.Text.Length > Settings.LongSpamMinimumLength);
-      return (longMessages.Select(longMessage => Convert.ToInt32(StringTools.Delta(_unnormalized, longMessage.Text) * 100))
-        .Where(delta => delta > Settings.LongSpamSimilarity)
-        .Select(
-          delta =>
-            _message.Text.Length > Settings.LongSpamMinimumLength * Settings.LongSpamLongerBanMultiplier
-              ? new Mute(_message.Nick, TimeSpan.FromMinutes(10), "10m " + _message.Nick + ": " + delta + "% = past text")
-              : new Mute(_message.Nick, TimeSpan.FromMinutes(1), "1m " + _message.Nick + ": " + delta + "% = past text"))
-              ).FirstOrDefault();
+      foreach (var longMessage in longMessages) {
+        var delta = Convert.ToInt32(StringTools.Delta(_unnormalized, longMessage.Text) * 100);
+        if (delta > Settings.LongSpamSimilarity) {
+          if (_message.Text.Length > Settings.LongSpamMinimumLength * Settings.LongSpamLongerBanMultiplier) {
+            return new Mute(_message.Nick, TimeSpan.FromMinutes(10), "10m " + _message.Nick + ": " + delta + "% = past text");
+          }
+          return new Mute(_message.Nick, TimeSpan.FromMinutes(1), "1m " + _message.Nick + ": " + delta + "% = past text");
+        }
+      }
+      return null;
     }

     public Mute SelfSpam() {
       var shortMessages = _context.TakeLast(Settings.SelfSpamContextLength).Where(x => x.Nick == _message.Nick).ToList();
-      if (shortMessages.Count() < 2) return null;
-      var percentList = shortMessages.Select(sm => StringTools.Delta(sm.Text, _text)).Select(delta => Convert.ToInt32(delta * 100)).Where(x => x >= Settings.SelfSpamSimilarity).ToList();
-      return percentList.Count() >= 2
-        ? new Mute(_message.Nick, TimeSpan.FromMinutes(2), "2m " + _message.Nick + ": " + percentList.Average() + "% = your past text")
-        : null;
+      if (shortMessages.Count >= 2) {
+        var percentList = shortMessages.Select(sm => Convert.ToInt32(StringTools.Delta(sm.Text, _text) * 100)).Where(x => x >= Settings.SelfSpamSimilarity).ToList();
+        if (percentList.Count >= 2) {
+          return new Mute(_message.Nick, TimeSpan.FromMinutes(2), "2m " + _message.Nick + ": " + percentList.Average() + "% = your past text");
+        }
+      }
+      return null;
     }

     public Mute NumberSpam() {


- fix comment - remove unused import

- fix comment
- remove unused import

--- CL_DeviceController.cs
+++ CL_DeviceController.cs
@@ -6,7 +6,6 @@
 using System.Reflection;
 using CUE.NET;
 using CUE.NET.Brushes;
-using CUE.NET.Devices.Generic;
 using CUE.NET.Devices.Generic.Enums;
 using CUE.NET.Devices.Generic.EventArgs;
 using CUE.NET.Devices.Keyboard;
@@ -236,7 +235,7 @@

       for (int i = 0; i < bardata.Length; i++)
       {
-        // make sure that  min > bardata > max
+        // make sure that  min < bardata < max
         bardata[i] = Math.Min(Math.Max(bardata[i], _min), _max);
       }


Remove Size property

Remove Size property

--- CSGL.Vulkan/VkImage.cs
+++ CSGL.Vulkan/VkImage.cs
@@ -34,12 +34,6 @@
         public Unmanaged.VkMemoryRequirements Requirements {
             get {
                 return requirements;
-            }
-        }
-
-        public ulong Size {
-            get {
-                return requirements.size;
             }
         }


minor label highlighting bugfix

minor label highlighting bugfix

--- CSHARP/AsmDudeTools.cs
+++ CSHARP/AsmDudeTools.cs
@@ -70,9 +70,12 @@
         }

         public static bool isLabel(string token) {
-            return (token[token.Length - 1] == ':');
-        }
-
+            if (token.Length > 1) {
+                return (token[token.Length - 1] == ':');
+            } else {
+                return false;
+            }
+        }

         public static string getRelatedRegister(string reg) {
             switch (reg.ToUpper()) {


update

update

--- WorkFlowWinForms/InputDaysActivity.cs
+++ WorkFlowWinForms/InputDaysActivity.cs
@@ -41,6 +41,7 @@
             context.CreateBookmark(bookMarkName,new BookmarkCallback(CallBackFun));

             //int days = int.Parse(Console.ReadLine());
+
             //context.SetValue(outDays, days);
         }


업데이트 링크를 latest 릴리즈를 가리키도록 수정

업데이트 링크를 latest 릴리즈를 가리키도록 수정

--- App/MainForm.cs
+++ App/MainForm.cs
@@ -162,7 +162,7 @@

         private void linkLabel_NewUpdate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
         {
-            Process.Start(string.Format("https://github.com/{0}/releases", Global.GITHUB_REPO));
+            Process.Start(string.Format("https://github.com/{0}/releases/latest", Global.GITHUB_REPO));
         }

         private void button_SelectProcess_Click(object sender, EventArgs e)


One-time tokens don't allow any dictionary value.

--- XamarinStripe/StripeCreditCardInfo.cs
+++ XamarinStripe/StripeCreditCardInfo.cs
@@ -48,13 +48,13 @@
             if (is_number && ExpirationYear <= 0)
                 throw new ArgumentOutOfRangeException ("ExpirationYear");

-            if (is_number) {
-                sb.AppendFormat ("card[number]={0}&card[exp_month]={1}&card[exp_year]={2}&",
-                            HttpUtility.UrlEncode (Number), ExpirationMonth, ExpirationYear);
-            } else {
+            if (!is_number) {
                 // One-time token
                 sb.AppendFormat ("card={0}&", HttpUtility.UrlEncode (Number));
+                return;
             }
+            sb.AppendFormat ("card[number]={0}&card[exp_month]={1}&card[exp_year]={2}&",
+                            HttpUtility.UrlEncode (Number), ExpirationMonth, ExpirationYear);
             if (!String.IsNullOrEmpty (CVC))
                 sb.AppendFormat ("card[cvc]={0}&", HttpUtility.UrlEncode (CVC));
             if (!String.IsNullOrEmpty (FullName))


Make Brush's setter private

Make Brush's setter private

--- Yeena/UI/Controls/StashGridMarking.cs
+++ Yeena/UI/Controls/StashGridMarking.cs
@@ -18,7 +18,7 @@
 namespace Yeena.UI.Controls {
     class StashGridMarking {
         public PoEItem Item { get; private set; }
-        public Brush Brush { get; set; }
+        public Brush Brush { get; private set; }

         public StashGridMarking(PoEItem item) : this(item, Brushes.Green) {
         }


make webutilmore verbose on PUT for avatar updates. Reduce LargeTime debug level to 500ms from 3000ms

--- OpenSim/Framework/WebUtil.cs
+++ OpenSim/Framework/WebUtil.cs
@@ -81,7 +81,7 @@
         /// Number of milliseconds a call can take before it is considered
         /// a "long" call for warning & debugging purposes
         /// </summary>
-        public const int LongCallTime = 3000;
+        public const int LongCallTime = 500;

         /// <summary>
         /// The maximum length of any data logged because of a long request time.
@@ -208,6 +208,9 @@
             string errorMessage = "unknown error";
             int tickstart = Util.EnvironmentTickCount();
             int tickdata = 0;
+            int tickcompressdata = 0;
+            int tickJsondata = 0;
+            int compsize = 0;
             string strBuffer = null;

             try
@@ -224,6 +227,8 @@
                 if (data != null)
                 {
                     strBuffer = OSDParser.SerializeJsonString(data);
+
+                    tickJsondata = Util.EnvironmentTickCountSubtract(tickstart);

                     if (DebugLevel >= 5)
                         LogOutgoingDetail(strBuffer);
@@ -243,13 +248,19 @@
                                 // gets written on the strteam upon Dispose()
                             }
                             byte[] buf = ms.ToArray();
+
+                            tickcompressdata = Util.EnvironmentTickCountSubtract(tickstart);
+
                             request.ContentLength = buf.Length;   //Count bytes to send
+                            compsize = buf.Length;
                             using (Stream requestStream = request.GetRequestStream())
                                 requestStream.Write(buf, 0, (int)buf.Length);
                         }
                     }
                     else
                     {
+                        tickcompressdata = tickJsondata;
+                        compsize = buffer.Length;
                         request.ContentType = "application/json";
                         request.ContentLength = buffer.Length;   //Count bytes to send
                         using (Stream requestStream = request.GetRequestStream())
@@ -291,12 +302,16 @@
                 int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
                 if (tickdiff > LongCallTime)
                     m_log.InfoFormat(
-                        "[WEB UTIL]: Slow ServiceOSD request {0} {1} {2} took {3}ms, {4}ms writing, {5}",
+                        "[WEB UTIL]: Slow ServiceOSD request {0} {1} {2} took {3}ms, {4}ms writing({5} at Json; {6} at comp), {7} bytes ({8} uncomp): {9}",
                         reqnum,
                         method,
                         url,
                         tickdiff,
                         tickdata,
+                        tickJsondata,
+                        tickcompressdata,
+                        compsize,
+                        strBuffer != null ? strBuffer.Length : 0,
                         strBuffer != null
                             ? (strBuffer.Length > MaxRequestDiagLength ? strBuffer.Remove(MaxRequestDiagLength) : strBuffer)
                             : "");


[trunk] Fixing header

[trunk] Fixing header

--- Opus.Core/StringUtilities.cs
+++ Opus.Core/StringUtilities.cs
@@ -1,4 +1,4 @@
-// <copyright file="Array.cs" company="Mark Final">
+// <copyright file="StringUtilties.cs" company="Mark Final">
 //  Opus
 // </copyright>
 // <summary>Opus Core</summary>


[Core] Prevent lang file migration errors from holding up server

--- Oxide.Core/Libraries/Lang.cs
+++ Oxide.Core/Libraries/Lang.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using System.IO;
 using System.Linq;

@@ -296,15 +297,20 @@

             foreach (var file in files)
             {
-                var oldName = file.Substring(Interface.Oxide.LangDirectory.Length + 1);
-                var split = oldName.Split('.');
-                var newName = $"{split[0]}.json";
-                var path = Path.Combine(Interface.Oxide.LangDirectory, split[1]);
-
-                if (!Directory.Exists(path)) Directory.CreateDirectory(path);
-
-                if (!File.Exists(Path.Combine(path, newName))) File.Move(file, Path.Combine(path, newName));
-                else File.Delete(file);
+                var split = file.Substring(Interface.Oxide.LangDirectory.Length + 1).Split('.');
+                var newPath = Path.Combine(Interface.Oxide.LangDirectory, split[1]);
+                var newFile = Path.Combine(newPath, $"{split[0]}.json");
+
+                try
+                {
+                    Directory.CreateDirectory(newPath);
+                    if (!File.Exists(newFile)) File.Move(file, newFile);
+                    else File.Delete(file);
+                }
+                catch (Exception ex)
+                {
+                    Interface.Oxide.LogException("Migrating language files to the new structure failed", ex);
+                }
             }
         }
     }


Fix mixed whitespace.

Fix mixed whitespace.

--- tests/SideBySide.New/AppConfig.cs
+++ tests/SideBySide.New/AppConfig.cs
@@ -8,42 +8,43 @@

 namespace SideBySide
 {
-    public static class AppConfig
-    {
-	    private static IReadOnlyDictionary<string, string> DefaultConfig{get;} =
-		    new Dictionary<string, string>
-		    {
-			    ["Data:NoPasswordUser"] = "",
-			    ["Data:SupportsJson"] = "false",
-		    };
+	public static class AppConfig
+	{
+		private static IReadOnlyDictionary<string, string> DefaultConfig { get; } =
+			new Dictionary<string, string>
+			{
+				["Data:NoPasswordUser"] = "",
+				["Data:SupportsJson"] = "false",
+			};

-	    private static int _configFirst;
-	    private static IConfiguration ConfigBuilder { get; } = new ConfigurationBuilder()
-		    .SetBasePath(Path.GetFileName(Directory.GetCurrentDirectory()) == "SideBySide.New" ? Directory.GetCurrentDirectory() :
-		    	Path.Combine(Directory.GetCurrentDirectory(), "tests", "SideBySide.New"))
-	    	.AddInMemoryCollection(DefaultConfig)
-		    .AddJsonFile("config.json")
-		    .Build();
+		private static int _configFirst;

-	    public static IConfiguration Config
-	    {
-		    get
-		    {
-			    if (Interlocked.Exchange(ref _configFirst, 1) == 0)
-				    Console.WriteLine("Config Read");
-			    return ConfigBuilder;
-		    }
-	    }
+		private static IConfiguration ConfigBuilder { get; } = new ConfigurationBuilder()
+			.SetBasePath(Path.GetFileName(Directory.GetCurrentDirectory()) == "SideBySide.New" ? Directory.GetCurrentDirectory() :
+				Path.Combine(Directory.GetCurrentDirectory(), "tests", "SideBySide.New"))
+			.AddInMemoryCollection(DefaultConfig)
+			.AddJsonFile("config.json")
+			.Build();

-	    public static string ConnectionString => Config.GetValue<string>("Data:ConnectionString");
+		public static IConfiguration Config
+		{
+			get
+			{
+				if (Interlocked.Exchange(ref _configFirst, 1) == 0)
+					Console.WriteLine("Config Read");
+				return ConfigBuilder;
+			}
+		}

-	    public static string PasswordlessUser => Config.GetValue<string>("Data:PasswordlessUser");
+		public static string ConnectionString => Config.GetValue<string>("Data:ConnectionString");

-	    public static bool SupportsJson => Config.GetValue<bool>("Data:SupportsJson");
+		public static string PasswordlessUser => Config.GetValue<string>("Data:PasswordlessUser");

-	    public static MySqlConnectionStringBuilder CreateConnectionStringBuilder()
-	    {
-		    return new MySqlConnectionStringBuilder(ConnectionString);
-	    }
-    }
+		public static bool SupportsJson => Config.GetValue<bool>("Data:SupportsJson");
+
+		public static MySqlConnectionStringBuilder CreateConnectionStringBuilder()
+		{
+			return new MySqlConnectionStringBuilder(ConnectionString);
+		}
+	}
 }


Change version to 1.13

Change version to 1.13

--- AssemblyInfo.cs
+++ AssemblyInfo.cs
@@ -24,4 +24,4 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.11.0.*")]+[assembly: AssemblyVersion("1.13.0.*")]