BL-2316 Fix MRU List

BL-2316 Fix MRU List

* case of extension was wrong (s/b bloomCollection)
* the change to control.Tag near the end of the method
   avoids a "Possible unintended reference comparison"
   compiler message

--- src/BloomExe/CollectionChoosing/OpenCreateCloneControl.cs
+++ src/BloomExe/CollectionChoosing/OpenCreateCloneControl.cs
@@ -58,18 +58,18 @@
 			_templateButton.Parent.Controls.Remove(_templateButton);

 			const int maxMruItems = 3;
-			List<string> collectionsToShow = _mruList.Paths.Take(maxMruItems).ToList();
+			var collectionsToShow = _mruList.Paths.Take(maxMruItems).ToList();
 			if (collectionsToShow.Count() < maxMruItems && Directory.Exists(NewCollectionWizard.DefaultParentDirectoryForCollections))
 			{
 				collectionsToShow.AddRange(Directory.GetDirectories(NewCollectionWizard.DefaultParentDirectoryForCollections)
-					.Select(d => Path.Combine(d, Path.ChangeExtension(Path.GetFileName(d),"BloomCollection")))
+					.Select(d => Path.Combine(d, Path.ChangeExtension(Path.GetFileName(d),"bloomCollection")))
 					.Where(c => File.Exists(c) && !collectionsToShow.Contains(c))
 					.OrderBy(c => Directory.GetLastWriteTime(Path.GetDirectoryName(c)))
 					.Reverse()
 					.Take(maxMruItems - collectionsToShow.Count()));
 			}
-			int count = 0;
-			foreach (string path in collectionsToShow)
+			var count = 0;
+			foreach (var path in collectionsToShow)
 			{
 				AddFileChoice(path, count);
 				++count;
@@ -79,7 +79,7 @@

 			foreach (Control control in tableLayoutPanel2.Controls)
 			{
-				if (control.Tag == "sendreceive")
+				if (control.Tag != null && control.Tag.ToString() == "sendreceive")
 					control.Visible = Settings.Default.ShowSendReceive;
 			}
 		}


Enable C# command line tests on Mono

Enable C# command line tests on Mono

--- src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
+++ src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
@@ -102,7 +102,7 @@
             return CSharpCommandLineParser.Default.Parse(args, baseDirectory, sdkDirectory, additionalReferenceDirectories);
         }

-        [Fact]
+        [ConditionalFact(typeof(WindowsDesktopOnly), Reason = ConditionalSkipReason.TestExecutionNeedsWindowsTypes)]
         public void XmlMemoryMapped()
         {
             var dir = Temp.CreateDirectory();
@@ -121,8 +121,8 @@
             using (var mmf = MemoryMappedFile.CreateFromFile(fileStream, "xmlMap", 0, MemoryMappedFileAccess.Read, HandleInheritability.None, leaveOpen: true))
             {
                 exitCode = cmd.Run(outWriter);
+                Assert.StartsWith($"error CS0016: Could not write to output file '{xmlPath}' -- ", outWriter.ToString());
                 Assert.Equal(1, exitCode);
-                Assert.StartsWith($"error CS0016: Could not write to output file '{xmlPath}' -- ", outWriter.ToString());
             }
         }

@@ -5900,7 +5900,7 @@
             Assert.Equal(1, peHeaders.PEHeader.MinorSubsystemVersion);
         }

