rename logger instances

rename logger instances

--- abremir.AllMyBricks.DatabaseSeeder/Configuration/Logging.cs
+++ abremir.AllMyBricks.DatabaseSeeder/Configuration/Logging.cs
@@ -34,11 +34,11 @@

             if (LogVerbosity != LogVerbosityEnum.NoLogging)
             {
-                var dataSynchronizationServiceEventHandler = IoC.IoCContainer.GetInstance<DataSynchronizationServiceLogger>();
-                var themeSynchronizerEventHandler = IoC.IoCContainer.GetInstance<ThemeSynchronizerLogger>();
-                var subthemeSynchronizerEventHandler = IoC.IoCContainer.GetInstance<SubthemeSynchronizerLogger>();
-                var setSynchronizerEventHandler = IoC.IoCContainer.GetInstance<SetSynchronizerLogger>();
-                var thumbnailSynchronizerEventHandler = IoC.IoCContainer.GetInstance<ThumbnailSynchronizerLogger>();
+                var dataSynchronizationServiceLogger = IoC.IoCContainer.GetInstance<DataSynchronizationServiceLogger>();
+                var themeSynchronizerLogger = IoC.IoCContainer.GetInstance<ThemeSynchronizerLogger>();
+                var subthemeSynchronizerLogger = IoC.IoCContainer.GetInstance<SubthemeSynchronizerLogger>();
+                var setSynchronizerLogger = IoC.IoCContainer.GetInstance<SetSynchronizerLogger>();
+                var thumbnailSynchronizerLogger = IoC.IoCContainer.GetInstance<ThumbnailSynchronizerLogger>();
                 var assetUncompressionLogger = IoC.IoCContainer.GetInstance<AssetUncompressionLogger>();
             }
         }


Put Description back in for FieldLookupString. It is only available for taxonomies.

--- OpenAsset.RestClient.Library/Noun/FieldLookupString.cs
+++ OpenAsset.RestClient.Library/Noun/FieldLookupString.cs
@@ -17,6 +17,8 @@
         [JsonProperty("value",NullValueHandling = NullValueHandling.Ignore), NestedNounProperty]
         public string _value;
         [JsonProperty(NullValueHandling = NullValueHandling.Ignore), NestedNounProperty]
+        public string description;
+        [JsonProperty(NullValueHandling = NullValueHandling.Ignore), NestedNounProperty]
         protected int? display_order;
         [JsonProperty(NullValueHandling = NullValueHandling.Ignore), NestedNounProperty]
         protected int? field_id;
@@ -27,6 +29,12 @@
         {
             get { return _value; }
             set { _value = value; }
+        }
+
+        public virtual string Description
+        {
+            get { return description; }
+            set { description = value; }
         }

         public virtual int DisplayOrder


Fix some inventory issues

Fix some inventory issues

--- OpenSim/Services/InventoryService/XInventoryService.cs
+++ OpenSim/Services/InventoryService/XInventoryService.cs
@@ -308,6 +308,8 @@
             //
             foreach (UUID id in folderIDs)
             {
+                if (!ParentIsTrash(id))
+                    continue;
                 InventoryFolderBase f = new InventoryFolderBase();
                 f.ID = id;
                 PurgeFolder(f);
@@ -319,6 +321,9 @@

         public virtual bool PurgeFolder(InventoryFolderBase folder)
         {
+            if (!ParentIsTrash(folder.ID))
+                return false;
+
             XInventoryFolder[] subFolders = m_Database.GetFolders(
                     new string[] { "parentFolderID" },
                     new string[] { folder.ID.ToString() });
@@ -519,5 +524,29 @@

             return newItem;
         }
+
+        private bool ParentIsTrash(UUID folderID)
+        {
+            XInventoryFolder[] folder = m_Database.GetFolders(new string[] {"folderID"}, new string[] {folderID.ToString()});
+            if (folder.Length < 1)
+                return false;
+
+            UUID parentFolder = folder[0].parentFolderID;
+
+            while (parentFolder != UUID.Zero)
+            {
+                XInventoryFolder[] parent = m_Database.GetFolders(new string[] {"folderID"}, new string[] {parentFolder.ToString()});
+                if (parent.Length < 1)
+                    return false;
+
+                if (parent[0].type == (int)AssetType.TrashFolder)
+                    return true;
+                if (parent[0].type == (int)AssetType.RootFolder)
+                    return false;
+
+                parentFolder = parent[0].parentFolderID;
+            }
+            return false;
+        }
     }
 }


Fixed small bug

Fixed small bug


Changed JobScheduler to update the interval whenever a job is scheduled.

It only updates the interval if the new job is supposed to run before the
next tick is scheduled.

--- JobScheduling/JobScheduler.cs
+++ JobScheduling/JobScheduler.cs
@@ -193,6 +193,12 @@
             lock (locker)
             {
                 jobs.Add(job);
+
+                double interval = job.TimeToRun(DateTime.UtcNow).TotalMilliseconds;
+                if (interval < timer.Interval)
+                {
+                    timer.Interval = interval <= 0 ? 1 : interval;
+                }
                 if (!timer.Enabled)
                 {
                     timer.Enabled = true;


CheckTest

CheckTest

--- JsonConversion/JsonProgram.cs
+++ JsonConversion/JsonProgram.cs
@@ -1,5 +1,7 @@
 using Newtonsoft.Json.Linq;
 using System;
+using Newtonsoft.Json;
+using NUnit.Framework;

 namespace JsonConversion
 {
@@ -8,10 +10,28 @@
 		static void Main()
 		{
 			string json = Console.In.ReadToEnd();
-			JObject v2 = JObject.Parse(json);
+
 			//...
 			var v3 = "{ 'version':'3', 'products': 'TODO' }";
 			Console.Write(v3);
 		}
+
+	    static string SerializeJson(string inputString)
+	    {
+            var v2 = JsonConvert.SerializeObject(inputString);
+	        return "";
+
+	    }
 	}
+
+    [TestFixture]
+    public class JsonProgram_Should
+    {
+        [Test]
+        public void GetStringFromConsole()
+        {
+            var p=new JsonProgram();
+
+        }
+    }
 }


slide updates

slide updates

--- tsDemo/tsDemo/Views/Home/Slides.cshtml
+++ tsDemo/tsDemo/Views/Home/Slides.cshtml
@@ -40,9 +40,7 @@

Windows 95

Toy Story

-
Gangsters Paradice

-
Ace of Base

-
Bill Clinton

+
Gangster's Paradise, by Coolio

@@ -82,7 +80,7 @@

-
JS Fails

+
JavaScript: The Lousy Parts

Weird Inheritance

No Module Support

@@ -126,7 +124,7 @@

Kinda in the middle

Superset of JS

ES6/ES7 Features

-
Static Typing

+
Optional Static Typing

@@ -151,12 +149,13 @@

How does it stack up?

             ES6 Comparison
+

+            TypeScript Roadmap

Who uses it?

Microsoft: Azure Dashboard (several 100k loc app)

-
Asana

Google: Angular 2.0

Used to power Intellisense in VSCode and Visual Studio

@@ -167,7 +166,7 @@
                 TypeScript Playground

-                typescriptlang.org
+                TypeScript Handbook

@@ -195,9 +194,9 @@

Major Takeaways

-
1. JavaScript is everywhere, from microcontrollers to giant cloud

+
1. JavaScript is everywhere, from microcontrollers to the cloud

2. ... but isn't really good at building large apps.

-
3. TypeScript make's building complex client-side apps easier.

+
3. TypeScript makes building complex client-side apps easier.


Changed test to use microsoft/vscode

Changed test to use microsoft/vscode

--- Octokit.Tests.Integration/Clients/IssueTimelineClientTests.cs
+++ Octokit.Tests.Integration/Clients/IssueTimelineClientTests.cs
@@ -53,7 +53,7 @@
         [IntegrationTest]
         public async Task CanRetrieveTimelineForRecentIssues()
         {
-            // Make sure we can deserialize the event timeline for the 20 most recent closed PRs and 20 most recent open Issues from octokit.net
+            // Make sure we can deserialize the event timeline for recent closed PRs and open Issues in a heavy activity repository (microsoft/vscode)

             // Search request
             var github = Helper.GetAuthenticatedClient();
@@ -62,7 +62,7 @@
                 PerPage = 20,
                 Page = 1
             };
-            search.Repos.Add("octokit", "octokit.net");
+            search.Repos.Add("microsoft", "vscode");

             // 20 most recent closed PRs
             search.Type = IssueTypeQualifier.PullRequest;
@@ -70,7 +70,7 @@
             var pullRequestResults = await github.Search.SearchIssues(search);
             foreach (var pullRequest in pullRequestResults.Items)
             {
-                var timelineEventInfos = await _issueTimelineClient.GetAllForIssue("octokit", "octokit.net", pullRequest.Number);
+                var timelineEventInfos = await _issueTimelineClient.GetAllForIssue("microsoft", "vscode", pullRequest.Number);
                 Assert.NotEmpty(timelineEventInfos);
             }

@@ -80,7 +80,7 @@
             var issueResults = await github.Search.SearchIssues(search);
             foreach (var issue in issueResults.Items)
             {
-                var timelineEventInfos = await _issueTimelineClient.GetAllForIssue("octokit", "octokit.net", issue.Number);
+                var timelineEventInfos = await _issueTimelineClient.GetAllForIssue("microsoft", "vscode", issue.Number);

                 Assert.NotNull(timelineEventInfos);
             }


Make HistoricTaskQuery.Assigned optional

--- Camunda.Api.Client/History/HistoricTaskQuery.cs
+++ Camunda.Api.Client/History/HistoricTaskQuery.cs
@@ -160,7 +160,7 @@
         /// <summary>
         /// If set to true, restricts the query to all tasks that are assigned.
         /// </summary>
-        public bool Assigned;
+        public bool? Assigned;

         /// <summary>
         /// If set to true, restricts the query to all tasks that are unassigned.


Add support for iframe resizing when content size is smaller than the current frame

--- CkanDotNet.Web/Views/Shared/Layout/_Page.cshtml
+++ CkanDotNet.Web/Views/Shared/Layout/_Page.cshtml
@@ -54,6 +54,32 @@

     <!-- Handle iframe resize after page load -->
     <script language="javascript">
+
+        var iframeId = '@id';
+        var iframeSrc = '@src';
+
+        function resizeFrame() {
+            var isInIFrame = (window.location != window.parent.location) ? true : false;
+
+                if (isInIFrame) {
+
+                    var iframe = null;
+                    if (iframeId !== '') {
+                        iframe = $('iframe#' + iframeId, parent.document).get(0);
+                    } else if (iframeSrc !== '') {
+                        iframe = $('iframe[src="' + iframeSrc + '"]', parent.document).get(0);
+                    }
+
+                    if (iframe) {
+                        // Reset the iframe height (so we can shrink the iframe if needed)
+                        $(iframe).height(0);
+
+                        // Set the new size
+                        $(iframe).height($(document).height());
+                    }
+                }
+        }
+
         $(function () {
             try {

@@ -61,28 +87,14 @@
                 <text>document.domain = "@SettingsHelper.GetIframeDocumentDomain()";</text>
                 }

-                var isInIFrame = (window.location != window.parent.location) ? true : false;
-
-                if (isInIFrame) {
-                    @if(!String.IsNullOrEmpty(id)) {
-                      <text>var iframe = $('iframe#@id]', parent.document).get(0);</text>
-                    }
-                    else
-                    {
-                      <text>var iframe = $('iframe[src="@src"]', parent.document).get(0);</text>
-                    }
-
-                    if (iframe) {
-                        $(iframe).height($(document).height());
-                    }
-                }
+                resizeFrame();

             } catch (ex) {
                 // Intentionally catch this so we don't get same origin errors in we aren't in an iframe
             }
         });
     </script>
-}
+}

 </html>


Remove unnecessary TODO

Remove unnecessary TODO

