*Parcels now fully work on MySQL as a datastore after a few tweaks and bug fixes after testing

--- OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
+++ OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
@@ -118,7 +118,7 @@

                 m_landAccessListTable = createLandAccessListTable();
                 m_dataSet.Tables.Add(m_landAccessListTable);
-                setupLandCommands(m_landAccessListDataAdapter, m_connection);
+                setupLandAccessCommands(m_landAccessListDataAdapter, m_connection);
                 m_landAccessListDataAdapter.Fill(m_landAccessListTable);
             }
         }
@@ -313,15 +313,82 @@

         public void RemoveLandObject(LLUUID globalID)
         {
+            lock (m_dataSet)
+            {
+                using (MySqlCommand cmd = new MySqlCommand("delete from land where UUID=?UUID", m_connection))
+                {
+                    cmd.Parameters.Add(new MySqlParameter("?UUID", globalID.ToString()));
+                    cmd.ExecuteNonQuery();
+                }
+
+                using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?UUID", m_connection))
+                {
+                    cmd.Parameters.Add(new MySqlParameter("?UUID", globalID.ToString()));
+                    cmd.ExecuteNonQuery();
+                }
+            }
         }

         public void StoreLandObject(Land parcel, LLUUID regionUUID)
         {
+            lock (m_dataSet)
+            {
+                DataTable land = m_landTable;
+                DataTable landaccesslist = m_landAccessListTable;
+
+                DataRow landRow = land.Rows.Find(parcel.landData.globalID.ToString());
+                if (landRow == null)
+                {
+                    landRow = land.NewRow();
+                    fillLandRow(landRow, parcel.landData, regionUUID);
+                    land.Rows.Add(landRow);
+                }
+                else
+                {
+                    fillLandRow(landRow, parcel.landData, regionUUID);
+                }
+
+                using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection))
+                {
+                    cmd.Parameters.Add(new MySqlParameter("?LandUUID", parcel.landData.globalID.ToString()));
+                    cmd.ExecuteNonQuery();
+                }
+
+                foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.parcelAccessList)
+                {
+                    DataRow newAccessRow = landaccesslist.NewRow();
+                    fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID);
+                    landaccesslist.Rows.Add(newAccessRow);
+                }
+
+            }
+
+            Commit();
         }

         public List<Framework.LandData> LoadLandObjects(LLUUID regionUUID)
         {
-            return new List<LandData>();
+            List<LandData> landDataForRegion = new List<LandData>();
+            lock (m_dataSet)
+            {
+                DataTable land = m_landTable;
+                DataTable landaccesslist = m_landAccessListTable;
+                string searchExp = "RegionUUID = '" + regionUUID.ToString() + "'";
+                DataRow[] rawDataForRegion = land.Select(searchExp);
+                foreach (DataRow rawDataLand in rawDataForRegion)
+                {
+                    LandData newLand = buildLandData(rawDataLand);
+                    string accessListSearchExp = "LandUUID = '" + newLand.globalID.ToString() + "'";
+                    DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
+                    foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
+                    {
+                        newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
+                    }
+
+                    landDataForRegion.Add(newLand);
+                }
+            }
+            return landDataForRegion;
         }

         private void DisplayDataSet(DataSet ds, string title)
@@ -371,6 +438,8 @@
                 m_primDataAdapter.Update(m_primTable);
                 m_shapeDataAdapter.Update(m_shapeTable);
                 m_terrainDataAdapter.Update(m_terrainTable);
+                m_landDataAdapter.Update(m_landTable);
+                m_landAccessListDataAdapter.Update(m_landAccessListTable);

                 m_dataSet.AcceptChanges();
             }
@@ -635,7 +704,7 @@
             newData.landName = (String)row["Name"];
             newData.landDesc = (String)row["Description"];
             newData.ownerID = (String)row["OwnerUUID"];
-            newData.isGroupOwned = (Boolean)row["IsGroupOwned"];
+            newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
             newData.area = Convert.ToInt32(row["Area"]);
             newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
             newData.category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]); //Enum libsecondlife.Parcel.ParcelCategory
@@ -645,8 +714,8 @@
             newData.salePrice = Convert.ToInt32(row["SalePrice"]);
             newData.landStatus = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]); //Enum. libsecondlife.Parcel.ParcelStatus
             newData.landFlags = Convert.ToUInt32(row["LandFlags"]);
-            newData.landingType = (Byte)row["LandingType"];
-            newData.mediaAutoScale = (Byte)row["MediaAutoScale"];
+            newData.landingType = Convert.ToByte(row["LandingType"]);
+            newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
             newData.mediaID = new LLUUID((String)row["MediaTextureUUID"]);
             newData.mediaURL = (String)row["MediaURL"];
             newData.musicURL = (String)row["MusicURL"];
@@ -665,7 +734,7 @@
         {
             ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
             entry.AgentID = new LLUUID((string)row["AccessUUID"]);
-            entry.Flags = (ParcelManager.AccessList)row["Flags"];
+            entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]);
             entry.Time = new DateTime();
             return entry;
         }


Fix error message reporting when beginning order

--- src/Certify.Providers/ACME/Certes/CertesACMEProvider.cs
+++ src/Certify.Providers/ACME/Certes/CertesACMEProvider.cs
@@ -473,7 +473,14 @@
                         {
                             remainingAttempts--;

-                            log.Error($"BeginCertificateOrder: error creating order. Retries remaining:{remainingAttempts} {exp.ToString()} ");
+                            var msg = exp.ToString();
+
+                            if (exp.InnerException != null && exp.InnerException is AcmeRequestException)
+                            {
+                                msg = (exp.InnerException as AcmeRequestException).Error?.Detail;
+                            }
+
+                            log.Error($"BeginCertificateOrder: error creating order. Retries remaining:{remainingAttempts} :: {msg} ");

                             lastException = exp;

@@ -512,7 +519,7 @@

                     var msg = "Failed to begin certificate order.";

-                    if (lastException!=null && (lastException as Exception).InnerException is AcmeRequestException)
+                    if (lastException != null && (lastException as Exception).InnerException is AcmeRequestException)
                     {
                         msg = ((lastException as Exception).InnerException as AcmeRequestException).Error?.Detail;

@@ -695,7 +702,7 @@
                 return new StatusMessage
                 {
                     IsOK = false,
-                    Message ="Challenge could not be submitted. No matching attempted challenge."
+                    Message = "Challenge could not be submitted. No matching attempted challenge."
                 };
             }


Get Config Info  log added

Get Config Info  log added

--- src/ChannelAdvisorAccess/Services/Items/ItemsService.cs
+++ src/ChannelAdvisorAccess/Services/Items/ItemsService.cs
@@ -1767,45 +1767,117 @@
 		}
 		#endregion

-		#region Get Config Info
-		public ClassificationConfigurationInformation[] GetClassificationConfigInfo()
-		{
-			return AP.Query.Get( () =>
-			{
-				var result = this._client.GetClassificationConfigurationInformation( this._credentials, this.AccountId );
-				CheckCaSuccess( result );
-				return result.ResultData;
-			} );
-		}
-
-		public async Task< ClassificationConfigurationInformation[] > GetClassificationConfigInfoAsync()
-		{
-			return await AP.QueryAsync.Get( async () =>
-			{
-				var result = await this._client.GetClassificationConfigurationInformationAsync( this._credentials, this.AccountId ).ConfigureAwait( false );
-				CheckCaSuccess( result.GetClassificationConfigurationInformationResult );
-				return result.GetClassificationConfigurationInformationResult.ResultData;
-			} ).ConfigureAwait( false );
-		}
-
-		public DistributionCenterResponse[] GetDistributionCenterList()
-		{
-			return AP.Query.Get( () =>
-			{
-				var result = this._client.GetDistributionCenterList( this._credentials, this.AccountId );
-				CheckCaSuccess( result );
-				return result.ResultData;
-			} );
-		}
-
-		public async Task< DistributionCenterResponse[] > GetDistributionCenterListAsync()
-		{
-			return await AP.QueryAsync.Get( async () =>
-			{
-				var result = await this._client.GetDistributionCenterListAsync( this._credentials, this.AccountId ).ConfigureAwait( false );
-				CheckCaSuccess( result.GetDistributionCenterListResult );
-				return result.GetDistributionCenterListResult.ResultData;
-			} ).ConfigureAwait( false );
+		#region Get Config Info
+		public ClassificationConfigurationInformation[] GetClassificationConfigInfo( Mark mark = null )
+		{
+			if( mark.IsBlank() )
+				mark = Mark.CreateNew();
+
+			try
+			{
+				ChannelAdvisorLogger.LogTraceStarted( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ) );
+
+				var classificationConfigurationInformations = AP.Query.Get( () =>
+				{
+					ChannelAdvisorLogger.LogTraceRetryStarted( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ) );
+					var result = this._client.GetClassificationConfigurationInformation( this._credentials, this.AccountId );
+					CheckCaSuccess( result );
+					ChannelAdvisorLogger.LogTraceRetryEnd( this.CreateMethodCallInfo( mark : mark, methodResult : result.ToJson(), additionalInfo : this.AdditionalLogInfoString ) );
+					return result.ResultData;
+				} );
+				ChannelAdvisorLogger.LogTraceEnd( this.CreateMethodCallInfo( mark : mark, methodResult : classificationConfigurationInformations.ToJson(), additionalInfo : this.AdditionalLogInfoString ) );
+				return classificationConfigurationInformations;
+			}
+			catch( Exception exception )
+			{
+				var channelAdvisorException = new ChannelAdvisorException( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ), exception );
+				ChannelAdvisorLogger.LogTraceException( channelAdvisorException );
+				throw channelAdvisorException;
+			}
+		}
+
+		public async Task< ClassificationConfigurationInformation[] > GetClassificationConfigInfoAsync( Mark mark = null )
+		{
+			if( mark.IsBlank() )
+				mark = Mark.CreateNew();
+
+			try
+			{
+				ChannelAdvisorLogger.LogTraceStarted( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ) );
+
+				var classificationConfigurationInformations = await AP.QueryAsync.Get( async () =>
+				{
+					ChannelAdvisorLogger.LogTraceRetryStarted( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ) );
+					var result = await this._client.GetClassificationConfigurationInformationAsync( this._credentials, this.AccountId ).ConfigureAwait( false );
+					CheckCaSuccess( result.GetClassificationConfigurationInformationResult );
+					ChannelAdvisorLogger.LogTraceRetryEnd( this.CreateMethodCallInfo( mark : mark, methodResult : result.ToJson(), additionalInfo : this.AdditionalLogInfoString ) );
+					return result.GetClassificationConfigurationInformationResult.ResultData;
+				} ).ConfigureAwait( false );
+				ChannelAdvisorLogger.LogTraceEnd( this.CreateMethodCallInfo( mark : mark, methodResult : classificationConfigurationInformations.ToJson(), additionalInfo : this.AdditionalLogInfoString ) );
+				return classificationConfigurationInformations;
+			}
+			catch( Exception exception )
+			{
+				var channelAdvisorException = new ChannelAdvisorException( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ), exception );
+				ChannelAdvisorLogger.LogTraceException( channelAdvisorException );
+				throw channelAdvisorException;
+			}
+		}
+
+		public DistributionCenterResponse[] GetDistributionCenterList( Mark mark = null )
+		{
+			if( mark.IsBlank() )
+				mark = Mark.CreateNew();
+
+			try
+			{
+				ChannelAdvisorLogger.LogTraceStarted( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ) );
+
+				var distributionCenterResponses = AP.Query.Get( () =>
+				{
+					ChannelAdvisorLogger.LogTraceRetryStarted( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ) );
+					var result = this._client.GetDistributionCenterList( this._credentials, this.AccountId );
+					this.CheckCaSuccess( result );
+					ChannelAdvisorLogger.LogTraceRetryEnd( this.CreateMethodCallInfo( mark : mark, methodResult : result.ToJson(), additionalInfo : this.AdditionalLogInfoString ) );
+					return result.ResultData;
+				} );
+				ChannelAdvisorLogger.LogTraceEnd( this.CreateMethodCallInfo( mark : mark, methodResult : distributionCenterResponses.ToJson(), additionalInfo : this.AdditionalLogInfoString ) );
+				return distributionCenterResponses;
+			}
+			catch( Exception exception )
+			{
+				var channelAdvisorException = new ChannelAdvisorException( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ), exception );
+				ChannelAdvisorLogger.LogTraceException( channelAdvisorException );
+				throw channelAdvisorException;
+			}
+		}
+
+		public async Task< DistributionCenterResponse[] > GetDistributionCenterListAsync( Mark mark = null )
+		{
+			if( mark.IsBlank() )
+				mark = Mark.CreateNew();
+
+			try
+			{
+				ChannelAdvisorLogger.LogTraceStarted( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString, methodParameters : sku ) );
+
+				var distributionCenterResponses = await AP.QueryAsync.Get( async () =>
+				{
+					ChannelAdvisorLogger.LogTraceRetryStarted( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString, methodParameters : sku ) );
+					var result = await this._client.GetDistributionCenterListAsync( this._credentials, this.AccountId ).ConfigureAwait( false );
+					this.CheckCaSuccess( result.GetDistributionCenterListResult );
+					ChannelAdvisorLogger.LogTraceRetryEnd( this.CreateMethodCallInfo( mark : mark, methodResult : result.ToJson(), additionalInfo : this.AdditionalLogInfoString, methodParameters : sku ) );
+					return result.GetDistributionCenterListResult.ResultData;
+				} ).ConfigureAwait( false );
+				ChannelAdvisorLogger.LogTraceEnd( this.CreateMethodCallInfo( mark : mark, methodResult : distributionCenterResponses.ToJson(), additionalInfo : this.AdditionalLogInfoString, methodParameters : sku ) );
+				return distributionCenterResponses;
+			}
+			catch( Exception exception )
+			{
+				var channelAdvisorException = new ChannelAdvisorException( this.CreateMethodCallInfo( mark : mark, additionalInfo : this.AdditionalLogInfoString ), exception );
+				ChannelAdvisorLogger.LogTraceException( channelAdvisorException );
+				throw channelAdvisorException;
+			}
 		}
 		#endregion