-        [Fact]
+        [ConditionalFact(typeof(WindowsOnly), Reason = "https://github.com/dotnet/roslyn/issues/30152")]
         public void CreateCompilationWithKeyFile()
         {
             string source = @"
@@ -9863,24 +9863,28 @@

         public class QuotedArgumentTests
         {
+            private static readonly string s_rootPath = ExecutionConditionUtil.IsWindows
+                ? @"c:\"
+                : "/";
+
             private void VerifyQuotedValid<T>(string name, string value, T expected, Func<CSharpCommandLineArguments, T> getValue)
             {
-                var args = DefaultParse(new[] { $"/{name}:{value}", "a.cs" }, @"c:\");
+                var args = DefaultParse(new[] { $"/{name}:{value}", "a.cs" }, s_rootPath);
                 Assert.Equal(0, args.Errors.Length);
                 Assert.Equal(expected, getValue(args));

-                args = DefaultParse(new[] { $@"/{name}:""{value}""", "a.cs" }, @"c:\");
+                args = DefaultParse(new[] { $@"/{name}:""{value}""", "a.cs" }, s_rootPath);
                 Assert.Equal(0, args.Errors.Length);
                 Assert.Equal(expected, getValue(args));
             }

             private void VerifyQuotedInvalid<T>(string name, string value, T expected, Func<CSharpCommandLineArguments, T> getValue)
             {
-                var args = DefaultParse(new[] { $"/{name}:{value}", "a.cs" }, @"c:\");
+                var args = DefaultParse(new[] { $"/{name}:{value}", "a.cs" }, s_rootPath);
                 Assert.Equal(0, args.Errors.Length);
                 Assert.Equal(expected, getValue(args));

-                args = DefaultParse(new[] { $@"/{name}:""{value}""", "a.cs" }, @"c:\");
+                args = DefaultParse(new[] { $@"/{name}:""{value}""", "a.cs" }, s_rootPath);
                 Assert.True(args.Errors.Length > 0);
             }


Enables dupfinder in build script

Enables dupfinder in build script

--- setup.cake
+++ setup.cake
@@ -9,7 +9,7 @@
                             repositoryOwner: "cake-contrib",
                             repositoryName: "Cake.Mage",
                             appVeyorAccountName: "cakecontrib",
-							shouldRunDupFinder: false,
+							shouldRunDupFinder: true,
 							shouldRunInspectCode: true);

 BuildParameters.PrintParameters(Context);
@@ -17,6 +17,11 @@
 ToolSettings.SetToolSettings(context: Context,
                             dupFinderExcludePattern: new string[] {
                                 BuildParameters.RootDirectoryPath + "/src/Cake.Mage.Tests/*.cs" },
+                            dupFinderExcludePattern: new []
+                            {
+                                BuildParameters.RootDirectoryPath + "/src/Cake.Mage/obj/**/*.*",
+                                BuildParameters.RootDirectoryPath + "/src/Cake.Mage.Tests/**/*.cs",
+                            },
                             testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* ",
                             testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
                             testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");


Fix build break introduces in 1717625. (changeset 1404211)

--- src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
+++ src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
@@ -3590,7 +3590,7 @@
         public void Bug15538()
         {
             // Several Jenkins VMs are still running with local systems permissions.  This suite won't run properly
-            // in that environment.  Removing this check is being tracked by issue #79.
+            // in that environment.  Removing this check is being tracked by issue #79.
             using (var identity = System.Security.Principal.WindowsIdentity.GetCurrent())
             {
                 if (identity.IsSystem)


Restored MyGet feed for Cake.Recipe.

Restored MyGet feed for Cake.Recipe.

--- setup.cake
+++ setup.cake
@@ -1,4 +1,4 @@
-#load nuget:https://ci.appveyor.com/nuget/cake-recipe?package=Cake.Recipe&prerelease
+#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease

 Environment.SetVariableNames();


Temporarily disable some new logic for binding redirects because it causes bad remoting errors.

--- src/Gallio/Gallio/Runner/Drivers/MultiDomainTestDriver.cs
+++ src/Gallio/Gallio/Runner/Drivers/MultiDomainTestDriver.cs
@@ -86,8 +86,9 @@
                 if (File.Exists(assemblyConfigFile))
                     testDomain.TestPackageConfig.HostSetup.Configuration.ConfigurationXml = File.ReadAllText(assemblyConfigFile);

-                foreach (KeyValuePair<string, AssemblyName> pair in runtime.GetPluginAssemblyPaths())
-                    testDomain.TestPackageConfig.HostSetup.Configuration.AddAssemblyBinding(pair.Value, pair.Key, true);
+                //FIXME: Causes weird runtime errors with type identity mismatches.
+                //foreach (KeyValuePair<string, AssemblyName> pair in runtime.GetPluginAssemblyPaths())
+                    //testDomain.TestPackageConfig.HostSetup.Configuration.AddAssemblyBinding(pair.Value, pair.Key, true);

                 foreach (ITestFramework framework in frameworks)
                     framework.ConfigureTestDomain(testDomain);
@@ -106,7 +107,7 @@
             foreach (TestDomainSetup testDomain in testDomains.Values)
             {
                 ILogger logger = new RemoteLogger(Logger);
-                ITestDriver testDriver = remote.CreateRemoteTestDriver(testDomain, logger, runtime.GetRuntimeSetup().RuntimePath);
+                ITestDriver testDriver = remote.CreateRemoteTestDriver(testDomain, logger);
                 testDriver.Initialize(RuntimeSetup, logger);

                 yield return new Partition(new ProxyTestDriver(testDriver), testDomain.TestPackageConfig);
@@ -126,11 +127,10 @@

         private class Remote : LongLivedMarshalByRefObject
         {
-            public ITestDriver CreateRemoteTestDriver(TestDomainSetup setup, ILogger logger, string runtimePath)
+            public ITestDriver CreateRemoteTestDriver(TestDomainSetup setup, ILogger logger)
             {
                 IHostFactory hostFactory = new IsolatedAppDomainHostFactory();
                 IHost host = hostFactory.CreateHost(setup.TestPackageConfig.HostSetup, logger);
-                HostAssemblyResolverHook.Bootstrap(host, runtimePath);

                 ITestDriver remoteTestDriver = HostUtils.CreateInstance<LocalTestDriver>(host);
                 ProxyTestDriver proxyTestDriver = new ProxyTestDriver(remoteTestDriver);


* ConfigurationProvider.cs reverted back rules formatting for MigrateBranches

Will be eventually corrupted back after applying Resharper's clean code.
Will need to do smth with it.

--- src/GitVersionCore/Configuration/ConfigurationProvider.cs
+++ src/GitVersionCore/Configuration/ConfigurationProvider.cs
@@ -103,27 +103,10 @@
             // Map of current names and previous names
             var dict = new Dictionary<string, string[]>
             {
-                {"hotfix(es)?[/-]", new[]
-                    {
-                        "hotfix[/-]"
-                    }
-                },
-                {"features?[/-]", new[]
-                    {
-                        "feature[/-]",
-                        "feature(s)?[/-]"
-                    }
-                },
-                {"releases?[/-]", new[]
-                    {
-                        "release[/-]"
-                    }
-                },
-                {"dev(elop)?(ment)?$", new[]
-                    {
-                        "develop"
-                    }
-                }
+                {"hotfix(es)?[/-]", new[] { "hotfix[/-]" }},
+                {"features?[/-]", new[] { "feature[/-]", "feature(s)?[/-]" }},
+                {"releases?[/-]", new[] { "release[/-]" }},
+                {"dev(elop)?(ment)?$", new[] { "develop" }}
             };

             foreach (var mapping in dict)
@@ -141,7 +124,6 @@
             }
         }

-
         static BranchConfig GetOrCreateBranchDefaults(Config config, string branch)
         {
             if (!config.Branches.ContainsKey(branch))


Update IgnoreOnOsVersionUnderFactAttribute.cs

--- src/Kernel32.Tests/IgnoreOnOsVersionUnderFactAttribute.cs
+++ src/Kernel32.Tests/IgnoreOnOsVersionUnderFactAttribute.cs
@@ -5,8 +5,8 @@
 using Xunit;

 /// <summary>
-///     A variant of XUnit <see cref="FactAttribute" /> that is automatically skiped when the OS version is under a
-///     specific treshold.
+///     A variant of XUnit <see cref="FactAttribute" /> that is automatically skipped when the OS version is under a
+///     specific threshold.
 /// </summary>
 internal class IgnoreOnOsVersionUnderFactAttribute : FactAttribute
 {
@@ -38,4 +38,4 @@
             base.Skip = value;
         }
     }
-}+}


Eliminated hiding of the VERBOSE setting in Core.Search.TestPositionIncrement (unreachable code warning)

--- src/Lucene.Net.Tests/core/Search/TestPositionIncrement.cs
+++ src/Lucene.Net.Tests/core/Search/TestPositionIncrement.cs
@@ -53,7 +53,8 @@
     [TestFixture]
     public class TestPositionIncrement : LuceneTestCase
     {
-        internal const bool VERBOSE = false;
+        // LUCENENET: This existed in Lucene, but do we really want to override the global setting?
+        //internal const bool VERBOSE = false;

         [Test]
         public virtual void TestSetPosition()


Changed source trigger to password helper to propertychanged

--- src/MaterialForms/AttachedProperties/PasswordBoxHelper.cs
+++ src/MaterialForms/AttachedProperties/PasswordBoxHelper.cs
@@ -31,7 +31,7 @@
                 new FrameworkPropertyMetadata(Guid.NewGuid().ToString(), HandleBoundPasswordChanged)
                 {
                     BindsTwoWayByDefault = true,
-                    DefaultUpdateSourceTrigger = UpdateSourceTrigger.LostFocus // Match the default on Binding
+                    DefaultUpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged // Match the default on Binding
                 });

         private static void HandleBoundPasswordChanged(DependencyObject dp, DependencyPropertyChangedEventArgs e)


Add issue link

Add issue link

--- src/Microsoft.Azure.WebJobs.Logging/Internal/LogWriter.cs
+++ src/Microsoft.Azure.WebJobs.Logging/Internal/LogWriter.cs
@@ -250,6 +250,7 @@
                     }
                 }

+                // https://github.com/Azure/azure-webjobs-sdk/issues/1761
                 // Just making a note while I'm in this code fixing something else.
                 // It looks like this will drop data if there is any type of error when communicating with storage.
                 // Other code paths drop the data after successfully writing to storage


Fix missing month on mobile view for long weekends

--- src/Nager.Date.Website/Views/PublicHoliday/Country.cshtml
+++ src/Nager.Date.Website/Views/PublicHoliday/Country.cshtml
@@ -101,7 +101,7 @@

                                     {{ onlyDayName(day) }}
                                     {{ onlyDayNumber(day) }}

-                                    {{ day | onlyMonthName }}
+                                    {{ onlyMonthName(day) }}

                                 {{ monthNameWithDay(longWeekend.endDate) }}


Additional tests for user supplied converters/deserializer precedence

--- src/Nancy.Tests/Unit/ModelBinding/DefaultBinderFixture.cs
+++ src/Nancy.Tests/Unit/ModelBinding/DefaultBinderFixture.cs
@@ -229,6 +229,48 @@
                 .MustHaveHappened(Repeated.Exactly.Once);
         }

+        [Fact]
+        public void User_body_serializer_should_take_precedence_over_default_one()
+        {
+            var userDeserializer = A.Fake<IBodyDeserializer>();
+            A.CallTo(() => userDeserializer.CanDeserialize(null)).WithAnyArguments().Returns(true);
+            var defaultDeserializer = A.Fake<IBodyDeserializer>();
+            A.CallTo(() => defaultDeserializer.CanDeserialize(null)).WithAnyArguments().Returns(true);
+            A.CallTo(() => this.emptyDefaults.DefaultBodyDeserializers).Returns(new[] { defaultDeserializer });
+            var binder = this.GetBinder(bodyDeserializers: new[] { userDeserializer });
+            var context = new NancyContext { Request = new FakeRequest("GET", "/") };
+            context.Request.Headers.Add("Content-Type", new[] { "application/xml" });
+
+            binder.Bind(context, this.GetType());
+
+            A.CallTo(() => userDeserializer.Deserialize(null, null, null, null)).WithAnyArguments()
+                .MustHaveHappened(Repeated.Exactly.Once);
+            A.CallTo(() => defaultDeserializer.Deserialize(null, null, null, null)).WithAnyArguments()
+                .MustNotHaveHappened();
+        }
+
+        [Fact]
+        public void User_type_converter_should_take_precedence_over_default_one()
+        {
+            var userTypeConverter = A.Fake<ITypeConverter>();
+            A.CallTo(() => userTypeConverter.CanConvertTo(typeof(string))).WithAnyArguments().Returns(true);
+            A.CallTo(() => userTypeConverter.Convert(null, null, null)).WithAnyArguments().Returns(null);
+            var defaultTypeConverter = A.Fake<ITypeConverter>();
+            A.CallTo(() => defaultTypeConverter.CanConvertTo(typeof(string))).WithAnyArguments().Returns(true);
+            A.CallTo(() => defaultTypeConverter.Convert(null, null, null)).WithAnyArguments().Returns(null);
+            A.CallTo(() => this.emptyDefaults.DefaultTypeConverters).Returns(new[] { defaultTypeConverter });
+            var binder = this.GetBinder(typeConverters: new[] { userTypeConverter });
+            var context = new NancyContext { Request = new FakeRequest("GET", "/") };
+            context.Request.Form["StringProperty"] = "Test";
+
+            binder.Bind(context, typeof(TestModel));
+
+            A.CallTo(() => userTypeConverter.Convert(null, null, null)).WithAnyArguments()
+                .MustHaveHappened(Repeated.Exactly.Once);
+            A.CallTo(() => defaultTypeConverter.Convert(null, null, null)).WithAnyArguments()
+                .MustNotHaveHappened();
+        }
+
         private IBinder GetBinder(IEnumerable<ITypeConverter> typeConverters = null, IEnumerable<IBodyDeserializer> bodyDeserializers = null, IFieldNameConverter nameConverter = null, BindingDefaults bindingDefaults = null)
         {
             var converters = typeConverters ?? new ITypeConverter[] { };


fix code style issue

fix code style issue

--- src/Remote.Linq/ExpressionVisitors/ExpressionEvaluator.cs
+++ src/Remote.Linq/ExpressionVisitors/ExpressionEvaluator.cs
@@ -92,6 +92,9 @@
                 case ExpressionType.Quote:
                 case ExpressionType.Throw:
                     return false;
+
+                default:
+                    break;
             }

             return true;


Forced enum values

Forced enum values

--- src/SimpleSoft.IniParser/Impl/IniNormalizationSortType.cs
+++ src/SimpleSoft.IniParser/Impl/IniNormalizationSortType.cs
@@ -31,14 +31,14 @@
         /// <summary>
         /// Undefined order
         /// </summary>
-        None,
+        None = 0,
         /// <summary>
         /// Ascending order
         /// </summary>
-        Ascending,
+        Ascending = 1,
         /// <summary>
         /// Descending order
         /// </summary>
-        Descending
+        Descending = 2
     }
 }


Modify DbColumn based on API review

Modify DbColumn based on API review

--- src/System.Data.Common/src/System/Data/Common/DbColumn.cs
+++ src/System.Data.Common/src/System/Data/Common/DbColumn.cs
@@ -8,29 +8,29 @@
 {
     public class DbColumn
     {
-        public virtual bool AllowDBNull { get; set; }
-        public virtual string BaseCatalogName { get; set; }
-        public virtual string BaseColumnName { get; set; }
-        public virtual string BaseSchemaName { get; set; }
-        public virtual string BaseServerName { get; set; }
-        public virtual string BaseTableName { get; set; }
-        public virtual string ColumnName { get; set; }
-        public virtual int ColumnOrdinal { get; set; }
-        public virtual int ColumnSize { get; set; }
-        public virtual bool IsAliased { get; set; }
-        public virtual bool IsAutoIncrement { get; set; }
-        public virtual bool IsExpression { get; set; }
-        public virtual bool IsHidden { get; set; }
-        public virtual bool IsIdentity { get; set; }
-        public virtual bool IsKey { get; set; }
-        public virtual bool IsLong { get; set; }
-        public virtual bool IsReadOnly { get; set; }
-        public virtual bool IsUnique { get; set; }
-        public virtual int NumericPrecision { get; set; }
-        public virtual int NumericScale { get; set; }
-        public virtual string UdtAssemblyQualifiedName { get; set; }
-        public virtual Type DataType { get; set; }
-        public virtual string DataTypeName { get; set; }
+        public bool AllowDBNull { get; protected set; }
+        public string BaseCatalogName { get; protected set; }
+        public string BaseColumnName { get; protected set; }
+        public string BaseSchemaName { get; protected set; }
+        public string BaseServerName { get; protected set; }
+        public string BaseTableName { get; protected set; }
+        public string ColumnName { get; protected set; }
+        public int ColumnOrdinal { get; protected set; }
+        public int ColumnSize { get; protected set; }
+        public bool IsAliased { get; protected set; }
+        public bool IsAutoIncrement { get; protected set; }
+        public bool IsExpression { get; protected set; }
+        public bool IsHidden { get; protected set; }
+        public bool IsIdentity { get; protected set; }
+        public bool IsKey { get; protected set; }
+        public bool IsLong { get; protected set; }
+        public bool IsReadOnly { get; protected set; }
+        public bool IsUnique { get; protected set; }
+        public int NumericPrecision { get; protected set; }
+        public int NumericScale { get; protected set; }
+        public string UdtAssemblyQualifiedName { get; protected set; }
+        public Type DataType { get; protected set; }
+        public string DataTypeName { get; protected set; }
         public virtual object this[string property]
         {
             get


Disable TestCheckChildProcessUserAndGroupIds test (#35949)

Sporadically failing in CI

--- src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs
+++ src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs
@@ -523,6 +523,7 @@
         }

         [Fact]
+        [ActiveIssue(35933, TestPlatforms.AnyUnix)]
         public unsafe void TestCheckChildProcessUserAndGroupIds()
         {
             string userName = GetCurrentRealUserName();


Increase Ping test timeout.

Increase Ping test timeout.

These tests intermittently fail when they hit the timeout limit of 1s. I'm increasing it to 10s to get some more stability.

--- src/System.Net.Ping/tests/FunctionalTests/TestSettings.cs
+++ src/System.Net.Ping/tests/FunctionalTests/TestSettings.cs
@@ -11,7 +11,7 @@
     internal static class TestSettings
     {
         public static readonly string LocalHost = "localhost";
-        public const int PingTimeout = 1000;
+        public const int PingTimeout = 10 * 1000;

         public const string PayloadAsString = "'Post hoc ergo propter hoc'. 'After it, therefore because of it'. It means one thing follows the other, therefore it was caused by the other. But it's not always true. In fact it's hardly ever true.";
         public static readonly byte[] PayloadAsBytes = Encoding.UTF8.GetBytes(TestSettings.PayloadAsString);


Fix some warnings/problems in class

Fix some warnings/problems in class

--- DataAccess/Application.DataAccess/Repositories/GlobalRepository.cs
+++ DataAccess/Application.DataAccess/Repositories/GlobalRepository.cs
@@ -14,8 +14,6 @@
     using System.Threading.Tasks;
     using Application.DataAccess.Entities;
     using Application.DataAccess.Enums;
-    using Application.DataAccess.Helpers;
-    using Application.DataAccess.Models;
     using Microsoft.AspNetCore.Identity;
     using Microsoft.EntityFrameworkCore;
     using Microsoft.EntityFrameworkCore.Storage;
@@ -23,8 +21,6 @@
     public class GlobalRepository : IGlobalRepository
     {
         private readonly DataContext context;
-
-        private readonly UserManager<ApplicationUser> userManager;

         /// <summary>
         /// Initializes a new instance of the <see cref="GlobalRepository"/> class.
@@ -34,7 +30,6 @@
         public GlobalRepository(DataContext context, UserManager<ApplicationUser> userManager)
         {
             this.context = context;
-            this.userManager = userManager;
         }

         #region Transactions
@@ -61,9 +56,9 @@
         {
             entity = entity ?? throw new ArgumentNullException(nameof(entity));

-            this.context.Add<T>(entity);
-
-            int savedRecords = await this.context.SaveChangesAsync();
+            this.context.Add(entity);
+
+            await this.context.SaveChangesAsync();

             return entity;
         }
@@ -73,18 +68,18 @@
         {
             entity = entity ?? throw new ArgumentNullException(nameof(entity));

-            var entry = this.context.Entry(entity);
-
-            this.context.Update<T>(entity);
+            this.context.Entry(entity);
+
+            this.context.Update(entity);
             try
             {
-                int savedRecords = await this.context.SaveChangesAsync();
+                await this.context.SaveChangesAsync();

                 return entity;
             }
             catch (DbUpdateConcurrencyException ex)
             {
-                ex.Entries[0].Reload();
+                await ex.Entries[0].ReloadAsync();
                 throw;
             }
         }
@@ -135,7 +130,7 @@

             DbSet<TEntity> entity = this.context.Set<TEntity>();

-            return await this.ItemList<TEntity>(entity, skip, take, active, propertyInfo, sortOrder);
+            return await this.ItemList(entity, skip, take, active, propertyInfo, sortOrder);
         }

         #region Blog
@@ -158,102 +153,79 @@

         public async Task<Blog> AddBlogAsync(Blog blog)
         {
-            using (IDbContextTransaction dbContextTransaction = await this.BeginTransactionAsync())
-            {
-                try
+            await using IDbContextTransaction dbContextTransaction = await this.BeginTransactionAsync();
+            try
+            {
+                blog.BlogId ??= Guid.NewGuid().ToString();
+
+                this.context.Blogs.Add(blog);
+
+                await this.context.SaveChangesAsync();
+
+                await dbContextTransaction.CommitAsync();
+
+                return blog;
+            }
+            catch
+            {
+                await dbContextTransaction.RollbackAsync();
+
+                throw;
+            }
+        }
+
+        public async Task<Blog> UpdateBlogAsync(string blogId, string title, string content, string userId)
+        {
+            Blog blog = await this.context.Blogs.FirstOrDefaultAsync(bl => bl.IsActive.Value && bl.BlogId.Equals(blogId));
+
+            if (!Equals(blog, null))
+            {
+                if (!blog.UserId.Equals(userId))
                 {
-                    blog.BlogId = blog.BlogId == null ? Guid.NewGuid().ToString() : blog.BlogId;
-
-                    this.context.Blogs.Add(blog);
-
-                    await this.context.SaveChangesAsync();
-
-                    dbContextTransaction.Commit();
-
-                    return blog;
+                    throw new Exception("You can update only own blogs!");
                 }
-                catch (Exception ex)
+
+                blog.Title = title;
+                blog.Content = content;
+            }
+            else
+            {
+                throw new Exception($"Blog with id {blogId} not found.");
+            }
+
+            await this.context.SaveChangesAsync();
+
+            return blog;
+        }
+
+        public async Task<bool> DeleteBlogAsync(string blogId, string userId)
+        {
+            Blog deleteBlog = await this.context.Blogs.FirstOrDefaultAsync(a => a.IsActive.Value && a.BlogId.Equals(blogId));
+
+            if (!Equals(deleteBlog, null))
+            {
+                if (!deleteBlog.UserId.Equals(userId))
                 {
-                    dbContextTransaction.Rollback();
-
-                    throw ex;
+                    throw new Exception("You can remove only own blogs!");
                 }
-            }
-        }
-
-        public async Task<Blog> UpdateBlogAsync(string blogId, string title, string content, string userId)
-        {
-            try
-            {
-                Blog blog = await this.context.Blogs.FirstOrDefaultAsync(bl => bl.IsActive.Value && bl.BlogId.Equals(blogId));
-
-                if (!Equals(blog, null))
-                {
-                    if (!blog.UserId.Equals(userId))
-                    {
-                        throw new Exception("You can update only own blogs!");
-                    }
-
-                    blog.Title = title;
-                    blog.Content = content;
-                }
-                else
-                {
-                    throw new Exception($"Blog with id {blogId} not found.");
-                }
-
-                await this.context.SaveChangesAsync();
-
-                return blog;
-            }
-            catch (Exception ex)
-            {
-                throw ex;
-            }
-        }
-
-        public async Task<bool> DeleteBlogAsync(string blogId, string userId)
-        {
-            try
-            {
-                Blog deleteBlog = await this.context.Blogs.FirstOrDefaultAsync(a => a.IsActive.Value && a.BlogId.Equals(blogId));
-
-                if (!Equals(deleteBlog, null))
-                {
-                    if (!deleteBlog.UserId.Equals(userId))
-                    {
-                        throw new Exception("You can remove only own blogs!");
-                    }
-
-                    this.context.Blogs.Remove(deleteBlog);
-                }
-                else
-                {
-                    throw new Exception($"Blog with id {blogId} not found.");
-                }
-
-                return await this.context.SaveChangesAsync() > 0;
-            }
-            catch (Exception ex)
-            {
-                throw ex;
-            }
+
+                this.context.Blogs.Remove(deleteBlog);
+            }
+            else
+            {
+                throw new Exception($"Blog with id {blogId} not found.");
+            }
+
+            return await this.context.SaveChangesAsync() > 0;
         }

         public async Task<bool> SaveBlogFileAsync(string userId, string fileBlobName, string title)
         {
-            try
-            {
-                FileStorage blogFile = new FileStorage { FileId = fileBlobName, UserId = userId, Title = title ?? string.Empty };
-
-                this.context.FileStorages.Add(blogFile);
-
-                return await this.context.SaveChangesAsync() > 0;
-            }
-            catch
-            {
-                throw;
-            }
+            FileStorage blogFile = new FileStorage { FileId = fileBlobName, UserId = userId, Title = title ?? string.Empty };
+
+            this.context.FileStorages.Add(blogFile);
+
+            return await this.context.SaveChangesAsync() > 0;
         }

         public async Task<FileStorage> GetBlogFileAsync(string fileBlobName)
@@ -269,23 +241,16 @@
         [SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1009:ClosingParenthesisMustBeSpacedCorrectly", Justification = "ValueTuple.")]
         public async Task<(List<FileStorage>, int)> GetFileStoragesAsync(string userId, int index, int count)
         {
-            try
-            {
-                var filesQuery = this.context.FileStorages.Where(x => x.UserId == userId);
-                int totalAmount = await filesQuery.CountAsync();
-
-                List<FileStorage> fileStorage = await filesQuery
-                    .OrderByDescending(a => a.CreatedDate)
-                    .Skip(index)
-                    .Take(count)
-                    .ToListAsync();
-
-                return (fileStorage, totalAmount);
-            }
-            catch
-            {
-                throw;
-            }
+            var filesQuery = this.context.FileStorages.Where(x => x.UserId == userId);
+            int totalAmount = await filesQuery.CountAsync();
+
+            List<FileStorage> fileStorage = await filesQuery
+                .OrderByDescending(a => a.CreatedDate)
+                .Skip(index)
+                .Take(count)
+                .ToListAsync();
+
+            return (fileStorage, totalAmount);
         }

         public async Task<bool> DeleteBlogFileAsync(string fileBlobName, string userId)
@@ -366,14 +331,5 @@

             return selector;
         }
-
-        private int SkipSize(int page, int elementsAmount)
-        {
-            double toSkip = (page - 1) * elementsAmount;
-
-            toSkip = toSkip < 0 ? 0 : toSkip;
-
-            return (int)toSkip;
-        }
     }
 }


IndexManager.RebuildIndices() uses new index Add method GRAPHDB-347

--- GraphDB/Implementations/SonesGraphDB/Manager/Index/IndexManager.cs
+++ GraphDB/Implementations/SonesGraphDB/Manager/Index/IndexManager.cs
@@ -399,11 +399,7 @@
                     {
                         foreach (var index in indexGroup.Value)
                         {
-                            var key = CreateIndexKey(indexGroup.Key, vertex);
-                            if (key != null)
-                            {
-                                index.Add(key, vertex.VertexID);
-                            }
+                            index.Add(vertex);
                         }
                     }
                 }


Added method to arrange notes in order of last date changed, Fixed the dock menu when 0 notes present

--- tomboy/AppDelegate.cs
+++ tomboy/AppDelegate.cs
@@ -118,7 +118,7 @@
 		public override void FinishedLaunching (NSObject notification)
 		{
 			//moving from nibFinishedLoading may address a few issues with crashes.
-			//BuildDockMenuNotes ();
+			BuildDockMenuNotes ();

 			if (controller == null)
 				controller = new NotesWindowController();
@@ -136,24 +136,54 @@
 		/// </summary>
 		void BuildDockMenuNotes ()
 		{
-			if (dockMenu == null)
+			if (dockMenu == null || Notes.Count == 0)
 				return;

-			dockMenu.RemoveAllItems ();
+			//dockMenu.RemoveAllItems ();

 			if (Notes != null || Notes.Count > 0) {
 				if (Notes.Count < _maxNotesInMenu)
 					_maxNotesInMenu = Notes.Count;
-				for (int i = 0; i < _maxNotesInMenu; i++) {
+				/*for (int i = 0; i < _maxNotesInMenu; i++) {
 					var item = new NSMenuItem ();
 					var key_at = Notes.Keys.ElementAt (i);
 					item.Title = Notes[key_at].Title;
 					item.Activated += HandleActivated;
 					dockMenu.AddItem (item);
+				}*/
+				ArrangeDateWise();
+			}
+		}
+
+		void ArrangeDateWise(){
+			if (Notes != null || Notes.Count > 0)
+			{
+				int count = Notes.Count;
+				Dictionary<DateTime,Note> dateDict = new Dictionary<DateTime, Note>();
+
+				for (int i = 0; i < count; i++)
+				{
+					Note temp = Notes.Values.ElementAt(i);
+					dateDict.Add(temp.ChangeDate, temp);
 				}
-			}
-		}
-
+
+				var dateList = dateDict.Keys.ToList();
+				dateList.Sort();
+
+				if (Notes.Count < _maxNotesInMenu)
+					_maxNotesInMenu = Notes.Count;
+				for (int i = 0; i < _maxNotesInMenu; i++)
+				{
+					var item = new NSMenuItem();
+					DateTime date = dateList.ElementAt(_maxNotesInMenu - i - 1);
+					item.Title = dateDict[date].Title;
+					item.Activated += HandleActivated;
+					dockMenu.AddItem(item);
+				}
+
+			}
+
+		}
 		void HandleActivated (object sender, EventArgs e)
 		{
 			NSMenuItem item = (NSMenuItem)sender;
@@ -273,6 +303,8 @@
 		#region private methods
 		private void LoadDashboardWindow ()
 		{
+			BuildDockMenuNotes();
+
 			if (controller == null)
 				controller = new NotesWindowController ();
 			controller.Window.MakeKeyAndOrderFront (this);


WorkScheduler refactorings

WorkScheduler refactorings

--- source/FFImageLoading.Common/Work/WorkScheduler.cs
+++ source/FFImageLoading.Common/Work/WorkScheduler.cs
@@ -202,9 +202,9 @@
         private PendingTask FindSimilarPendingTask(IImageLoaderTask task)
         {
             // At first check if the exact same items exists in pending tasks (exact same means same transformations, same downsample, ...)
-            // Since it will be exactly the same it can be retrieved from memory cache
+            // Since it will be exactly the same it can be retrieved from memory cache
+
             string key = task.GetKey(raw: false);
-
             var alreadyRunningTaskForSameKey = _pendingTasks.FirstOrDefault(t => t.ImageLoadingTask.GetKey(raw: false) == key);

             //TODO BUG / DISABLED as it always resultt with "Similar request finished but the image is not in the cache"


cleanup code

cleanup code

--- source/GameOverlay/Drawing/Imaging/ImageDecoder.cs
+++ source/GameOverlay/Drawing/Imaging/ImageDecoder.cs
@@ -1,19 +1,38 @@
 using System;
 using System.Collections.Generic;

+using SharpDX.Direct2D1;
 using SharpDX.WIC;
-using SharpDX.Direct2D1;

 using Bitmap = SharpDX.Direct2D1.Bitmap;
 using PixelFormat = SharpDX.WIC.PixelFormat;

 namespace GameOverlay.Drawing.Imaging
 {
-    internal static class ImageDecoder
-    {
-        // PixelFormat sorted in a best compatibility and best color accuracy order
-        private static readonly Guid[] _standardPixelFormats = new Guid[]
-        {
+	internal static class ImageDecoder
+	{
+		private static readonly Guid[] _floatingPointFormats = new Guid[]
+		{
+			PixelFormat.Format128bppRGBAFloat,
+			PixelFormat.Format128bppRGBAFixedPoint,
+			PixelFormat.Format128bppPRGBAFloat,
+			PixelFormat.Format128bppRGBFloat,
+			PixelFormat.Format128bppRGBFixedPoint,
+			PixelFormat.Format96bppRGBFixedPoint,
+			PixelFormat.Format96bppRGBFloat,
+			PixelFormat.Format64bppBGRAFixedPoint,
+			PixelFormat.Format64bppRGBAFixedPoint,
+			PixelFormat.Format64bppRGBFixedPoint,
+			PixelFormat.Format48bppRGBFixedPoint,
+			PixelFormat.Format48bppBGRFixedPoint,
+			PixelFormat.Format32bppGrayFixedPoint,
+			PixelFormat.Format32bppGrayFloat,
+			PixelFormat.Format16bppGrayFixedPoint
+		};
+
+		// PixelFormat sorted in a best compatibility and best color accuracy order
+		private static readonly Guid[] _standardPixelFormats = new Guid[]
+		{
 			PixelFormat.Format144bpp8ChannelsAlpha,
 			PixelFormat.Format128bpp8Channels,
 			PixelFormat.Format128bpp7ChannelsAlpha,
@@ -82,25 +101,6 @@
 			PixelFormat.Format8bppGray
 		};

-		private static readonly Guid[] _floatingPointFormats = new Guid[]
-		{
-			PixelFormat.Format128bppRGBAFloat,
-			PixelFormat.Format128bppRGBAFixedPoint,
-			PixelFormat.Format128bppPRGBAFloat,
-			PixelFormat.Format128bppRGBFloat,
-			PixelFormat.Format128bppRGBFixedPoint,
-			PixelFormat.Format96bppRGBFixedPoint,
-			PixelFormat.Format96bppRGBFloat,
-			PixelFormat.Format64bppBGRAFixedPoint,
-			PixelFormat.Format64bppRGBAFixedPoint,
-			PixelFormat.Format64bppRGBFixedPoint,
-			PixelFormat.Format48bppRGBFixedPoint,
-			PixelFormat.Format48bppBGRFixedPoint,
-			PixelFormat.Format32bppGrayFixedPoint,
-			PixelFormat.Format32bppGrayFloat,
-			PixelFormat.Format16bppGrayFixedPoint
-		};
-
 		private static readonly Guid[] _uncommonFormats = new Guid[]
 		{
 			PixelFormat.Format4bppIndexed,
@@ -133,6 +133,17 @@
 			}
 		}

+		private static void TryCatch(Action action)
+		{
+			if (action == null) throw new ArgumentNullException(nameof(action));
+
+			try
+			{
+				action();
+			}
+			catch { }
+		}
+
 		public static Bitmap Decode(RenderTarget device, BitmapDecoder decoder)
 		{
 			var frame = decoder.GetFrame(0);
@@ -163,16 +174,5 @@

 			throw new Exception("Unsupported Image Format!");
 		}
-
-		private static void TryCatch(Action action)
-		{
-			if (action == null) throw new ArgumentNullException(nameof(action));
-
-			try
-			{
-				action();
-			}
-			catch { }
-		}
 	}
 }


made ToolProvider public

made ToolProvider public

--- tools/ToolProvider.cs
+++ tools/ToolProvider.cs
@@ -7,7 +7,7 @@

 namespace de.fhb.oll.mediacategorizer.tools
 {
-    class ToolProvider
+    public class ToolProvider
     {
         private readonly Setup applicationSetup;


Use a design-time selector

Use a design-time selector

--- NET/Demos/UWP/TreehopperShowcase/ViewModels/AnalogReadViewModel.cs
+++ NET/Demos/UWP/TreehopperShowcase/ViewModels/AnalogReadViewModel.cs
@@ -7,6 +7,7 @@
 using Treehopper;
 using Treehopper.Mvvm.Messages;
 using System.Diagnostics;
+using Treehopper.Mvvm.ViewModel;

 namespace TreehopperShowcase.ViewModels
 {
@@ -14,15 +15,21 @@
     {
         public TreehopperUsb Board { get; set; }

+        public ISelectorViewModel Selector { get; set; }
         public AnalogReadViewModel()
         {
             if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
             {
+                Selector = new SelectorDesignTimeViewModel();
                 Board = DesignTimeConnectionService.Instance.Boards[0];
                 Board.CreateAnalogDemoData();
                 RaisePropertyChanged("Board");
+            } else
+            {
+                Selector = new SelectorViewModel();
             }
-                Messenger.Default.Register<BoardConnectedMessage>(this,
+
+            Messenger.Default.Register<BoardConnectedMessage>(this,
             (msg) =>
             {
                 Board = msg.Board;


FIxed cast error

FIxed cast error

--- Noodles.AspMvc/RequestHandling/NoodleResultToActionResultMapper.cs
+++ Noodles.AspMvc/RequestHandling/NoodleResultToActionResultMapper.cs
@@ -64,7 +64,10 @@
         {
             if (result.Result is ActionResult)
             {
-                if (result is RedirectResult) return new AjaxAwareRedirectResult((RedirectResult) result);
+                if (result.Result is RedirectResult && context.RequestContext.HttpContext.Request.IsAjaxRequest())
+                {
+                    return new AjaxAwareRedirectResult((RedirectResult) result.Result);
+                }
                 return (ActionResult) result.Result;
             }
             var res = new System.Web.Mvc.ViewResult();


Avoid a crash if no messaging server URL is defined

--- OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
+++ OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
@@ -336,6 +336,9 @@

         private void NotifyMessageServerOfStartup(Scene scene)
         {
+            if (string.IsNullOrEmpty(scene.CommsManager.NetworkServersInfo.MessagingURL))
+                return;
+
             Hashtable xmlrpcdata = new Hashtable();
             xmlrpcdata["RegionUUID"] = scene.RegionInfo.RegionID.ToString();
             ArrayList SendParams = new ArrayList();


login

login

--- SmartSchoolManagementSystem/SmartSchoolManagementSystem/Program.cs
+++ SmartSchoolManagementSystem/SmartSchoolManagementSystem/Program.cs
@@ -17,7 +17,7 @@
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);

-            Application.Run(new MessageSender());
+            Application.Run(new Login());


Makes ghosts able to point through walls. (#2821)

Co-authored-by: BuildTools <d519b457f1162fe4882e8e1ac2d555db7e3d20fc@null.spigotmc.org>

--- Content.Server/GameObjects/EntitySystems/PointingSystem.cs
+++ Content.Server/GameObjects/EntitySystems/PointingSystem.cs
@@ -1,6 +1,7 @@
-#nullable enable
+#nullable enable
 using System;
 using System.Collections.Generic;
+using Content.Server.GameObjects.Components.Observer;
 using Content.Server.GameObjects.Components.Pointing;
 using Content.Server.Players;
 using Content.Shared.GameObjects.EntitySystems;
@@ -79,7 +80,13 @@

         public bool InRange(IEntity pointer, EntityCoordinates coordinates)
         {
-            return pointer.InRangeUnOccluded(coordinates, 15, e => e == pointer);
+            if (pointer.HasComponent<GhostComponent>()){
+                return pointer.Transform.Coordinates.InRange(EntityManager, coordinates, 15);
+            }
+            else
+            {
+                return pointer.InRangeUnOccluded(coordinates, 15, e => e == pointer);
+            }
         }

         public bool TryPoint(ICommonSession? session, EntityCoordinates coords, EntityUid uid)


Unit Test, Creating Objects

Unit Test, Creating Objects

--- DDS-RTPS/ConfigurationTests/TestDDSConfigCreatingObject.cs
+++ DDS-RTPS/ConfigurationTests/TestDDSConfigCreatingObject.cs
@@ -4,7 +4,10 @@
 using org.omg.dds.core;
 using Doopec.Dds.Domain;
 using org.omg.dds.pub;
+using org.omg.dds.topic;
 using org.omg.dds.core.policy;
+using Doopec.Configuration;
+using org.omg.dds.sub;

 namespace ConfigurationTests
 {
@@ -76,5 +79,629 @@
             Assert.IsTrue(isOrderedAccess);
         }

+        [TestMethod]
+        public void QoSDomainParticipantTest01()
+        {
+            //PRECONDITIONS
+            DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+            DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+            DomainParticipantQos qos = dp.GetQos();
+            Assert.IsNotNull(qos);
+            byte[] data = new byte[20];
+            string value = qos.GetUserData().GetValue(data,0).ToString();
+            Assert.AreEqual("", value);
+        }
+
+        [TestMethod]
+        public void QoSDomainParticipantTest02()
+        {
+            //PRECONDITIONS
+            DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+            DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+            DomainParticipantQos qos = dp.GetQos();
+            Assert.IsNotNull(qos);
+            byte[] data = new byte[20];
+            bool entityFactory = qos.GetEntityFactory().IsAutoEnableCreatedEntities();
+            Assert.IsTrue(entityFactory);
+        }
+        [TestMethod]
+        public void QoSTopicTest01()
+        {
+            //PRECONDITIONS
+            DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+            DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+            Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+            TopicQos qos = tp.GetQos();
+            Assert.IsNotNull(qos);
+            var partitions = qos.GetTopicData().GetLength();
+            Assert.AreEqual(0,partitions);
+        }
+     [TestMethod]
+        public void QoSTopicTest02()
+        {
+            //PRECONDITIONS
+            DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+            DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+            Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+            TopicQos qos = tp.GetQos();
+            Assert.IsNotNull(qos);
+            var period = qos.GetDeadline().GetPeriod();
+            Assert.IsNotNull(period);
+            Assert.AreEqual(100,period);
+        }
+ [TestMethod]
+        public void QoSTopicTest03()
+        {
+            //PRECONDITIONS
+            DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+            DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+            Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+            TopicQos qos = tp.GetQos();
+            Assert.IsNotNull(qos);
+            DurabilityQosPolicyKind durability = qos.GetDurability().GetKind();
+            Assert.IsNotNull(durability);
+            Assert.AreEqual(DurabilityQosPolicyKind.VOLATILE,durability);
+        }
+
+         [TestMethod]
+         public void QoSSubscriberTest01()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Subscriber sub = dp.CreateSubscriber();
+             SubscriberQos qos = sub.GetQos();
+             Assert.IsNotNull(qos);
+             Assert.IsNotNull(qos.GetEntityFactory());
+             Assert.IsTrue(qos.GetEntityFactory().IsAutoEnableCreatedEntities());
+         }
+
+         [TestMethod]
+         public void QoSSubscriberTest02()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Subscriber sub = dp.CreateSubscriber();
+             SubscriberQos qos = sub.GetQos();
+             Assert.IsNotNull(qos);
+
+             byte[] data = new byte[20];
+             int len = qos.GetGroupData().GetValue(data, 0);
+             Assert.AreEqual(0, len);
+         }
+
+         [TestMethod]
+         public void QoSSubscriberTest03()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Subscriber sub = dp.CreateSubscriber();
+             SubscriberQos qos = sub.GetQos();
+             Assert.IsNotNull(qos);
+
+             byte[] data = new byte[20];
+             var partitions = qos.GetPartition().GetName();
+             Assert.IsNotNull(partitions);
+         }
+
+         [TestMethod]
+         public void QoSSubscriberTest04()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Subscriber sub = dp.CreateSubscriber();
+             SubscriberQos qos = sub.GetQos();
+             Assert.IsNotNull(qos);
+
+             byte[] data = new byte[20];
+             AccessScopeKind accessScope = qos.GetPresentation().GetAccessScope();
+             Assert.AreEqual(AccessScopeKind.GROUP, accessScope);
+
+             bool isCoherentAccess = qos.GetPresentation().IsCoherentAccess();
+             Assert.IsFalse(isCoherentAccess);
+
+             bool isOrderedAccess = qos.GetPresentation().IsOrderedAccess();
+             Assert.IsTrue(isOrderedAccess);
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest01()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             var period = qos.GetDeadline().GetPeriod();
+             Assert.IsNotNull(period);
+             Assert.AreEqual(1, period);
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest02()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             DestinationOrderQosPolicyKind destinationOrder = qos.GetDestinationOrder().GetKind();
+             Assert.AreEqual(DestinationOrderQosPolicyKind.BY_SOURCE_TIMESTAMP, destinationOrder);
+
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest03()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             DurabilityQosPolicyKind durability = qos.GetDurability().GetKind();
+             Assert.AreEqual(DurabilityQosPolicyKind.VOLATILE, durability);
+
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest04()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             var historyDepth = qos.GetDurabilityService().GetHistoryDepth();
+             Assert.AreEqual(0, historyDepth);
+
+             HistoryQosPolicyKind historyKind = qos.GetDurabilityService().GetHistoryKind();
+             Assert.AreEqual(HistoryQosPolicyKind.KEEP_LAST, historyKind);
+
+             var maxInstances = qos.GetDurabilityService().GetMaxInstances();
+             Assert.AreEqual(1, maxInstances);
+
+             var maxSamples = qos.GetDurabilityService().GetMaxSamples();
+             Assert.AreEqual(1, maxSamples);
+
+             var maxSamplesPerInstance = qos.GetDurabilityService().GetMaxSamplesPerInstance();
+             Assert.AreEqual(1, maxSamplesPerInstance);
+
+             var serviceCleanupDelay = qos.GetDurabilityService().GetServiceCleanupDelay();
+             Assert.AreEqual(100, serviceCleanupDelay);
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest05()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             byte[] data = new byte[20];
+             HistoryQosPolicyKind kind = qos.GetHistory().GetKind();
+             Assert.AreEqual(HistoryQosPolicyKind.KEEP_ALL, kind);
+
+             var depth = qos.GetHistory().GetDepth();
+             Assert.AreEqual(1, depth);
+
+         }
+         [TestMethod]
+         public void QoSDataWriterTest06()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             var duration = qos.GetLatencyBudget().GetDuration();
+             Assert.AreEqual(100, duration);
+
+         }
+         [TestMethod]
+         public void QoSDataWriterTest07()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             var duration = qos.GetLifespan().GetDuration();
+             Assert.AreEqual(100, duration);
+         }
+         [TestMethod]
+         public void QoSDataWriterTest08()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             LivelinessQosPolicyKind kind = qos.GetLiveliness().GetKind();
+             Assert.AreEqual(LivelinessQosPolicyKind.AUTOMATIC, kind);
+
+             var duration = qos.GetLiveliness().GetLeaseDuration();
+             Assert.AreEqual(100, duration);
+         }
+         [TestMethod]
+         public void QoSDataWriterTest09()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             OwnershipQosPolicyKind kind = qos.GetOwnership().GetKind();
+             Assert.AreEqual(OwnershipQosPolicyKind.SHARED, kind);
+
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest10()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             var value = qos.GetOwnershipStrength().GetValue();
+             Assert.AreEqual(100, value);
+
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest11()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             ReliabilityQosPolicyKind kind = qos.GetReliability().GetKind();
+             Assert.AreEqual(ReliabilityQosPolicyKind.BEST_EFFORT, kind);
+
+             var maxBlokingTime = qos.GetReliability().GetMaxBlockingTime();
+             Assert.AreEqual(1000, maxBlokingTime);
+
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest12()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             var maxInstance = qos.GetResourceLimits().GetMaxInstances();
+             Assert.AreEqual(1, maxInstance);
+
+             var maxSamples = qos.GetResourceLimits().GetMaxSamples();
+             Assert.AreEqual(1, maxSamples);
+
+             var maxSamplesPerInstance = qos.GetResourceLimits().GetMaxSamplesPerInstance();
+             Assert.AreEqual(1, maxSamplesPerInstance);
+
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest13()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             var value = qos.GetTransportPriority().GetValue();
+             Assert.AreEqual(1, value);
+
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest14()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+             byte[] data = new byte[20];
+             var value = qos.GetUserData().GetValue(data,0);
+             Assert.AreEqual("", value);
+
+         }
+
+         [TestMethod]
+         public void QoSDataWriterTest15()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Publisher pub = dp.CreatePublisher();
+             DataWriter<Type> dw = pub.CreateDataWriter(tp);
+             DataWriterQos qos = dw.GetQos();
+             Assert.IsNotNull(qos);
+
+             bool autodisposeUnregisteredInstances = qos.GetWriterDataLifecycle().IsAutDisposeUnregisteredInstances();
+             Assert.IsTrue(autodisposeUnregisteredInstances);
+
+         }
+
+         [TestMethod]
+         public void QoSDataReaderTest01()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+
+             var period = qos.GetDeadline().GetPeriod();
+             Assert.IsNotNull(period);
+             Assert.AreEqual(1, period);
+         }
+
+         [TestMethod]
+         public void QoSDataReaderTest02()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+
+             DestinationOrderQosPolicyKind destinationOrder = qos.GetDestinationOrder().GetKind();
+             Assert.AreEqual(DestinationOrderQosPolicyKind.BY_SOURCE_TIMESTAMP, destinationOrder);
+
+         }
+
+         [TestMethod]
+         public void QoSDataReaderTest03()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+
+             DurabilityQosPolicyKind durability = qos.GetDurability().GetKind();
+             Assert.AreEqual(DurabilityQosPolicyKind.VOLATILE, durability);
+
+         }
+
+         [TestMethod]
+         public void QoSDataReaderTest04()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+
+             HistoryQosPolicyKind kind = qos.GetHistory().GetKind();
+             Assert.AreEqual(HistoryQosPolicyKind.KEEP_LAST, kind);
+
+             var depth = qos.GetHistory().GetDepth();
+             Assert.AreEqual(1, depth);
+
+         }
+         [TestMethod]
+         public void QoSDataReaderTest05()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+             var duration = qos.GetLatencyBudget().GetDuration();
+             Assert.AreEqual(100, duration);
+
+         }
+
+         [TestMethod]
+         public void QoSDataReaderTest06()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+
+             LivelinessQosPolicyKind kind = qos.GetLiveliness().GetKind();
+             Assert.AreEqual(LivelinessQosPolicyKind.AUTOMATIC, kind);
+
+             var duration = qos.GetLiveliness().GetLeaseDuration();
+             Assert.AreEqual(100, duration);
+         }
+         [TestMethod]
+         public void QoSDataReaderTest07()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+
+             OwnershipQosPolicyKind kind = qos.GetOwnership().GetKind();
+             Assert.AreEqual(OwnershipQosPolicyKind.SHARED, kind);
+
+         }
+
+
+         [TestMethod]
+         public void QoSDataReaderTest08()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+
+             ReliabilityQosPolicyKind kind = qos.GetReliability().GetKind();
+             Assert.AreEqual(ReliabilityQosPolicyKind.BEST_EFFORT, kind);
+
+             var maxBlokingTime = qos.GetReliability().GetMaxBlockingTime();
+             Assert.AreEqual(1000, maxBlokingTime);
+
+         }
+
+         [TestMethod]
+         public void QoSDataReaderTest09()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+
+             var maxInstance = qos.GetResourceLimits().GetMaxInstances();
+             Assert.AreEqual(1, maxInstance);
+
+             var maxSamples = qos.GetResourceLimits().GetMaxSamples();
+             Assert.AreEqual(1, maxSamples);
+
+             var maxSamplesPerInstance = qos.GetResourceLimits().GetMaxSamplesPerInstance();
+             Assert.AreEqual(1, maxSamplesPerInstance);
+
+         }
+
+         [TestMethod]
+         public void QoSDataReaderTest10()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             Assert.IsNotNull(dr);
+             DataReaderQos qos = dr.GetQos();
+
+             var value = qos.GetReaderDataLifecycle().GetAutoPurgeDisposedSamplesDelay();
+             Assert.AreEqual(1000, value);
+
+             var value1 = qos.GetReaderDataLifecycle().GetAutoPurgeNoWriterSamplesDelay();
+             Assert.AreEqual(1000, value1);
+
+         }
+
+         [TestMethod]
+         public void QoSDataReaderTest11()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             DataReaderQos qos = dr.GetQos();
+             Assert.IsNotNull(qos);
+             var minimumSeparation = qos.GetTimeBasedFilter().GetMinimumSeparation();
+             Assert.AreEqual(1000, minimumSeparation);
+
+         }
+
+         [TestMethod]
+         public void QoSDataReaderTest12()
+         {
+             //PRECONDITIONS
+             DomainParticipantFactory factory = DomainParticipantFactory.GetInstance(Bootstrap.CreateInstance());
+             DomainParticipantImpl dp = factory.CreateParticipant() as DomainParticipantImpl;
+             Topic<Type> tp = dp.CreateTopic<Type>("Greetings Topic");
+             Subscriber sub = dp.CreateSubscriber();
+             DataReader<Type> dr = sub.CreateDataReader(tp);
+             DataReaderQos qos = dr.GetQos();
+             Assert.IsNotNull(qos);
+             byte[] data = new byte[20];
+             var value = qos.GetUserData().GetValue(data, 0);
+             Assert.AreEqual("", value);
+
+         }
     }
 }