--- apis/Google.Cloud.Firestore/Google.Cloud.Firestore/Query.cs
+++ apis/Google.Cloud.Firestore/Google.Cloud.Firestore/Query.cs
@@ -890,7 +890,6 @@
                 }
                 else
                 {
-                    // TODO: For arrays and maps, we should check this recursively.
                     var convertedValue = ValueSerializer.Serialize(value);
                     ValidateNoSentinelsRecursively(convertedValue, "Sentinel values cannot be specified in filters");
                     return new InternalFilter(fieldPath, (int) op, convertedValue);


Authorization Cloning Rules Tests

Authorization Cloning Rules Tests

--- Csla20Test/Csla.Test/Authorization/AuthTests.cs
+++ Csla20Test/Csla.Test/Authorization/AuthTests.cs
@@ -23,49 +23,78 @@
         {
             ApplicationContext.GlobalContext.Clear();

+            Security.TestPrincipal.SimulateLogin();
+
+            //Security.PermissionsRoot pr = Security.PermissionsRoot.NewPermissionsRoot();
+
+            #region "Pre Cloning Tests"
+
             DataPortal.DpRoot root = DataPortal.DpRoot.NewRoot();

-            root.AddAuthRules();
-
             //Is it denying read properly?
-            string DeniedRead = root.DenyReadOnProperty;
+            Assert.AreEqual("[DenyReadOnProperty] Can't read property", root.DenyReadOnProperty,
+                "Read should have been denied 1");

             //Is it denying write properly?
-            root.DenyWriteOnProperty = "Write has been allowed when it shouldn't";
-            string DeniedWrite = root.Auth;
+            root.DenyWriteOnProperty = "DenyWriteOnProperty";
+
+            Assert.AreEqual("[DenyWriteOnProperty] Can't write variable", root.Auth,
+                "Write should have been denied 2");

             //Is it denying both read and write properly?
-            //We're checking this to see whether the methods are working properly
-            //for a single method (i.e., is the property having both read and write
-            //denied, like it's supposed to).
-            string DeniedReadWrite_Read = root.DenyReadWriteOnProperty;
-            root.DenyReadWriteOnProperty = "Write has been allowed when it shouldn't";
-            string DeniedReadWrite_Write = root.Auth;
+            Assert.AreEqual("[DenyReadWriteOnProperty] Can't read property", root.DenyReadWriteOnProperty,
+                "Read should have been denied 3");

-            //Is it allowing read and write properly?
-            string AllowReadWrite_Read = root.AllowReadWriteOnProperty;
-            root.AllowReadWriteOnProperty = "Write was allowed";
-            string AllowReadWrite_Write = root.Auth;
+            root.DenyReadWriteOnProperty = "DenyReadWriteONproperty";
+
+            Assert.AreEqual("[DenyReadWriteOnProperty] Can't write variable", root.Auth,
+                "Write should have been denied 4");
+
+            //Is it allowing both read and write properly?
+            Assert.AreEqual(root.AllowReadWriteOnProperty, root.Auth,
+                "Read should have been allowed 5");
+
+            root.AllowReadWriteOnProperty = "No value";
+            Assert.AreEqual("No value", root.Auth,
+                "Write should have been allowed 6");
+
+            #endregion
+
+            #region "After Cloning Tests"
+
+            //Do they work under cloning as well?
+            DataPortal.DpRoot NewRoot = root.Clone();

             ApplicationContext.GlobalContext.Clear();

-            Assert.AreEqual("[DenyReadOnProperty] Can't read property", DeniedRead,
-                "Read should have been denied 1");
-
-            Assert.AreEqual("[DenyWriteOnProperty] Can't write variable", DeniedWrite,
-                "Write should have been denied 2");
+            //Is it denying read properly?
+            Assert.AreEqual("[DenyReadOnProperty] Can't read property", NewRoot.DenyReadOnProperty,
+                "Read should have been denied 7");

-            Assert.AreEqual("[DenyReadWriteOnProperty] Can't read property", DeniedReadWrite_Read,
-                "Read should have been denied 3");
+            //Is it denying write properly?
+            NewRoot.DenyWriteOnProperty = "DenyWriteOnProperty";

-            Assert.AreEqual("[DenyReadWriteOnProperty] Can't write variable", DeniedReadWrite_Write,
-                "Write should have been denied 4");
+            Assert.AreEqual("[DenyWriteOnProperty] Can't write variable", NewRoot.Auth,
+                "Write should have been denied 8");

-            Assert.AreEqual("AllowReadWriteOnProperty", AllowReadWrite_Read,
-                "Read should have been allowed 5");
+            //Is it denying both read and write properly?
+            Assert.AreEqual("[DenyReadWriteOnProperty] Can't read property", NewRoot.DenyReadWriteOnProperty,
+                "Read should have been denied 9");

-            Assert.AreEqual("Write was allowed", AllowReadWrite_Write,
-                "Write shoudl have been allowed 6");
+            NewRoot.DenyReadWriteOnProperty = "DenyReadWriteONproperty";
+
+            Assert.AreEqual("[DenyReadWriteOnProperty] Can't write variable", NewRoot.Auth,
+                "Write should have been denied 10");
+
+            //Is it allowing both read and write properly?
+            Assert.AreEqual(NewRoot.AllowReadWriteOnProperty, NewRoot.Auth,
+                "Read should have been allowed 11");
+
+            NewRoot.AllowReadWriteOnProperty = "AllowReadWriteOnProperty";
+            Assert.AreEqual("AllowReadWriteOnProperty", NewRoot.Auth,
+                "Write should have been allowed 12");
+
+            #endregion
         }
     }
 }


Abstract out GetPins and GetHotPins

Abstract out GetPins and GetHotPins

--- DayTomato/DayTomato/Services/DayTomatoClient.cs
+++ DayTomato/DayTomato/Services/DayTomatoClient.cs
@@ -72,14 +72,17 @@
         public Task<bool> RemoveVoteTrip(string tripId, Account account) => CastVoteOn("trips", tripId, account, 0);

         // Get Pins
-        public async Task<List<Pin>> GetPins()
-        {
-            var response = await _httpClient.GetAsync("pins");
-            response.EnsureSuccessStatusCode();
+        public async Task<List<Pin>> GetPins(string sort = "createDate", int limit = 0)
+		{
+		    var response = await _httpClient.GetAsync($"pins?sort={sort}&limit={limit}");
+		    response.EnsureSuccessStatusCode();

             var content = await response.Content.ReadAsStringAsync();
             return JsonConvert.DeserializeObject<List<Pin>>(content);
         }
+
+        // Get hot pins
+        public Task<List<Pin>> GetHotPins() => GetPins("likes", 10);

         // Get a Pin
         public async Task<Pin> GetPin(string id)
@@ -92,7 +95,7 @@
         }

         // Get Pins In Area
-        public async Task<List<Pin>> GetPins(double latTopLeft, double lngTopLeft, double latBotRight, double lngBotRight)
+        public async Task<List<Pin>> __GetPins(double latTopLeft, double lngTopLeft, double latBotRight, double lngBotRight)
 		{
 			List<Pin> pins = new List<Pin>();
 			var uri = new Uri(BaseUrl + "pins?searcharea=" + Convert.ToString(latTopLeft) + ","
@@ -103,16 +106,6 @@
 		    response.EnsureSuccessStatusCode();

             string content = await response.Content.ReadAsStringAsync();
-            return JsonConvert.DeserializeObject<List<Pin>>(content);
-        }
-
-        // Get hot pins
-        public async Task<List<Pin>> GetHotPins()
-		{
-			var response = await _httpClient.GetAsync("pins?sort=likes&limit=10");
-		    response.EnsureSuccessStatusCode();
-
-            var content = await response.Content.ReadAsStringAsync();
             return JsonConvert.DeserializeObject<List<Pin>>(content);
         }

@@ -225,7 +218,6 @@
 			var response = await _httpClient.PutAsync(uri, null);
 			return response.IsSuccessStatusCode;
 		}
-

 		// Getting an image from a url
 		public async Task<byte[]> GetImageBitmapFromUrlAsync(string url)


better search object

better search object

--- DbShell.Driver.Common/Structure/DatabaseInfo.cs
+++ DbShell.Driver.Common/Structure/DatabaseInfo.cs
@@ -32,28 +32,28 @@
         /// <summary>
         /// List of tables
         /// </summary>
-        [XmlCollection(typeof (TableInfo))]
+        [XmlCollection(typeof(TableInfo))]
         [DataMember]
         public List<TableInfo> Tables
         {
             get { return _tables; }
         }

-        [XmlCollection(typeof (ViewInfo))]
+        [XmlCollection(typeof(ViewInfo))]
         [DataMember]
         public List<ViewInfo> Views
         {
             get { return _views; }
         }

-        [XmlCollection(typeof (StoredProcedureInfo))]
+        [XmlCollection(typeof(StoredProcedureInfo))]
         [DataMember]
         public List<StoredProcedureInfo> StoredProcedures
         {
             get { return _storedProcedures; }
         }