Added code to go after putting things in directories.

--- PSAtlasDatasetCommands/GetATLASMCJobOptions.cs
+++ PSAtlasDatasetCommands/GetATLASMCJobOptions.cs
@@ -36,6 +36,9 @@
         [Parameter(HelpMessage = "Should include files be expanded inline?", Mandatory = false)]
         public SwitchParameter ExpandIncludeFiles { get; set; }

+        [Parameter(HelpMessage = "Extract all include files individually to local directory rather than stdout", Mandatory = false)]
+        public PathInfo ExtractionPath { get; set; }
+
         public GetATLASMCJobOptions()
         {
             MCCampaign = "MC15";
@@ -72,14 +75,47 @@
             }
             var ds = myMCFile[0];

-            IEnumerable<string> lines = GetSvnFileLines(BuildTarget(ds.Uri));
-
-            foreach (var line in lines)
-            {
-                WriteObject(line);
+            // Write out the raw lines, or the files to the local directory, depending.
+            if (ExtractionPath == null)
+            {
+                IEnumerable<string> lines = GetSvnFileLines(BuildTarget(ds.Uri));
+
+                foreach (var line in lines)
+                {
+                    WriteObject(line);
+                }
+            } else
+            {
+                var files = GetSvnFiles(BuildTarget(ds.Uri), ExtractionPath);
+                foreach (var f in files)
+                {
+                    WriteObject(f);
+                }
             }

             base.ProcessRecord();
+        }
+
+        /// <summary>
+        /// Fetch the files, and if requested, all the include files as well.
+        /// </summary>
+        /// <param name="svnTarget"></param>
+        /// <param name="extractionPath"></param>
+        /// <returns></returns>
+        private IEnumerable<PathInfo> GetSvnFiles(SvnTarget svnTarget, PathInfo extractionPath)
+        {
+            // Build the location of this file.
+            var targetTempPath = Path.GetTempFileName();
+            //var args = new SvnExportArgs() { Overwrite = true };
+            //WriteVerbose($"Downloading svn file {ds.TargetName}");
+            //_client.Export(ds, targetTempPath, args);
+
+            //// Transfer process the lines
+            //var lines = new FileInfo(targetTempPath)
+            //    .ReadLines()
+            //    .SelectMany(l => ReplaceIncludeFiles(l, ExpandIncludeFiles));
+            //return lines;
+            throw new NotImplementedException();
         }

         /// <summary>
@@ -109,11 +145,18 @@
         /// <returns></returns>
         private Collection<SvnListEventArgs> FetchListing(SvnTarget svnTarget, SvnListArgs args = null)
         {
-            args = args == null ? new SvnListArgs() : args;
-            var result = new Collection<SvnListEventArgs>();
-            WriteVerbose($"Fetching svn listing from {svnTarget.TargetName}");
-            _client.GetList(svnTarget, args, out result);
-            return result;
+            try
+            {
+                args = args == null ? new SvnListArgs() : args;
+                var result = new Collection<SvnListEventArgs>();
+                WriteVerbose($"Fetching svn listing from {svnTarget.TargetName}");
+                _client.GetList(svnTarget, args, out result);
+                return result;
+            } catch (Exception e)
+            {
+                WriteWarning($"Error occured accessing '{svnTarget.TargetName} - could it be username/password is wrong? Use TortoiseSVN to make sure it is cached.");
+                throw;
+            }
         }

         /// <summary>


'parse seq w/ sep' from fact to theory

'parse seq w/ sep' from fact to theory

--- src/CommandLine.Tests/Unit/Core/InstanceBuilderTests.cs
+++ src/CommandLine.Tests/Unit/Core/InstanceBuilderTests.cs
@@ -318,25 +318,21 @@
             // Teardown
         }

-        [Fact]
-        public void Parse_long_sequence_with_separator()
-        {
-            // Fixture setup
-            var expectedResult = new FakeOptionsWithSequenceAndSeparator
-                {
-                    LongSequence = new[] { 1L, 1234L, 59678L },
-                    StringSequence = new string[] { }
-                };
+        [Theory]
+        [InlineData(new[] { "--long-seq", "1;1234;59678" }, new[] { 1L, 1234L, 59678L })]
+        public void Parse_long_sequence_with_separator(string[] arguments, long[] expected)
+        {
+            // Fixture setup in attributes

             // Exercize system
             var result = InstanceBuilder.Build(
                 () => new FakeOptionsWithSequenceAndSeparator(),
-                new[] { "--long-seq", "1;1234;59678" },
-                StringComparer.Ordinal,
-                CultureInfo.InvariantCulture);
-
-            // Verify outcome
-            expectedResult.ShouldBeEquivalentTo(result.Value);
+                arguments,
+                StringComparer.Ordinal,
+                CultureInfo.InvariantCulture);
+
+            // Verify outcome
+            expected.ShouldBeEquivalentTo(result.Value.LongSequence);

             // Teardown
         }


Fixed tests

Fixed tests

--- src/DatenMeister/Runtime/ExtentStorage/ExtentManager.cs
+++ src/DatenMeister/Runtime/ExtentStorage/ExtentManager.cs
@@ -265,7 +265,7 @@
                     loaded.RemoveAt(0);

                     // Check, if given workspace can be loaded or whether references are still in list