Only update details of VisualisedDrawables when they are visible

This greatly improved performance once more, resulting in draw vis
being finally useful when at the highest-level draw node, even inside
song select.

It is accomplished in a slightly hacky way (it assumes no scaling
happens between the TreeContainer and the VisualisedDrawable).
This should be acceptable due to the WIP/debugger nature of the
draw vis.

--- osu.Framework/Graphics/Visualisation/VisualisedDrawable.cs
+++ osu.Framework/Graphics/Visualisation/VisualisedDrawable.cs
@@ -32,8 +32,11 @@

         public FlowContainer Flow;

-        public VisualisedDrawable(Drawable d)
-        {
+        private TreeContainer tree;
+
+        public VisualisedDrawable(Drawable d, TreeContainer tree)
+        {
+            this.tree = tree;
             Target = d;

             attachEvents();
@@ -145,23 +148,27 @@
         private void onAutoSize()
         {
             Scheduler.Add(() => activityAutosize.FadeOutFromOne(1));
-            updateSpecifics();
         }

         private void onLayout()
         {
             Scheduler.Add(() => activityLayout.FadeOutFromOne(1));
-            updateSpecifics();
         }

         private void onInvalidate()
         {
             Scheduler.Add(() => activityInvalidate.FadeOutFromOne(1));
-            updateSpecifics();
         }

         private void updateSpecifics()
         {
+            Vector2 posInTree = ToSpaceOfOtherDrawable(Vector2.Zero, tree);
+            if (posInTree.Y < -previewBox.DrawHeight || posInTree.Y > tree.Height)
+            {
+                text.Text = string.Empty;
+                return;
+            }
+
             previewBox.Alpha = Math.Max(0.2f, Target.Alpha);
             previewBox.ColourInfo = Target.ColourInfo;

@@ -172,6 +179,8 @@

         protected override void Update()
         {
+            updateSpecifics();
+
             text.Colour = !Flow.IsPresent ? Color4.LightBlue : Color4.White;
             base.Update();
         }


Use less custom classes for CPS tests

Use less custom classes for CPS tests

--- osu.Game.Tests/Visual/Gameplay/TestSceneClicksPerSecond.cs
+++ osu.Game.Tests/Visual/Gameplay/TestSceneClicksPerSecond.cs
@@ -4,6 +4,7 @@
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Linq;
 using NUnit.Framework;
 using osu.Framework.Bindables;
@@ -13,9 +14,9 @@
 using osu.Framework.Timing;
 using osu.Game.Rulesets;
 using osu.Game.Rulesets.Judgements;
-using osu.Game.Rulesets.Mania;
 using osu.Game.Rulesets.Mods;
 using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Osu;
 using osu.Game.Rulesets.UI;
 using osu.Game.Scoring;
 using osu.Game.Screens.Play;
@@ -27,9 +28,12 @@
     public class TestSceneClicksPerSecond : OsuTestScene
     {
         private DependencyProvidingContainer? dependencyContainer;
-        private MockFrameStableClock? mainClock;
         private ClicksPerSecondCalculator? calculator;
         private ManualInputListener? listener;
+        private GameplayClockContainer? gameplayClockContainer;
+        private ManualClock? manualClock;
+        private DrawableRuleset? drawableRuleset;
+        private IFrameStableClock? frameStableClock;

         [SetUpSteps]
         public void SetUpSteps()
@@ -40,25 +44,99 @@

                 Debug.Assert(ruleset != null);

-                Children = new Drawable[]
-                {
+                Child = gameplayClockContainer = new GameplayClockContainer(manualClock = new ManualClock());
+                gameplayClockContainer.AddRange(new Drawable[]
+                {
+                    drawableRuleset = new TestDrawableRuleset(frameStableClock = new TestFrameStableClock(manualClock)),
                     dependencyContainer = new DependencyProvidingContainer
                     {
                         RelativeSizeAxes = Axes.Both,
                         CachedDependencies = new (Type, object)[]
                         {
-                            (typeof(IGameplayClock), mainClock = new MockFrameStableClock(new MockFrameBasedClock())),
-                            (typeof(DrawableRuleset), new MockDrawableRuleset(ruleset, mainClock))
+                            (typeof(DrawableRuleset), drawableRuleset),
+                            (typeof(IGameplayClock), gameplayClockContainer)
                         }
-                    },
-                };
+                    }
+                });
             });
         }