-        [XmlCollection(typeof (FunctionInfo))]
+        [XmlCollection(typeof(FunctionInfo))]
         [DataMember]
         public List<FunctionInfo> Functions
         {
@@ -96,6 +96,11 @@
         private T FindObjectLike<T>(IEnumerable<T> objs, string schema, string name)
             where T : NamedObjectInfo
         {
+            var res = objs.FirstOrDefault(x => x.Schema == schema && x.Name == name);
+            if (res != null)
+            {
+                return null;
+            }
             if (schema == null)
             {
                 return objs.FirstOrDefault(t => String.Compare(t.Name, name, true) == 0);
@@ -447,7 +452,7 @@

         public T FindByGroupId<T>(T obj) where T : DatabaseObjectInfo
         {
-            return (T) FindByGroupId(obj.GroupId);
+            return (T)FindByGroupId(obj.GroupId);
         }

         public TableInfo AddTable(NameWithSchema name)
@@ -504,13 +509,13 @@
             switch (obj.ObjectType)
             {
                 case DatabaseObjectType.View:
-                    Views.Add((ViewInfo) res);
+                    Views.Add((ViewInfo)res);
                     break;
                 case DatabaseObjectType.StoredProcedure:
-                    StoredProcedures.Add((StoredProcedureInfo) res);
+                    StoredProcedures.Add((StoredProcedureInfo)res);
                     break;
                 case DatabaseObjectType.Function:
-                    Functions.Add((FunctionInfo) res);
+                    Functions.Add((FunctionInfo)res);
                     break;
                 case DatabaseObjectType.Trigger:
                     Triggers.Add((TriggerInfo)res);
@@ -522,10 +527,10 @@
         private SpecificObjectInfo FindSpecificObject(SpecificObjectInfo obj)
         {
             return
-                (SpecificObjectInfo) FindStoredProcedure(obj.FullName)
-                ?? (SpecificObjectInfo) FindFunction(obj.FullName)
-                ?? (SpecificObjectInfo) FindView(obj.FullName)
-                ?? (SpecificObjectInfo) FindTrigger(obj.FullName);
+                (SpecificObjectInfo)FindStoredProcedure(obj.FullName)
+                ?? (SpecificObjectInfo)FindFunction(obj.FullName)
+                ?? (SpecificObjectInfo)FindView(obj.FullName)
+                ?? (SpecificObjectInfo)FindTrigger(obj.FullName);
         }

         public void AddObject(DatabaseObjectInfo obj, bool reuseGrouId)
@@ -593,9 +598,9 @@
         public override FullDatabaseRelatedName GetName()
         {
             return new FullDatabaseRelatedName
-                {
-                    ObjectType = DatabaseObjectType.Database,
-                };
+            {
+                ObjectType = DatabaseObjectType.Database,
+            };
         }
     }
 }


Make Default Collection Configurable.

Make Default Collection Configurable.

--- EAAddinFramework/WorkTracking/TFS/TFSProject.cs
+++ EAAddinFramework/WorkTracking/TFS/TFSProject.cs
@@ -15,6 +15,7 @@
 using System.Net.Http.Headers;
 using TSF.UmlToolingFramework.Wrappers.EA;
 using UML=TSF.UmlToolingFramework.UML;
+using System.Configuration;

 namespace EAAddinFramework.WorkTracking.TFS
 {
@@ -23,10 +24,10 @@
 	/// </summary>
 	public class TFSProject:Project
 	{
-		 //TFS constants
-        const string tfsCollection = "DefaultCollection/";
+        //TFS constants
+        const string defaultTfsCollection = "DefaultCollection/";
         //variables
-		internal TFSSettings settings {get;set;}
+        internal TFSSettings settings {get;set;}
 		internal string TFSUrl {get;set;}
 		private List<WorkItem> _workitems;
 		AuthenticationHeaderValue _authorization;
@@ -89,14 +90,29 @@
 				throw new NotImplementedException();
 			}
 		}
-
-		/// <summary>
-		/// returns all owned workitems for this package and if requested for all owned packages recursively
-		/// </summary>
-		/// <param name="ownerPackage">the owner package</param>
-		/// <param name="recursive">indicates whether or not we should recursively search workitems in owned packages</param>
-		/// <returns>a list of owned workitems for the given package</returns>
-		public override List<WT.Workitem> getOwnedWorkitems(UML.Classes.Kernel.Package ownerPackage, bool recursive)
+
+        //Get the DefaultCollection path from the config file (if it exists).
+        private string tfsCollection
+        {
+            get
+            {
+                if (ConfigurationManager.AppSettings.AllKeys.Any(key => key.Equals("DefaultCollection")))
+                {
+
+                    return ConfigurationManager.AppSettings["DefaultCollection"];
+                }
+                //Return the constant.
+                return defaultTfsCollection;
+            }
+        }
+
+        /// <summary>
+        /// returns all owned workitems for this package and if requested for all owned packages recursively
+        /// </summary>
+        /// <param name="ownerPackage">the owner package</param>
+        /// <param name="recursive">indicates whether or not we should recursively search workitems in owned packages</param>
+        /// <returns>a list of owned workitems for the given package</returns>
+        public override List<WT.Workitem> getOwnedWorkitems(UML.Classes.Kernel.Package ownerPackage, bool recursive)
 		{
 			List<WT.Workitem> foundWorkItems = new List<WT.Workitem>();
 			var elementTypes = settings.mappedElementTypes;


TDfix, same fix applied to nonspecific (#748)

* fix

* GUI fix for Max Fragment Mass

* Update unit test

* Codacy

* same fix different class

* another fix oh boy

--- EngineLayer/Indexing/PrecursorIndexingEngine.cs
+++ EngineLayer/Indexing/PrecursorIndexingEngine.cs
@@ -107,7 +107,7 @@
                 }
             }

-            var fragmentIndex = new List<int>[maxFragmentMass * fragmentBinsPerDalton];
+            var fragmentIndex = new List<int>[maxFragmentMass * fragmentBinsPerDalton+1];

             // populate fragment index
             progress = 0;
@@ -115,14 +115,15 @@
             for (int i = 0; i < peptidesSortedByMass.Count; i++)
             {
                 double mz = Chemistry.ClassExtensions.ToMz(peptidesSortedByMass[i].MonoisotopicMassIncludingFixedMods, 1);
+                if (!Double.IsNaN(mz))
+                {
+                    int fragmentBin = (int)Math.Round(mz * fragmentBinsPerDalton);

-                int fragmentBin = (int)Math.Round(mz * fragmentBinsPerDalton);
-
-                if (fragmentIndex[fragmentBin] == null)
-                    fragmentIndex[fragmentBin] = new List<int> { i };
-                else
-                    fragmentIndex[fragmentBin].Add(i);
-
+                    if (fragmentIndex[fragmentBin] == null)
+                        fragmentIndex[fragmentBin] = new List<int> { i };
+                    else
+                        fragmentIndex[fragmentBin].Add(i);
+                }
                 progress++;
                 var percentProgress = (int)((progress / peptidesSortedByMass.Count) * 100);


Show the exception to the user

Show the exception to the user

--- Espera/Espera.View/ViewModels/CrashViewModel.cs
+++ Espera/Espera.View/ViewModels/CrashViewModel.cs
@@ -11,6 +11,8 @@

         public CrashViewModel(Exception exception)
         {
+            this.ReportContent = exception.ToString();
+
             this.SubmitCrashReport = this.WhenAnyValue(x => x.SendingSucceeded)
                 .Select(x => x == null || !x.Value)
                 .ToCommand();
@@ -21,6 +23,8 @@
                 .ToProperty(this, x => x.SendingSucceeded);
         }

+        public string ReportContent { get; private set; }
+
         public bool? SendingSucceeded
         {
             get { return this.sendingSucceeded == null ? null : this.sendingSucceeded.Value; }


Changed CustomIQ return value

Changed CustomIQ return value

--- Extensions/CustomExtension/CustomIqExtension.cs
+++ Extensions/CustomExtension/CustomIqExtension.cs
@@ -73,7 +73,7 @@
             {
                 //call the callback for receiving a relevant stanza
                 //and wait for answer in order provide it
-                response = im.CustomIqDelegate.Invoke(stanza.From,query.InnerText);
+                response = im.CustomIqDelegate.Invoke(stanza.From,query.InnerXml);

                 if (response != null && response != "")
                 {


Initial commit for adding support for toggling autodelete

--- Google.PowerShell/Compute/GceInstanceCmdlets.cs
+++ Google.PowerShell/Compute/GceInstanceCmdlets.cs
@@ -991,10 +991,12 @@
         {
             public const string AccessConfig = "AccessConfig";
             public const string Disk = "Disk";
+            public const string AutoDeleteDisk = "AutoDeleteDisk";
             public const string Metadata = "Metadata";
             public const string Tag = "Tag";
             public const string AccessConfigByObject = "AccessConfigByObject";
             public const string DiskByObject = "DiskByObject";
+            public const string AutoDeleteDiskByObject = "AutoDeleteDiskByObject";
             public const string MetadataByObject = "MetadataByObject";
             public const string TagByObject = "TagByObject";
         }
@@ -1006,6 +1008,7 @@
         /// </summary>
         [Parameter(ParameterSetName = ParameterSetNames.AccessConfig)]
         [Parameter(ParameterSetName = ParameterSetNames.Disk)]
+        [Parameter(ParameterSetName = ParameterSetNames.AutoDeleteDisk)]
         [Parameter(ParameterSetName = ParameterSetNames.Metadata)]
         [Parameter(ParameterSetName = ParameterSetNames.Tag)]
         [ConfigPropertyName(CloudSdkSettings.CommonProperties.Project)]
@@ -1021,6 +1024,7 @@
         /// </summary>
         [Parameter(ParameterSetName = ParameterSetNames.AccessConfig)]
         [Parameter(ParameterSetName = ParameterSetNames.Disk)]
+        [Parameter(ParameterSetName = ParameterSetNames.AutoDeleteDisk)]
         [Parameter(ParameterSetName = ParameterSetNames.Metadata)]
         [Parameter(ParameterSetName = ParameterSetNames.Tag)]
         [ConfigPropertyName(CloudSdkSettings.CommonProperties.Zone)]
@@ -1038,6 +1042,8 @@
             Position = 0, ValueFromPipeline = true)]
         [Parameter(ParameterSetName = ParameterSetNames.Disk, Mandatory = true,
             Position = 0, ValueFromPipeline = true)]
+        [Parameter(ParameterSetName = ParameterSetNames.AutoDeleteDisk, Mandatory = true,
+            Position = 0, ValueFromPipeline = true)]
         [Parameter(ParameterSetName = ParameterSetNames.Metadata, Mandatory = true,
             Position = 0, ValueFromPipeline = true)]
         [Parameter(ParameterSetName = ParameterSetNames.Tag, Mandatory = true,
@@ -1054,6 +1060,8 @@
         [Parameter(ParameterSetName = ParameterSetNames.AccessConfigByObject, Mandatory = true,
             Position = 0, ValueFromPipeline = true)]
         [Parameter(ParameterSetName = ParameterSetNames.DiskByObject, Mandatory = true,
+            Position = 0, ValueFromPipeline = true)]
+        [Parameter(ParameterSetName = ParameterSetNames.AutoDeleteDiskByObject, Mandatory = true,
             Position = 0, ValueFromPipeline = true)]
         [Parameter(ParameterSetName = ParameterSetNames.MetadataByObject, Mandatory = true,
             Position = 0, ValueFromPipeline = true)]
@@ -1114,6 +1122,28 @@

         /// <summary>
         /// <para type="description">
+        /// The name of the disk to turn on autodelete.
+        /// </para>
+        /// </summary>
+        [Parameter(ParameterSetName = ParameterSetNames.AutoDeleteDisk)]
+        [Parameter(ParameterSetName = ParameterSetNames.AutoDeleteDiskByObject)]
+        [ArrayPropertyTransform(typeof(Disk), nameof(Disk.SelfLink))]
+        [ValidateNotNullOrEmpty]
+        public string[] TurnOnAutoDeleteDisk { get; set; } = { };
+
+        /// <summary>
+        /// <para type="description">
+        /// The name of the disk to turn off autodelete.
+        /// </para>
+        /// </summary>
+        [Parameter(ParameterSetName = ParameterSetNames.AutoDeleteDisk)]
+        [Parameter(ParameterSetName = ParameterSetNames.AutoDeleteDiskByObject)]
+        [ArrayPropertyTransform(typeof(Disk), nameof(Disk.SelfLink))]
+        [ValidateNotNullOrEmpty]
+        public string[] TurnOffAutoDeleteDisk { get; set; } = { };
+
+        /// <summary>
+        /// <para type="description">
         /// The keys and values of the metadata to add.
         /// </para>
         /// </summary>
@@ -1156,6 +1186,7 @@
             {
                 case ParameterSetNames.AccessConfig:
                 case ParameterSetNames.Disk:
+                case ParameterSetNames.AutoDeleteDisk:
                 case ParameterSetNames.Metadata:
                 case ParameterSetNames.Tag:
                     _project = Project;
@@ -1164,6 +1195,7 @@
                     break;
                 case ParameterSetNames.AccessConfigByObject:
                 case ParameterSetNames.DiskByObject:
+                case ParameterSetNames.AutoDeleteDiskByObject:
                 case ParameterSetNames.MetadataByObject:
                 case ParameterSetNames.TagByObject:
                     _project = GetProjectNameFromUri(Object.SelfLink);
@@ -1181,6 +1213,10 @@
                 case ParameterSetNames.Disk:
                 case ParameterSetNames.DiskByObject:
                     ProcessDisk();
+                    break;
+                case ParameterSetNames.AutoDeleteDisk:
+                case ParameterSetNames.AutoDeleteDiskByObject:
+                    ProcessAutoDeleteDisk();
                     break;
                 case ParameterSetNames.Metadata:
                 case ParameterSetNames.MetadataByObject:
@@ -1285,6 +1321,14 @@
         }

         /// <summary>
+        /// ProcessRecord for AutoDeleteDisk parameter set.
+        /// </summary>
+        private void ProcessAutoDeleteDisk()
+        {
+            FILL IN HERE
+        }
+
+        /// <summary>
         /// ProcessRecord for Metadata parameter set.
         /// </summary>
         private void ProcessMetadata()


Safer email and name validation in Configuration.BuildSignature

--- LibGit2Sharp/Configuration.cs
+++ LibGit2Sharp/Configuration.cs
@@ -342,30 +342,29 @@

         internal Signature BuildSignature(DateTimeOffset now, bool shouldThrowIfNotFound)
         {
-            var name = Get<string>("user.name");
-            var email = Get<string>("user.email");
-
-            if (shouldThrowIfNotFound)
-            {
-                if (name == null || string.IsNullOrEmpty(name.Value))
+            var name = this.GetValueOrDefault<string>("user.name");
+            var email = this.GetValueOrDefault<string>("user.email");
+
+            if (shouldThrowIfNotFound && (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(email)))
+            {
+                if (string.IsNullOrEmpty(name))
                 {
                     throw new LibGit2SharpException(
-                        "Can not find Name setting of the current user in Git configuration.");
+                        "Cannot find Name setting of the current user in Git configuration.");
                 }

-                if (email == null || string.IsNullOrEmpty(email.Value))
+                if (string.IsNullOrEmpty(email))
                 {
                     throw new LibGit2SharpException(
-                        "Can not find Email setting of the current user in Git configuration.");
+                        "Cannot find Email setting of the current user in Git configuration.");
                 }
             }

-            var nameForSignature = name == null || string.IsNullOrEmpty(name.Value) ? "unknown" : name.Value;
-            var emailForSignature = email == null || string.IsNullOrEmpty(email.Value)
-                                        ? string.Format("{0}@{1}", Environment.UserName, Environment.UserDomainName)
-                                        : email.Value;
-
-            return new Signature(nameForSignature, emailForSignature, now);
+            return new Signature(
+                !string.IsNullOrEmpty(name) ? name : "unknown",
+                !string.IsNullOrEmpty(email) ? email : string.Format(
+                        CultureInfo.InvariantCulture, "{0}@{1}", Environment.UserName, Environment.UserDomainName),
+                now);
         }

         private ConfigurationSafeHandle Snapshot()


Revise whitespace

Revise whitespace

--- Library/Export/GCodeExport.cs
+++ Library/Export/GCodeExport.cs
@@ -212,12 +212,14 @@
 		{
 			try
 			{
-				GCodeFileStream gCodeFileStream = new GCodeFileStream(GCodeFile.Load(gcodeFilename,
-					new Vector4(),
-					new Vector4(),
-					new Vector4(),
-					Vector4.One,
-					CancellationToken.None));
+				var gCodeFileStream = new GCodeFileStream(
+					GCodeFile.Load(
+						gcodeFilename,
+						new Vector4(),
+						new Vector4(),
+						new Vector4(),
+						Vector4.One,
+						CancellationToken.None));

 				bool addLevelingStream = printer.Settings.GetValue<bool>(SettingsKey.print_leveling_enabled) && this.ApplyLeveling;
 				var queueStream = new QueuedCommandsStream(gCodeFileStream);
@@ -236,6 +238,7 @@
 						{
 							file.WriteLine(nextLine);
 						}
+
 						nextLine = finalStream.ReadLine();
 					}
 				}


Avoid instantiations of test cases where possible

--- osu.Framework.Testing/TestBrowser.cs
+++ osu.Framework.Testing/TestBrowser.cs
@@ -41,10 +41,8 @@
             foreach (Type type in asm.GetLoadableTypes().Where(t => t.IsSubclassOf(typeof(TestCase)) && !t.IsAbstract))
                 TestTypes.Add(type);

-            TestTypes.Sort((a, b) => string.Compare(instantiateTest(a).Name, instantiateTest(b).Name, StringComparison.Ordinal));
+            TestTypes.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.Ordinal));
         }
-
-        private TestCase instantiateTest(Type testType) => (TestCase)Activator.CreateInstance(testType);

         [BackgroundDependencyLoader]
         private void load(Storage storage)
@@ -185,8 +183,8 @@

             if (testType != null)
             {
-                testContentContainer.Add(CurrentTest = instantiateTest(testType));
-                CurrentTest.RunAllSteps(onCompletion);
+                testContentContainer.Add(CurrentTest = (TestCase)Activator.CreateInstance(testType));
+                CurrentTest.OnLoadComplete = d => ((TestCase)d).RunAllSteps(onCompletion);
             }

             updateButtons();


Explicitly dispose testcases

Explicitly dispose testcases

--- osu.Framework/Testing/TestBrowser.cs
+++ osu.Framework/Testing/TestBrowser.cs
@@ -388,6 +388,7 @@
                 {
                     testContentContainer.Remove(lastTest.Parent);
                     lastTest.Clear();
+                    lastTest.Dispose();
                 }

                 if (CurrentTest != newTest)


Use easing function directly

Use easing function directly

--- osu.Framework/Utils/Interpolation.cs
+++ osu.Framework/Utils/Interpolation.cs
@@ -234,7 +234,7 @@
                 if (duration == 0 || current == 0)
                     return startColour;

-                float t = Math.Max(0, Math.Min(1, (float)ApplyEasing(easing, current / duration)));
+                float t = Math.Max(0, Math.Min(1, (float)easing.ApplyEasing(current / duration)));

                 return new Color4(
                     startColour.R + t * (endColour.R - startColour.R),
@@ -286,7 +286,7 @@
                 if (duration == 0)
                     return val2;

-                double t = ApplyEasing(easing, current / duration);
+                double t = easing.ApplyEasing(current / duration);
                 return val1 + t * (val2 - val1);
             }

@@ -298,7 +298,7 @@
                 if (duration == 0 || current == 0)
                     return val1;

-                float t = (float)ApplyEasing(easing, current / duration);
+                float t = (float)easing.ApplyEasing(current / duration);
                 return val1 + t * (val2 - val1);
             }

@@ -310,7 +310,7 @@
                 if (duration == 0 || current == 0)
                     return val1;

-                float t = (float)ApplyEasing(easing, current / duration);
+                float t = (float)easing.ApplyEasing(current / duration);

                 return new RectangleF(
                     val1.X + t * (val2.X - val1.X),


Remove extra braces

Remove extra braces

--- osu.Game/Beatmaps/Formats/Decoder.cs
+++ osu.Game/Beatmaps/Formats/Decoder.cs
@@ -74,9 +74,7 @@
         {
             var storyboard = new Storyboard();
             foreach (StreamReader stream in streams)
-            {
                 ParseStoryboard(stream, storyboard);
-            }
             return storyboard;
         }


Add xmldoc for hiddenbyuser bool

Add xmldoc for hiddenbyuser bool

--- osu.Game/Overlays/Toolbar/Toolbar.cs
+++ osu.Game/Overlays/Toolbar/Toolbar.cs
@@ -23,6 +23,9 @@
         public const float HEIGHT = 40;
         public const float TOOLTIP_HEIGHT = 30;

+        /// <summary>
+        /// Whether the user hid this <see cref="Toolbar"/> with <see cref="GlobalAction.ToggleToolbar"/>.
+        /// </summary>
         public bool HiddenByUser;

         public Action OnHome;


Move more toolbar to async load

Move more toolbar to async load

--- osu.Game/Overlays/Toolbar/Toolbar.cs
+++ osu.Game/Overlays/Toolbar/Toolbar.cs
@@ -22,7 +22,7 @@

         public Action OnHome;

-        private readonly ToolbarUserArea userArea;
+        private ToolbarUserArea userArea;

         protected override bool BlockPositionalInput => false;

@@ -33,7 +33,8 @@

         private readonly Bindable<OverlayActivation> overlayActivationMode = new Bindable<OverlayActivation>(OverlayActivation.All);

-        public Toolbar()
+        [BackgroundDependencyLoader(true)]
+        private void load(OsuGame osuGame)
         {
             Children = new Drawable[]
             {
@@ -78,11 +79,7 @@

             RelativeSizeAxes = Axes.X;
             Size = new Vector2(1, HEIGHT);
-        }

-        [BackgroundDependencyLoader(true)]
-        private void load(OsuGame osuGame)
-        {
             StateChanged += visibility =>
             {
                 if (overlayActivationMode.Value == OverlayActivation.Disabled)


add test code

add test code

--- Samples/AdventureWorksModel/Production/WorkOrderRepository.cs
+++ Samples/AdventureWorksModel/Production/WorkOrderRepository.cs
@@ -38,6 +38,13 @@
             return CreateNewWorkOrder(product);
         }

+        [DescribedAs("Create workorder based on random product - to test transient creation")]
+        [QueryOnly]
+        public WorkOrder CreateNewWorkOrder3() {
+            var product = Random<Product>();
+            return CreateNewWorkOrder(product);
+        }
+

         #region Injected Services


remove Sql Substring on Etc.

remove Sql Substring on Etc.

--- Signum.Engine/Linq/ExpressionVisitor/DbExpressionNominator.cs
+++ Signum.Engine/Linq/ExpressionVisitor/DbExpressionNominator.cs
@@ -1007,14 +1007,9 @@
             if (this.IsFullNominateOrAggresive)
                 return newStr;

-            var subString = Add(new SqlFunctionExpression(typeof(string), null, SqlFunction.SUBSTRING.ToString(), new Expression[]
-            {
-                newStr,
-                new SqlConstantExpression(1, typeof(int)),
-                Expression.Add(max, new SqlConstantExpression(1, typeof(int))),
-            }));
-
-            return etcString == null ? Expression.Call(miEtc2, subString, max) : Expression.Call(miEtc3, subString, max, etcString);
+            return etcString == null ?
+                Expression.Call(miEtc2, newStr, max) :
+                Expression.Call(miEtc3, newStr, max, etcString);
         }

         static MethodInfo miEtc2 = ReflectionTools.GetMethodInfo(() => "".Etc(2));


changed default port to 9001

changed default port to 9001

--- Server.cs
+++ Server.cs
@@ -13,7 +13,7 @@
     class Server
     {
         public string ip = IPAddress.Any.ToString();
-        ushort port = 9000;
+        ushort port = 9001;

         TcpListener listener;


Actually start IPC thread

Actually start IPC thread

--- osu.Framework/Platform/DesktopGameHost.cs
+++ osu.Framework/Platform/DesktopGameHost.cs
@@ -50,6 +50,7 @@
                         Name = "IPC",
                         IsBackground = true
                     };
+                    ipcThread.Start();
                 }
             }


Adjust catcher size to match stable

Adjust catcher size to match stable

--- osu.Game.Rulesets.Catch/UI/CatcherArea.cs
+++ osu.Game.Rulesets.Catch/UI/CatcherArea.cs
@@ -25,7 +25,7 @@
 {
     public class CatcherArea : Container
     {
-        public const float CATCHER_SIZE = 84;
+        public const float CATCHER_SIZE = 100;

         protected readonly Catcher MovableCatcher;


address comments

address comments

--- osu.Game.Rulesets.Osu/Mods/OsuModGhost.cs
+++ osu.Game.Rulesets.Osu/Mods/OsuModGhost.cs
@@ -3,10 +3,10 @@

 using osu.Game.Rulesets.UI;
 using osu.Game.Rulesets.Mods;
-using osu.Framework.Graphics;
 using osu.Framework.Graphics.Sprites;
 using osu.Framework.Bindables;
 using osu.Framework.Localisation;
+using osu.Framework.Utils;
 using osu.Game.Graphics.UserInterface;
 using osu.Game.Configuration;
 using osu.Game.Overlays.Settings;
@@ -17,14 +17,18 @@
 {
     public class OsuModGhost : Mod, IUpdatableByPlayfield, IApplicableToScoreProcessor
     {
+        public const float CURSOR_ALPHA_TRANSITION_DURATION = 100;
         public override string Name => "Ghost";
-        public override string Acronym => "G";
+        public override string Acronym => "GS";
         public override ModType Type => ModType.Fun;
         public override IconUsage? Icon => FontAwesome.Solid.Ghost;
         public override string Description => "Where's the cursor?";
         public override double ScoreMultiplier => 1;
-
-        private readonly BindableNumber<float> ghostAlpha = new BindableFloat(0);
+        private double transitionProgress = 0;
+        private float currentCursorAlpha = 1;
+        private float startCursorAlpha = 1;
+        private float targetCursorAlpha = 0;
+
         private BindableNumber<int> currentCombo;

         [SettingSource(
@@ -43,21 +47,25 @@
         public ScoreRank AdjustRank(ScoreRank rank, double accuracy) => rank;
         public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
         {
-            currentCombo = scoreProcessor.Combo.GetBoundCopy();
-            currentCombo.BindValueChanged(combo =>
-            {
-                float dimFactor = HiddenComboCount.Value == 0 ? 1 : (float)combo.NewValue / HiddenComboCount.Value;
-
-                scoreProcessor.TransformBindableTo(ghostAlpha, 1-dimFactor, 100, Easing.OutQuint);
-            }, true);
+            if (HiddenComboCount.Value != 0) {
+                currentCombo = scoreProcessor.Combo.GetBoundCopy();
+                currentCombo.BindValueChanged(combo =>
+                {
+                    targetCursorAlpha = 1 - (float)combo.NewValue / HiddenComboCount.Value;
+                    startCursorAlpha = currentCursorAlpha;
+                    transitionProgress = 0;
+                }, true);
+            }
         }
-

         public virtual void Update(Playfield playfield)
         {
-            playfield.Cursor.Alpha = ghostAlpha.Value;
+            if (transitionProgress < CURSOR_ALPHA_TRANSITION_DURATION) {
+                transitionProgress += playfield.Time.Elapsed;
+                currentCursorAlpha = (float)Interpolation.Lerp(startCursorAlpha, targetCursorAlpha, transitionProgress/CURSOR_ALPHA_TRANSITION_DURATION);
+                playfield.Cursor.Alpha = currentCursorAlpha;
+            }
         }
-
     }

     public class HiddenComboSlider : OsuSliderBar<int>


Use provided extension method instead of reimplementing locally

--- osu.Game/Screens/Select/PlaySongSelect.cs
+++ osu.Game/Screens/Select/PlaySongSelect.cs
@@ -8,7 +8,6 @@
 using osu.Framework.Input.Events;
 using osu.Framework.Screens;
 using osu.Game.Graphics;
-using osu.Game.Online.API.Requests.Responses;
 using osu.Game.Overlays;
 using osu.Game.Overlays.Notifications;
 using osu.Game.Rulesets.Mods;
@@ -103,23 +102,7 @@

                 if (replayGeneratingMod != null)
                 {
-                    return new ReplayPlayer((beatmap, mods) =>
-                    {
-                        var replayData = replayGeneratingMod.CreateReplayData(beatmap, mods);
-
-                        return new Score
-                        {
-                            Replay = replayData.Replay,
-                            ScoreInfo =
-                            {
-                                User = new APIUser
-                                {
-                                    Id = APIUser.SYSTEM_USER_ID,
-                                    Username = replayData.User.Username,
-                                }
-                            }
-                        };
-                    });
+                    return new ReplayPlayer((beatmap, mods) => replayGeneratingMod.CreateScoreFromReplayData(beatmap, mods));
                 }

                 return new SoloPlayer();


ContentManagerMock: Added ExpectGetItemLatestVersion method.

--- Proligence.Orchard.Testing/Mocks/ContentManagerMock.cs
+++ Proligence.Orchard.Testing/Mocks/ContentManagerMock.cs
@@ -54,6 +54,11 @@
         public void ExpectGetItemDraftRequired(int id, ContentItem contentItem)
         {
             Setup(x => x.Get(id, It.Is<VersionOptions>(o => o.IsDraftRequired))).Returns(contentItem);
+        }
+
+        public void ExpectGetItemLatestVersion(int id, ContentItem contentItem)
+        {
+            Setup(x => x.Get(id, It.Is<VersionOptions>(o => o.IsLatest))).Returns(contentItem);
         }

         public void ExpectGetItemAnyVersion(int id, ContentItem contentItem)


Adding digest header

Adding digest header

--- RESTLess/Controls/RequestBuilderDigestAuthViewModel.cs
+++ RESTLess/Controls/RequestBuilderDigestAuthViewModel.cs
@@ -194,7 +194,7 @@
                 Enum.TryParse(QopTextBox.Replace("-", string.Empty), out qopType);
             }

-            string ha1;
+            string ha1 = null;
             if (!string.IsNullOrEmpty(UsernameTextBox) && !string.IsNullOrEmpty(RealmTextBox) && !string.IsNullOrEmpty(PasswordTextBox))
             {
                 ha1 = GetMD5HashData(UsernameTextBox + ":" + RealmTextBox + ":" + PasswordTextBox);
@@ -205,7 +205,7 @@
                 }
             }

-            string ha2;
+            string ha2 = null;
             if (qopType == QopType.none || qopType == QopType.auth)
             {
                 ha2 = GetMD5HashData(request.Method + request.Url);
@@ -215,7 +215,14 @@
                 // TODO : if no body?
                 ha2 = GetMD5HashData(request.Method + request.Url + GetMD5HashData(request.Body));
             }
-
+
+            if (!string.IsNullOrEmpty(ha1) && !string.IsNullOrEmpty(ha2))
+            {
+                var response = qopType != QopType.none ? GetMD5HashData(ha1 + ":" + NonceTextBox + ":" + NonceCount + ":" + clientNonceTextBox + ":" + QopTextBox + ":" + ha2) : GetMD5HashData(ha1 + ":" + NonceTextBox + ":" + ha2);
+
+                request.Headers.Add(AuthorizationHeaderString, response);
+                ActionLabel = "Added!";
+            }
         }

         public void ClearButton()


Fix when changing max jumps at air

Fix when changing max jumps at air

--- Raccoon/Core/Components/Movement/PlatformerMovement.cs
+++ Raccoon/Core/Components/Movement/PlatformerMovement.cs
@@ -201,10 +201,20 @@
             }

             set {
+                int previousMaxJumps = _maxJumps;
                 _maxJumps = Math.Max(0, value);

-                if (OnGround && Jumps != _maxJumps) {
-                    Jumps = _maxJumps;
+                // update current jumps amount
+                if (Jumps != _maxJumps) {
+                    if (OnGround) {
+                        Jumps = _maxJumps;
+                    } else {
+                        if (_maxJumps > previousMaxJumps) {
+                            Jumps += _maxJumps - previousMaxJumps;
+                        } else if (_maxJumps < previousMaxJumps) {
+                            Jumps = Math.Max(0, Jumps - (previousMaxJumps - _maxJumps));
+                        }
+                    }
                 }
             }
         }


Update to abstract even more platform variables

--- Raccoon/Core/Components/Movement/PlatformerMovement.cs
+++ Raccoon/Core/Components/Movement/PlatformerMovement.cs
@@ -15,8 +15,6 @@
         #region Public Members

         public static Vector2 GravityForce;
-        public static int LedgeJumpMaxTime = 200;       // milliseconds
-        public static uint JumpInputBufferTime = 200;   // milliseconds

         /// <summary>
         /// Elevation range degrees where it's considered a ramp, and will be walkable,
@@ -109,7 +107,7 @@
                      _requestedJump,
                      _canPerformEarlyJumpInput = true;

-        private int _jumpMaxY, _ledgeJumpTime;
+        private int _jumpMaxY, _ledgeJumpTime, _currentLedgeJumpMaxTime;
         private uint _lastTimeFirstRequestToJump;

         // ramp movement
@@ -287,6 +285,21 @@
         /// When leaving descending ramp, velocity will be reduced to this amount smooth it.
         /// </summary>
         public float SmoothLeavingDescendingRampVelocityCuttoff { get; set; } = 1f;
+
+        public float SmoothFallingFromDescendingRampVelocityCuttoff { get; set; } = 1f;
+
+        /// <summary>
+        /// Time limit that it's allowed to jump action perform a jump when start falling.
+        /// </summary>
+        public int LedgeJumpMaxTime { get; set; }
+
+        public int RampLedgeJumpMaxTime { get; set; }
+
+        /// <summary>
+        /// If jump action continuously happens until this time (in milliseconds) before touching the ground,
+        /// jump will happen automatically after ground is touched.
+        /// </summary>
+        public uint JumpInputBufferTime { get; set; }

         /// <summary>
         /// Tags to check using fall through platform logic.
@@ -367,10 +380,10 @@
             base.Update(delta);

             if (IsFalling) {
-                if (_ledgeJumpTime <= LedgeJumpMaxTime) {
+                if (_ledgeJumpTime <= _currentLedgeJumpMaxTime) {
                     _ledgeJumpTime += delta;
                 } else if (Jumps > 0) {
-                    // ledge jump time has been missed, so lost all jumps
+                    // ledge jump time has been missed, so all jumps are lost
                     Jumps = 0;
                     _canKeepCurrentJump = false; // Body has just fallen
                 }
@@ -758,7 +771,7 @@
             }

             // checks if can jump and ledge jump time
-            if (!CanJump || (!OnGround && _ledgeJumpTime > LedgeJumpMaxTime)) {
+            if (!CanJump || (!OnGround && _ledgeJumpTime > _currentLedgeJumpMaxTime)) {
                 return;
             }

@@ -1169,10 +1182,17 @@
         }

         private void Fall() {
+            // ledge jump
+            _ledgeJumpTime = 0;
+            if (IsOnRamp || IsLeavingRamp) {
+                _currentLedgeJumpMaxTime = RampLedgeJumpMaxTime;
+            } else {
+                _currentLedgeJumpMaxTime = LedgeJumpMaxTime;
+            }
+
             ClearRampState();
             IsFalling = true;
             OnGround = IsJumping = IsStillJumping = _canKeepCurrentJump = false;
-            _ledgeJumpTime = 0;
             OnFallingBegin();
         }


TSI-1308 Prevent pre-processing MM links in Component metadata twice (TSI-2163)

--- Sdl.Web.Tridion.Templates/Templates/ResolveRichText.cs
+++ Sdl.Web.Tridion.Templates/Templates/ResolveRichText.cs
@@ -25,7 +25,7 @@
         private const string FileNameAttribute = "data-multimediaFileName";
         private const string FileSizeAttribute = "data-multimediaFileSize";
         private const string MimeTypeAttribute = "data-multimediaMimeType";
-        private const string TcmXLinkPattern = @"xlink:href=\\""(tcm\:\d+\-\d+)\\""";
+        private const string TcmXLinkPattern = @"xlink:href=\\""(tcm\:\d+\-\d+)\\""(?!\sdata-schemaUri)";
         private const string XhtmlNamespaceDeclaration = " xmlns=\\\"http://www.w3.org/1999/xhtml\\\"";

         private List<string> _dataFieldNames;


add EmailTemplateLogic.AvoidSynchronizeDefaultTemplates with default true

--- Signum.Engine.Extensions/Mailing/EmailTemplateLogic.cs
+++ Signum.Engine.Extensions/Mailing/EmailTemplateLogic.cs
@@ -29,7 +29,8 @@
 {
     public static class EmailTemplateLogic
     {
-        public static bool AvoidSynchronize = false;
+        public static bool AvoidSynchronizeTokens = false;
+        public static bool AvoidSynchronizeDefaultTemplates = true;

         public static EmailTemplateMessageEmbedded GetCultureMessage(this EmailTemplateEntity template, CultureInfo ci)
         {
@@ -280,7 +281,7 @@

         static SqlPreCommand Schema_Synchronize_Tokens(Replacements replacements)
         {
-            if (AvoidSynchronize)
+            if (AvoidSynchronizeTokens)
                 return null;

             StringDistance sd = new StringDistance();
@@ -296,7 +297,7 @@

         static SqlPreCommand Schema_Syncronize_DefaultTemplates(Replacements replacements)
         {
-            if (AvoidSynchronize)
+            if (AvoidSynchronizeDefaultTemplates)
                 return null;

             var table = Schema.Current.Table(typeof(EmailTemplateEntity));


Adjusted file and assembly version

Adjusted file and assembly version

--- Solid.Practices.Composition/Properties/AssemblyInfo.cs
+++ Solid.Practices.Composition/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]


Increased total waifu cache TTL to 20 minutes

--- SoraBot/SoraBot.Services/Waifu/WaifuServiceUnboxing.cs
+++ SoraBot/SoraBot.Services/Waifu/WaifuServiceUnboxing.cs
@@ -16,7 +16,7 @@
         private readonly IWaifuRepository _waifuRepo;
         private readonly RandomNumberService _rand;

-        private const int _WAIFU_CACHE_TTL_MINS = 5;
+        private const int _WAIFU_CACHE_TTL_MINS = 20;

         private const int _COMMON_CHANCE = 525;
         private const int _UNCOMMON_CHANCE = 355;


:recycle: Impr

:recycle: Impr

--- Source/Orion.Shared/Absorb/Objects/Events/EventBase.cs
+++ Source/Orion.Shared/Absorb/Objects/Events/EventBase.cs
@@ -89,7 +89,7 @@
                             throw new ArgumentOutOfRangeException();
                     }

-                case Service.Mastodon.Enum.MessageType.Delete:
+                case MastodonMessageType.Delete:
                     return new DeleteEvent(message as MastodonDeleteMessage);

                 default:


Fixed IONTime not IComparable error in IONDownloader.

--- Source/Tools/IONDownloader/WaveformReaderCollection.cs
+++ Source/Tools/IONDownloader/WaveformReaderCollection.cs
@@ -38,7 +38,7 @@

         private IEnumerable<IONWaveformReader> AlignedReaders => ActiveReaders
             .Where(reader => !(reader.CurrentWaveform is null))
-            .GroupBy(reader => reader.CurrentWaveform!.TimeOfFirstPoint)
+            .GroupBy(reader => (DateTime)reader.CurrentWaveform!.TimeOfFirstPoint)
             .OrderBy(grouping => grouping.Key)
             .FirstOrDefault() ?? Enumerable.Empty<IONWaveformReader>();


Allow to set a custom response headers 	- Add function SetStatusCode

--- Sources/DotNet/Woopsa/HTTPServer/Utils/HTTPResponse.cs
+++ Sources/DotNet/Woopsa/HTTPServer/Utils/HTTPResponse.cs
@@ -35,6 +35,7 @@
             _bufferWriter = new StreamWriter(_bufferStream);
             ResponseCode = 200;
             ResponseMessage = "OK";
+            _isResponseSent = false;
         }
         #endregion

@@ -94,6 +95,22 @@
         public void SetHeader(string header, string value)
         {
             _headers[header] = value;
+        }
+
+        /// <summary>
+        /// Set the status and message code of the response
+        /// </summary>
+        /// <param name="responseCode"></param>
+        /// <param name="responseMessage"></param>
+        public void SetStatusCode(int responseCode, string responseMessage)
+        {
+            if(!_isResponseSent)
+            {
+                ResponseCode = responseCode;
+                ResponseMessage = responseMessage;
+            }
+            else
+                throw new WoopsaException("Response has already been sent");
         }

         /// <summary>
@@ -187,6 +204,7 @@
                 _bufferStream.CopyTo(responseStream);
                 responseStream.Position = 0;
                 responseStream.CopyTo(outputStream);
+                _isResponseSent = true;
             }
             catch(IOException e)
             {
@@ -201,6 +219,7 @@
         private Stream _bufferStream;
         private StreamWriter _bufferWriter;
         private Dictionary<string, string> _headers;
+        private bool _isResponseSent;
         #endregion

         #region Private/Protected/Internal Methods


Fixing error handling upon incorrect login

--- Src/Commons.Security.Mvc/Controllers/AuthController.cs
+++ Src/Commons.Security.Mvc/Controllers/AuthController.cs
@@ -144,7 +144,7 @@

             try
             {
-                service.Authenticate(userName, password);
+                user = service.Authenticate(userName, password);
             }
             catch (RulesException rulesException)
             {


Avoid allocations in ConversionSelector

Avoid allocations in ConversionSelector

--- Src/FluentAssertions/Equivalency/ConversionSelector.cs
+++ Src/FluentAssertions/Equivalency/ConversionSelector.cs
@@ -27,8 +27,19 @@
         }
     }

-    private List<ConversionSelectorRule> inclusions = new();
-    private List<ConversionSelectorRule> exclusions = new();
+    private readonly List<ConversionSelectorRule> inclusions;
+    private readonly List<ConversionSelectorRule> exclusions;
+
+    public ConversionSelector()
+        : this(new List<ConversionSelectorRule>(), new List<ConversionSelectorRule>())
+    {
+    }
+
+    private ConversionSelector(List<ConversionSelectorRule> inclusions, List<ConversionSelectorRule> exclusions)
+    {
+        this.inclusions = inclusions;
+        this.exclusions = exclusions;
+    }

     public void IncludeAll()
     {
@@ -55,6 +66,11 @@

     public bool RequiresConversion(Comparands comparands, INode currentNode)
     {
+        if (inclusions.Count == 0)
+        {
+            return false;
+        }
+
         var objectInfo = new ObjectInfo(comparands, currentNode);

         return inclusions.Any(p => p.Predicate(objectInfo)) && !exclusions.Any(p => p.Predicate(objectInfo));
@@ -84,10 +100,6 @@

     public ConversionSelector Clone()
     {
-        return new ConversionSelector
-        {
-            inclusions = new List<ConversionSelectorRule>(inclusions),
-            exclusions = new List<ConversionSelectorRule>(exclusions),
-        };
+        return new ConversionSelector(new List<ConversionSelectorRule>(inclusions), new List<ConversionSelectorRule>(exclusions));
     }
 }


More work on the Address table classes.

More work on the Address table classes.

--- Src/Workshell.PE/Content/Imports/ImportAddressTable.cs
+++ Src/Workshell.PE/Content/Imports/ImportAddressTable.cs
@@ -126,20 +126,21 @@
         private Location location;
         private ImportAddressTableEntry[] entries;

-        internal ImportAddressTable(ImportAddressTables addressTables,  ImportDirectoryEntry directoryEntry, ulong tableOffset, ulong[] tableEntries)
+        internal ImportAddressTable(ImportAddressTables addressTables,  ImportDirectoryEntry directoryEntry, uint tableRVA/*, ulong tableOffset*/, ulong[] tableEntries)
         {
             bool is_64bit = addressTables.DataDirectory.Directories.Image.Is64Bit;
             LocationCalculator calc = addressTables.DataDirectory.Directories.Image.GetCalculator();
-            uint rva = directoryEntry.OriginalFirstThunk;
+            uint rva = tableRVA;
             ulong image_base = addressTables.DataDirectory.Directories.Image.NTHeaders.OptionalHeader.ImageBase;
             ulong va = image_base + rva;
+            ulong offset = calc.RVAToOffset(rva);
             ulong size = (tableEntries.Count() * (is_64bit ? sizeof(ulong) : sizeof(uint))).ToUInt64();
             Section section = calc.RVAToSection(rva);

             tables = addressTables;
             dir_entry = directoryEntry;
-            location = new Location(tableOffset,rva,va,size,size,section);
-            entries = LoadEntries(is_64bit,tableOffset,tableEntries);
+            location = new Location(offset, rva, va, size, size, section);
+            entries = LoadEntries(is_64bit, offset, tableEntries);
         }

         #region Methods
@@ -274,40 +275,22 @@

     }

-    public sealed class ImportAddressTables : ExecutableImageContent, IEnumerable<ImportAddressTable>, ISupportsLocation, ISupportsBytes
+    public sealed class ImportAddressTables : ExecutableImageContent, IEnumerable<ImportAddressTable>, ISupportsBytes
     {

         private ImportAddressTable[] tables;

-        internal ImportAddressTables(DataDirectory dataDirectory, Location dataLocation, Tuple<ImportDirectoryEntry, ulong[]>[] addressTables) : base(dataDirectory,dataLocation)
+        internal ImportAddressTables(DataDirectory dataDirectory, Location dataLocation, Tuple<uint, ImportDirectoryEntry, ulong[]>[] addressTables) : base(dataDirectory,dataLocation)
         {
             tables = new ImportAddressTable[addressTables.Length];

-            /*
-            LoadTables(tablesInfo);
-
-            ulong lowest_offset = 0;
-
-            if (tablesInfo.Count() > 0)
-                lowest_offset = tablesInfo.MinBy(table => table.Item1).Item1;
-
-            LocationCalculator calc = content.DataDirectory.Directories.Reader.GetCalculator();
-            uint rva = calc.OffsetToRVA(content.Section,lowest_offset);
-            ulong va = calc.OffsetToVA(content.Section,lowest_offset);
-            ulong size = 0;
-
-            foreach (var table in tables)
-                size += table.Location.FileSize;
-
-            location = new Location(lowest_offset,rva,va,size,size);
-            */
-
             LocationCalculator calc = DataDirectory.Directories.Image.GetCalculator();

             for (var i = 0; i < addressTables.Length; i++)
             {
-                ulong offset = calc.RVAToOffset(addressTables[i].Item1.OriginalFirstThunk);
-                ImportAddressTable table = new ImportAddressTable(this, addressTables[i].Item1, offset, addressTables[i].Item2);
+                Tuple<uint, ImportDirectoryEntry, ulong[]> tuple = addressTables[i];
+                ulong offset = calc.RVAToOffset(tuple.Item1);
+                ImportAddressTable table = new ImportAddressTable(this, tuple.Item2, tuple.Item1, tuple.Item3);

                 tables[i] = table;
             }
@@ -320,7 +303,7 @@
             LocationCalculator calc = directory.DataDirectory.Directories.Image.GetCalculator();
             bool is_64bit = directory.DataDirectory.Directories.Image.Is64Bit;
             Stream stream = directory.DataDirectory.Directories.Image.GetStream();
-            List<Tuple<ImportDirectoryEntry, ulong[]>> tables = new List<Tuple<ImportDirectoryEntry, ulong[]>>();
+            List<Tuple<uint, ImportDirectoryEntry, ulong[]>> tables = new List<Tuple<uint, ImportDirectoryEntry, ulong[]>>();

             foreach (ImportDirectoryEntry dir_entry in directory)
             {
@@ -342,7 +325,7 @@
                         break;
                 }

-                Tuple<ImportDirectoryEntry, ulong[]> table = new Tuple<ImportDirectoryEntry, ulong[]>(dir_entry, entries.ToArray());
+                Tuple<uint, ImportDirectoryEntry, ulong[]> table = new Tuple<uint, ImportDirectoryEntry, ulong[]>(dir_entry.OriginalFirstThunk, dir_entry, entries.ToArray());

                 tables.Add(table);
             }
@@ -350,7 +333,7 @@
             uint rva = 0;

             if (tables.Count > 0)
-                rva = tables.MinBy(table => table.Item1.OriginalFirstThunk).Item1.OriginalFirstThunk;
+                rva = tables.MinBy(table => table.Item1).Item1;

             ulong image_base = directory.DataDirectory.Directories.Image.NTHeaders.OptionalHeader.ImageBase;
             ulong va = image_base + rva;
@@ -359,7 +342,7 @@

             foreach (var table in tables)
             {
-                int size = table.Item2.Length * (!is_64bit ? sizeof(uint) : sizeof(ulong));
+                int size = table.Item3.Length * (!is_64bit ? sizeof(uint) : sizeof(ulong));

                 file_size += size.ToUInt32();
             }
@@ -371,6 +354,62 @@
             return result;
         }

+        public static ImportAddressTables GetAddressTable(ImportDirectory directory)
+        {
+            LocationCalculator calc = directory.DataDirectory.Directories.Image.GetCalculator();
+            bool is_64bit = directory.DataDirectory.Directories.Image.Is64Bit;
+            Stream stream = directory.DataDirectory.Directories.Image.GetStream();
+            List<Tuple<uint, ImportDirectoryEntry, ulong[]>> tables = new List<Tuple<uint, ImportDirectoryEntry, ulong[]>>();
+
+            foreach (ImportDirectoryEntry dir_entry in directory)
+            {
+                if (dir_entry.FirstThunk == 0)
+                    continue;
+
+                List<ulong> entries = new List<ulong>();
+                ulong offset = calc.RVAToOffset(dir_entry.FirstThunk);
+
+                stream.Seek(offset.ToInt64(), SeekOrigin.Begin);
+
+                while (true)
+                {
+                    ulong entry = (!is_64bit ? Utils.ReadUInt32(stream) : Utils.ReadUInt64(stream));
+
+                    entries.Add(entry);
+
+                    if (entry == 0)
+                        break;
+                }
+
+                Tuple<uint, ImportDirectoryEntry, ulong[]> table = new Tuple<uint, ImportDirectoryEntry, ulong[]>(dir_entry.FirstThunk, dir_entry, entries.ToArray());
+
+                tables.Add(table);
+            }
+
+            uint rva = 0;
+
+            if (tables.Count > 0)
+                rva = tables.MinBy(table => table.Item1).Item1;
+
+            ulong image_base = directory.DataDirectory.Directories.Image.NTHeaders.OptionalHeader.ImageBase;
+            ulong va = image_base + rva;
+            ulong file_offset = calc.RVAToOffset(rva);
+            ulong file_size = 0;
+
+            foreach (var table in tables)
+            {
+                int size = table.Item3.Length * (!is_64bit ? sizeof(uint) : sizeof(ulong));
+
+                file_size += size.ToUInt32();
+            }
+
+            Section section = calc.RVAToSection(rva);
+            Location location = new Location(file_offset, rva, va, file_size, file_size, section);
+            ImportAddressTables result = new ImportAddressTables(directory.DataDirectory, location, tables.ToArray());
+
+            return result;
+        }
+
         #endregion

         #region Methods
@@ -401,47 +440,6 @@
             return buffer;
         }

-        /*
-        private void LoadTables(IEnumerable<Tuple<ulong,ImportDirectoryEntry>> tablesInfo)
-        {
-            List<ImportAddressTable> list = new List<ImportAddressTable>();
-            bool is_64bit = content.DataDirectory.Directories.Reader.Is64Bit;
-            Stream stream = content.DataDirectory.Directories.Reader.GetStream();
-
-            foreach(Tuple<ulong,ImportDirectoryEntry> table_info in tablesInfo)
-            {
-                stream.Seek(Convert.ToInt64(table_info.Item1),SeekOrigin.Begin);
-
-                List<ulong> entries = new List<ulong>();
-
-                while (true)
-                {
-                    ulong entry;
-
-                    if (!is_64bit)
-                    {
-                        entry = Utils.ReadUInt32(stream);
-                    }
-                    else
-                    {
-                        entry = Utils.ReadUInt64(stream);
-                    }
-
-                    entries.Add(entry);
-
-                    if (entry == 0)
-                        break;
-                }
-
-                ImportAddressTable table = new ImportAddressTable(this,table_info.Item2,table_info.Item1,entries);
-
-                list.Add(table);
-            }
-
-            tables = list.ToArray();
-        }
-        */
-
         #endregion

         #region Properties


Removed comment

Removed comment

--- UnityProject/Assets/Scripts/VisualEffects/ZMVibrate.cs
+++ UnityProject/Assets/Scripts/VisualEffects/ZMVibrate.cs
@@ -43,7 +43,6 @@
 				_switchCounter += 1;

 				if (_switchCounter > switchLimit) {
-					Debug.Log("Other way!");
 					_rotateToMin = true;
 					_switchCounter = 0;
 				}


Make queary async

Make queary async

--- HospitalAutomation.Core/Services/UserService.cs
+++ HospitalAutomation.Core/Services/UserService.cs
@@ -13,7 +13,9 @@
         {
             using (var context = new HospitalAutomationEntities())
             {
-                return context.OTURUMs.FirstOrDefaultAsync(p => p.KullaniciAdi == username && p.Sifre == password) != null;
+                var task = context.OTURUMs.FirstOrDefaultAsync(p => p.KullaniciAdi == username && p.Sifre == password);
+                task.Wait();
+                return  task.Result != null;
             }
         }
     }


Refactored: 使用していないメソッドを削除。

Refactored: 使用していないメソッドを削除。

--- Implem.Pleasanter/Models/Users/UserUtilities.cs
+++ Implem.Pleasanter/Models/Users/UserUtilities.cs
@@ -781,14 +781,6 @@
                 ? Versions.VerTypes.Latest
                 : Versions.VerTypes.History;
             return EditorResponse(userModel).ToJson();
-        }
-
-        /// <summary>
-        /// Fixed:
-        /// </summary>
-        public static bool Self(int userId)
-        {
-            return Sessions.UserId() == userId;
         }

         /// <summary>


Remove random notimplementedexception

Remove random notimplementedexception

--- LogicalShift.Reason/Solvers/ByteCodeExecutor.cs
+++ LogicalShift.Reason/Solvers/ByteCodeExecutor.cs
@@ -206,7 +206,6 @@
             }

             _environment = newEnvironment;