-                    if (IsForMetaWorkspaceIn(extentLoaderConfig.workspaceId, loaded))
+                    if (IsMetaWorkspaceInLoaderList(extentLoaderConfig.workspaceId, loaded))
                     {
                         // If yes, put current workspace to the end
                         loaded.Add(tuple);
@@ -324,9 +324,23 @@
         /// <param name="loaded">List of items still to be loaded</param>
         /// <returns>True, if the loading should be inhibited because one
         /// of the metaitems are still in</returns>
-        private bool IsForMetaWorkspaceIn(string workspaceId, List<Tuple<ExtentLoaderConfig, XElement>> loaded)
+        private bool IsMetaWorkspaceInLoaderList(string workspaceId, List<Tuple<ExtentLoaderConfig, XElement>> loaded)
+        {
+            return IsMetaWorkspaceInList(
+                workspaceId,
+                loaded.Select(x => x.Item1.workspaceId));
+        }
+
+        private bool IsMetaWorkspaceInList(
+            string workspaceId,
+            IEnumerable<string> workspaceList)
         {
             var workspace = _workspaceLogic.GetWorkspace(workspaceId);
+            if (string.IsNullOrEmpty(workspaceId) || workspace == null)
+            {
+                // If workspace is not known, accept it
+                return false;
+            }
             var metaWorkspaces = workspace.MetaWorkspaces;
             foreach (var metaWorkspace in metaWorkspaces)
             {
@@ -336,12 +350,12 @@
                     continue;
                 }

-                if (loaded.Any(x => x.Item1.workspaceId == metaWorkspace.id))
+                if (workspaceList.Any(x => x == metaWorkspace.id))
                 {
                     return true;
                 }

-                if (IsForMetaWorkspaceIn(metaWorkspace.id, loaded))
+                if (IsMetaWorkspaceInList(metaWorkspace.id, workspaceList))
                 {
                     return true;
                 }


Fix a typo

Fix a typo

--- src/DotVVM.Samples.Tests/Complex/NestedComboBoxTests.cs
+++ src/DotVVM.Samples.Tests/Complex/NestedComboBoxTests.cs
@@ -19,7 +19,7 @@
         }

         [Fact]
-        public void Comples_NestedComboBox_HeavilyNested()
+        public void Complex_NestedComboBox_HeavilyNested()
         {
             RunInAllBrowsers(browser => {
                 browser.NavigateToUrl(SamplesRouteUrls.ComplexSamples_NestedComboBox_HeavilyNested);


Only get dependencies for #r and #load commands

--- src/Dotnet.Script.Core/Interactive/InteractiveRunner.cs
+++ src/Dotnet.Script.Core/Interactive/InteractiveRunner.cs
@@ -72,23 +72,25 @@
                 }
                 else
                 {
-                    var lineRuntimeDependencies = ScriptCompiler.RuntimeDependencyResolver.GetDependenciesFromCode(CurrentDirectory, input).ToArray();
-                    var lineDependencies = lineRuntimeDependencies.SelectMany(rtd => rtd.Assemblies).Distinct();
+                    if (input.StartsWith("#r ") || input.StartsWith("#load "))
+                    {
+                        var lineRuntimeDependencies = ScriptCompiler.RuntimeDependencyResolver.GetDependenciesFromCode(CurrentDirectory, input).ToArray();
+                        var lineDependencies = lineRuntimeDependencies.SelectMany(rtd => rtd.Assemblies).Distinct();

-                    var scriptMap = lineRuntimeDependencies.ToDictionary(rdt => rdt.Name, rdt => rdt.Scripts);
-                    if (scriptMap.Count > 0)
-                    {
-                        _scriptOptions =
-                            _scriptOptions.WithSourceResolver(
-                                new NuGetSourceReferenceResolver(
-                                    new SourceFileResolver(ImmutableArray<string>.Empty, CurrentDirectory), scriptMap));
+                        var scriptMap = lineRuntimeDependencies.ToDictionary(rdt => rdt.Name, rdt => rdt.Scripts);
+                        if (scriptMap.Count > 0)
+                        {
+                            _scriptOptions =
+                                _scriptOptions.WithSourceResolver(
+                                    new NuGetSourceReferenceResolver(
+                                        new SourceFileResolver(ImmutableArray<string>.Empty, CurrentDirectory), scriptMap));
+                        }
+                        foreach (var runtimeDependency in lineDependencies)
+                        {
+                            Logger.Verbose("Adding reference to a runtime dependency => " + runtimeDependency);
+                            _scriptOptions = _scriptOptions.AddReferences(MetadataReference.CreateFromFile(runtimeDependency.Path));
+                        }
                     }
-                    foreach (var runtimeDependency in lineDependencies)
-                    {
-                        Logger.Verbose("Adding reference to a runtime dependency => " + runtimeDependency);
-                        _scriptOptions = _scriptOptions.AddReferences(MetadataReference.CreateFromFile(runtimeDependency.Path));
-                    }
-
                     _scriptState = await _scriptState.ContinueWithAsync(input, _scriptOptions, ex => true);
                 }
             });


Update header

Update header


Add logging when error is shown in PR detail view

--- src/GitHub.App/ViewModels/PullRequestDetailViewModel.cs
+++ src/GitHub.App/ViewModels/PullRequestDetailViewModel.cs
@@ -16,6 +16,7 @@
 using GitHub.UI;
 using LibGit2Sharp;
 using ReactiveUI;
+using NLog;

 namespace GitHub.ViewModels
 {
@@ -26,6 +27,8 @@
     [PartCreationPolicy(CreationPolicy.NonShared)]
     public class PullRequestDetailViewModel : PanePageViewModelBase, IPullRequestDetailViewModel
     {
+        static readonly Logger log = LogManager.GetCurrentClassLogger();
+
         readonly IModelService modelService;
         readonly IPullRequestService pullRequestsService;
         readonly IPullRequestSessionManager sessionManager;
@@ -93,7 +96,7 @@
             Checkout = ReactiveCommand.CreateAsyncObservable(
                 this.WhenAnyValue(x => x.CheckoutState)
                     .Cast<CheckoutCommandState>()
-                    .Select(x => x != null && x.IsEnabled),
+                    .Select(x => x != null && x.IsEnabled),
                 DoCheckout);
             Checkout.IsExecuting.Subscribe(x => isInCheckout = x);
             SubscribeOperationError(Checkout);
@@ -351,6 +354,7 @@
                 .ObserveOn(RxApp.MainThreadScheduler)
                 .Catch<IPullRequestModel, Exception>(ex =>
                 {
+                    log.Error("Error observing GetPullRequest", ex);
                     ErrorMessage = ex.Message.Trim();
                     IsLoading = IsBusy = false;
                     return Observable.Empty<IPullRequestModel>();
@@ -460,6 +464,7 @@
             }
             catch (Exception ex)
             {
+                log.Error("Error loading PullRequestModel", ex);
                 ErrorMessage = ex.Message.Trim();
             }
             finally


Add send module chanel tests

Add send module chanel tests

--- src/Lime.Protocol.UnitTests/Network/ChannelBaseTests.cs
+++ src/Lime.Protocol.UnitTests/Network/ChannelBaseTests.cs
@@ -65,18 +65,19 @@
         [Category("SendMessageAsync")]
         public async Task SendMessageAsync_EstablishedState_CallsTransport()
         {
-            var tcs = new TaskCompletionSource<Envelope>();
-            _transport
-                .Setup(t => t.ReceiveAsync(It.IsAny<CancellationToken>()))
-                .Returns(tcs.Task);
-
-            var target = GetTarget(SessionState.Established);
-
+            // Arrange
+            var tcs = new TaskCompletionSource<Envelope>();
+            _transport
+                .Setup(t => t.ReceiveAsync(It.IsAny<CancellationToken>()))
+                .Returns(tcs.Task);
             var content = Dummy.CreateTextContent();
             var message = Dummy.CreateMessage(content);
-
+            var target = GetTarget(SessionState.Established);
+
+            // Act
             await target.SendMessageAsync(message);

+            // Assert
             _transport.Verify(
                 t => t.SendAsync(It.Is<Message>(
                         e => e.Id == message.Id &&
@@ -118,6 +119,60 @@
             await target.SendMessageAsync(message);
         }

+        [Test]
+        [Category("SendMessageAsync")]
+        public async Task SendMessageAsync_ModuleReturnsMessage_SendsModuleMessage()
+        {
+            // Arrange
+            var content = Dummy.CreateTextContent();
+            var message = Dummy.CreateMessage(content);
+            var moduleMessage = Dummy.CreateMessage(content);
+            var tcs = new TaskCompletionSource<Envelope>();
+            _transport
+                .Setup(t => t.ReceiveAsync(It.IsAny<CancellationToken>()))
+                .Returns(tcs.Task);
+            var target = (TestChannel)GetTarget(SessionState.New);
+            var moduleMock = new Mock<IChannelModule<Message>>();
+            moduleMock
+                .Setup(t => t.OnSending(message, It.IsAny<CancellationToken>()))
+                .Returns(moduleMessage.AsCompletedTask());
+            target.MessageModules.Add(moduleMock.Object);
+            target.SetState(SessionState.Established);
+
+            // Act
+            await target.SendMessageAsync(message);
+
+            // Assert
+            _transport.Verify(t => t.SendAsync(moduleMessage, It.IsAny<CancellationToken>()), Times.Once());
+        }
+
+        [Test]
+        [Category("SendMessageAsync")]
+        public async Task SendMessageAsync_ModuleReturnsNull_DoNotCallTransport()
+        {
+            // Arrange
+            var content = Dummy.CreateTextContent();
+            var message = Dummy.CreateMessage(content);
+
+            var tcs = new TaskCompletionSource<Envelope>();
+            _transport
+                .Setup(t => t.ReceiveAsync(It.IsAny<CancellationToken>()))
+                .Returns(tcs.Task);
+            var target = (TestChannel)GetTarget(SessionState.New);
+            var moduleMock = new Mock<IChannelModule<Message>>();
+            moduleMock
+                .Setup(t => t.OnSending(message, It.IsAny<CancellationToken>()))
+                .Returns(Task.FromResult<Message>(null));
+            target.MessageModules.Add(moduleMock.Object);
+            target.SetState(SessionState.Established);
+
+            // Act
+            await target.SendMessageAsync(message);
+
+            // Assert
+            _transport.Verify(t => t.SendAsync(message, It.IsAny<CancellationToken>()), Times.Never);
+        }
+
         #endregion

         #region ReceiveMessageAsync
@@ -395,6 +450,60 @@
             await target.SendCommandAsync(command);
         }

+        [Test]
+        [Category("SendCommandAsync")]
+        public async Task SendCommandAsync_ModuleReturnsCommand_SendsModuleCommand()
+        {
+            // Arrange
+            var content = Dummy.CreateTextContent();
+            var command = Dummy.CreateCommand(content);
+            var moduleCommand = Dummy.CreateCommand(content);
+            var tcs = new TaskCompletionSource<Envelope>();
+            _transport
+                .Setup(t => t.ReceiveAsync(It.IsAny<CancellationToken>()))
+                .Returns(tcs.Task);
+            var target = (TestChannel)GetTarget(SessionState.New);
+            var moduleMock = new Mock<IChannelModule<Command>>();
+            moduleMock
+                .Setup(t => t.OnSending(command, It.IsAny<CancellationToken>()))
+                .Returns(moduleCommand.AsCompletedTask());
+            target.CommandModules.Add(moduleMock.Object);
+            target.SetState(SessionState.Established);
+
+            // Act
+            await target.SendCommandAsync(command);
+
+            // Assert
+            _transport.Verify(t => t.SendAsync(moduleCommand, It.IsAny<CancellationToken>()), Times.Once());
+        }
+
+        [Test]
+        [Category("SendCommandAsync")]
+        public async Task SendCommandAsync_ModuleReturnsNull_DoNotCallTransport()
+        {
+            // Arrange
+            var content = Dummy.CreateTextContent();
+            var command = Dummy.CreateCommand(content);
+
+            var tcs = new TaskCompletionSource<Envelope>();
+            _transport
+                .Setup(t => t.ReceiveAsync(It.IsAny<CancellationToken>()))
+                .Returns(tcs.Task);
+            var target = (TestChannel)GetTarget(SessionState.New);
+            var moduleMock = new Mock<IChannelModule<Command>>();
+            moduleMock
+                .Setup(t => t.OnSending(command, It.IsAny<CancellationToken>()))
+                .Returns(Task.FromResult<Command>(null));
+            target.CommandModules.Add(moduleMock.Object);
+            target.SetState(SessionState.Established);
+
+            // Act
+            await target.SendCommandAsync(command);
+
+            // Assert
+            _transport.Verify(t => t.SendAsync(command, It.IsAny<CancellationToken>()), Times.Never);
+        }
+
         #endregion

         #region ReceiveCommandAsync
@@ -565,6 +674,58 @@
             await target.SendNotificationAsync(notification);
         }

+        [Test]
+        [Category("SendNotificationAsync")]
+        public async Task SendNotificationAsync_ModuleReturnsNotification_SendsModuleNotification()
+        {
+            // Arrange
+            var notification = Dummy.CreateNotification(Event.Authorized);
+            var moduleNotification = Dummy.CreateNotification(Event.Received);
+            var tcs = new TaskCompletionSource<Envelope>();
+            _transport
+                .Setup(t => t.ReceiveAsync(It.IsAny<CancellationToken>()))
+                .Returns(tcs.Task);
+            var target = (TestChannel)GetTarget(SessionState.New);
+            var moduleMock = new Mock<IChannelModule<Notification>>();
+            moduleMock
+                .Setup(t => t.OnSending(notification, It.IsAny<CancellationToken>()))
+                .Returns(moduleNotification.AsCompletedTask());
+            target.NotificationModules.Add(moduleMock.Object);
+            target.SetState(SessionState.Established);
+
+            // Act
+            await target.SendNotificationAsync(notification);
+
+            // Assert
+            _transport.Verify(t => t.SendAsync(moduleNotification, It.IsAny<CancellationToken>()), Times.Once());
+        }
+
+        [Test]
+        [Category("SendNotificationAsync")]
+        public async Task SendNotificationAsync_ModuleReturnsNull_DoNotCallTransport()
+        {
+            // Arrange
+            var notification = Dummy.CreateNotification(Event.Authorized);
+
+            var tcs = new TaskCompletionSource<Envelope>();
+            _transport
+                .Setup(t => t.ReceiveAsync(It.IsAny<CancellationToken>()))
+                .Returns(tcs.Task);
+            var target = (TestChannel)GetTarget(SessionState.New);
+            var moduleMock = new Mock<IChannelModule<Notification>>();
+            moduleMock
+                .Setup(t => t.OnSending(notification, It.IsAny<CancellationToken>()))
+                .Returns(Task.FromResult<Notification>(null));
+            target.NotificationModules.Add(moduleMock.Object);
+            target.SetState(SessionState.Established);
+
+            // Act
+            await target.SendNotificationAsync(notification);
+
+            // Assert
+            _transport.Verify(t => t.SendAsync(notification, It.IsAny<CancellationToken>()), Times.Never);
+        }
+
         #endregion

         #region ReceiveNotificationAsync


(GH-3286) Fix for: DateTimePicker: Calendar.SelectedDate not always updated and consistent Closes #3286

--- src/MahApps.Metro/Controls/TimePicker/DateTimePicker.cs
+++ src/MahApps.Metro/Controls/TimePicker/DateTimePicker.cs
@@ -140,6 +140,7 @@

             if (_calendar != null)
             {
+                _calendar.SetBinding(Calendar.SelectedDateProperty, GetBinding(SelectedDateTimeProperty));
                 _calendar.SetBinding(Calendar.DisplayDateProperty, GetBinding(DisplayDateProperty));
                 _calendar.SetBinding(Calendar.DisplayDateStartProperty, GetBinding(DisplayDateStartProperty));
                 _calendar.SetBinding(Calendar.DisplayDateEndProperty, GetBinding(DisplayDateEndProperty));
@@ -270,7 +271,7 @@
             var dateTime = GetSelectedDateTimeFromGUI();
             if (dateTime != null)
             {
-                DisplayDate = dateTime.Value > DateTime.MinValue && dateTime.Value < DateTime.MaxValue ? dateTime.Value : DateTime.Today;
+                this.SetCurrentValue(DisplayDateProperty, dateTime.Value > DateTime.MinValue && dateTime.Value < DateTime.MaxValue ? dateTime.Value : DateTime.Today);
                 if ((SelectedDateTime != DisplayDate && SelectedDateTime != DateTime.MinValue) || (Popup != null && Popup.IsOpen))
                 {
                     this.SetCurrentValue(SelectedDateTimeProperty, DisplayDate);


Update QuoteCommands.cs

Update QuoteCommands.cs

--- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs
+++ src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs
@@ -52,7 +52,7 @@
             using (var uow = DbHandler.Instance.GetUnitOfWork())
             {
 //                quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false);
-                quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(Id, keyword).ConfigureAwait(false);
+                quote = await uow.Quotes.GetRandomQuoteByKeyword.ConfigureAwait(false);
             }

             if (quote == null)


Obtain organiser's timezone from MAPI property for meeting invite. Fixes #67

--- src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookNew.cs
+++ src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookNew.cs
@@ -166,6 +166,7 @@
         private const String PR_SMTP_ADDRESS = "http://schemas.microsoft.com/mapi/proptag/0x39FE001E";
         private const String EMAIL1ADDRESS = "http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/8084001F";
         private const String PR_IPM_WASTEBASKET_ENTRYID = "http://schemas.microsoft.com/mapi/proptag/0x35E30102";
+        private const String PR_ORGANISER_TIMEZONE = "http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/8234001E";

         public NameSpace GetCurrentUser(NameSpace oNS) {
             Boolean releaseNamespace = (oNS == null);
@@ -596,17 +597,57 @@
         #region TimeZone Stuff
         //http://stackoverflow.com/questions/17348807/how-to-translate-between-windows-and-iana-time-zones
         //https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+        //https://blogs.technet.microsoft.com/dst2007/ - MS timezone updates

         public Event IANAtimezone_set(Event ev, AppointmentItem ai) {
-            try {
+            String organiserTZname = null;
+            String organiserTZid = null;
+            if (ai.Organizer != CurrentUserName()) {
+                log.Fine("Meeting organiser is someone else - checking their timezone.");
                 try {
-                    ev.Start.TimeZone = IANAtimezone(ai.StartTimeZone.ID, ai.StartTimeZone.Name);
+                    PropertyAccessor pa = null;
+                    try {
+                        pa = ai.PropertyAccessor;
+                        organiserTZname = pa.GetProperty(PR_ORGANISER_TIMEZONE).ToString();
+                    } finally {
+                        pa = (PropertyAccessor)OutlookOgcs.Calendar.ReleaseObject(pa);
+                    }
+                    if (organiserTZname != ai.StartTimeZone.Name) {
+                        log.Fine("Appointment's timezone: " + ai.StartTimeZone.Name);
+                        log.Fine("Organiser's timezone:   " + organiserTZname);
+                        log.Debug("Retrieving the meeting organiser's timezone ID.");
+                        System.Collections.ObjectModel.ReadOnlyCollection<TimeZoneInfo> sysTZ = TimeZoneInfo.GetSystemTimeZones();
+                        try {
+                            TimeZoneInfo tzi = sysTZ.FirstOrDefault(t => t.DisplayName == organiserTZname || t.StandardName == organiserTZname);
+                            if (tzi == null)
+                                throw new ArgumentNullException("No timezone ID exists for organiser's timezone " + organiserTZname);
+                            else
+                                organiserTZid = tzi.Id;
+
+                        } catch (ArgumentNullException ex) {
+                            throw ex as System.Exception;
+                        } catch (System.Exception ex) {
+                            throw new System.Exception("Failed to get the organiser's timezone ID for " + organiserTZname, ex);
+                        }
+                    }
+                } catch (System.Exception ex) {
+                    Forms.Main.Instance.Console.Update(OutlookOgcs.Calendar.GetEventSummary(ai) +
+                        "<br/>Could not determine the organiser's timezone. Google Event will have incorrect time.", Console.Markup.warning);
+                    OGCSexception.Analyse(ex);
+                    organiserTZname = null;
+                    organiserTZid = null;
+                }
+            }
+
+            try {
+                try {
+                    ev.Start.TimeZone = IANAtimezone(organiserTZid ?? ai.StartTimeZone.ID, organiserTZname ?? ai.StartTimeZone.Name);
                 } catch (System.Exception ex) {
                     log.Debug(ex.Message);
                     throw new ApplicationException("Failed to set start timezone. [" + ai.StartTimeZone.ID + ", " + ai.StartTimeZone.Name + "]");
                 }
                 try {
-                    ev.End.TimeZone = IANAtimezone(ai.EndTimeZone.ID, ai.EndTimeZone.Name);
+                    ev.End.TimeZone = IANAtimezone(organiserTZid ?? ai.EndTimeZone.ID, organiserTZname ?? ai.EndTimeZone.Name);
                 } catch (System.Exception ex) {
                     log.Debug(ex.Message);
                     throw new ApplicationException("Failed to set end timezone. [" + ai.EndTimeZone.ID + ", " + ai.EndTimeZone.Name + "]");


#3752 Lint 'semicolons' and 'line length' options change together

--- src/Package/Impl/Options/R/Editor/RLintOptionsDialog.cs
+++ src/Package/Impl/Options/R/Editor/RLintOptionsDialog.cs
@@ -234,8 +234,8 @@
         [LocDescription("Settings_Lint_Semicolons_Description")]
         [DefaultValue(false)]
         public bool Semicolons {
-            get => _options.LineLength;
-            set => _options.LineLength = value;
+            get => _options.Semicolons;
+            set => _options.Semicolons = value;
         }

         [LocCategory("Settings_LintCategory_Statements")]


temp workaround for traits

temp workaround for traits

--- src/Peachpie.CodeAnalysis/CodeGen/CodeGenerator.Emit.cs
+++ src/Peachpie.CodeAnalysis/CodeGen/CodeGenerator.Emit.cs
@@ -2250,6 +2250,13 @@
                     return;
                 }

+                if (ntype.Arity != 0)
+                {
+                    // workaround for traits - constructed traits do not match the declaratin in Context
+                    // TODO: ctx.ExpectTypeDeclared(GetPhpTypeInfo(RuntimeTypeHandle(T<>)))
+                    return;
+                }
+
                 // Template: ctx.ExpectTypeDeclared<d>
                 EmitLoadContext();
                 EmitCall(ILOpCode.Call, CoreMethods.Context.ExpectTypeDeclared_T.Symbol.Construct(d));


Display the debug logging of the process

--- MiniDumper/MiniDumper.cs
+++ MiniDumper/MiniDumper.cs
@@ -75,6 +75,7 @@

         public void DumpOnException(uint threadId, EXCEPTION_RECORD ev)
         {
+            if (ev.ExceptionCode == BREAKPOINT_CODE)
             {
                 return;
             }


Using cache, with API call as fallback.

Using cache, with API call as fallback.

--- ModCore/Commands/Star.cs
+++ ModCore/Commands/Star.cs
@@ -51,35 +51,38 @@
                 embed.Description =
                     $"You have given **{givenStars.Count()}** stars to other users.\n\n" +
                     $"You have been given **{gotStars.Count()}** stars by **{gotStars.Select(x => x.StargazerId).Distinct().Count()}** different users, over **{gotStars.Select(x => x.MessageId).Distinct().Count()}** different messages.";
-
+
+                var allMembers = ctx.Guild.Members;
+
                 var givenMemberNames = new Dictionary<string, int>();
                 foreach (DatabaseStarData star in givenStars)
                 {
-                    string memberName = "Unknown User";
-                    try
+                    string memberName = "Removed User";
+                    if (allMembers.Any(x => x.Id == (ulong)star.AuthorId))
                     {
-                        memberName = (await ctx.Client.GetUserAsync((ulong)star.AuthorId)).Mention;
-                        if (givenMemberNames.ContainsKey(memberName))
+                        memberName = allMembers.First(x => x.Id == (ulong)star.AuthorId).Mention;
+                    }
+                    else
+                    {
+                        try
                         {
-                            givenMemberNames[memberName] += 1;
+                            memberName = (await ctx.Client.GetUserAsync((ulong)star.AuthorId)).Mention;
                         }
-                        else
+                        catch
                         {
-                            givenMemberNames.Add(memberName, 1);
+                            // TODO: Make SSG proud (Still)
                         }
                     }
-                    catch
+                    if (givenMemberNames.ContainsKey(memberName))
                     {
-                        if (givenMemberNames.ContainsKey(memberName))
-                        {
-                            givenMemberNames[memberName] += 1;
-                        }
-                        else
-                        {
-                            givenMemberNames.Add(memberName, 1);
-                        }
+                        givenMemberNames[memberName] += 1;
+                    }
+                    else
+                    {
+                        givenMemberNames.Add(memberName, 1);
                     }
                 }
+
                 var orderGivenmemberNames = givenMemberNames.OrderByDescending(x => x.Value).Select(x => x.Key + " - " + x.Value);
                 embed.AddField("Users who you gave stars", string.Join("\n", orderGivenmemberNames.Take(10)), false);

@@ -89,29 +92,29 @@
                 var gotMemberNames = new Dictionary<string, int>();
                 foreach (DatabaseStarData star in gotStars)
                 {
-                    string memberName = "Unknown User";
-                    try
+                    string memberName = "Removed User";
+                    if (allMembers.Any(x => x.Id == (ulong)star.StargazerId))
                     {
-                        memberName = (await ctx.Client.GetUserAsync((ulong)star.StargazerId)).Mention;
-                        if (gotMemberNames.ContainsKey(memberName))
+                        memberName = allMembers.First(x => x.Id == (ulong)star.StargazerId).Mention;
+                    }
+                    else
+                    {
+                        try
                         {
-                            gotMemberNames[memberName] += 1;
+                            memberName = (await ctx.Client.GetUserAsync((ulong)star.StargazerId)).Mention;
                         }
-                        else
+                        catch
                         {
-                            gotMemberNames.Add(memberName, 1);
+                            // TODO: Make SSG proud (Still)
                         }
                     }
-                    catch
+                    if (gotMemberNames.ContainsKey(memberName))
                     {
-                        if (gotMemberNames.ContainsKey(memberName))
-                        {
-                            gotMemberNames[memberName] += 1;
-                        }
-                        else
-                        {
-                            gotMemberNames.Add(memberName, 1);
-                        }
+                        gotMemberNames[memberName] += 1;
+                    }
+                    else
+                    {
+                        gotMemberNames.Add(memberName, 1);
                     }
                 }
                 var orderedGotMemberNames = gotMemberNames.OrderByDescending(x => x.Value).Select(x => x.Key + " - " + x.Value);


Некорректно реализовано отсутствие параметра Маска в методе НайтиФайлы (see #228)

--- src/ScriptEngine.HostedScript/Library/FileOperations.cs
+++ src/ScriptEngine.HostedScript/Library/FileOperations.cs
@@ -84,22 +84,15 @@
         {
             if (mask == null)
             {
-                recursive = false;
-                if (File.Exists(dir))
-                {
-                    mask = Path.GetFileName(dir);
-                    dir = Path.GetDirectoryName(dir);
+                // fix 225, 227, 228
+                var fObj = new FileContext(dir);
+                if(fObj.Exists())
+                {
+                    return new ArrayImpl(new[] { fObj });
                 }
                 else
                 {
-                    if (System.Environment.OSVersion.Platform == PlatformID.Unix)
-                    {
-                        mask = "*";
-                    }
-                    else
-                    {
-                        mask = "*.*";
-                    }
+                    return new ArrayImpl();
                 }
             }
             else if (File.Exists(dir))


Skip runtime stash on shutdown

Skip runtime stash on shutdown

--- src/runtime/StateSerialization/RuntimeData.cs
+++ src/runtime/StateSerialization/RuntimeData.cs
@@ -49,6 +49,7 @@

         internal static void Stash()
         {
+            return;
             var runtimeStorage = new PythonNetState
             {
                 Metatype = MetaType.SaveRuntimeData(),


[Fixes bug #873622] Allow saving empty files with Window/Save All

--- Pinta/Actions/Window/SaveAllDocumentsAction.cs
+++ Pinta/Actions/Window/SaveAllDocumentsAction.cs
@@ -46,7 +46,7 @@
 		private void Activated (object sender, EventArgs e)
 		{
 			foreach (Document doc in PintaCore.Workspace.OpenDocuments) {
-				if (!doc.IsDirty)
+				if (!doc.IsDirty && doc.HasFile)
 					continue;

 				PintaCore.Workspace.SetActiveDocument (doc);


Fixed bug in page edit. See issue #87

Fixed bug in page edit. See issue #87

--- Piranha/Models/Manager/PageModels/EditModel.cs
+++ Piranha/Models/Manager/PageModels/EditModel.cs
@@ -388,6 +388,14 @@
 					Parents = BuildParentPages(Sitemap.GetStructure(false), Page) ;
 					Parents.Insert(0, new PagePlacement() { Level = 1, IsSelected = Page.ParentId == Guid.Empty }) ;
 					Siblings = BuildSiblingPages(Page.Id, Page.ParentId, Page.Seqno, Page.ParentId) ;
+
+					// Initialize regions
+					foreach (var reg in Regions)
+						if (Extend.ExtensionManager.ExtensionTypes.ContainsKey(reg.Type)) {
+							var m = Extend.ExtensionManager.ExtensionTypes[reg.Type].GetMethod("Init") ;
+							if (m != null)
+								m.Invoke(reg.Body, new object[] { this }) ;
+						}
 				}
 			}
 		}


Cosmetics in TracingControl.xaml.cs

Cosmetics in TracingControl.xaml.cs

--- src/StructuredLogViewer/Controls/TracingControl.xaml.cs
+++ src/StructuredLogViewer/Controls/TracingControl.xaml.cs
@@ -7,11 +7,7 @@
 using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Shapes;
-using System.Windows.Threading;
-using System.Threading;
 using Microsoft.Build.Logging.StructuredLogger;
-using System.Windows.Media.Imaging;
-using System.IO;

 namespace StructuredLogViewer.Controls
 {
@@ -63,37 +59,37 @@

         public bool ShowEvaluation
         {
-            get { return _showEvaluation; }
+            get => _showEvaluation;
             set { _showEvaluation = value; ComputeAndDraw(); }
         }

         public bool ShowProject
         {
-            get { return _showProject; }
+            get => _showProject;
             set { _showProject = value; ComputeAndDraw(); }
         }

         public bool ShowTarget
         {
-            get { return _showTarget; }
+            get => _showTarget;
             set { _showTarget = value; ComputeAndDraw(); }
         }

         public bool ShowTask
         {
-            get { return _showTask; }
+            get => _showTask;
             set { _showTask = value; ComputeAndDraw(); }
         }

         public bool ShowOther
         {
-            get { return _showOther; }
+            get => _showOther;
             set { _showOther = value; ComputeAndDraw(); }
         }

         public bool ShowNodes
         {
-            get { return _showNodes; }
+            get => _showNodes;
             set { _showNodes = value; ComputeAndDraw(); }
         }

@@ -147,11 +143,6 @@

         private void TimelineControl_MouseWheel(object sender, MouseWheelEventArgs e)
         {
-            if ((Keyboard.Modifiers & ModifierKeys.Control) == 0)
-            {
-                return;
-            }
-
             if (e.Delta > 0)
             {
                 if (scaleFactor < maximumZoom)
@@ -180,11 +171,10 @@

         public Timeline Timeline { get; set; }

-
         // SetTimeline is called from BuildControl which will set the global values
         public void SetTimeline(Timeline timeline, long globalStart, long globalEnd)
         {
-            var start = DateTime.Now;
+            var start = Timestamp;
             Timeline = timeline;
             GlobalStartTime = globalStart;
             GlobalEndTime = globalEnd;
@@ -238,7 +228,7 @@
             textHeight = sample.DesiredSize.Height;

             lanesPanel = new StackPanel { Orientation = Orientation.Vertical, HorizontalAlignment = HorizontalAlignment.Left };
-            this.initTime = DateTime.Now - start;
+            this.initTime = Timestamp - start;

             ComputeAndDraw();
             grid.Children.Add(lanesPanel);
@@ -247,16 +237,20 @@
         private void ComputeAndDraw()
         {
             if (Timeline == null)
+            {
                 return;
+            }

             ComputeTimeline();

             Draw();
         }

+        private DateTime Timestamp => DateTime.UtcNow;
+
         private void ComputeTimeline()
         {
-            var start = DateTime.Now;
+            var start = Timestamp;
             var keys = Timeline.Lanes.Keys.ToList();
             keys.Sort();

@@ -271,7 +265,7 @@
             });

             blocksCollection = blocksCollectionArray.ToList();
-            this.computeTime = DateTime.Now - start;
+            this.computeTime = Timestamp - start;
         }

         /// <summary>
@@ -279,9 +273,11 @@
         /// </summary>
         private void Draw()
         {
-            var start = DateTime.Now;
+            var start = Timestamp;
             if (Timeline == null)
+            {
                 return;
+            }

             TextBlocks?.Clear();
             lanesPanel.Children.Clear();
@@ -289,7 +285,7 @@
             // Compute number of pixel for one second, used by ruler
             OneSecondPixelWidth = ConvertTimeToPixel(TimeSpan.FromSeconds(1).Ticks);

-            int showMeassurementMod = 0;
+            int showMeasurementMod = 0;

             foreach (var blocks in blocksCollection)
             {
@@ -297,16 +293,17 @@

                 if (panel != null && panel.Children.Count > 0)
                 {
-                    if (ShowNodes || showMeassurementMod == 0)
+                    if (ShowNodes || showMeasurementMod == 0)
                     {
-                        lanesPanel.Children.Add(CreatePanelForNodeDivider(showMeassurementMod % 5 == 0));
-                        showMeassurementMod++;
+                        lanesPanel.Children.Add(CreatePanelForNodeDivider(showMeasurementMod % 5 == 0));
+                        showMeasurementMod++;
                     }

                     lanesPanel.Children.Add(panel);
                 }
             }
-            this.drawTime = DateTime.Now - start;
+
+            this.drawTime = Timestamp - start;
         }

         private Panel CreatePanelForNodeDivider(bool showTime)
@@ -482,7 +479,7 @@
             canvas.VerticalAlignment = VerticalAlignment.Top;
             double canvasWidth = 0;
             double canvasHeight = 0;
-            double minimumDurationToInclude = 1; // ignore duration is less than 1pixel
+            double minimumDurationToInclude = 1; // ignore durations less than 1 pixel

             foreach (var block in blocks)
             {
@@ -548,6 +545,7 @@
             BorderBrush = Brushes.DeepSkyBlue,
             BorderThickness = new Thickness(1)
         };
+
         private StackPanel lanesPanel;

         private void HighlightTextBlock(TextBlock hit, bool scrollToElement = false)
@@ -561,6 +559,7 @@
                     horizontalOffset = p.X > 20 ? p.X - 20 : p.X;
                     verticalOffset = p.Y > 20 ? p.Y - 20 : p.Y;
                 }
+
                 return;
             }


Fixing TraceWriter cast

Fixing TraceWriter cast

--- src/WebJobs.Script/Description/ScriptFunctionInvoker.cs
+++ src/WebJobs.Script/Description/ScriptFunctionInvoker.cs
@@ -7,6 +7,7 @@
 using System.IO;
 using System.Linq;
 using System.Threading.Tasks;
+using Microsoft.Azure.WebJobs.Host;

 namespace Microsoft.Azure.WebJobs.Script
 {
@@ -34,82 +35,82 @@
         public async Task Invoke(object[] parameters)
         {
             string input = parameters[0].ToString();
-            TextWriter textWriter = (TextWriter)parameters[1];
+            TraceWriter traceWriter = (TraceWriter)parameters[1];

             switch (_scriptType)
             {
                 case "ps1":
-                    await InvokePowerShellScript(input, textWriter);
+                    await InvokePowerShellScript(input, traceWriter);
                     break;
                 case "cmd":
                 case "bat":
-                    await InvokeWindowsBatchScript(input, textWriter);
+                    await InvokeWindowsBatchScript(input, traceWriter);
                     break;
                 case "py":
-                    await InvokePythonScript(input, textWriter);
+                    await InvokePythonScript(input, traceWriter);
                     break;
                 case "php":
-                    await InvokePhpScript(input, textWriter);
+                    await InvokePhpScript(input, traceWriter);
                     break;
                 case "sh":
-                    await InvokeBashScript(input, textWriter);
+                    await InvokeBashScript(input, traceWriter);
                     break;
                 case "fsx":
-                    await InvokeFSharpScript(input, textWriter);
-                    break;
-            }
-        }
-
-        internal Task InvokeFSharpScript(string input, TextWriter textWriter)
+                    await InvokeFSharpScript(input, traceWriter);
+                    break;
+            }
+        }
+
+        internal Task InvokeFSharpScript(string input, TraceWriter traceWriter)
         {
             string scriptHostArguments = string.Format("/c fsi.exe {0}", _scriptFilePath);

-            return InvokeScriptHostCore("cmd", scriptHostArguments, textWriter, input);
-        }
-
-        internal Task InvokeBashScript(string input, TextWriter textWriter)
+            return InvokeScriptHostCore("cmd", scriptHostArguments, traceWriter, input);
+        }
+
+        internal Task InvokeBashScript(string input, TraceWriter traceWriter)
         {
             string scriptHostArguments = string.Format("{0}", _scriptFilePath);
             string bashPath = ResolveBashPath();

-            return InvokeScriptHostCore(bashPath, scriptHostArguments, textWriter, input);
-        }
-
-        internal Task InvokePhpScript(string input, TextWriter textWriter)
+            return InvokeScriptHostCore(bashPath, scriptHostArguments, traceWriter, input);
+        }
+
+        internal Task InvokePhpScript(string input, TraceWriter traceWriter)
         {
             string scriptHostArguments = string.Format("{0}", _scriptFilePath);

-            return InvokeScriptHostCore("php.exe", scriptHostArguments, textWriter, input);
-        }
-
-        internal Task InvokePythonScript(string input, TextWriter textWriter)
+            return InvokeScriptHostCore("php.exe", scriptHostArguments, traceWriter, input);
+        }
+
+        internal Task InvokePythonScript(string input, TraceWriter traceWriter)
         {
             string scriptHostArguments = string.Format("{0}", _scriptFilePath);

-            return InvokeScriptHostCore("python.exe", scriptHostArguments, textWriter, input);
-        }
-
-        internal Task InvokePowerShellScript(string input, TextWriter textWriter)
+            return InvokeScriptHostCore("python.exe", scriptHostArguments, traceWriter, input);
+        }
+
+        internal Task InvokePowerShellScript(string input, TraceWriter traceWriter)
         {
             string scriptHostArguments = string.Format("-ExecutionPolicy RemoteSigned -File {0}", _scriptFilePath);

-            return InvokeScriptHostCore("PowerShell.exe", scriptHostArguments, textWriter, input);
-        }
-
-        internal Task InvokeWindowsBatchScript(string input, TextWriter textWriter)
+            return InvokeScriptHostCore("PowerShell.exe", scriptHostArguments, traceWriter, input);
+        }
+
+        internal Task InvokeWindowsBatchScript(string input, TraceWriter traceWriter)
         {
             string scriptHostArguments = string.Format("/c {0}", _scriptFilePath);

-            return InvokeScriptHostCore("cmd", scriptHostArguments, textWriter, input);
-        }
-
-        internal Task InvokeScriptHostCore(string path, string arguments, TextWriter textWriter, string stdin = null)
+            return InvokeScriptHostCore("cmd", scriptHostArguments, traceWriter, input);
+        }
+
+        internal Task InvokeScriptHostCore(string path, string arguments, TraceWriter traceWriter, string stdin = null)
         {
             string workingDirectory = Path.GetDirectoryName(_scriptFilePath);

             // TODO
             // - put a timeout on how long we wait?
-            // - need to periodically flush the standard out to the TextWriter
+            // - need to periodically flush the standard out to the TraceWriter
             // - need to handle stderr as well
             Process process = CreateProcess(path, workingDirectory, arguments);
             process.Start();
@@ -128,7 +129,7 @@

             // write the results to the Dashboard
             string output = process.StandardOutput.ReadToEnd();
-            textWriter.Write(output);
+            traceWriter.Verbose(output);

             return Task.FromResult(0);
         }


BUG IRID-124: Matrix.CopyToArray - wrong indexer in inner loop condition

--- src/app/MathNet.Iridium/Library/LinearAlgebra/Matrix.cs
+++ src/app/MathNet.Iridium/Library/LinearAlgebra/Matrix.cs
@@ -402,7 +402,7 @@
             double[,] newData = new double[_rowCount, _columnCount];
             for(int i = 0; i < _rowCount; i++)
             {
-                for(int j = 0; i < _columnCount; j++)
+                for(int j = 0; j < _columnCount; j++)
                 {
                     newData[i, j] = _data[i][j];
                 }


upd for new .net

upd for new .net

--- NetIntrinsics/Patcher.cs
+++ NetIntrinsics/Patcher.cs
@@ -134,6 +134,7 @@
         {
             foreach (var expected in new[] {
                     new byte[] { 0x53, 0x48, 0x83, 0xEC, 0x20 },
+                    new byte[] { 0x56, 0x48, 0x83, 0xEC, 0x20 },
                     new byte[] { 0x48, 0x89, 0x54, 0x24 },
                     new byte[] { 0x48, 0x83, 0xEC, 0x28 },
                 }) {


Fix issue with version detection

Fix issue with version detection

If the user had a subkey of 8.0 for example,
that would override previous higher versions found.

This fixes #142 and #144

--- OotD.Launcher/Program.cs
+++ OotD.Launcher/Program.cs
@@ -104,7 +104,7 @@

                         if (double.TryParse(subKey, NumberStyles.Float, new NumberFormatInfo(), out var versionKey))
                         {
-                            if (version >= 11 || versionKey > version)
+                            if (versionKey > version)
                             {
                                 version = versionKey;
                             }


renaming setupItem to setItem on meter contract

--- src/App.Metrics/Meter/DefaultMeterManager.cs
+++ src/App.Metrics/Meter/DefaultMeterManager.cs
@@ -46,15 +46,15 @@
         }

         /// <inheritdoc />
-        public void Mark(MeterOptions options, MetricSetItem itemSetup)
+        public void Mark(MeterOptions options, MetricSetItem setItem)
         {
-            _registry.Meter(options, () => _meterBuilder.Build(_clock)).Mark(itemSetup);
+            _registry.Meter(options, () => _meterBuilder.Build(_clock)).Mark(setItem);
         }

         /// <inheritdoc />
-        public void Mark(MeterOptions options, long amount, MetricSetItem itemSetup)
+        public void Mark(MeterOptions options, long amount, MetricSetItem setItem)
         {
-            _registry.Meter(options, () => _meterBuilder.Build(_clock)).Mark(itemSetup, amount);
+            _registry.Meter(options, () => _meterBuilder.Build(_clock)).Mark(setItem, amount);
         }

         /// <inheritdoc />


add signed build InternalsVisibleTo

add signed build InternalsVisibleTo

--- src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs
+++ src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs
@@ -10,7 +10,13 @@
 using Tmds.DBus;

 [assembly: InternalsVisibleTo(Connection.DynamicAssemblyName)]
+
+#if SIGNED_BUILD
+[assembly: InternalsVisibleTo("Avalonia.X11, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+#else
 [assembly: InternalsVisibleTo("Avalonia.X11")]
+#endif
+
 namespace Avalonia.FreeDesktop
 {
     internal class DBusTrayIconImpl


fixes from upstream, wraplayout.

fixes from upstream, wraplayout.

--- src/Avalonia.Layout/WrapLayout/WrapLayout.cs
+++ src/Avalonia.Layout/WrapLayout/WrapLayout.cs
@@ -236,6 +236,15 @@
             // for the last condition it is zeros so adding it will make no difference
             // this way is faster than an if condition in every loop for checking the last item
             totalMeasure.U = parentMeasure.U;
+
+            // Propagating an infinite size causes a crash. This can happen if the parent is scrollable and infinite in the opposite
+            // axis to the panel. Clearing to zero prevents the crash.
+            // This is likely an incorrect use of the control by the developer, however we need stability here so setting a default that wont crash.
+            if (double.IsInfinity(totalMeasure.U))
+            {
+                totalMeasure.U = 0.0;
+            }
+
             totalMeasure.V = state.GetHeight();

             totalMeasure.U = Math.Ceiling(totalMeasure.U);


Improve comment

Improve comment

--- src/AvaloniaEdit.TextMate/TextEditorModel.cs
+++ src/AvaloniaEdit.TextMate/TextEditorModel.cs
@@ -152,9 +152,9 @@

                 UpdateSnapshot();

-                // invalidate current and previous line
+                // invalidate the changed line it's previous line
                 // some grammars (JSON, csharp, ...)
-                // need to invalidate previous lines
+                // need to invalidate the previous line
                 if (startLine - 1 >= 0)
                     InvalidateLine(startLine - 1);
                 InvalidateLine(startLine);


Improved Insert + Update perf for SQLite Documents

--- src/Biggy.Data.Sqlite/sqliteDocumentStore.cs
+++ src/Biggy.Data.Sqlite/sqliteDocumentStore.cs
@@ -83,6 +83,7 @@
     }

     public virtual int Add(IEnumerable<T> items) {
+      var results = new List<int>();
       if (items.Count() == 0) {
         return 0;
       }
@@ -102,81 +103,105 @@
         _database.Transact(sqlSeq);
       }

-      var sb = new StringBuilder();
-      string sqlFormat = "INSERT INTO {0} (id, body) VALUES ";
-      string valueGroupFormat = "({0})";
-      var args = new List<object>();
-      var paramIndex = 0;
-
-      var commands = new List<System.Data.IDbCommand>();
-      sb.AppendFormat(sqlFormat, this.TableName);
-      var valueGroups = new List<string>();
-
-      foreach (var item in items) {
-        // Set the next Id for each object:
-        if (this.KeyIsAutoIncrementing) {
-          this.SetKeyValue(item, nextReservedId);
-        }
-        var ex = this.SetDataForDocument(item);
-        var itemAsDictionary = ex as IDictionary<string, object>;
-        var parameterPlaceholders = new List<string>();
-
-        // SQLite has a limit on number of parameters per statement:
-        if (paramIndex + itemAsDictionary.Count() > 999) {
-          // Grab the sql statement from sb and add a command to the list:
-          sb.Append(string.Join(",", valueGroups));
-          commands.Add(_database.BuildCommand(sb.ToString(), args.ToArray()));
-
-          // Start over:
-          sb = new StringBuilder();
-          sb.AppendFormat(sqlFormat, this.TableName);
-          paramIndex = 0;
-          parameterPlaceholders.Clear();
-          valueGroups.Clear();
-          args.Clear();
-        }
-        foreach (var kvp in itemAsDictionary) {
-          args.Add(kvp.Value);
-          parameterPlaceholders.Add("@" + paramIndex++.ToString());
-        }
-        string valueGroup = string.Format(valueGroupFormat, string.Join(",", parameterPlaceholders));
-        valueGroups.Add(valueGroup);
-        nextReservedId++;
-      }
-      sb.Append(string.Join(",", valueGroups));
-      commands.Add(_database.BuildCommand(sb.ToString(), args.ToArray()));
-      return _database.Transact(commands.ToArray());
-    }
+      string sqlFormat = "INSERT INTO {0} (id, body) VALUES ({1});";
+
+      using(var conn = _database.CreateConnection(_database.ConnectionString)) {
+        conn.Open();
+        using(var tx = conn.BeginTransaction()) {
+          try {
+            foreach (var item in items) {
+              var args = new List<object>();
+              var paramIndex = 0;
+
+              // Set the next Id for each object:
+              if (this.KeyIsAutoIncrementing) {
+                this.SetKeyValue(item, nextReservedId);
+              }
+              var ex = this.SetDataForDocument(item);
+              var itemAsDictionary = ex as IDictionary<string, object>;
+              var parameterPlaceholders = new List<string>();
+
+              // Gather paramter values and placeholders:
+              foreach (var kvp in itemAsDictionary) {
+                args.Add(kvp.Value);
+                parameterPlaceholders.Add("@" + paramIndex++.ToString());
+              }
+              string commaDelimitedParameters = string.Join(",", parameterPlaceholders);
+              nextReservedId++;
+
+              string sql = string.Format(sqlFormat, TableName, commaDelimitedParameters);
+              using (var cmd = _database.BuildCommand(sql, args.ToArray())) {
+                cmd.Connection = conn;
+                results.Add(cmd.ExecuteNonQuery());
+              }
+            }
+            tx.Commit();
+          }
+          catch (System.Data.Common.DbException x) {
+            tx.Rollback();
+            throw x;
+          }
+          finally {
+            conn.Close();
+          }
+        }
+      }
+      return results.Sum();
+    }
+

     public int Update(T item) {
       return this.Update(new T[] { item });
     }

     public virtual int Update(IEnumerable<T> items) {
-      var args = new List<object>();
-      var paramIndex = 0;
       string ParameterAssignmentFormat = "{0} = @{1}";
-      string sqlFormat = ""
-      + "UPDATE {0} SET {1} WHERE {2};";
-      var sb = new StringBuilder();
-
-      foreach (var item in items) {
-        var ex = this.SetDataForDocument(item);
-        var dc = ex as IDictionary<string, object>;
-        var setValueStatements = new List<string>();
-        foreach (var kvp in dc) {
-          if (kvp.Key != this.KeyName) {
-            args.Add(kvp.Value);
-            string setItem = string.Format(ParameterAssignmentFormat, kvp.Key, paramIndex++.ToString());
-            setValueStatements.Add(setItem);
-          }
-        }
-        args.Add(this.GetKeyValue(item));
-        string whereCriteria = string.Format(ParameterAssignmentFormat, "id", paramIndex++.ToString());
-        sb.AppendFormat(sqlFormat, this.TableName, string.Join(",", setValueStatements), whereCriteria);
-      }
-      var batchedSQL = sb.ToString();
-      return _database.Transact(batchedSQL, args.ToArray());
+      string sqlFormat = "UPDATE {0} SET {1} WHERE {2};";
+      var results = new List<int>();
+
+      using (var conn = _database.CreateConnection(_database.ConnectionString)) {
+        conn.Open();
+        // SQLite performs WAAAAYYYY better inside a transaction:
+        using (var tx = conn.BeginTransaction()) {
+          try {
+            foreach (var item in items) {
+              var paramIndex = 0;
+              var args = new List<object>();
+
+              var ex = this.SetDataForDocument(item);
+              var dc = ex as IDictionary<string, object>;
+              var setValueStatements = new List<string>();
+
+              // Build the SET Statements:
+              foreach (var kvp in dc) {
+                if (kvp.Key != this.KeyName) {
+                  args.Add(kvp.Value);
+                  string setItem = string.Format(ParameterAssignmentFormat, kvp.Key, paramIndex++.ToString());
+                  setValueStatements.Add(setItem);
+                }
+              }
+              args.Add(this.GetKeyValue(item));
+              string commaDelimitedSetStatements = string.Join(",", setValueStatements);
+              string whereCriteria = string.Format(ParameterAssignmentFormat, "id", paramIndex++.ToString());
+              string updateSql = string.Format(sqlFormat, this.TableName, commaDelimitedSetStatements, whereCriteria);
+
+              using (var cmd = _database.BuildCommand(updateSql, args.ToArray())) {
+                cmd.Connection = conn;
+                results.Add(cmd.ExecuteNonQuery());
+              }
+            }
+            tx.Commit();
+          }
+          catch (System.Data.Common.DbException x) {
+            tx.Rollback();
+            throw x;
+          }
+          finally {
+            conn.Close();
+          }
+        }
+      }
+      return results.Sum();
     }

     public virtual int Delete(T item) {


Add error message.

Add error message.

--- src/Cassette/CassetteApplicationContainer.cs
+++ src/Cassette/CassetteApplicationContainer.cs
@@ -38,7 +38,7 @@
             {
                 if (_getApplication == null)
                 {
-                    throw new InvalidOperationException(); // TODO: nice descriptive error message here
+                    throw new InvalidOperationException("Cassette infrastructure library missing. Make sure Cassette.Web has been added to the web application.");
                 }
                 return _getApplication();
             }
@@ -147,5 +147,4 @@
             }
         }
     }
-}
-
+}


Cleaning up rec'd items.

Cleaning up rec'd items.

--- Purchasing.Mvc/Views/Order/ReceiveItems.cshtml
+++ Purchasing.Mvc/Views/Order/ReceiveItems.cshtml
@@ -44,23 +44,21 @@
                             alert("Must be a number");
                         } else {

-                            var lineItemId = $(this).data("id");
                             var id = $("#id").val();
                             var antiforgery = $("input[name='__RequestVerificationToken']").val();
                             var url = '@Url.Action("ReceiveItems")';
                             var loader = $("#" + lineItemId + " .quantity-loader");
                             var outstanding = $("#" + lineItemId + " .unaccounted");
-                            var payInvoice = '@Model.PayInvoice';
-
-
+
                             $("#" + lineItemId + " .quantity-update-message").html("Updating...");
                             loader.show();
-                            $.post(url, { id: id, lineItemId: lineItemId, receivedQuantity: receiveVal, updateNote: false, payInvoice: payInvoice, __RequestVerificationToken: antiforgery }, function (result) {
+                            $.post(url, { id: id, lineItemId: lineItemId, receivedQuantity: receiveVal, updateNote: false, payInvoice: false, __RequestVerificationToken: antiforgery }, function (result) {
                                 loader.hide();
                                 if (result) {
                                     $("#" + lineItemId + " .receiveQuantity").html(result.receivedQuantityReturned);
                                     if (result.success == true) {
                                         $("#" + lineItemId + " .quantity-update-message").html(result.message);
+                                        $("#original" + lineItemId).val(receiveVal);
                                         outstanding.html(result.unaccounted);
                                         $("#" + lineItemId + " .user-name").html(result.lastUpdatedBy);
                                         $("#" + lineItemId + " .update-date").html("Just Now");
@@ -95,11 +93,9 @@
             var updateMessage = $("#notesLineId" + lineItemId + " .notes-update-message");
             var loader = $("#notesLineId" + lineItemId + " .notes-loader");

-            var payInvoice = '@Model.PayInvoice';
-
             loader.show();
             updateMessage.html("Updating...");
-            $.post(url, { id: id, lineItemId: lineItemId, note: notesVal, updateNote: true, payInvoice: payInvoice, __RequestVerificationToken: antiforgery }, function (result) {
+            $.post(url, { id: id, lineItemId: lineItemId, note: notesVal, updateNote: true, payInvoice: false, __RequestVerificationToken: antiforgery }, function (result) {
                 loader.hide();
                 if (result) {
                     if (result.success == true) {
@@ -131,13 +127,11 @@
             var lineItemId = temp.data("id");
             var url = '@Url.Action("GetReceiveHistory")';
             var dialogList = $("#historyBody");
-
-            var payInvoice = '@Model.PayInvoice';
-
+
             dialogList.empty();
             $("#peepsDialog").dialog("open");
             $("#peepsLoaderId").show();
-            $.getJSON(url, { id: orderId, lineItemId: lineItemId, payInvoice: payInvoice }, function (result) {
+            $.getJSON(url, { id: orderId, lineItemId: lineItemId, payInvoice: false }, function (result) {
                 $("#peepsLoaderId").hide();
                 if (result == null || result.success == false) {
                     alert("There was a problem getting the list of users.");
@@ -354,11 +348,6 @@
     </script>

-
-
-
-
-


Initial setup of queries

Initial setup of queries

to find purchaser totals for pending and completed on current date

--- Purchasing.Web/Controllers/ReportController.cs
+++ Purchasing.Web/Controllers/ReportController.cs
@@ -51,6 +51,34 @@
         public ActionResult Index()
         {
             return View();
+        }
+
+        public ActionResult PurchaserWorkLoad()
+        {
+            var allWorkgroups = _workgroupService.LoadAdminWorkgroups(true).ToList();
+            var workgroupIds = allWorkgroups.Select(x => x.Id).ToArray();
+
+            var xxx =
+                _repositoryFactory.OrderTrackingRepository
+                          .Queryable.Where(a => a.DateCreated >= DateTime.Now.Date && workgroupIds.Contains(a.Order.Workgroup.Id) && a.Description.Contains("completed"))
+                          .Select(a => a.User).ToList();
+            var yyy = xxx.Distinct().ToList();
+            foreach (var user in yyy)
+            {
+
+                var sss = xxx.Where(a => a.Id == user.Id).Count(); //This will tell me how many orders have been completed by each purchaser.
+            }
+
+
+            var ooo =
+                _queryRepositoryFactory.OrderHistoryRepository.Queryable.Where(
+                    a => a.StatusId == "PR" && workgroupIds.Contains(a.WorkgroupId)).Select(b => b.Purchaser).ToList();
+            var uuu = ooo.Distinct().ToList();
+            foreach (var userName in uuu)
+            {
+                var z = ooo.FindAll(a => a.Contains(userName)).Count;
+            }
+            return null;
         }

         [Authorize(Roles = Role.Codes.DepartmentalAdmin)]


Update DockFactory.cs

Update DockFactory.cs

--- src/Core2D/ViewModels/Docking/DockFactory.cs
+++ src/Core2D/ViewModels/Docking/DockFactory.cs
@@ -41,7 +41,7 @@

             var projectViewModel = new ProjectViewModel()
             {
-                Id = "ProjectExlorer",
+                Id = "ProjectExplorer",
                 Title = "Project Explorer"
             };

@@ -356,7 +356,7 @@
         {
             ContextLocator = new Dictionary<string, Func<object>>
             {
-                ["ProjectExlorer"] = () => _projectEditor,
+                ["ProjectExplorer"] = () => _projectEditor,
                 ["ProjectDock"] = () => _projectEditor,
                 ["PageProperties"] = () => _projectEditor,
                 ["ShapeProperties"] = () => _projectEditor,
@@ -384,7 +384,7 @@
                 ["HomeDock"] = () => _projectEditor,
                 ["DashboardMenuView"] = () => _projectEditor,
                 ["DashboardView"] = () => _projectEditor,
-                ["DashboardDock"] = () => _projectEditor,
+                ["DashboardDock"] = () => _projectEditor
             };

             DockableLocator = new Dictionary<string, Func<IDockable?>>()


Fix the ReadTests_Maths.Log tests.

Fix the ReadTests_Maths.Log tests.

There are many [Order Details] rows with a Discount value of 0, and Math.Log(0)
generates a floating point exception, causing the L2SQL tests to fail.

Fix the tests to add 1 to the Discount, thus giving a valid value to the
Math.Log() method.  This fixes the tests for L2SQL and SQL Server (and fixes
ReadTests_Maths.Log03() for SQLite).

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

--- src/DbLinq/Test/Providers/ReadTests_Maths.cs
+++ src/DbLinq/Test/Providers/ReadTests_Maths.cs
@@ -108,7 +108,7 @@

         //LN (SSIS)

-#if !DEBUG && (SQLITE || (MSSQL && !MONO_STRICT))
+#if !DEBUG && (SQLITE)
         [Explicit]
 #endif
         [Test]
@@ -117,14 +117,13 @@
             Northwind db = CreateDB();

             var q = from c in db.OrderDetails
-                    where Math.Log((double)(c.Discount)) > 0.0
-                    select c;
-
-            var list = q.ToList();
-
-        }
-
-#if !DEBUG && (SQLITE || (MSSQL && !MONO_STRICT))
+                    where Math.Log((double)(c.Discount + 1)) > 0.0
+                    select c;
+
+            Assert.AreEqual(838, q.Count());
+        }
+
+#if !DEBUG && (SQLITE)
         [Explicit]
 #endif
         [Test]
@@ -133,11 +132,10 @@
             Northwind db = CreateDB();

             var q = from c in db.OrderDetails
-                    where Math.Log((double)(c.Discount),3.0) > 0.0
-                    select c;
-
-            var list = q.ToList();
-
+                    where Math.Log((double)(c.Discount + 1),3.0) > 0.0
+                    select c;
+
+            Assert.AreEqual(838, q.Count());
         }

@@ -145,20 +143,16 @@

         //LOG (SSIS)

-#if !DEBUG && (SQLITE || (MSSQL && !MONO_STRICT))
-        [Explicit]
-#endif
         [Test]
         public void Log03()
         {
             Northwind db = CreateDB();

             var q = from c in db.OrderDetails
-                    where Math.Log10((double)(c.Discount)) > 0.0
-                    select c;
-
-            var list = q.ToList();
-
+                    where Math.Log10((double)(c.Discount + 1)) > 0.0
+                    select c;
+
+            Assert.AreEqual(838, q.Count());
         }


Fixed CommandException

Fixed CommandException

--- src/Discord.Net.Commands/CommandException.cs
+++ src/Discord.Net.Commands/CommandException.cs
@@ -5,11 +5,13 @@
     public class CommandException : Exception
     {
         public CommandInfo Command { get; }
-        public ICommandContext Content { get; }
+        public ICommandContext Context { get; }

         public CommandException(CommandInfo command, ICommandContext context, Exception ex)
             : base($"Error occurred executing {command.GetLogText(context)}.", ex)
         {
+            Command = command;
+            Context = context;
         }
     }
 }


Removed hardcode github user and repo strings

--- src/DocFunctions.Lib/Clients/GithubClient.cs
+++ src/DocFunctions.Lib/Clients/GithubClient.cs
@@ -54,7 +54,7 @@

         private RepositoryContent GetContents(Octokit.GitHubClient client, string path, string commitSha)
         {
-            var contents = client.Repository.Content.GetAllContentsByRef("red-folder", "red-folder.docs.staging", path, commitSha).Result;
+            var contents = client.Repository.Content.GetAllContentsByRef(_username, _repo, path, commitSha).Result;

             return contents.First();
         }
@@ -66,13 +66,13 @@

             var client = GetClient();

-            var folders = await client.Repository.Content.GetAllContents("red-folder", "red-folder.docs.staging");
+            var folders = await client.Repository.Content.GetAllContents(_username, _repo);

             var shalist = new List<string>();

             foreach (var folder in folders.Where(x => x.Type == ContentType.Dir))
             {
-                var files = await client.Repository.Content.GetAllContents("red-folder", "red-folder.docs.staging", folder.Path);
+                var files = await client.Repository.Content.GetAllContents(_username, _repo, folder.Path);

                 foreach (var file in files.Where(x => x.Type == ContentType.File))
                 {


Cleaning up Identifier code

Cleaning up Identifier code

--- src/Docu.Console/Parsing/Model/Identifier.cs
+++ src/Docu.Console/Parsing/Model/Identifier.cs
@@ -6,6 +6,8 @@
 {
     public abstract class Identifier : IComparable<Identifier>, IEquatable<Identifier>
     {
+        private const string GENERIC_PARAMATER_PREFIX = "``";
+        private static readonly string GENERIC_TYPE_NAMESPACE = string.Empty;
         private readonly string name;
         private static Dictionary<string, Type> nameToType;

@@ -21,8 +23,8 @@

         public static TypeIdentifier FromType(Type type)
         {
-            return type.IsGenericParameter
-                ? new TypeIdentifier(type.GenericParameterPosition.ToString(), string.Empty)
+            return type.IsGenericParameter
+                ? new TypeIdentifier(GENERIC_PARAMATER_PREFIX + type.GenericParameterPosition, GENERIC_TYPE_NAMESPACE)
                 : new TypeIdentifier(type.Name, type.Namespace);
         }

@@ -32,7 +34,7 @@
             var parameters = new List<TypeIdentifier>();

             if (method.IsGenericMethod)
-                name += "``" + method.GetGenericArguments().Length;
+                name += GENERIC_PARAMATER_PREFIX + method.GetGenericArguments().Length;

             foreach (ParameterInfo param in method.GetParameters())
             {
@@ -167,10 +169,49 @@
         private static List<TypeIdentifier> GetMethodParameters(string fullName)
         {
             var parameters = new List<TypeIdentifier>();
-
+            if (!fullName.EndsWith(")")) return parameters;
+
+            buildTypeLookup();
+
+            var firstCharAfterParen = fullName.IndexOf("(") + 1;
+            var paramList = fullName.Substring(firstCharAfterParen, fullName.Length - firstCharAfterParen - 1) ;
+
+            foreach (var paramName in ParseMethodParameterList(paramList))
+            {
+                if (IsGenericArgument(paramName))
+                {
+                    parameters.Add(new TypeIdentifier(paramName, GENERIC_TYPE_NAMESPACE));
+                    continue;
+                }
+                var typeNameToFind = paramName;
+                var genericParamPosition = paramName.IndexOf('{');
+                if (genericParamPosition > 0)
+                {
+                    var openTypeName = paramName.Substring(0, genericParamPosition);
+                    var endOfGenericParams = paramName.IndexOf('}', genericParamPosition);
+                    var lengthOfGenericParamsSection = endOfGenericParams - genericParamPosition - 1;
+                    var genericParamList = paramName.Substring(genericParamPosition + 1, lengthOfGenericParamsSection).Split(',');
+                    typeNameToFind = openTypeName + "`" + genericParamList.Length;
+                }
+                Type paramType;
+                if (nameToType.TryGetValue(typeNameToFind, out paramType))
+                {
+                    parameters.Add(FromType(paramType));
+                }
+            }
+
+            return parameters;
+        }
+
+        private static bool IsGenericArgument(string parameter)
+        {
+            return parameter.StartsWith(GENERIC_PARAMATER_PREFIX);
+        }
+
+        private static void buildTypeLookup()
+        {
             if(nameToType == null)
             {
-                // build type lookup table
                 nameToType = new Dictionary<string, Type>();
                 foreach(Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
                 {
@@ -180,41 +221,6 @@
                     }
                 }
             }
-
-            if (fullName.EndsWith(")"))
-            {
-                string paramList = fullName.Substring(fullName.IndexOf("(") + 1);
-                paramList = paramList.Substring(0, paramList.Length - 1);
-
-                foreach (string paramName in ParseMethodParameterList(paramList))
-                {
-                    Type paramType;
-                    if (paramName.StartsWith("``"))
-                    {
-                        parameters.Add(new TypeIdentifier(paramName.Substring(2), ""));
-                    }
-                    else
-                    {
-                        var typeNameToFind = paramName;
-                        var genericParamPosition = paramName.IndexOf('{');
-                        if (genericParamPosition > 0)
-                        {
-                            var openTypeName = paramName.Substring(0, genericParamPosition);
-                            var endOfGenericParams = paramName.IndexOf('}', genericParamPosition);
-                            var lengthOfGenericParamsSection = endOfGenericParams - genericParamPosition - 1;
-                            System.Diagnostics.Debug.Assert(genericParamPosition + 1 + lengthOfGenericParamsSection <= paramName.Length, "Failure parsing:" + paramName);
-                            var genericParamList = paramName.Substring(genericParamPosition + 1, lengthOfGenericParamsSection).Split(',');
-                            typeNameToFind = openTypeName + "`" + genericParamList.Length;
-                        }
-                        if (nameToType.TryGetValue(typeNameToFind, out paramType))
-                        {
-                            parameters.Add(FromType(paramType));
-                        }
-                    }
-                }
-            }
-
-            return parameters;
         }

         public static IEnumerable<string> ParseMethodParameterList(string methodParameters)


Revert cleanup of RadioButton

Revert cleanup of RadioButton

--- src/DotVVM.Framework/Controls/RadioButton.cs
+++ src/DotVVM.Framework/Controls/RadioButton.cs
@@ -28,8 +28,7 @@
             DotvvmProperty.Register<bool, RadioButton>(t => t.Checked, false);

         /// <summary>
-        /// Gets or sets the <see cref="CheckableControlBase.CheckedValue"/> of the first
-        /// <see cref="RadioButton" /> that is checked and bound to this collection.
+        /// Gets or sets the <see cref="CheckableControlBase.CheckedValue"/> of the first <see cref="RadioButton" /> that is checked and bound to this collection.
         /// </summary>
         [MarkupOptions(AllowHardCodedValue = false)]
         public object CheckedItem
@@ -37,7 +36,6 @@
             get { return GetValue(CheckedItemProperty); }
             set { SetValue(CheckedItemProperty, value); }
         }
-
         public static readonly DotvvmProperty CheckedItemProperty =
             DotvvmProperty.Register<object, RadioButton>(t => t.CheckedItem, null);

@@ -50,7 +48,6 @@
             get { return (string)GetValue(GroupNameProperty); }
             set { SetValue(GroupNameProperty, value); }
         }
-
         public static readonly DotvvmProperty GroupNameProperty =
             DotvvmProperty.Register<string, RadioButton>(t => t.GroupName, "");

@@ -67,8 +64,7 @@
         protected virtual void RenderGroupNameAttribute(IHtmlWriter writer)
         {
             var group = new KnockoutBindingGroup();
-            group.Add("name", this, GroupNameProperty, () =>
-            {
+            group.Add("name", this, GroupNameProperty, () => {
                 writer.AddAttribute("name", GroupName);
             });
             writer.AddKnockoutDataBind("attr", group);
@@ -82,8 +78,7 @@

         protected virtual void RenderCheckedValueAttribute(IHtmlWriter writer)
         {
-            writer.AddKnockoutDataBind("checkedValue", this, CheckedValueProperty, () =>
-            {
+            writer.AddKnockoutDataBind("checkedValue", this, CheckedValueProperty, () => {
                 var checkedValue = (CheckedValue ?? string.Empty).ToString();
                 if (!string.IsNullOrEmpty(checkedValue))
                 {
@@ -100,9 +95,7 @@
                 writer.AddKnockoutDataBind("checked", this, CheckedProperty, () => { });
                 if (!IsPropertySet(CheckedValueProperty))
                 {
-                    throw new DotvvmControlException(this, "The 'CheckedValue' of the RadioButton " +
-                        "control must be set. Remember that all RadioButtons with the same " +
-                        "GroupName have to be bound to the same property in the viewmodel.");
+                    throw new DotvvmControlException(this, "The 'CheckedValue' of the RadioButton control must be set. Remember that all RadioButtons with the same GroupName have to be bound to the same property in the viewmodel.");
                 }
             }
             else
@@ -116,17 +109,15 @@
         public static IEnumerable<ControlUsageError> ValidateUsage(ResolvedControl control)
         {
             var itemType = control.GetValue(CheckedItemProperty)?.GetResultType();
-            var nonNullItemType = itemType;
-            if (itemType.IsNullable())
-            {
-                nonNullItemType = itemType.GetGenericArguments()[0];
-            }
+            var nonNullItemType = itemType.IsNullable()
+                ? itemType.GetGenericArguments()[0]
+                : itemType;
             var valueType = control.GetValue(CheckedValueProperty)?.GetResultType();
             if (nonNullItemType != null && valueType != null && nonNullItemType != valueType)
             {
                 yield return new ControlUsageError(
-                    $"CheckedItem type \'{itemType}\' must be the same as or a nullable variant of " +
-                    $"the CheckedValue type \'{valueType}\'.",
+                    $"CheckedItem type \'{itemType}\' must be the same as or a nullable " +
+                    $"variant of the CheckedValue type \'{valueType}\'.",
                     control.GetValue(CheckedItemProperty).DothtmlNode,
                     control.GetValue(CheckedValueProperty).DothtmlNode
                 );


Update AssemblyInfo.cs

Update AssemblyInfo.cs

--- src/FilterBuilder/Properties/AssemblyInfo.cs
+++ src/FilterBuilder/Properties/AssemblyInfo.cs
@@ -39,17 +39,3 @@
                                       //(used if a resource is not found in the page,
                                       // app, or any theme specific resource dictionaries)
 )]
-
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]