+        [Test]
+        public void TestBasicConsistency()
+        {
+            createCalculator();
+            startClock();
+
+            AddStep("Create gradually increasing KPS inputs", () =>
+            {
+                addInputs(generateGraduallyIncreasingKps());
+            });
+
+            for (int i = 0; i < 10; i++)
+            {
+                seek(i * 10000);
+                advanceForwards(2);
+                int kps = i + 1;
+                AddAssert($"{kps} KPS", () => calculator!.Value == kps);
+            }
+        }
+
+        [Test]
+        public void TestRateAdjustConsistency()
+        {
+            createCalculator();
+            startClock();
+
+            AddStep("Create consistent KPS inputs", () => addInputs(generateConsistentKps(10)));
+
+            advanceForwards(2);
+
+            for (double i = 1; i <= 2; i += 0.25)
+            {
+                changeRate(i);
+                double rate = i;
+                AddAssert($"KPS approx. = {i}", () => MathHelper.ApproximatelyEquivalent(calculator!.Value, 10 * rate, 0.5));
+            }
+
+            for (double i = 1; i >= 0.5; i -= 0.25)
+            {
+                changeRate(i);
+                double rate = i;
+                AddAssert($"KPS approx. = {i}", () => MathHelper.ApproximatelyEquivalent(calculator!.Value, 10 * rate, 0.5));
+            }
+        }
+
+        [Test]
+        public void TestInputsDiscardedOnRewind()
+        {
+            createCalculator();
+            startClock();
+
+            AddStep("Create consistent KPS inputs", () => addInputs(generateConsistentKps(10)));
+            seek(1000);
+
+            AddAssert("KPS = 10", () => calculator!.Value == 10);
+
+            AddStep("Create delayed inputs", () => addInputs(generateConsistentKps(10, 50)));
+            seek(1000);
+            AddAssert("KPS didn't changed", () => calculator!.Value == 10);
+        }
+
+        private void seekAllClocks(double time)
+        {
+            gameplayClockContainer?.Seek(time);
+            manualClock!.CurrentTime = time;
+        }
+
+        protected override Ruleset CreateRuleset() => new OsuRuleset();
+
+        #region Quick steps methods
+
         private void createCalculator()
         {
             AddStep("create calculator", () =>
             {
+                Debug.Assert(dependencyContainer?.Dependencies.Get(typeof(DrawableRuleset)) is DrawableRuleset);
                 dependencyContainer!.Children = new Drawable[]
                 {
                     calculator = new ClicksPerSecondCalculator(),
@@ -78,96 +156,45 @@
             });
         }

-        [Test]
-        public void TestBasicConsistency()
-        {
-            createCalculator();
-
-            AddStep("Create gradually increasing KPS inputs", () =>
-            {
-                addInputs(generateGraduallyIncreasingKps());
+        private void seek(double time) => AddStep($"Seek clocks to {time}ms", () => seekAllClocks(time));
+
+        private void changeRate(double rate) => AddStep($"Change rate to x{rate}", () => manualClock!.Rate = rate);
+
+        private void advanceForwards(double time) =>
+            AddStep($"Advance clocks {time} seconds forward.", () =>
+            {
+                gameplayClockContainer!.Seek(gameplayClockContainer.CurrentTime + time * manualClock!.Rate);
+
+                for (int i = 0; i < time; i++)
+                {
+                    frameStableClock?.ProcessFrame();
+                }
             });

-            for (int i = 0; i < 10; i++)
-            {
-                seek(i * 10000);
-                advanceForwards(2);
-                int kps = i + 1;
-                AddAssert($"{kps} KPS", () => calculator!.Value == kps);
-            }
-        }
-
-        [Test]
-        public void TestRateAdjustConsistency()
-        {
-            createCalculator();
-
-            AddStep("Create consistent KPS inputs", () => addInputs(generateConsistentKps(10)));
-
-            advanceForwards(2);
-
-            for (double i = 1; i <= 2; i += 0.25)
-            {
-                changeRate(i);
-                double rate = i;
-                AddAssert($"KPS approx. = {i}", () => MathHelper.ApproximatelyEquivalent(calculator!.Value, 10 * rate, 0.5));
-            }
-
-            for (double i = 1; i >= 0.5; i -= 0.25)
-            {
-                changeRate(i);
-                double rate = i;
-                AddAssert($"KPS approx. = {i}", () => MathHelper.ApproximatelyEquivalent(calculator!.Value, 10 * rate, 0.5));
-            }
-        }
-
-        [Test]
-        public void TestInputsDiscardedOnRewind()
-        {
-            createCalculator();
-
-            AddStep("Create consistent KPS inputs", () => addInputs(generateConsistentKps(10)));
-            seek(1000);
-
-            AddAssert("KPS = 10", () => calculator!.Value == 10);
-
-            AddStep("Create delayed inputs", () => addInputs(generateConsistentKps(10, 50)));
-            seek(1000);
-            AddAssert("KPS didn't changed", () => calculator!.Value == 10);
-        }
-
-        private void seek(double time) => AddStep($"Seek main clock to {time}ms", () => mainClock?.Seek(time));
-
-        private void changeRate(double rate) => AddStep($"Change rate to x{rate}", () =>
-            (mainClock?.UnderlyingClock as MockFrameBasedClock)!.Rate = rate);
-
-        private void advanceForwards(int frames = 1) => AddStep($"Advance main clock {frames} frame(s) forward.", () =>
-        {
-            if (mainClock == null) return;
-
-            MockFrameBasedClock underlyingClock = (MockFrameBasedClock)mainClock.UnderlyingClock;
-            underlyingClock.Backwards = false;
-
-            for (int i = 0; i < frames; i++)
-            {
-                underlyingClock.ProcessFrame();
-            }
+        private void startClock() => AddStep("Start clocks", () =>
+        {
+            gameplayClockContainer?.Start();
+            manualClock!.Rate = 1;
         });

+        #endregion
+
+        #region Input generation
+
         private void addInputs(IEnumerable<double> inputs)
         {
-            Debug.Assert(mainClock != null && listener != null);
+            Debug.Assert(manualClock != null && listener != null && gameplayClockContainer != null);
             if (!inputs.Any()) return;

-            double baseTime = mainClock.CurrentTime;
+            double baseTime = gameplayClockContainer.CurrentTime;

             foreach (double timestamp in inputs)
             {
-                mainClock.Seek(timestamp);
+                seekAllClocks(timestamp);
                 listener.AddInput();
             }

-            mainClock.Seek(baseTime);
+            seekAllClocks(baseTime);
         }

         private IEnumerable<double> generateGraduallyIncreasingKps()
@@ -200,9 +227,52 @@
             }
         }

-        protected override Ruleset CreateRuleset() => new ManiaRuleset();
-
-        #region Mock classes
+        #endregion
+
+        #region Test classes
+
+        private class TestFrameStableClock : IFrameStableClock
+        {
+            public TestFrameStableClock(IClock source, double startTime = 0)
+            {
+                this.source = source;
+                StartTime = startTime;
+
+                if (source is ManualClock manualClock)
+                {
+                    manualClock.CurrentTime = startTime;
+                }
+            }
+
+            public double CurrentTime => source.CurrentTime;
+            public double Rate => source.Rate;
+            public bool IsRunning => source.IsRunning;
+
+            private IClock source;
+
+            public void ProcessFrame()
+            {
+                if (source is ManualClock manualClock)
+                {
+                    manualClock.CurrentTime += 1000 * Rate;
+                }
+
+                TimeInfo = new FrameTimeInfo
+                {
+                    Elapsed = 1000 * Rate,
+                    Current = CurrentTime
+                };
+            }
+
+            public double ElapsedFrameTime => TimeInfo.Elapsed;
+            public double FramesPerSecond => 1 / ElapsedFrameTime * 1000;
+            public FrameTimeInfo TimeInfo { get; private set; }
+
+            public double? StartTime { get; }
+            public IEnumerable<double> NonGameplayAdjustments => Enumerable.Empty<double>();
+            public IBindable<bool> IsCatchingUp => new Bindable<bool>();
+            public IBindable<bool> WaitingOnFrames => new Bindable<bool>();
+        }

         private class ManualInputListener : ClicksPerSecondCalculator.InputListener
         {
@@ -214,108 +284,54 @@
             }
         }

-        private class MockFrameBasedClock : ManualClock, IFrameBasedClock
-        {
-            public const double FRAME_INTERVAL = 1000;
-            public bool Backwards;
-
-            public MockFrameBasedClock()
-            {
-                Rate = 1;
-                IsRunning = true;
-            }
-
-            public void ProcessFrame()
-            {
-                CurrentTime += FRAME_INTERVAL * Rate * (Backwards ? -1 : 1);
-                TimeInfo = new FrameTimeInfo
-                {
-                    Current = CurrentTime,
-                    Elapsed = FRAME_INTERVAL * Rate * (Backwards ? -1 : 1)
-                };
-            }
-
-            public void Seek(double time)
-            {
-                TimeInfo = new FrameTimeInfo
-                {
-                    Elapsed = time - CurrentTime,
-                    Current = CurrentTime = time
-                };
-            }
-
-            public double ElapsedFrameTime => TimeInfo.Elapsed;
-            public double FramesPerSecond => 1 / FRAME_INTERVAL;
-            public FrameTimeInfo TimeInfo { get; private set; }
-        }
-
-        private class MockFrameStableClock : IGameplayClock, IFrameStableClock
-        {
-            internal readonly IFrameBasedClock UnderlyingClock;
-
-            public readonly BindableBool IsPaused = new BindableBool();
-
-            public MockFrameStableClock(MockFrameBasedClock underlyingClock)
-            {
-                UnderlyingClock = underlyingClock;
-            }
-
-            public void Seek(double time) => (UnderlyingClock as MockFrameBasedClock)?.Seek(time);
-
-            public IBindable<bool> IsCatchingUp => new Bindable<bool>();
-            public IBindable<bool> WaitingOnFrames => new Bindable<bool>();
-            public double CurrentTime => UnderlyingClock.CurrentTime;
-            public double Rate => UnderlyingClock.Rate;
-            public bool IsRunning => UnderlyingClock.IsRunning;
-            public void ProcessFrame() => UnderlyingClock.ProcessFrame();
-
-            public double ElapsedFrameTime => UnderlyingClock.ElapsedFrameTime;
-            public double FramesPerSecond => UnderlyingClock.FramesPerSecond;
-            public FrameTimeInfo TimeInfo => UnderlyingClock.TimeInfo;
-            public double TrueGameplayRate => UnderlyingClock.Rate;
-            public double? StartTime => 0;
-            public IEnumerable<double> NonGameplayAdjustments => Enumerable.Empty<double>();
-            IBindable<bool> IGameplayClock.IsPaused => IsPaused;
-        }
-
-        private class MockDrawableRuleset : DrawableRuleset
-        {
-            public MockDrawableRuleset(Ruleset ruleset, IFrameStableClock clock)
-                : base(ruleset)
-            {
-                FrameStableClock = clock;
-            }
-
-#pragma warning disable CS0067
-            public override event Action<JudgementResult>? NewResult;
-            public override event Action<JudgementResult>? RevertResult;
-#pragma warning restore CS0067
-            public override Playfield? Playfield => null;
-            public override Container? Overlays => null;
-            public override Container? FrameStableComponents => null;
+#nullable disable
+
+        [SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
+        private class TestDrawableRuleset : DrawableRuleset
+        {
+            public override IEnumerable<HitObject> Objects => Enumerable.Empty<HitObject>();
+
+            public override event Action<JudgementResult> NewResult
+            {
+                add => throw new InvalidOperationException($"{nameof(NewResult)} operations not supported in test context");
+                remove => throw new InvalidOperationException($"{nameof(NewResult)} operations not supported in test context");
+            }
+
+            public override event Action<JudgementResult> RevertResult
+            {
+                add => throw new InvalidOperationException($"{nameof(RevertResult)} operations not supported in test context");
+                remove => throw new InvalidOperationException($"{nameof(RevertResult)} operations not supported in test context");
+            }
+
+            public override Playfield Playfield => null;
+            public override Container Overlays => null;
+            public override Container FrameStableComponents => null;
             public override IFrameStableClock FrameStableClock { get; }

             internal override bool FrameStablePlayback { get; set; }
             public override IReadOnlyList<Mod> Mods => Array.Empty<Mod>();
-            public override IEnumerable<HitObject> Objects => Array.Empty<HitObject>();
+
             public override double GameplayStartTime => 0;
-            public override GameplayCursorContainer? Cursor => null;
-
-            public override void SetReplayScore(Score replayScore)
-            {
-            }
-
-            public override void SetRecordTarget(Score score)
-            {
-            }
-
-            public override void RequestResume(Action continueResume)
-            {
-            }
-
-            public override void CancelResume()
-            {
-            }
+            public override GameplayCursorContainer Cursor => null;
+
+            public TestDrawableRuleset()
+                : base(new OsuRuleset())
+            {
+            }
+
+            public TestDrawableRuleset(IFrameStableClock frameStableClock)
+                : this()
+            {
+                FrameStableClock = frameStableClock;
+            }
+
+            public override void SetReplayScore(Score replayScore) => throw new NotImplementedException();
+
+            public override void SetRecordTarget(Score score) => throw new NotImplementedException();
+
+            public override void RequestResume(Action continueResume) => throw new NotImplementedException();
+
+            public override void CancelResume() => throw new NotImplementedException();
         }

         #endregion


Remove unnecessary using statement

Remove unnecessary using statement

--- osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs
+++ osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs
@@ -3,7 +3,6 @@

 using NUnit.Framework;
 using osu.Framework.Allocation;
-using osu.Framework.Graphics.Containers;
 using osu.Game.Beatmaps;
 using osu.Game.Overlays;
 using osu.Game.Overlays.BeatmapSet;


Fix default mouse sensitivity not reverting correctly

--- osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs
+++ osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs
@@ -93,6 +93,7 @@
                     // this bindable will still act as the "interactive" bindable displayed during a drag.
                     base.Bindable = new BindableDouble(doubleValue.Value)
                     {
+                        Default = doubleValue.Default,
                         MinValue = doubleValue.MinValue,
                         MaxValue = doubleValue.MaxValue
                     };


Refs #1593 - unit test ter illustratie

Refs #1593 - unit test ter illustratie

--- Solution/TestProjecten/Chiro.Gap.Services.Test/LedenServiceTest.cs
+++ Solution/TestProjecten/Chiro.Gap.Services.Test/LedenServiceTest.cs
@@ -36,6 +36,7 @@
 using Moq;
 using GebruikersRecht = Chiro.Gap.Poco.Model.GebruikersRecht;
 using Microsoft.VisualStudio.TestTools.UnitTesting.Web;
+using Chiro.Gap.Services;

 namespace Chiro.Gap.Services.Test
 {
@@ -351,9 +352,8 @@
         /// wel moet failen, moet ticket #1391 mogelijk opnieuw geopend worden.)
         /// </summary>
         [TestMethod()]
-        public void VoorstelTotInschrijvenGenererenTest()
-        {
-
+        public void VoorstelTotInschrijvenGenererenSorteringTest()
+        {
             // ARRANGE

             string foutBerichten;
@@ -1576,5 +1576,77 @@

             Assert.AreEqual(nieuwLid.AfdelingsJaar,  afdelingsJaar2);
         }
+
+        /// <summary>
+        /// Test op inschrijving voorstellen voor leiding (illustreert #1593)
+        /// </summary>
+        [TestMethod()]
+        public void VoorstelTotInschrijvenGenererenLeidingTest()
+        {
+            // ARRANGE
+
+            string foutBerichten;
+
+            // Gauw wat handgemaakte dummydata:
+
+            var mijnAfdeling = new AfdelingsJaar
+            {
+                ID = 1,
+                GeboorteJaarVan = 1996,
+                GeboorteJaarTot = 1998,
+                Geslacht = GeslachtsType.Gemengd,
+                OfficieleAfdeling = new OfficieleAfdeling { ID = (int)NationaleAfdeling.Ketis }
+            };
+
+            var groepsWerkJaar = new GroepsWerkJaar
+            {
+                WerkJaar = 2013,
+                AfdelingsJaar =
+                    new List<AfdelingsJaar>
+                                                 {
+                                                     mijnAfdeling,
+                                                 }
+            };
+
+            // gelieerde persoon te oud voor een afdeling
+            var oudeGelieerdePersoon = new GelieerdePersoon
+            {
+                ID = 3,
+                Persoon = new Persoon
+                {
+                    GeboorteDatum = new DateTime(1992, 3, 8),
+                    Geslacht = GeslachtsType.Vrouw
+                },
+                Groep = new ChiroGroep
+                {
+                    GroepsWerkJaar = new List<GroepsWerkJaar>
+                                                                                {
+                                                                                groepsWerkJaar
+                                                                                }
+                }
+            };
+            groepsWerkJaar.Groep = oudeGelieerdePersoon.Groep;
+
+            // We mocken een en ander:
+
+            var repositoryProviderMock = new Mock<IRepositoryProvider>();
+            repositoryProviderMock.Setup(src => src.RepositoryGet<GelieerdePersoon>())
+                                  .Returns(
+                                      new DummyRepo<GelieerdePersoon>(new List<GelieerdePersoon>
+                                                                          {
+                                                                              oudeGelieerdePersoon,
+                                                                          }));
+            Factory.InstantieRegistreren(repositoryProviderMock.Object);
+
+            // ACT
+
+            var target = Factory.Maak<LedenService>();
+            var actual = target.VoorstelTotInschrijvenGenereren(new[] { oudeGelieerdePersoon.ID }, out foutBerichten);
+
+            // We verwachten nu dat de personen opgeleverd worden van jong naar oud.  Dus
+            // eerst persoon 2, dan persoon 1.
+
+            Assert.IsTrue(actual.First().LeidingMaken);
+        }
     }
 }