-            throw new NotImplementedException();
         }

         /// <summary>


fixed issue with Charts Controller when no vehicle positions

--- MileageStats.Web/Controllers/ChartController.cs
+++ MileageStats.Web/Controllers/ChartController.cs
@@ -175,9 +175,17 @@
             }

             var selectedVehicleColors = new List<string>();
-            foreach (var position in chartFormModel.Positions)
-            {
-                selectedVehicleColors.Add(colors[position]);
+
+            if (chartFormModel.Positions == null)
+            {
+                selectedVehicleColors.Add(colors[0]);
+            }
+            else
+            {
+                foreach (var position in chartFormModel.Positions)
+                {
+                    selectedVehicleColors.Add(colors[position]);
+                }
             }

             var themeColors = string.Join(";", selectedVehicleColors);


Update X509CertificateDatabase.cs

Update X509CertificateDatabase.cs

Fix: NetStandard does not support method GetBytes, use method GetFieldValue instead

--- MimeKit/Cryptography/X509CertificateDatabase.cs
+++ MimeKit/Cryptography/X509CertificateDatabase.cs
@@ -132,13 +132,18 @@
 		static int ReadBinaryBlob (DbDataReader reader, int column, ref byte[] buffer)
 		{
 			long nread;
-
+#if NETSTANDARD
+			buffer= reader.GetFieldValue<byte[]> (column);
+			nread = buffer.Length;
+			return (int) nread;
+#else
 			// first, get the length of the buffer needed
 			if ((nread = reader.GetBytes (column, 0, null, 0, buffer.Length)) > buffer.Length)
 				Array.Resize (ref buffer, (int) nread);

 			// read the certificate data
 			return (int) reader.GetBytes (column, 0, buffer, 0, (int) nread);
+#endif
 		}

 		static X509Certificate DecodeCertificate (DbDataReader reader, X509CertificateParser parser, int column, ref byte[] buffer)


Fix incorrect header sizes in test data.

--- MsgPack.Strict.Tests/StrictDeserialiserTests.cs
+++ MsgPack.Strict.Tests/StrictDeserialiserTests.cs
@@ -154,7 +154,7 @@
         [Fact]
         public void ThrowsOnUnexpectedField()
         {
-            var bytes = TestUtil.PackBytes(packer => packer.PackMapHeader(2)
+            var bytes = TestUtil.PackBytes(packer => packer.PackMapHeader(3)
                 .Pack("Name").Pack("Bob")
                 .Pack("Score").Pack(123)
                 .Pack("SUPRISE").Pack("Unexpected"));
@@ -169,7 +169,7 @@
         [Fact]
         public void ThrowsOnDuplicateField()
         {
-            var bytes = TestUtil.PackBytes(packer => packer.PackMapHeader(2)
+            var bytes = TestUtil.PackBytes(packer => packer.PackMapHeader(3)
                 .Pack("Name").Pack("Bob")
                 .Pack("Score").Pack(123)
                 .Pack("Score").Pack(321));


Update Products. Switch Controller to use FromServices.

--- Northwind.Web/Controllers/ProductsController.cs
+++ Northwind.Web/Controllers/ProductsController.cs
@@ -4,7 +4,6 @@
 using Northwind.Application.Products.Commands;
 using Northwind.Application.Products.Models;
 using Northwind.Application.Products.Queries;
-using Northwind.Persistence;

 namespace Northwind.Web.Controllers
 {
@@ -12,61 +11,50 @@
     [ApiController]
     public class ProductsController : ControllerBase
     {
-        private readonly IGetAllProductsQuery _getAllProductsQuery;
-        private readonly IGetProductQuery _getProductQuery;
-        private readonly ICreateProductCommand _createProductCommand;
-        private readonly IUpdateProductCommand _updateProductCommand;
-        private readonly IDeleteProductCommand _deleteProductCommand;
-
-        public ProductsController(NorthwindDbContext context,
-            IGetAllProductsQuery getAllProductsQuery,
-            IGetProductQuery getProductQuery,
-            ICreateProductCommand createProductCommand,
-            IUpdateProductCommand updateProductCommand,
-            IDeleteProductCommand deleteProductCommand)
-        {
-            _getAllProductsQuery = getAllProductsQuery;
-            _getProductQuery = getProductQuery;
-            _createProductCommand = createProductCommand;
-            _updateProductCommand = updateProductCommand;
-            _deleteProductCommand = deleteProductCommand;
-        }
-
         // GET: api/Products
         [HttpGet]
-        public async Task<IEnumerable<ProductDto>> GetProducts()
+        public async Task<IEnumerable<ProductDto>> GetProducts(
+            [FromServices] IGetAllProductsQuery query)
         {
-            return await _getAllProductsQuery.Execute();
+            return await query.Execute();
         }

         // GET: api/Products/5
         [HttpGet("{id}")]
-        public async Task<IActionResult> GetProduct([FromRoute] int id)
+        public async Task<IActionResult> GetProduct(
+            [FromServices] IGetProductQuery query,
+            int id)
         {
-            return Ok(await _getProductQuery.Execute(id));
+            return Ok(await query.Execute(id));
         }

         // POST: api/Products
         [HttpPost]
-        public async Task<IActionResult> PostProduct([FromBody] ProductDto product)
+        public async Task<IActionResult> PostProduct(
+            [FromServices] ICreateProductCommand command,
+            [FromBody] ProductDto product)
         {
-            var newProduct = await _createProductCommand.Execute(product);
+            var newProduct = await command.Execute(product);

             return CreatedAtAction("GetProduct", new { id = newProduct.ProductId }, newProduct);
         }

         // PUT: api/Products/5
         [HttpPut("{id}")]
-        public async Task<IActionResult> PutProduct([FromBody] ProductDto product)
+        public async Task<IActionResult> PutProduct(
+            [FromServices] IUpdateProductCommand command,
+            [FromBody] ProductDto product)
         {
-            return Ok(await _updateProductCommand.Execute(product));
+            return Ok(await command.Execute(product));
         }

         // DELETE: api/Products/5
         [HttpDelete("{id}")]
-        public async Task<IActionResult> DeleteProduct([FromRoute] int id)
+        public async Task<IActionResult> DeleteProduct(
+            [FromServices] IDeleteProductCommand command,
+            int id)
         {
-            await _deleteProductCommand.Execute(id);
+            await command.Execute(id);

             return NoContent();
         }


Changed level up notification to be sent to everyone on the map

--- OpenORPG.Server/Game/Zones/ZoneEntityMonitor.cs
+++ OpenORPG.Server/Game/Zones/ZoneEntityMonitor.cs
@@ -64,13 +64,12 @@

         private void PlayerOnLevelChanged(int newValue, int oldValue, Player player)
         {
-            var packet = new ServerSendGameMessagePacket(GameMessage.LevelUp, new List<string>()
+            // Send a notification to everyone in the zone
+            player.Zone.ChatChannel.SendMessage(GameMessage.LevelUp, new List<string>()
             {
                 (player.Name).ToString(),
                 player.Level.ToString()
             });
-
-            player.Client.Send(packet);
         }

         private void PlayerOnExperienceChanged(int newValue, int oldValue, Player player)


Move code around

Move code around

--- osu.Game/Overlays/NewsOverlay.cs
+++ osu.Game/Overlays/NewsOverlay.cs
@@ -74,7 +74,13 @@
             base.LoadComplete();

             // should not be run until first pop-in to avoid requesting data before user views.
-            article.BindValueChanged(onArticleChanged);
+            article.BindValueChanged(a =>
+            {
+                if (a.NewValue == null)
+                    loadListing();
+                else
+                    loadArticle(a.NewValue);
+            });
         }

         protected override NewsHeader CreateHeader() => new NewsHeader { ShowFrontPage = ShowFrontPage };
@@ -131,14 +137,6 @@
             sidebarContainer.Y = Math.Clamp(ScrollFlow.Current - Header.DrawHeight, 0, Math.Max(ScrollFlow.ScrollContent.DrawHeight - DrawHeight - Header.DrawHeight, 0));
         }

-        private void onArticleChanged(ValueChangedEvent<string> article)
-        {
-            if (article.NewValue == null)
-                loadListing();
-            else
-                loadArticle(article.NewValue);
-        }
-
         private void loadListing(int? year = null)
         {
             beginLoading();
@@ -159,6 +157,16 @@
             });
         }

+        private void loadArticle(string article)
+        {
+            beginLoading();
+
+            Header.SetArticle(article);
+
+            // Temporary, should be handled by ArticleDisplay later
+            LoadDisplay(Empty());
+        }
+
         private void getMorePosts()
         {
             lastRequest?.Cancel();
@@ -167,16 +175,6 @@
                 if (content.Child is ArticleListing listing)
                     listing.AddPosts(response);
             });
-        }
-
-        private void loadArticle(string article)
-        {
-            beginLoading();
-
-            Header.SetArticle(article);
-
-            // Temporary, should be handled by ArticleDisplay later
-            LoadDisplay(Empty());
         }

         private void performListingRequest(Action<GetNewsResponse> onSuccess)


add roslyn issue comment

add roslyn issue comment

--- Signum.Engine.Extensions/Cache/CacheLogic.cs
+++ Signum.Engine.Extensions/Cache/CacheLogic.cs
@@ -551,7 +551,7 @@

             public override List<T> RequestByBackReference<R>(IRetriever retriever, Expression<Func<T, Lite<R>?>> backReference, Lite<R> lite)
             {
-                throw new InvalidOperationException();
+                throw new InvalidOperationException(); /*CSBUG https://github.com/dotnet/roslyn/issues/33276*/
                 //var dic = this.cachedTable.GetBackReferenceDictionary(backReference);

                 //var ids = dic.TryGetC(lite.Id).EmptyIfNull();
@@ -915,3 +915,5 @@
         None
     }
 }
+
+


add Schema.InvalidateCache to avoid issues initializing applications after SQL migrations are run

--- Signum.Engine.Extensions/Cache/CacheLogic.cs
+++ Signum.Engine.Extensions/Cache/CacheLogic.cs
@@ -85,6 +85,7 @@

                 sb.Schema.SchemaCompleted += () => Schema_SchemaCompleted(sb);
                 sb.Schema.BeforeDatabaseAccess += StartSqlDependencyAndEnableBrocker;
+                sb.Schema.InvalidateCache += CacheLogic.ForceReset;
             }
         }


Assert view rendered

Assert view rendered

--- Snittlistan.Test/MatchController_EditTeam.cs
+++ Snittlistan.Test/MatchController_EditTeam.cs
@@ -53,5 +53,20 @@
 			// Assert
 			result.AssertResultIs<HttpNotFoundResult>();
 		}
+
+		[Fact]
+		public void CorrectView()
+		{
+			// Arrange
+			var match = TestData.CreateMatch();
+			Session.Store(match);
+
+			// Act
+			var controller = new MatchController(Session);
+			var result = controller.EditTeam(id: match.Id, isHomeTeam: true);
+
+			// Assert
+			result.AssertViewRendered().ForView(string.Empty);
+		}
 	}
 }


First version displaying the regex parts and the futur result.

--- Solution/App/Behaviors/RegexColorBehavior.cs
+++ Solution/App/Behaviors/RegexColorBehavior.cs
@@ -39,6 +39,37 @@
                                                                DependencyPropertyChangedEventArgs e)
         {
             var richTextBlock = (RichTextBlock) dependencyObject;
+            var futurResult = (string) e.NewValue;
+
+            if (string.IsNullOrEmpty(futurResult))
+            {
+                return;
+            }
+
+            var paragraph = richTextBlock.Blocks.OfType<Paragraph>().Single();
+
+            // Filter and create new run blocks with its configurations
+            var runs = paragraph.Inlines.OfType<Run>().Select(x => new Run
+                                                                   {
+                                                                       Text = x.Text,
+                                                                       Foreground = x.Foreground
+                                                                   }).ToList();
+
+            // Clear old previous run blocks
+            richTextBlock.Blocks.Clear();
+
+            // Create a new paragrah with its blocks
+            var newParagraph = new Paragraph();
+            runs.ForEach(x => newParagraph.Inlines.Add(x));
+
+            // Add the custom block containing the regex result
+            newParagraph.Inlines.Add(new Span
+                                     {
+                                         Inlines = {new Run {Text = futurResult}},
+                                         Foreground = new SolidColorBrush(Colors.Green)
+                                     });
+
+            richTextBlock.Blocks.Add(newParagraph);
         }

         private static void ResultPropertyChangedCallback(DependencyObject dependencyObject,


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.10.3526.20200821054313-master-64cc088

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "a276bdc8251c66b3b049b9f78c98da6c12081b9e";
+        public static string Commit = "64cc0884420b204eed0bb8dfb76104294818e488";

         public static string Version = "1.10";
-        public static string Build   = "3522";
+        public static string Build   = "3526";

         public static int BuildYear   = 2020;
         public static int BuildMonth  = 08;
-        public static int BuildDay    = 18;
-        public static int BuildHour   = 23;
-        public static int BuildMinute = 05;
-        public static int BuildSecond = 27;
+        public static int BuildDay    = 21;
+        public static int BuildHour   = 05;
+        public static int BuildMinute = 43;
+        public static int BuildSecond = 13;
     }
 }


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.13.3637.20201001204511-master-92347f7

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "6dc9463e20aced18adbbd2cd1fff59d4af05a084";
+        public static string Commit = "92347f7b77cc263189e03cdfc972a265617a3616";

         public static string Version = "1.13";
-        public static string Build   = "3636";
+        public static string Build   = "3637";

         public static int BuildYear   = 2020;
-        public static int BuildMonth  = 09;
-        public static int BuildDay    = 29;
-        public static int BuildHour   = 13;
-        public static int BuildMinute = 46;
-        public static int BuildSecond = 57;
+        public static int BuildMonth  = 10;
+        public static int BuildDay    = 01;
+        public static int BuildHour   = 20;
+        public static int BuildMinute = 45;
+        public static int BuildSecond = 11;
     }
 }


Outside tools should be able to explictly setup the default cache

This way if the default changes they don't get suprized so easily; allow others to program defensively.

--- Source/Chattel/AssetCacheSimpleFolderTree.cs
+++ Source/Chattel/AssetCacheSimpleFolderTree.cs
@@ -31,7 +31,7 @@
 using ProtoBuf;

 namespace Chattel {
-	internal class AssetCacheSimpleFolderTree : IChattelCache {
+	public class AssetCacheSimpleFolderTree : IChattelCache {
 		private static readonly Logging.ILog LOG = Logging.LogProvider.For<AssetCacheSimpleFolderTree>();

 		private readonly ChattelConfiguration _config;
@@ -42,7 +42,7 @@
 		/// Initializes a new instance of the <see cref="T:ChattelReader"/> class.
 		/// </summary>
 		/// <param name="config">Instance of the configuration class.</param>
-		internal AssetCacheSimpleFolderTree(ChattelConfiguration config) {
+		public AssetCacheSimpleFolderTree(ChattelConfiguration config) {
 			_config = config ?? throw new ArgumentNullException(nameof(config));
 		}


Fixed null safety in CreateFlashcard vm

Fixed null safety in CreateFlashcard vm

--- StudyBox/StudyBox.Core/ViewModels/CreateFlashcardViewModel.cs
+++ StudyBox/StudyBox.Core/ViewModels/CreateFlashcardViewModel.cs
@@ -731,15 +731,22 @@
                     HeaderMessage = StringResources.GetString("EditFlashcard");
                     SubmitFormMessage = StringResources.GetString("Edit"); ;

-                    var tips = await _restService.GetTips(deckInstance.ID, flashcardInstance.Id);
-                    if (tips != null)
-                    {
-                        foreach (var tip in tips)
-                        {
-                            TipsCollection.Add(new TipViewModel(tip.ID, tip.Essence));
-                        }
+                    try
+                    {
+                        var tips = await _restService.GetTips(deckInstance.ID, flashcardInstance.Id);
+                        if (tips != null)
+                        {
+                            foreach (var tip in tips)
+                            {
+                                TipsCollection.Add(new TipViewModel(tip.ID, tip.Essence));
+                            }
+                        }
                     }
-
+                    catch (Exception ex)
+                    {
+                        Messenger.Default.Send<MessageToMessageBoxControl>(new MessageToMessageBoxControl(true, false, StringResources.GetString("OperationFailed")));
+                    }
+
                     _flashcard = flashcardInstance;
                 }
                 else


GetPreviousToken/GetNextToken only if necessary

--- StyleCop.Analyzers/StyleCop.Analyzers/Helpers/TokenHelpers.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers/Helpers/TokenHelpers.cs
@@ -37,7 +37,13 @@
         /// <returns>true if token is preceded by a whitespace, otherwise false.</returns>
         internal static bool IsPrecededByWhitespace(this SyntaxToken token)
         {
-            SyntaxTriviaList triviaList = token.GetPreviousToken().TrailingTrivia.AddRange(token.LeadingTrivia);
+            SyntaxTriviaList triviaList = token.LeadingTrivia;
+            if (triviaList.Count > 0)
+            {
+                return triviaList.Last().IsKind(SyntaxKind.WhitespaceTrivia);
+            }
+
+            triviaList = token.GetPreviousToken().TrailingTrivia;
             return triviaList.Count > 0 && triviaList.Last().IsKind(SyntaxKind.WhitespaceTrivia);
         }

@@ -48,7 +54,13 @@
         /// <returns>true if token is followed by a whitespace, otherwise false.</returns>
         internal static bool IsFollowedByWhitespace(this SyntaxToken token)
         {
-            SyntaxTriviaList triviaList = token.TrailingTrivia.AddRange(token.GetNextToken().LeadingTrivia);
+            SyntaxTriviaList triviaList = token.TrailingTrivia;
+            if (triviaList.Count > 0)
+            {
+                return triviaList.First().IsKind(SyntaxKind.WhitespaceTrivia);
+            }
+
+            triviaList = token.GetNextToken().LeadingTrivia;
             return triviaList.Count > 0 && triviaList.First().IsKind(SyntaxKind.WhitespaceTrivia);
         }
     }


(VsIntegration) Correction on GlobalScope acces; Now all functions appears in CompletionList

--- VisualStudio/ProjectPackage/Editors/XSharpCompletionSource.cs
+++ VisualStudio/ProjectPackage/Editors/XSharpCompletionSource.cs
@@ -542,7 +542,9 @@
             {
                 List<AssemblyInfo> oneAssembly = new List<AssemblyInfo>();
                 oneAssembly.Add(asm);
-                Type globalType = SystemTypeController.Lookup("Functions", oneAssembly);
+                if (String.IsNullOrEmpty(asm.GlobalClassName))
+                    continue;
+                Type globalType = SystemTypeController.Lookup(asm.GlobalClassName, oneAssembly);
                 //
                 if (globalType != null)
                 {
@@ -4025,7 +4027,9 @@
             {
                 List<AssemblyInfo> oneAssembly = new List<AssemblyInfo>();
                 oneAssembly.Add(asm);
-                Type globalType = SystemTypeController.Lookup("Functions", oneAssembly);
+                if ( String.IsNullOrEmpty(asm.GlobalClassName) )
+                    continue;
+                Type globalType = SystemTypeController.Lookup(asm.GlobalClassName, oneAssembly);
                 //
                 if (globalType != null)
                 {
@@ -4096,6 +4100,7 @@
                                 var methods = type.GetMember(currentToken, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Static);
                                 if (methods.Length > 0)
                                 {
+                                    foundElement = new CompletionElement(methods[0]);
                                     return new CompletionType(type);
                                 }
                             }


fix default endpoint

fix default endpoint

--- Graphite/CarbonHttpClient.cs
+++ Graphite/CarbonHttpClient.cs
@@ -18,9 +18,9 @@
         private readonly PickleGraphiteFormatter _formatter;

         /// <summary>
-        /// Creates a client for localhost
+        /// Creates a client for localhost:2007
         /// </summary>
-        public CarbonHttpClient():this("https://localhost")
+        public CarbonHttpClient():this("http://localhost:2007")
         {
         }