C# 6 syntax

C# 6 syntax

--- src/Skybrud.Social.Instagram/Models/Users/InstagramUser.cs
+++ src/Skybrud.Social.Instagram/Models/Users/InstagramUser.cs
@@ -14,65 +14,57 @@
         /// <summary>
         /// Gets the ID of the user.
         /// </summary>
-        public long Id { get; private set; }
+        public long Id { get; }

         /// <summary>
         /// Gets the username of the user.
         /// </summary>
-        public string Username { get; private set; }
+        public string Username { get; }

         /// <summary>
         /// Gets the full name of the user. A user may not have specified a full name.
         /// </summary>
-        public string FullName { get; private set; }
+        public string FullName { get; }

         /// <summary>
         /// Gets the profile picture of the user.
         /// </summary>
-        public string ProfilePicture { get; private set; }
+        public string ProfilePicture { get; }

         /// <summary>
         /// Gets the website of the user. A user may not have specified a website.
         /// </summary>
-        public string Website { get; private set; }
+        public string Website { get; }

         /// <summary>
         /// Gets the bio of the user. A user may not have specified a bio.
         /// </summary>
-        public string Bio { get; private set; }
+        public string Bio { get; }

         /// <summary>
         /// Gets a reference to various statistics about the user.
         /// </summary>
-        public InstagramUserCounts Counts { get; private set; }
+        public InstagramUserCounts Counts { get; }

         /// <summary>
         /// Gets whether the user has specified a full name.
         /// </summary>
-        public bool HasFullName {
-            get { return !String.IsNullOrWhiteSpace(FullName); }
-        }
+        public bool HasFullName => !String.IsNullOrWhiteSpace(FullName);

         /// <summary>
         /// Gets whether the user has uploaded a profile picture.
         /// </summary>
-        public bool HasProfilePicture {
-            get { return !String.IsNullOrWhiteSpace(ProfilePicture); }
-        }
+        public bool HasProfilePicture => !String.IsNullOrWhiteSpace(ProfilePicture);

         /// <summary>
         /// Gets whether the user has specified a website.
         /// </summary>
-        public bool HasWebsite {
-            get { return !String.IsNullOrWhiteSpace(Website); }
-        }
+        public bool HasWebsite => !String.IsNullOrWhiteSpace(Website);

         /// <summary>
         /// Gets whether the user has specified a bio.
         /// </summary>
-        public bool HasBio {
-            get { return !String.IsNullOrWhiteSpace(Bio); }
-        }
+        public bool HasBio => !String.IsNullOrWhiteSpace(Bio);

         #endregion


add PropertyValue

add PropertyValue

--- src/SmartSql/Utils/PropertyAccessor/IGetAccessorFactory.cs
+++ src/SmartSql/Utils/PropertyAccessor/IGetAccessorFactory.cs
@@ -4,7 +4,18 @@

 namespace SmartSql.Utils.PropertyAccessor
 {
+    public class PropertyValue
+    {
+        public GetStatus Status { get; set; } = GetStatus.Ok;
+        public object Value { get; set; }

+        public enum GetStatus
+        {
+            Ok = 1,
+            NotFindProperty = 1 << 1,
+            NotFindGet = 1 << 2
+        }
+    }
     public interface IGetAccessorFactory
     {
         Func<object, object> CreateGet(Type targetType, string propertyName, bool ignorePropertyCase);


Import DateTimeOffset as UTC

Import DateTimeOffset as UTC

--- src/SqlNotebookScript/Core/AdoModules/AdoModuleProvider.cs
+++ src/SqlNotebookScript/Core/AdoModules/AdoModuleProvider.cs
@@ -708,8 +708,11 @@
                 var reader = (NpgsqlDataReader)cursorMetadata.Reader;
                 ResultText16(ctx, ((DateTime)reader.GetDate(n)).ToString("yyyy-MM-dd"));
             } else if (type == typeof(NpgsqlTypes.NpgsqlDateTime) || type == typeof(DateTime)) {
-                ResultText16(ctx, (cursorMetadata.Reader.GetDateTime(n)).ToString("yyyy-MM-dd HH:mm:ss.fff zzz"));
+                ResultText16(ctx, cursorMetadata.Reader.GetDateTime(n).ToString("yyyy-MM-dd HH:mm:ss.fff"));
 #pragma warning restore CS0618 // Type or member is obsolete
+            } else if (type == typeof(DateTimeOffset)) {
+                ResultText16(ctx, ((DateTimeOffset)cursorMetadata.Reader.GetValue(n))
+                    .UtcDateTime.ToString("yyyy-MM-dd HH:mm:ss.fff"));
             } else {
                 ResultText16(ctx, cursorMetadata.Reader.GetValue(n).ToString());
             }


Improve performance of decoding only '+' in WebUtility

x4-x5 performance increase (benchmark)
2x allocations decrease

--- src/System.Runtime.Extensions/src/System/Net/WebUtility.cs
+++ src/System.Runtime.Extensions/src/System/Net/WebUtility.cs
@@ -394,15 +394,15 @@
             // go through the string's chars collapsing %XX and
             // appending each char as char, with exception of %XX constructs
             // that are appended as bytes
-
-            bool needsDecoding = false;
+            bool needsDecodingUnsafe = false;
+            bool needsDecodingSpaces = false;
             for (int pos = 0; pos < count; pos++)
             {
                 char ch = value[pos];

                 if (ch == '+')
                 {
-                    needsDecoding = true;
+                    needsDecodingSpaces = true;
                     ch = ' ';
                 }
                 else if (ch == '%' && pos < count - 2)
@@ -417,7 +417,7 @@

                         // don't add as char
                         helper.AddByte(b);
-                        needsDecoding = true;
+                        needsDecodingUnsafe = true;
                         continue;
                     }
                 }
@@ -428,7 +428,19 @@
                     helper.AddChar(ch);
             }

-            return needsDecoding ? helper.GetString() : value;
+            if (!needsDecodingUnsafe)
+            {
+                if (needsDecodingSpaces)
+                {
+                    // Only spaces to decode
+                    return value.Replace('+', ' ');
+                }
+
+                // Nothing to decode
+                return value;
+            }
+
+            return helper.GetString();
         }

         private static byte[] UrlDecodeInternal(byte[] bytes, int offset, int count)


Initial tweak to enums - will need a better fix but ok for now (Aurelia)

--- src/TypeScriptDefinitionsGenerator.Common/MainGenerator.cs
+++ src/TypeScriptDefinitionsGenerator.Common/MainGenerator.cs
@@ -526,9 +526,13 @@
         }

-        private static string GetMethodParameters(List<ActionParameterInfo> actionParameters, string settingsType, bool useUndefinedForSettingsType = false, string optionsParameterName = "ajaxOptions")
-        {
-            var result = string.Join(", ", actionParameters.Select(a => a.Name + ": " + a.Type));
+        private string GetMethodParameters(List<ActionParameterInfo> actionParameters, string settingsType, bool useUndefinedForSettingsType = false, string optionsParameterName = "ajaxOptions")
+        {
+            var result = string.Join(", ", actionParameters.Select(a =>
+                a.Name + ": " + (_options.GenerateAsModules && a.ClrType != null && (a.ClrType.IsEnum || Nullable.GetUnderlyingType(a.ClrType)?.IsEnum == true)
+                    ? "Enums."
+                    : "")
+                + a.Type));
             if (result != "") result += ", ";
             result += optionsParameterName + ": " + settingsType + (useUndefinedForSettingsType ? " = undefined" : " = null");
             return result;


Take out debug menu

Take out debug menu

--- src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs
+++ src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs
@@ -55,12 +55,6 @@
         [SerializeField] private float appManagerProgressValue;
         [SerializeField] private string appManagerProgressMessage;

-        [MenuItem("GitHub/Select")]
-        public static void Select()
-        {
-            Selection.activeObject = SceneView.currentDrawingSceneView;
-        }
-
         [MenuItem(Menu_Window_GitHub)]
         public static void Window_GitHub()
         {


Change log message

Change log message

--- src/ZNetCS.AspNetCore.IPFiltering/IPFilteringMiddleware.cs
+++ src/ZNetCS.AspNetCore.IPFiltering/IPFilteringMiddleware.cs
@@ -116,7 +116,7 @@
             }
             else
             {
-                this.logger.LogInformation(1, "The {BlokedIp} was blocked.", ipAddress);
+                this.logger.LogInformation(1, "The IP Address: {BlokedIp} was blocked.", ipAddress);
                 context.Response.StatusCode = (int)this.options.HttpStatusCode;
             }
         }


Fixed single character Say text not parsing correctly

--- Assets/Fungus/Narrative/Scripts/DialogParser.cs
+++ Assets/Fungus/Narrative/Scripts/DialogParser.cs
@@ -67,11 +67,14 @@
 				position = m.Index + tagText.Length;
 				m = m.NextMatch();
 			}
-
-			if (position < storyText.Length - 1)
+
+			if (position < storyText.Length)
 			{
 				string postText = storyText.Substring(position, storyText.Length - position);
-				AddWordsToken(tokens, postText);
+				if (postText.Length > 0)
+				{
+					AddWordsToken(tokens, postText);
+				}
 			}
 		}


removed comments that are no longer relevant

--- Atreyu/ViewModels/FrameManipulationViewModel.cs
+++ Atreyu/ViewModels/FrameManipulationViewModel.cs
@@ -63,8 +63,6 @@
         /// <summary>
         /// Initializes a new instance of the <see cref="FrameManipulationViewModel"/> class.
         /// </summary>
-        /// <param name="eventAggregator">
-        /// </param>
         [ImportingConstructor]
         public FrameManipulationViewModel()
         {
@@ -222,8 +220,6 @@
             if (this.CurrentFrame != frameNumber)
             {
                 this.CurrentFrame = frameNumber;
-
-                ////this._eventAggregator.GetEvent<FrameNumberChangedEvent>().Publish(frameNumber);
             }
         }

@@ -233,7 +229,6 @@
         /// </param>
         public void UpdateFrameNumber(int frameNumber)
         {
-            ////this._eventAggregator.GetEvent<FrameNumberChangedEvent>().Publish(frameNumber);
             this.CurrentFrame = frameNumber;
         }


PCTScheduler: made maxSteps public for replay. Changed the way yield works.

--- ActorTestingFramework/PCTScheduler.cs
+++ ActorTestingFramework/PCTScheduler.cs
@@ -14,7 +14,7 @@
         private readonly List<int> changePoints;

         private Random rand;
-        private int maxSteps;
+        public int maxSteps;
         private int numSteps;

         public PCTScheduler(int seed, int numChangePoints)
@@ -60,21 +60,17 @@
                 }
             }

-            if (currentActor.currentOp == OpType.Yield)
-            {
-                currentActor.enabled = false;
-            }
+            var enabledWithoutYield =
+                actorPriorityList.Where(
+                    info =>
+                        info.enabled &&
+                        (currentActor != info || info.currentOp != OpType.Yield)).ToList();

-            if (RandomScheduler.IsProgressOp(currentActor.currentOp))
-            {
-                foreach (var actorInfo in
-                    actorList.Where(info => info.currentOp == OpType.Yield && !info.enabled))
-                {
-                    actorInfo.enabled = true;
-                }
-            }
+            var enabledWithYield = actorPriorityList.Where(info => info.enabled).ToList();

-            var enabled = actorPriorityList.Where(info => info.enabled).ToList();
+            var enabled = enabledWithoutYield.Count == 0
+                ? enabledWithYield
+                : enabledWithoutYield;

             if (enabled.Count == 0)
             {


Update version number to 1.12

Update version number to 1.12

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


BufferMessageAdapter. Clear state support.

--- Algo/Storages/BufferMessageAdapter.cs
+++ Algo/Storages/BufferMessageAdapter.cs
@@ -104,6 +104,11 @@
 			//		return Enumerable.Empty<TMarketData>();
 			//	});
 			//}
+
+			public void Clear()
+			{
+				_data.Clear();
+			}
 		}

 		private readonly DataBuffer<SecurityId, ExecutionMessage> _ticksBuffer = new DataBuffer<SecurityId, ExecutionMessage>();
@@ -113,7 +118,7 @@
 		private readonly DataBuffer<Tuple<SecurityId, Type, object>, CandleMessage> _candleBuffer = new DataBuffer<Tuple<SecurityId, Type, object>, CandleMessage>();
 		private readonly DataBuffer<SecurityId, ExecutionMessage> _transactionsBuffer = new DataBuffer<SecurityId, ExecutionMessage>();
 		private readonly SynchronizedSet<NewsMessage> _newsBuffer = new SynchronizedSet<NewsMessage>();
-		private readonly HashSet<Tuple<SecurityId, DataType>> _subscriptions = new HashSet<Tuple<SecurityId, DataType>>();
+		private readonly SynchronizedSet<Tuple<SecurityId, DataType>> _subscriptions = new SynchronizedSet<Tuple<SecurityId, DataType>>();

 		/// <summary>
 		/// Initializes a new instance of the <see cref="BufferMessageAdapter"/>.
@@ -137,8 +142,9 @@
 		/// <returns>If subscription was just created, return <see langword="true" />, otherwise <see langword="false" />.</returns>
 		public bool Subscribe(SecurityId securityId, DataType dataType)
 		{
-			return _subscriptions.Add(Tuple.Create(securityId, dataType));
-		}
+			return _subscriptions.TryAdd(Tuple.Create(securityId, dataType));
+		}
+
 		/// <summary>
 		/// Update filter with remove a subscription.
 		/// </summary>
@@ -151,6 +157,14 @@
 		}

 		/// <summary>
+		/// Remove all subscriptions.
+		/// </summary>
+		public void ClearSubscriptions()
+		{
+			_subscriptions.Clear();
+		}
+
+		/// <summary>
 		/// Get accumulated ticks.
 		/// </summary>
 		/// <returns>Ticks.</returns>
@@ -226,6 +240,20 @@
 		{
 			switch (message.Type)
 			{
+				case MessageTypes.Reset:
+				{
+					_subscriptions.Clear();
+					_ticksBuffer.Clear();
+					_level1Buffer.Clear();
+					_candleBuffer.Clear();
+					_orderLogBuffer.Clear();
+					_orderBooksBuffer.Clear();
+					_transactionsBuffer.Clear();
+					_newsBuffer.Clear();
+					//SendOutMessage(new ResetMessage());
+					break;
+				}
+
 				case MessageTypes.OrderRegister:
 					var regMsg = (OrderRegisterMessage)message;


finished the tiled maps sample (for now)

--- Source/Samples.Extended/Samples/TiledMapsSample.cs
+++ Source/Samples.Extended/Samples/TiledMapsSample.cs
@@ -4,6 +4,7 @@
 using MonoGame.Extended;
 using MonoGame.Extended.BitmapFonts;
 using MonoGame.Extended.Maps.Tiled;
+using MonoGame.Extended.ViewportAdapters;

 namespace Samples.Extended.Samples
 {
@@ -25,13 +26,16 @@

         protected override void LoadContent()
         {
-            _camera = new Camera2D(GraphicsDevice)
-            {
-                Zoom = 0.5f
-            };
             _spriteBatch = new SpriteBatch(GraphicsDevice);
             _bitmapFont = Content.Load<BitmapFont>("montserrat-32");
             _tiledMap = Content.Load<TiledMap>("level01");
+
+            var viewportAdapter = new ScalingViewportAdapter(GraphicsDevice, 800, 480);
+            _camera = new Camera2D(viewportAdapter)
+            {
+                Zoom = 0.5f,
+                Position = new Vector2(_tiledMap.WidthInPixels / 4f, _tiledMap.HeightInPixels / 4f)
+            };
         }

         protected override void UnloadContent()
@@ -40,10 +44,32 @@

         protected override void Update(GameTime gameTime)
         {
+            var deltaSeconds = (float)gameTime.ElapsedGameTime.TotalSeconds;
             var keyboardState = Keyboard.GetState();

             if (keyboardState.IsKeyDown(Keys.Escape))
                 Exit();
+
+            const float cameraSpeed = 100f;
+            const float zoomSpeed = 0.2f;
+
+            if (keyboardState.IsKeyDown(Keys.W) || keyboardState.IsKeyDown(Keys.Up))
+                _camera.Move(new Vector2(0, -cameraSpeed) * deltaSeconds);
+
+            if (keyboardState.IsKeyDown(Keys.A) || keyboardState.IsKeyDown(Keys.Left))
+                _camera.Move(new Vector2(-cameraSpeed, 0) * deltaSeconds);
+
+            if (keyboardState.IsKeyDown(Keys.S) || keyboardState.IsKeyDown(Keys.Down))
+                _camera.Move(new Vector2(0, cameraSpeed) * deltaSeconds);
+
+            if (keyboardState.IsKeyDown(Keys.D) || keyboardState.IsKeyDown(Keys.Right))
+                _camera.Move(new Vector2(cameraSpeed, 0) * deltaSeconds);
+
+            if (keyboardState.IsKeyDown(Keys.R))
+                _camera.Zoom += zoomSpeed * deltaSeconds;
+
+            if (keyboardState.IsKeyDown(Keys.F))
+                _camera.Zoom -= zoomSpeed * deltaSeconds;

             base.Update(gameTime);
         }
@@ -52,7 +78,19 @@
         {
             GraphicsDevice.Clear(Color.CornflowerBlue);

-            _tiledMap.Draw(_camera);
+            // you can either draw the entire map in one go
+            //_tiledMap.Draw(_camera);
+
+            // or for more control, draw each layer separately
+            foreach (var layer in _tiledMap.Layers)
+            {
+                layer.Draw(_camera);
+            }
+
+            _spriteBatch.Begin();
+            _spriteBatch.DrawString(_bitmapFont, "WASD/Arrows: move", new Vector2(5, 5), new Color(0.5f, 0.5f, 0.5f));
+            _spriteBatch.DrawString(_bitmapFont, "RF: zoom", new Vector2(5, 5 + _bitmapFont.LineHeight), new Color(0.5f, 0.5f, 0.5f));
+            _spriteBatch.End();

             base.Draw(gameTime);
         }


Fix comment form

Fix comment form

--- Battery-Commander.Web/Views/SUTA/Details.cshtml
+++ Battery-Commander.Web/Views/SUTA/Details.cshtml
@@ -95,7 +95,7 @@
     {
         <hr />

-        @using (Html.BeginForm("Comment", "SUTA", FormMethod.Post, new { @class = "form-horitzontal" }))
+        @using (Html.BeginForm("Comment", "SUTA", new { Model.Id },FormMethod.Post, new { @class = "form-horitzontal" }))
         {
             @Html.AntiForgeryToken()
             @Html.HiddenFor(model => model.Id)


Updated close inactive sessions job tests

--- Source/Tests/Jobs/CloseInactiveSessionsJobTests.cs
+++ Source/Tests/Jobs/CloseInactiveSessionsJobTests.cs
@@ -68,7 +68,7 @@
             }
         }

-        private bool _isReset;
+        private static bool _isReset;
         private async Task ResetAsync() {
             if (!_isReset) {
                 _isReset = true;
@@ -126,8 +126,11 @@
         private async Task RemoveDataAsync() {
             await RemoveEventsAndStacks();
             await _tokenRepository.RemoveAllAsync();
+            await _cacheClient.RemoveAllAsync();
             await _userRepository.RemoveAllAsync();
+            await _cacheClient.RemoveAllAsync();
             await _projectRepository.RemoveAllAsync();
+            await _cacheClient.RemoveAllAsync();
             await _organizationRepository.RemoveAllAsync();
             await _client.RefreshAsync();
             await _cacheClient.RemoveAllAsync();
@@ -142,7 +145,7 @@
         }

         public override async void Dispose() {
-            await RemoveDataAsync();
+            await RemoveEventsAndStacks();
             base.Dispose();
         }
     }


LUCENENET-250 estFieldCacheSanityChecker bug

git-svn-id: 6c68d65edd5507bf6b37474e0d155329cbeeff2a@836400 13f79535-47bb-0310-9956-ffa450edef68

--- C#/src/Test/Util/TestFieldCacheSanityChecker.cs
+++ C#/src/Test/Util/TestFieldCacheSanityChecker.cs
@@ -64,11 +64,11 @@
 			{
 				Document doc = new Document();
 				doc.Add(new Field("theLong", System.Convert.ToString(theLong--), Field.Store.NO, Field.Index.NOT_ANALYZED));
-				doc.Add(new Field("theDouble", System.Convert.ToString(theDouble--), Field.Store.NO, Field.Index.NOT_ANALYZED));
+				doc.Add(new Field("theDouble", (theDouble--).ToString("E16"), Field.Store.NO, Field.Index.NOT_ANALYZED));
 				doc.Add(new Field("theByte", System.Convert.ToString((byte) theByte--), Field.Store.NO, Field.Index.NOT_ANALYZED));
 				doc.Add(new Field("theShort", System.Convert.ToString(theShort--), Field.Store.NO, Field.Index.NOT_ANALYZED));
 				doc.Add(new Field("theInt", System.Convert.ToString(theInt--), Field.Store.NO, Field.Index.NOT_ANALYZED));
-				doc.Add(new Field("theFloat", System.Convert.ToString(theFloat--), Field.Store.NO, Field.Index.NOT_ANALYZED));
+				doc.Add(new Field("theFloat", (theFloat--).ToString("E8"), Field.Store.NO, Field.Index.NOT_ANALYZED));
 				if (0 == i % 3)
 				{
 					wA.AddDocument(doc);


Reduce usings

Reduce usings

--- C#Development/BashSoft/BashSoft/Judge/Tester.cs
+++ C#Development/BashSoft/BashSoft/Judge/Tester.cs
@@ -2,8 +2,8 @@
 {
     using System;
     using System.IO;
-    using BashSoft.IO;
-    using BashSoft.StaticData;
+    using IO;
+    using StaticData;

     public static class Tester
     {


Removes a redundant field initialization in the random date generator.

--- Src/AutoFixture/RandomDateTimeSequenceGenerator.cs
+++ Src/AutoFixture/RandomDateTimeSequenceGenerator.cs
@@ -12,7 +12,6 @@
         public RandomDateTimeSequenceGenerator()
             : this(DateTime.MinValue, DateTime.MaxValue)
         {
-            this.randomizer = new Random();
         }

         public RandomDateTimeSequenceGenerator(DateTime minDate, DateTime maxDate)


Add packages location to ApplicationParameters

--- src/chocolatey/infrastructure.app/ApplicationParameters.cs
+++ src/chocolatey/infrastructure.app/ApplicationParameters.cs
@@ -18,6 +18,8 @@
         public static readonly string ChocolateyConfigFileResource = @"chocolatey.infrastructure.app.configuration.chocolatey.config";
         public static readonly string GlobalConfigFileLocation = _fileSystem.combine_paths(CommonAppDataChocolatey, "config", "chocolatey.config");
         public static readonly string LicenseFileLocation = _fileSystem.combine_paths(CommonAppDataChocolatey, "license", "chocolatey.license.xml");
+
+        public static readonly string PackagesLocation = _fileSystem.combine_paths(InstallLocation, "lib");

         public static class Tools
         {


Matrix multiplication example looks good

--- CSharpMath.Ios/IosMath/IosMathViewController.cs
+++ CSharpMath.Ios/IosMath/IosMathViewController.cs
@@ -20,10 +20,10 @@
                            a & b\\ c & d
                             \end{pmatrix}
                             \begin{pmatrix}
-                            \alpha & \beta \gamma & \delta
+                            \alpha & \beta \\ \gamma & \delta
                             \end{pmatrix} =
                             \begin{pmatrix}
-                            a\alpha + b\gamma & a\beta + b \delta
+                            a\alpha + b\gamma & a\beta + b \delta \\
                             c\alpha + d\gamma & c\beta + d \delta
                             \end{pmatrix}";
     private const string ShortMatrix = @"\begin{pmatrix} a & b\\ c & d \end{pmatrix}";
@@ -48,7 +48,7 @@
     {
       View.BackgroundColor = UIColor.White;
       /// WJWJWJ Set latex here.
-      var latexView = IosMathLabels.LatexView(ShortMatrix, 15);
+      var latexView = IosMathLabels.LatexView(Matrix, 15);
       latexView.BackgroundColor = UIColor.LightGray;
       var size = latexView.SizeThatFits(new CoreGraphics.CGSize(370, 180));
       latexView.Frame = new CoreGraphics.CGRect(0, 20, 320, 180);


在 Trailing 中，最后的 $ 不再认为是行结束符。

在 Trailing 中，最后的 $ 不再认为是行结束符。

--- Cyjb.Compiler/RegularExpressions/RegexParser.cs
+++ Cyjb.Compiler/RegularExpressions/RegexParser.cs
@@ -304,16 +304,10 @@
 						goto BreakOuterScan;
 					case '$':
 						// $ 仅在结尾表示行结尾，否则表示普通的符号。
-						if (EndOfPattern)
-						{
-							if (inTrailing)
-							{
-								AddRegex(AnchorExp.EndOfLine);
-							}
-							else
-							{
-								trailing = AnchorExp.EndOfLine;
-							}
+						// 在 Trailing 中，最后的 $ 不再认为是行结束符。
+						if (EndOfPattern && !inTrailing)
+						{
+							trailing = AnchorExp.EndOfLine;
 							goto BreakOuterScan;
 						}
 						else


Correct table name in SQL statements, should have been plural.

--- DapperTesting/Core/Data/DapperUserRepository.cs
+++ DapperTesting/Core/Data/DapperUserRepository.cs
@@ -18,7 +18,7 @@
         {
             var date = DateTime.Now;

-            const string sql = "INSERT INTO [User] ([DisplayName], [Email], [CreatedDate], [Active]) OUTPUT inserted.[Id] VALUES (@displayName, @email, @createdDate, @active)";
+            const string sql = "INSERT INTO [Users] ([DisplayName], [Email], [CreatedDate], [Active]) OUTPUT inserted.[Id] VALUES (@displayName, @email, @createdDate, @active)";

             var id = Fetch(c => c.Query<int>(sql, new
             {
@@ -34,13 +34,13 @@

         public void Delete(int id)
         {
-            const string sql = "DELETE FROM [User] WHERE [Id] = @userId";
+            const string sql = "DELETE FROM [Users] WHERE [Id] = @userId";
             Execute(c => c.Execute(sql, new { userId = id }));
         }

         public User Get(int id)
         {
-            const string sql = "SELECT * FROM [User] WHERE [Id] = @userId";
+            const string sql = "SELECT * FROM [Users] WHERE [Id] = @userId";
             var user = Fetch(c => c.Query<User>(sql, new { userId = id }).SingleOrDefault());
             return user;
         }


Fix a bug where a F-Curve menu is shown when other window is clicked

--- Dev/Editor/EffekseerCoreGUI/GUI/Dock/FCurves.cs
+++ Dev/Editor/EffekseerCoreGUI/GUI/Dock/FCurves.cs
@@ -272,7 +272,7 @@
 					}
 				}

-				if (canControl)
+				if (canControl && Manager.NativeManager.IsWindowHovered())
 				{
 					Manager.NativeManager.StartSelectingAreaFCurve();


25 second retry

25 second retry

--- DragonSpark/Diagnostics/DefaultRetryStrategy.cs
+++ DragonSpark/Diagnostics/DefaultRetryStrategy.cs
@@ -4,5 +4,5 @@
 {
 	public static DefaultRetryStrategy Default { get; } = new();

-	DefaultRetryStrategy() : base(1.5f) {}
+	DefaultRetryStrategy() : base(1.6f) {}
 }


Delayed the time before a compression volume is opened.

git-svn-id: bf0bd98e94caaaf89d4dca54eab1bef459ce3438@1492 59da171f-624f-0410-aa54-27559c288bec

--- Duplicati/Library/Compression/FileArchiveZip.cs
+++ Duplicati/Library/Compression/FileArchiveZip.cs
@@ -92,9 +92,26 @@
         private IWriter m_writer;

         /// <summary>
+        /// The name of the file being read
+        /// </summary>
+        private string m_filename;
+
+        /// <summary>
         /// Default constructor, used to read file extension and supported commands
         /// </summary>
         public FileArchiveZip() { }
+
+        public IArchive Archive
+        {
+            get
+            {
+                if (m_stream == null)
+                    m_stream = new System.IO.FileStream(m_filename, FileMode.Open, FileAccess.Read, FileShare.Read);
+                if (m_archive == null)
+                    m_archive = ArchiveFactory.Open(m_stream);
+                return m_archive;
+            }
+        }

         /// <summary>
         /// Constructs a new zip instance.
@@ -108,11 +125,10 @@
             if (string.IsNullOrEmpty(filename) && filename.Trim().Length == 0)
                 throw new ArgumentException("filename");

-            if (!File.Exists(filename) || new FileInfo(filename).Length > 0)
+            if (File.Exists(filename) && new FileInfo(filename).Length > 0)
             {
                 m_isWriting = false;
-                m_stream = new System.IO.FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
-                m_archive = ArchiveFactory.Open(m_stream);
+                m_filename = filename;
             }
             else
             {
@@ -178,7 +194,7 @@
         public string[] ListFiles(string prefix)
         {
             List<string> results = new List<string>();
-            foreach (IArchiveEntry e in m_archive.Entries)
+            foreach (IArchiveEntry e in Archive.Entries)
             {
                 if (prefix == null)
                 {
@@ -223,7 +239,7 @@
                 throw new InvalidOperationException("Cannot read while writing");

             string path = file;
-            foreach(IArchiveEntry e in m_archive.Entries)
+            foreach(IArchiveEntry e in Archive.Entries)
             {
                 if (string.Equals(e.FilePath, path, Duplicati.Library.Utility.Utility.ClientFilenameStringComparision))
                     return e;
@@ -234,7 +250,7 @@
             if (path != path2)
             {
                 path = path2;
-                foreach (IArchiveEntry e in m_archive.Entries)
+                foreach (IArchiveEntry e in Archive.Entries)
                 {
                     if (string.Equals(e.FilePath, path, Duplicati.Library.Utility.Utility.ClientFilenameStringComparision))
                         return e;
@@ -280,7 +296,7 @@
         {
             get
             {
-                return m_archive == null ? m_stream.Length : m_archive.TotalSize;
+                return m_isWriting ? m_stream.Length : Archive.TotalSize;
             }
         }


Found another StandardKernel constructor call in the PCL. Let's rerun the tests.

--- ATZ.DependencyInjection/DependencyResolver.cs
+++ ATZ.DependencyInjection/DependencyResolver.cs
@@ -21,7 +21,7 @@

         static DependencyResolver()
         {
-            Instance = new StandardKernel();
+            //Instance = new StandardKernel();
         }

         private static void CacheResolutionIfNewlyResolved([NotNull] IKernel kernel, [NotNull] Type interfaceType,


Excluded some tests.

Excluded some tests.

--- Tests/Base/CustomizationSupport/Db2iInterceptor.cs
+++ Tests/Base/CustomizationSupport/Db2iInterceptor.cs
@@ -94,6 +94,11 @@
 				//Access client throws a different exception so it is excluded
 				case ("DataContextTests", "ProviderConnectionStringConstructorTest2"):
 					return contexts.Except(TestProvNameDb2i.GetProviders(TestProvNameDb2i.All_AccessClient));
+
+				//LAG returns numeric instead of timestamp prior to 7.4
+				case ("AnalyticTests", "Issue1799Test1"):
+				case ("AnalyticTests", "Issue1799Test2"):
+					return contexts.Intersect(TestProvNameDb2i.GetProviders(TestProvNameDb2i.All_74));
 			}

 			return contexts;


Updated Room template to give better examples

--- Assets/Fungus/Scripts/RoomTemplate.cs
+++ Assets/Fungus/Scripts/RoomTemplate.cs
@@ -2,19 +2,30 @@
 using System.Collections;
 using Fungus;

-// An empty template room class to use as a starting point for your own room scripts.
-// Copy this script to your game folder, rename it and add it to your room object.
+// Use this class as a starting point for your own room scripts.
+// 1. Select this script in the Project window in Unity3D/
+// 2. Choose Edit > Duplicate from the menu. A copy of the file will be created.
+// 3. Rename the file to match the name of your room (e.g. DungeonRoom)
+// 4. Edit the script and rename the class to match the file name (e.g. public class RoomTemplate => public class DungeonRoom)
+// 5. Save the script and add it as a component to your Room game object in Unity 3D.
+
 public class RoomTemplate : Room
 {
-	// Properties go here
+	// Add public properties here.
+	// These will appear in the inspector window in Unity so you can connect them to objects in your scene

-	// Called when the player enters the room
+	// Some common examples:
+	// public View mainView;
+	// public Page dialogPage;
+	// public Room otherRoom;
+	// public SpriteRenderer characterSprite;
+	// public Animator characterAnim;
+	// public AudioClip musicClip;
+
+	// OnEnter() is always called when the player enters the room
 	void OnEnter()
 	{
-	}
-
-	// Called when the player leaves the room
-	void OnLeave()
-	{
-	}
+		// Add any sequence of Fungus commands you want here.
+		// See FungusExample/Scripts for examples
+	}
 }


Add missing http:// when defining the Uri

--- docs/code/transports/GrpcMultiConsoleListener.cs
+++ docs/code/transports/GrpcMultiConsoleListener.cs
@@ -21,8 +21,8 @@
                             h.Host = "127.0.0.1";
                             h.Port = 19796;

-                            h.AddServer(new Uri("127.0.0.1:19797"));
-                            h.AddServer(new Uri("127.0.0.1:19798"));
+                            h.AddServer(new Uri("http://127.0.0.1:19797"));
+                            h.AddServer(new Uri("http://127.0.0.1:19798"));
                         });

                         cfg.ConfigureEndpoints(context);


implement basics of custom objects

implement basics of custom objects

--- Assets/MapzenGo/Models/TileManager.cs
+++ Assets/MapzenGo/Models/TileManager.cs
@@ -14,7 +14,15 @@
 {
     public class TileManager : MonoBehaviour
     {
-
+        private List<Vector2d> _customObjects = new List<Vector2d>()
+        {
+            new Vector2d(40.753176, -73.982229),
+            new Vector2d(40.769759, -73.975537),
+            new Vector2d(40.740304, -73.972425),
+            new Vector2d(40.728664, -74.032011),
+        };
+
+
         protected readonly string _mapzenUrl = "https://vector.mapzen.com/osm/{0}/{1}/{2}/{3}.{4}?api_key={5}";
         [SerializeField] protected string _key = "vector-tiles-5sBcqh6"; //try getting your own key if this doesn't work
         [SerializeField] protected string _mapzenLayers = "buildings,roads,landuse,water";
@@ -96,6 +104,23 @@
             tile.transform.position = (rect.Center - centerInMercator).ToVector3();
             tile.transform.SetParent(TileHost, false);
             LoadTile(tileTms, tile);
+
+            foreach (var pos in _customObjects)
+            {
+                var meters = GM.LatLonToMeters(pos.x, pos.y);
+                var tileCoord = GM.MetersToTile(meters, Zoom);
+
+                if (Math.Abs(tileTms.x - tileCoord.x) < 0.2d && Math.Abs(tileTms.y - tileCoord.y) < .2d)
+                {
+                    var go = GameObject.CreatePrimitive(PrimitiveType.Sphere);
+                    go.transform.position = (meters - rect.Center).ToVector3();
+                    go.transform.localScale = Vector3.one*1000;
+                    go.transform.SetParent(tile.transform, false);
+                }
+            }
+
+
+
             yield return null;
         }


Have trash delete itself once on the ground

--- Assets/Scripts/Beanstalk/TrashFall.cs
+++ Assets/Scripts/Beanstalk/TrashFall.cs
@@ -18,6 +18,10 @@

 		transform.position = new Vector2(transform.position.x, transform.position.y - (FallSpeed * Time.deltaTime));
 		transform.Rotate(new Vector3(0,0,(50 * _spinDirection) * Time.deltaTime));
+		if (transform.position.y < 0) {
+		    // Remove self on reaching the ground
+		    Destroy(this.gameObject);
+		}

 	}


Added Headers

Added Headers

--- Assets/Scripts/DataStructures/Heap.cs
+++ Assets/Scripts/DataStructures/Heap.cs
@@ -1,4 +1,9 @@
-using UnityEngine;
+/*
+ * Heap.cs
+ * Authors: Lajos Polya
+ * Description: This is a Heap which is used by the A* (Star) algorithm
+ */
+using UnityEngine;
 using System.Collections;

 public class Heap {


Door Message

Door Message

There's a message now if you try to open a door but you can't; it tells
you what key you need.

--- Assets/Scripts/KeyedDoorController.cs
+++ Assets/Scripts/KeyedDoorController.cs
@@ -56,6 +56,7 @@
             return false;
         }

+        AddTranscriptLine("{0} needs the {1}", mover.name, keyName);
         return false;
     }


soudns

soudns

--- Assets/Scripts/Sounds/PacmanSounds.cs
+++ Assets/Scripts/Sounds/PacmanSounds.cs
@@ -19,11 +19,10 @@
 	}

 	void Update() {
-		if (player.clip == chomp && Time.time - lastTimeEaten > 0.3f) {
+		if (GameManager.Instance.paused) {
+			player.Stop ();
+		} else if (player.clip == chomp && Time.time - lastTimeEaten > 0.3f) {
 			player.loop = false;
-		}
-		if (player.clip == win && !player.isPlaying) {
-			GameManager.Instance.transitionToScene (GameManager.Instance.levelManager.nextScene);
 		}
 	}


1.0.6.231 Fixed某些object特殊重载GetHashCode()前后不一致造成泄漏问题

--- Assets/ToLua/Core/ObjectTranslator.cs
+++ Assets/ToLua/Core/ObjectTranslator.cs
@@ -21,6 +21,7 @@
 */
 using System;
 using System.Collections.Generic;
+using System.Runtime.CompilerServices;
 using UnityEngine;

 namespace LuaInterface
@@ -50,12 +51,7 @@

             public int GetHashCode(object obj)
             {
-                if (obj != null)
-                {
-                    return obj.GetHashCode();
-                }
-
-                return 0;
+                return RuntimeHelpers.GetHashCode(obj);
             }
         }


-again, refresh ui hotfix

-again, refresh ui hotfix

--- Assets/lab/Editor/Window/LabWindow.cs
+++ Assets/lab/Editor/Window/LabWindow.cs
@@ -26,14 +26,14 @@
     private void OnEnable() {
         titleContent = new GUIContent("lab");
 		titleContent.image = (Texture2D)EditorGUIUtility.Load("Assets/lab/Icons/icon_lab1.png");
-        Init();
+		Init();
+		gWindow = this;
     }

-    private void OnDisable() {
-        gWindow = null;
-    }
-
-    private void OnGUI() {
+	private void OnGUI() {
+		if(_statusBar == null) {
+			return;
+		}
         _statusBar.DrawStatusBar();
         ResizeSplitPanel();
         _scrollPosition = GUILayout.BeginScrollView(_scrollPosition, GUILayout.Width(_currentViewWidth), GUILayout.Height(position.height));
@@ -145,7 +145,7 @@
         }
     }

-    private void Init() {
+	private void Init() {
         if (_statusBar == null) {
             _statusBar = new StatusBarDrawer();
         }
@@ -153,13 +153,13 @@
             _paramPanel = new ParamPanelDrawer();
         }
         _cursorChangeRect = new Rect(_currentViewWidth, 0f, 5f, position.height);
-        if (_target != Selection.activeObject && Selection.activeObject is AiBlackboard && EditorUtility.IsPersistent(Selection.activeObject)) {
+        if (Selection.activeObject is AiBlackboard && EditorUtility.IsPersistent(Selection.activeObject)) {
             _target = (AiBlackboard)Selection.activeObject;
             _statusBar.Blackboard = _target;
             _paramPanel.Blackboard = _target;
             _treeDrawer = new TreeDrawer(_statusBar.CurrentTree);
             _statusBar.OnSelectedAiTree += _treeDrawer.RebuildTreeView;
-        } else if (Selection.activeGameObject != null && Selection.activeGameObject.GetComponent<AiController>() != null && Selection.activeGameObject.GetComponent<AiController>().Blackboard != null && Selection.activeGameObject.GetComponent<AiController>().Blackboard != _target) {
+        } else if (Selection.activeGameObject != null && Selection.activeGameObject.GetComponent<AiController>() != null && Selection.activeGameObject.GetComponent<AiController>().Blackboard != null) {
             _target = Selection.activeGameObject.GetComponent<AiController>().Blackboard;
             _statusBar.Blackboard = _target;
             _paramPanel.Blackboard = _target;


Fixes #28. Fixing issue with Func<> not resolving on dotNet core projects.

--- AutoDI.Container.Fody/ModuleWeaver.cs
+++ AutoDI.Container.Fody/ModuleWeaver.cs
@@ -352,8 +352,7 @@
             }
             return false;
         }
-
-        //TODO: Make static?
+
         MethodReference addSingleton =
             ModuleDefinition.ImportReference(typeof(ContainerMap).GetMethod(nameof(ContainerMap.AddSingleton)));
         MethodReference addLazySingleton =
@@ -363,7 +362,20 @@
         MethodReference addTransient =
             ModuleDefinition.ImportReference(typeof(ContainerMap).GetMethod(nameof(ContainerMap.AddTransient)));

-        //MethodReference funcCtor = ModuleDefinition.ImportReference(typeof(Func<>).GetConstructors().Single());
+        TypeReference funcType = ModuleDefinition.ImportReference(typeof(Func<>));
+        //NB: This null fall back is due to an issue with Mono.Cecil 0.10.0
+        //From GitHub issues it looks like it make be resolved in some of the beta builds, however this would require modifying Fody.
+        //For now we will just manually resolve this way. Since we know Func<>> lives in the core library.
+        TypeDefinition funcDefinition = funcType.Resolve() ?? ModuleDefinition.AssemblyResolver
+                                            .Resolve((AssemblyNameReference) ModuleDefinition.TypeSystem.CoreLibrary)
+                                            .MainModule.GetType(typeof(Func<>).FullName);
+        if (funcDefinition == null)
+        {
+            LogError($"Failed to resolve type '{typeof(Func<>).FullName}'");
+            return;
+        }
+        MethodDefinition funcCtor = funcDefinition.GetConstructors().Single();
+
         TypeReference type = ModuleDefinition.ImportReference(typeof(Type));
         MethodReference getTypeMethod = ModuleDefinition.ImportReference(typeof(Type).GetMethod(nameof(Type.GetTypeFromHandle)));

@@ -405,11 +417,7 @@
                         staticBody.Emit(OpCodes.Ldnull);
                         staticBody.Emit(OpCodes.Ldftn, delegateMethod);

-                        var funcType = ModuleDefinition.ImportReference(typeof(Func<>)).MakeGenericInstanceType(targetType);
-
-                        var funcCtor = GetGenericTypeConstructor(funcType.Resolve().GetConstructors().Single(), targetType);
-
-                        staticBody.Emit(OpCodes.Newobj, ModuleDefinition.ImportReference(funcCtor));
+                        staticBody.Emit(OpCodes.Newobj, ModuleDefinition.ImportReference(GetGenericTypeConstructor(funcCtor, targetType)));
                         break;
                 }

@@ -454,7 +462,7 @@
             }
             catch (Exception e)
             {
-                InternalLogDebug($"Failed to create map for {map}\r\n{e}", DebugLogLevel.Default);
+                LogWarning($"Failed to create map for {map}\r\n{e}");
             }
         }
     }


Added the Non-North American URI's for Protect without template function

--- AzureIP_Test/AzureIP_test/Iprotect.cs
+++ AzureIP_Test/AzureIP_test/Iprotect.cs
@@ -27,6 +27,10 @@
         const string EncryptionMethod1 = "1";
         const string EncryptionMethod2 = "2";
         const string alreadyEncrypted = "encrypted";
+    // if you are outside North America please uncomment this section as it is needed
+  /*   static Uri IntranetURL = new Uri(ConfigurationManager.AppSettings["LicensingIntranetDistributionPointUrl"]);
+       static Uri ExtranetURL = new Uri(ConfigurationManager.AppSettings["LicensingExtranetDistributionPointUrl"]);
+       static  ConnectionInfo connectionInfo = new ConnectionInfo(ExtranetURL, IntranetURL); */

         static void Main(string[] args)
         {
@@ -44,10 +48,6 @@
                 symmetricKeyCred.Base64Key = ConfigurationManager.AppSettings["Base64Key"];
                 symmetricKeyCred.BposTenantId = ConfigurationManager.AppSettings["BposTenantId"];

-                // if you are outside North America please uncomment this section as it is needed
-                /* Uri IntranetURL = new Uri(ConfigurationManager.AppSettings["LicensingIntranetDistributionPointUrl"]);
-                Uri ExtranetURL = new Uri(ConfigurationManager.AppSettings["LicensingExtranetDistributionPointUrl"]);
-                ConnectionInfo connectionInfo = new ConnectionInfo(ExtranetURL, IntranetURL); */

                 //Prompts user to choose whether to encrypt using Azure Template or Ad Hoc Policy
                 Console.WriteLine("Please select the desired encryption method (Enter 1 or 2)");
@@ -113,9 +113,7 @@

             // If you are based outside of the North American geo you need to provide the connection info

-           /* Uri IntranetURL = new Uri(ConfigurationManager.AppSettings["LicensingIntranetDistributionPointUrl"]);
-            Uri ExtranetURL = new Uri(ConfigurationManager.AppSettings["LicensingExtranetDistributionPointUrl"]);
-            ConnectionInfo connectionInfo = new ConnectionInfo(ExtranetURL, IntranetURL);
+           /*
             Collection<TemplateInfo> templates = SafeNativeMethods.IpcGetTemplateList(connectionInfo, false, true,
                 false, true, null, null, symmetricKeyCredential); */

@@ -259,6 +257,13 @@
                                             // The available issuers is a list of RMS servers that this user has already contacted.
                                             try
                                             {
+
+                                                // If you are based outside of the North American geo you need to provide the connection info
+
+                                                /*
+                                                 Collection<TemplateInfo> templates = SafeNativeMethods.IpcGetTemplateList(connectionInfo, false, true,
+                                                     false, true, null, null, symmetricKeyCredential); */
+
                                                 Collection<TemplateIssuer> templateIssuers = SafeNativeMethods
                                                     .IpcGetTemplateIssuerList(
                                                         null,


NRE Guard in ClampToScreen

NRE Guard in ClampToScreen

--- TransferWindowPlanner/Framework/ExtensionsUnity.cs
+++ TransferWindowPlanner/Framework/ExtensionsUnity.cs
@@ -28,12 +28,24 @@
             return r.ClampToScreen(new RectOffset(0, 0, 0, 0));
         }

+
+        private static RectOffset zeroRectOffset;
         /// <summary>
         /// Ensure that the Rect remains within the screen bounds
         /// </summary>
         /// <param name="ScreenBorder">A Border to the screen bounds that the Rect will be clamped inside (can be negative)</param>
         public static Rect ClampToScreen(this Rect r, RectOffset ScreenBorder)
         {
+            if (ScreenBorder == null)
+            {
+                //catch a default if we need it
+                if (zeroRectOffset == null)
+                {
+                    zeroRectOffset = new RectOffset(0, 0, 0, 0);
+                }
+                ScreenBorder = zeroRectOffset;
+            }
+
             r.x = Mathf.Clamp(r.x, ScreenBorder.left, Screen.width - r.width - ScreenBorder.right);
             r.y = Mathf.Clamp(r.y, ScreenBorder.top, Screen.height - r.height - ScreenBorder.bottom);
             return r;


[EntityTest][fix]: needn't quality as description in task's history

--- BLL/EntityTest/Task/TaskTestHelper.cs
+++ BLL/EntityTest/Task/TaskTestHelper.cs
@@ -42,7 +42,7 @@
             task.has_update_latest();

             HistoryItem latest = task.get_latest_history();
-            Assert.That(latest.Description, Is.EqualTo(string.Format("验收通过，质量为{0}", quality.GetEnumDescription())));
+            Assert.That(latest.Description, Is.EqualTo("验收任务"));
         }

         internal static void has_complete(this Task task, string description = Constants.DescriptionComplete)


fix DhcpServerTest. retry creating of "UdpClient" until got port

--- Bjd.DhcpServer.Test/DhcpServerTest.cs
+++ Bjd.DhcpServer.Test/DhcpServerTest.cs
@@ -33,7 +33,7 @@

             var option = kernel.ListOption.Get("Dhcp");
             Conf conf = new Conf(option);
-
+
             port = _service.GetAvailableUdpPort(ip, conf);

             //サーバ起動
@@ -60,7 +60,22 @@
         PacketDhcp Access(byte[] buf)
         {
             //クライアントソケット生成、及び送信
-            var cl = new UdpClient(68);
+            UdpClient cl;
+            int retry = 0;
+            while (true)
+            {
+                try
+                {
+                    cl = new UdpClient(68);
+                    break;
+                }
+                catch (System.Net.Sockets.SocketException)
+                {
+                    retry++;
+                    if (retry > 30) throw;
+                    System.Threading.Tasks.Task.Delay(500).Wait();
+                }
+            }
             //cl.Connect((new Ip(IpKind.V4Localhost)).IPAddress, 67); //クライアントのポートが67でないとサーバが応答しない
             //cl.Send(buf, buf.Length);


Fixed Date extensions to return Dates.

Fixed Date extensions to return Dates.

--- WmcSoft.Business.Primitives/Time/DateExtensions.cs
+++ WmcSoft.Business.Primitives/Time/DateExtensions.cs
@@ -54,9 +54,9 @@
         /// </summary>
         /// <param name="date">The date</param>
         /// <returns>The first day of the month</returns>
-        public static DateTime FirstDayOfMonth(this Date date)
+        public static Date FirstDayOfMonth(this Date date)
         {
-            return new DateTime(date.Year, date.Month, 1);
+            return new Date(date.Year, date.Month, 1);
         }

         /// <summary>
@@ -64,7 +64,7 @@
         /// </summary>
         /// <param name="date">The date</param>
         /// <returns>The first day of the month</returns>
-        public static DateTime FirstDayOfNextMonth(this Date date)
+        public static Date FirstDayOfNextMonth(this Date date)
         {
             return FirstDayOfMonth(date).AddMonths(1);
         }
@@ -74,14 +74,14 @@
         /// </summary>
         /// <param name="date">The date</param>
         /// <returns>The last day of the month</returns>
-        public static DateTime LastDayOfMonth(this Date date)
+        public static Date LastDayOfMonth(this Date date)
         {
             var year = date.Year;
             var month = date.Month;
-            return new DateTime(year, month, DateTime.DaysInMonth(year, month));
+            return new Date(year, month, DateTime.DaysInMonth(year, month));
         }

-        static DateTime UnguardedFirstDayOfWeek(DateTime date, IFormatProvider formatProvider)
+        static Date UnguardedFirstDayOfWeek(Date date, IFormatProvider formatProvider)
         {
             var dateTimeFormatInfo = (DateTimeFormatInfo)formatProvider.GetFormat(typeof(DateTimeFormatInfo));
             var firstDayOfWeek = dateTimeFormatInfo.FirstDayOfWeek;
@@ -89,7 +89,7 @@
             var delta = firstDayOfWeek - dayOfWeek;
             if (delta > 0)
                 delta -= 7;
-            return date.Date.AddDays(delta);
+            return date.AddDays(delta);
         }

         /// <summary>
@@ -98,7 +98,7 @@
         /// <param name="date">The date</param>
         /// <param name="formatProvider">The format provider to retrieve <see cref="DateTimeFormatInfo.FirstDayOfWeek"/>.</param>
         /// <returns>The first day of the week</returns>
-        public static DateTime FirstDayOfWeek(this Date date, IFormatProvider formatProvider = null)
+        public static Date FirstDayOfWeek(this Date date, IFormatProvider formatProvider = null)
         {
             return UnguardedFirstDayOfWeek(date, formatProvider ?? CultureInfo.CurrentCulture);
         }
@@ -109,7 +109,7 @@
         /// <param name="date">The date</param>
         /// <param name="formatProvider">The format provider to retrieve <see cref="DateTimeFormatInfo.FirstDayOfWeek"/>.</param>
         /// <returns>The last day of the week</returns>
-        public static DateTime LastDayOfWeek(this Date date, IFormatProvider formatProvider = null)
+        public static Date LastDayOfWeek(this Date date, IFormatProvider formatProvider = null)
         {
             return UnguardedFirstDayOfWeek(date, formatProvider ?? CultureInfo.CurrentCulture)
                 .AddDays(6);


CA-368811: Fix memory values showing in bytes in Import Wizard

Signed-off-by: Danilo Del Busso <766dc0f994b57f2d2e98930ecfa5ee8fb1091a62@citrix.com>

--- XenAdmin/Wizards/ImportWizard/ImageVMConfigPage.cs
+++ XenAdmin/Wizards/ImportWizard/ImageVMConfigPage.cs
@@ -47,9 +47,9 @@
 		public ImageVMConfigPage()
 		{
 			InitializeComponent();
-            m_upDownMemory.Minimum = m_upDownMemory.Increment = VM.DEFAULT_MEM_MIN_IMG_IMPORT;
-            m_upDownMemory.Maximum = VM.DEFAULT_MEM_ALLOWED;
-            m_ctrlError.HideError();
+            m_upDownMemory.Minimum = m_upDownMemory.Increment = (decimal)VM.DEFAULT_MEM_MIN_IMG_IMPORT / Util.BINARY_MEGA;
+            m_upDownMemory.Maximum = (decimal)VM.DEFAULT_MEM_ALLOWED / Util.BINARY_MEGA;
+			m_ctrlError.HideError();
 		}

 		#region Base class (XenTabPage) overrides


CA-249084: deleted more unneeded code

CA-249084: deleted more unneeded code

Signed-off-by: Gabor Apati-Nagy <fea1aad7ceb67d3aeb88acb6b51e51467c21418e@citrix.com>

--- XenAdmin/Wizards/NewSRWizard_Pages/SrWizardType.cs
+++ XenAdmin/Wizards/NewSRWizard_Pages/SrWizardType.cs
@@ -57,15 +57,8 @@
     {
         public LvmOhbaSrDescriptor(FibreChannelDevice device, IXenConnection connection)
         {
-            Host master = Helpers.GetMaster(connection);
             Device = device;
-
-            // CA-19025: Change XenCenter SR.create for LVMoHBA to use the
-            // updated SCSIid parameter rather than the device path
-            if (master != null)
-            {
-                DeviceConfig[SrProbeAction.SCSIid] = device.SCSIid;
-            }
+            DeviceConfig[SrProbeAction.SCSIid] = device.SCSIid;

             Description = string.Format(Messages.NEWSR_LVMOHBA_DESCRIPTION, device.Vendor, device.Serial);
         }


LiteralTests - Changed to isolated LogFactory (#4741)

--- tests/NLog.UnitTests/LayoutRenderers/LiteralTests.cs
+++ tests/NLog.UnitTests/LayoutRenderers/LiteralTests.cs
@@ -31,8 +31,6 @@
 // THE POSSIBILITY OF SUCH DAMAGE.
 //

-using NLog.Config;
-
 namespace NLog.UnitTests.LayoutRenderers
 {
     using Xunit;
@@ -42,49 +40,49 @@
         [Fact]
         public void LiteralTest()
         {
-            LogManager.Configuration = XmlLoggingConfiguration.CreateFromXmlString(@"
+            var logFactory = new LogFactory().Setup().LoadConfigurationFromXml(@"
             <nlog>
                 <targets><target name='debug' type='Debug' layout='abcd' /></targets>
                 <rules>
                     <logger name='*' minlevel='Debug' writeTo='debug' />
                 </rules>
-            </nlog>");
+            </nlog>").LogFactory;

-            var logger = LogManager.GetLogger("A");
+            var logger = logFactory.GetLogger("A");
             logger.Debug("a");
-            AssertDebugLastMessage("debug", "abcd");
+            logFactory.AssertDebugLastMessage("abcd");
         }

         [Fact]
         public void LiteralExplicitTextTest()
         {
-            LogManager.Configuration = XmlLoggingConfiguration.CreateFromXmlString(@"
+            var logFactory = new LogFactory().Setup().LoadConfigurationFromXml(@"
             <nlog>
                 <targets><target name='debug' type='Debug' layout='${literal:text=a\=\:\}b\t\nc\u003ad}' /></targets>
                 <rules>
                     <logger name='*' minlevel='Debug' writeTo='debug' />
                 </rules>
-            </nlog>");
+            </nlog>").LogFactory;

-            ILogger logger = LogManager.GetLogger("A");
+            var logger = logFactory.GetLogger("A");
             logger.Debug("a");
-            AssertDebugLastMessage("debug", "a=:}b\t\nc:d");
+            logFactory.AssertDebugLastMessage("a=:}b\t\nc:d");
         }

         [Fact]
         public void LiteralDefaultTextTest()
         {
-            LogManager.Configuration = XmlLoggingConfiguration.CreateFromXmlString(@"
+            var logFactory = new LogFactory().Setup().LoadConfigurationFromXml(@"
             <nlog>
                 <targets><target name='debug' type='Debug' layout='${literal:a\=\:\}b\t\nc\u003ad}' /></targets>
                 <rules>
                     <logger name='*' minlevel='Debug' writeTo='debug' />
                 </rules>
-            </nlog>");
+            </nlog>").LogFactory;

-            ILogger logger = LogManager.GetLogger("A");
+            var logger = logFactory.GetLogger("A");
             logger.Debug("a");
-            AssertDebugLastMessage("debug", "a=:}b\t\nc:d");
+            logFactory.AssertDebugLastMessage("a=:}b\t\nc:d");
         }
     }
 }


unit tests to cover scenarios described in issue #7

--- tests/RiskFirst.RestClient.Tests/RestRequestTests.cs
+++ tests/RiskFirst.RestClient.Tests/RestRequestTests.cs
@@ -99,6 +99,17 @@
         }

         [Fact]
+        public void GivenRepeatedCallsToWithQueryParameter_UriIsValid()
+        {
+            var req = new Uri(RootUri).AsRestRequest()
+                .WithQueryParameter("a", 1)
+                .WithQueryParameter("b", 2)
+                .CreateRequestMessage(HttpMethod.Get);
+
+            Assert.Equal($"{RootUri}/?a=1&b=2", req.RequestUri.ToString());
+        }
+
+        [Fact]
         public void GivenQueryParameterWithNullValue_UriIsValid()
         {
             var req = new Uri(RootUri).AsRestRequest()
@@ -132,6 +143,16 @@
         }

         [Fact]
+        public void GivenMultipleQueryParametersAsDictionary_UriIsValid()
+        {
+            var req = new Uri(RootUri).AsRestRequest()
+                .WithQueryParameters(new Dictionary<string, object>() { { "a", 1 }, { "b", 2 } })
+                .CreateRequestMessage(HttpMethod.Get);
+
+            Assert.Equal($"{RootUri}/?a=1&b=2", req.RequestUri.ToString());
+        }
+
+        [Fact]
         public void GivenHeader_RequestContainsHeader()
         {
             var req = new Uri(RootUri).AsRestRequest()


Minor fix testing rosbridge server config

--- sar-opal-base/Assets/scripts/MainGameController.cs
+++ sar-opal-base/Assets/scripts/MainGameController.cs
@@ -48,7 +48,7 @@
                 out server, out port);

 			this.clientSocket = new RosbridgeWebSocketClient(
-				server, // can pass hostname or IP address
+                server, // can pass hostname or IP address
                 port);

 			this.clientSocket.SetupSocket();


Added test for websocket (echo) #5

Added test for websocket (echo) #5

--- AngleSharp.Io.Tests/Network/WebSocketTests.cs
+++ AngleSharp.Io.Tests/Network/WebSocketTests.cs
@@ -1,9 +1,46 @@
 namespace AngleSharp.Io.Tests.Network
 {
+    using AngleSharp.Dom.Events;
+    using AngleSharp.Io.Dom;
+    using FluentAssertions;
     using NUnit.Framework;
+    using System;
+    using System.Collections.Generic;
+    using System.Threading.Tasks;

     [TestFixture]
     public class WebSocketTests
     {
+        [Test]
+        public async Task ConnectToWebSocketEcho()
+        {
+            if (Helper.IsNetworkAvailable())
+            {
+                // ARRANGE
+                var message = "foo";
+                var haserror = false;
+                var messages = new List<String>();
+                var closed = new TaskCompletionSource<Boolean>();
+                var document = await BrowsingContext.New().OpenNewAsync("https://www.websocket.org/echo.html");
+                var ws = new WebSocket(document.DefaultView, "wss://echo.websocket.org");
+
+                // ACT
+                ws.Opened += (s, ev) => ws.Send(message);
+                ws.Message += (s, ev) =>
+                {
+                    var msg = ev as MessageEvent;
+                    messages.Add(msg.Data.ToString());
+                    ws.Close();
+                };
+                ws.Closed += (s, ev) => closed.SetResult(true);
+                ws.Error += (s, ev) => haserror = true;
+                await closed.Task;
+
+                // ASSERT
+                haserror.Should().BeFalse();
+                messages.Count.Should().Be(1);
+                messages[0].Should().Be(message);
+            }
+        }
     }
 }


[Mono] Fix Transform2D rotation and scale

--- modules/mono/glue/Managed/Files/Transform2D.cs
+++ modules/mono/glue/Managed/Files/Transform2D.cs
@@ -17,12 +17,40 @@

         public real_t Rotation
         {
-            get { return Mathf.Atan2(y.x, origin.y); }
+            get
+            {
+                real_t det = BasisDeterminant();
+                Transform2D t = Orthonormalized();
+                if (det < 0)
+                {
+                    t.ScaleBasis(new Vector2(1, -1));
+                }
+                return Mathf.Atan2(t.x.y, t.x.x);
+            }
+            set
+            {
+                Vector2 scale = Scale;
+                x.x = y.y = Mathf.Cos(value);
+                x.y = y.x = Mathf.Sin(value);
+                y.x *= -1;
+                Scale = scale;
+            }
         }

         public Vector2 Scale
         {
-            get { return new Vector2(x.Length(), y.Length()); }
+            get
+            {
+                real_t detSign = Mathf.Sign(BasisDeterminant());
+                return new Vector2(x.Length(), detSign * y.Length());
+            }
+            set
+            {
+                x = x.Normalized();
+                y = y.Normalized();
+                x *= value.x;
+                y *= value.y;
+            }
         }

         public Vector2 this[int index]
@@ -95,7 +123,7 @@
         {
             var inv = this;

-            real_t det = this[0, 0] * this[1, 1] - this[1, 0] * this[0, 1];
+            real_t det = BasisDeterminant();

             if (det == 0)
             {
@@ -107,18 +135,23 @@
                 );
             }

-            real_t idet = 1.0f / det;
+            real_t detInv = 1.0f / det;

             real_t temp = this[0, 0];
             this[0, 0] = this[1, 1];
             this[1, 1] = temp;

-            this[0] *= new Vector2(idet, -idet);
-            this[1] *= new Vector2(-idet, idet);
+            this[0] *= new Vector2(detInv, -detInv);
+            this[1] *= new Vector2(-detInv, detInv);

             this[2] = BasisXform(-this[2]);

             return inv;
+        }
+
+        private real_t BasisDeterminant()
+        {
+            return x.x * y.y - x.y * y.x;
         }

         public Vector2 BasisXform(Vector2 v)
@@ -220,6 +253,14 @@
             return copy;
         }

+        private void ScaleBasis(Vector2 scale)
+        {
+            x.x *= scale.x;
+            x.y *= scale.y;
+            y.x *= scale.x;
+            y.y *= scale.y;
+        }
+
         private real_t Tdotx(Vector2 with)
         {
             return this[0, 0] * with[0] + this[1, 0] * with[1];
@@ -274,12 +315,9 @@

         public Transform2D(real_t rot, Vector2 pos)
         {
-            real_t cr = Mathf.Cos(rot);
-            real_t sr = Mathf.Sin(rot);
-            x.x = cr;
-            x.y = -sr;
-            y.x = sr;
-            y.y = cr;
+            x.x = y.y = Mathf.Cos(rot);
+            x.y = y.x = Mathf.Sin(rot);
+            y.x *= -1;
             origin = pos;
         }


plugin: fix CultureInfo null param exception

This was introduced in #3272.  This is just a quick fix and
not a proper one.

Fixes #3306, #3307.

--- plugin/CactbotEventSource/CactbotEventSource.cs
+++ plugin/CactbotEventSource/CactbotEventSource.cs
@@ -233,8 +233,13 @@
       var ui_lang = Config.DisplayLanguage;
       if (ui_lang == "default") ui_lang = language_;
       if (ui_lang == "cn") ui_lang = "zh";
-      CultureInfo culture = new CultureInfo(ui_lang, false);
-      CultureInfo.CurrentUICulture = culture;
+      try {
+        CultureInfo culture = new CultureInfo(ui_lang, false);
+        CultureInfo.CurrentUICulture = culture;
+      } catch {
+        // CultureInfo's constructor throws on nulls.
+        // TODO: remove this try/catch and verify a null check is sufficient?
+      }

       var versions = new VersionChecker(this);
       Version local = versions.GetCactbotVersion();


plugin: leave todo for config user dir

plugin: leave todo for config user dir

--- plugin/CactbotEventSource/CactbotEventSource.cs
+++ plugin/CactbotEventSource/CactbotEventSource.cs
@@ -615,6 +615,8 @@
         if (source != null && source != "") {
           // First try a user directory relative to the html.
           try {
+            // TODO: this is wrong for ui/dps/overlays
+            // TODO: maybe replace this with the version checker get cactbot root
             var url_dir = Path.GetDirectoryName(new Uri(source).LocalPath);
             config_dir = Path.GetFullPath(url_dir + "\\..\\..\\user\\");
             local_files = GetLocalUserFiles(config_dir);


run cleanup

run cleanup

--- core/Omego.Extensions/Poco/GenericEqualityComparer.cs
+++ core/Omego.Extensions/Poco/GenericEqualityComparer.cs
@@ -3,12 +3,28 @@
     using System;
     using System.Collections.Generic;

+    /// <summary>
+    ///     Represents a generic equality comparer comparer.
+    /// </summary>
+    /// <typeparam name="TSource">The type to use for comparison.</typeparam>
     public class GenericEqualityComparer<TSource> : IEqualityComparer<TSource>
     {
         private readonly Func<TSource, TSource, bool> areEqual;

         private readonly Func<TSource, int> hashCode;

+        /// <summary>
+        ///     Initializes a new instance of the <see cref="GenericEqualityComparer{TSource}" /> of
+        ///     <typeparamref name="TSource" /> struct.
+        /// </summary>
+        /// <param name="areEqual">
+        ///     The <see cref="Func{T1, T2, TResult}" /> of <typeparamref name="TSource" />,
+        ///     <typeparamref name="TSource" />, and <see cref="bool" /> to use for equality comparison.
+        /// </param>
+        /// <param name="hashCode">
+        ///     The <see cref="Func{T1, TResult}" /> of <typeparamref name="TSource" />,
+        ///     and <see cref="int" /> to use to get the hash code.
+        /// </param>
         public GenericEqualityComparer(Func<TSource, TSource, bool> areEqual, Func<TSource, int> hashCode)
         {
             this.areEqual = areEqual ??
@@ -17,8 +33,10 @@
             throw new ArgumentNullException(nameof(hashCode));
         }

+        /// <inheritdoc />
         public bool Equals(TSource x, TSource y) => areEqual(x, y);

+        /// <inheritdoc />
         public int GetHashCode(TSource obj) => hashCode(obj);
     }
 }


.NET Example: Sudoku example bugfix. Many thanks to Ilya Mironov for reporting this issue.

Signed-off-by: Christoph M. Wintersteiger <df906fa73c281118b7012d85069f1a6194ecf7a3@microsoft.com>

--- examples/dotnet/Program.cs
+++ examples/dotnet/Program.cs
@@ -474,7 +474,7 @@
                 cells_c[i] = new BoolExpr[9];
                 for (uint j = 0; j < 9; j++)
                     cells_c[i][j] = ctx.MkAnd(ctx.MkLe(ctx.MkInt(1), X[i][j]),
-                                                ctx.MkLe(X[i][j], ctx.MkInt(9)));
+                                              ctx.MkLe(X[i][j], ctx.MkInt(9)));
             }

             // each row contains a digit at most once
@@ -485,7 +485,13 @@
             // each column contains a digit at most once
             BoolExpr[] cols_c = new BoolExpr[9];
             for (uint j = 0; j < 9; j++)
-                cols_c[j] = ctx.MkDistinct(X[j]);
+            {
+                IntExpr[] column = new IntExpr[9];
+                for (uint i = 0; i < 9; i++)
+                    column[i] = X[i][j];
+
+                cols_c[j] = ctx.MkDistinct(column);
+            }

             // each 3x3 square contains a digit at most once
             BoolExpr[][] sq_c = new BoolExpr[3][];
@@ -2087,7 +2093,7 @@
                 {
                     QuantifierExample3(ctx);
                     QuantifierExample4(ctx);
-                }
+                }

                 Log.Close();
                 if (Log.isOpen())


corrected solutions

corrected solutions

--- CSharpSC/MultiDispose/MultiDispose.cs
+++ CSharpSC/MultiDispose/MultiDispose.cs
@@ -22,29 +22,27 @@

 using System;
 using System.IO;
+using System.Text;

 namespace SecureCSharp
 {
     class ReadAndWrite
     {
         static string[] lines = new string[10];
+
         static void WriteFile(string fileName)
         {
             // Write only some strings in an array to a file.
-            Stream stream = null;
-            try
+            using (Stream stream = new FileStream(fileName, FileMode.OpenOrCreate))
             {
-                stream = new FileStream("file.txt", FileMode.OpenOrCreate);
                 using (StreamWriter writer = new StreamWriter(stream))
                 {
-                    stream = null;
-                    // Use the writer object...
-                }
-            }
-            finally
-            {
-                stream?.Dispose();
-            }
+                    foreach (string line in lines)
+                    {
+                        writer.WriteLine(line);
+                    } // end foreach (string line in lines)
+                } // end using (StreamWriter file = new StreamWriter(stream))
+            } // end using (Stream stream = new FileStream(fileName, FileMode.OpenOrCreate))
         } // end void WriteFile(string fileName)

         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String)")]
@@ -66,7 +64,7 @@
             foreach (string line in lines)
             {
                 // Use a tab to indent each line of the file.
-                Console.WriteLine("\t" + line);
+                Console.WriteLine(line);
             }
         }

@@ -136,18 +134,62 @@

 /*
-Stream stream = null;
-try
-{
-  stream = new FileStream("file.txt", FileMode.OpenOrCreate);
-  using (StreamWriter writer = new StreamWriter(stream))
-  {
-    stream = null;
-    // Use the writer object...
-  }
-}
-finally
-{
-  stream?.Dispose();
-}
+    class ReadAndWrite
+    {
+        static string[] lines = new string[10];
+
+        static void WriteFile(string fileName)
+        {
+            Stream stream = null;
+            try
+            {
+                stream = new FileStream(fileName, FileMode.OpenOrCreate);
+                using (StreamWriter writer = new StreamWriter(stream))
+                {
+                    stream = null;
+                    foreach (string line in lines)
+                    {
+                        writer.WriteLine(line);
+                    } // end foreach (string line in lines)
+                }
+            }
+            finally
+            {
+                stream?.Dispose();
+            }
+        } // end void WriteFile(string fileName)
 */
+
+/*
+    static void ReadFile(string fileName)
+    {
+        // Read each line of the file into a string array. Each element
+        // of the array is one line of the file.
+        int n = 0;
+        Stream stream = null;
+        try
+        {
+            stream = new FileStream(fileName, FileMode.OpenOrCreate);
+            using (StreamReader reader = new StreamReader(stream))
+            {
+                stream = null;
+                while ((lines[n] = reader.ReadLine()) != null)
+                {
+                    n++;
+                }
+            }
+        }
+        finally
+        {
+            stream?.Dispose();
+        }
+
+        // Display the file contents by using a foreach loop.
+        System.Console.WriteLine("Contents of WriteLines2.txt = ");
+        foreach (string line in lines)
+        {
+            // Use a tab to indent each line of the file.
+            Console.WriteLine(line);
+        }
+    }
+*/


(GH-716) Update ReportGenerator reference from 4.7.0 to 4.7.1

--- Cake.Recipe/Content/toolsettings.cake
+++ Cake.Recipe/Content/toolsettings.cake
@@ -53,7 +53,7 @@
         string nunitTool = "#tool nuget:?package=NUnit.ConsoleRunner&version=3.11.1",
         string nugetTool = "#tool nuget:?package=NuGet.CommandLine&version=5.7.0",
         string openCoverTool = "#tool nuget:?package=OpenCover&version=4.7.922",
-        string reportGeneratorTool = "#tool nuget:?package=ReportGenerator&version=4.7.0",
+        string reportGeneratorTool = "#tool nuget:?package=ReportGenerator&version=4.7.1",
         string reportUnitTool = "#tool nuget:?package=ReportUnit&version=1.2.1",
         string codecovGlobalTool = "#tool dotnet:?package=Codecov.Tool&version=1.12.3",
         string coverallsGlobalTool = "#tool dotnet:?package=coveralls.net&version=1.0.0",


Object static class declarations are now done on top of files for all classes.

--- binder/Generators/C/CSources.cs
+++ binder/Generators/C/CSources.cs
@@ -3,7 +3,8 @@
 using CppSharp.Generators;
 using System.Linq;
 using System.Collections.Generic;
-
+using MonoManagedToNative.Passes;
+
 namespace MonoManagedToNative.Generators
 {
     public class CSources : CTemplate
@@ -47,6 +48,8 @@
             WriteLine("MonoImage* {0}_image;", AssemblyId);
             PopBlock(NewLineKind.BeforeNextBlock);

+            GenerateObjectDeclarations();
+
             GenerateMonoInitialization();
             GenerateAssemblyLoad();

@@ -60,15 +63,26 @@

         public override bool VisitClassDecl(Class @class)
         {
-            PushBlock();
-            WriteLine("static MonoClass* {0}_class = 0;", @class.QualifiedName);
-            PopBlock(NewLineKind.BeforeNextBlock);
-
             GenerateClassLookup(@class);

             VisitDeclContext(@class);

             return true;
+        }
+
+        public void GenerateObjectDeclarations()
+        {
+            var genObjectsPass = new GenerateObjectTypesPass();
+            Unit.Visit(genObjectsPass);
+
+            foreach (var @class in genObjectsPass.Classes)
+            {
+                PushBlock();
+                WriteLine("static MonoClass* {0}_class = 0;", @class.QualifiedName);
+                PopBlock(NewLineKind.Never);
+            }
+
+            NewLine();
         }

         public void GenerateMonoInitialization()


Pass owner login and repo name as paramters

Instead of Repo Id, because the Repository field is null is resulting
Issues.

--- CodeHub/Views/IssueDetailView.xaml.cs
+++ CodeHub/Views/IssueDetailView.xaml.cs
@@ -36,7 +36,7 @@

             if (e.NavigationMode != NavigationMode.Back)
             {
-               await ViewModel.Load((e.Parameter as Tuple<long, Issue>));
+               await ViewModel.Load((e.Parameter as Tuple<string,string, Issue>));
             }
         }
     }


Add test coverage of `AddOnce` with inline delegate

I'm still unsure if this one works every time...

--- osu.Framework.Tests/Threading/SchedulerTest.cs
+++ osu.Framework.Tests/Threading/SchedulerTest.cs
@@ -422,6 +422,23 @@
         private void classAction()
         {
             classInvocations++;
+        }
+
+        [Test]
+        public void TestAddOnceInlineDelegate()
+        {
+            classInvocations = 0;
+
+            for (int i = 0; i < 10; i++)
+                invokeInlineDelegateAction();
+
+            scheduler.Update();
+            Assert.AreEqual(1, classInvocations);
+        }
+
+        private void invokeInlineDelegateAction()
+        {
+            scheduler.AddOnce(() => classInvocations++);
         }

         [Test]


Fix being able to add a size transformation on auto size containers.

--- osu.Framework/Graphics/Containers/Container.cs
+++ osu.Framework/Graphics/Containers/Container.cs
@@ -937,8 +937,7 @@

             set
             {
-                //transform check here is to allow AutoSizeDuration to work below.
-                if ((AutoSizeAxes & Axes.Both) != 0 && !Transforms.Any(t => t is TransformSize))
+                if ((AutoSizeAxes & Axes.Both) != 0)
                     throw new InvalidOperationException("The Size of an AutoSizeContainer should only be manually set if it is relative to its parent.");
                 base.Size = value;
             }
@@ -996,7 +995,7 @@

             if (AutoSizeDuration > 0)
             {
-                ResizeTo(new Vector2(
+                autoSizeResizeTo(new Vector2(
                         (AutoSizeAxes & Axes.X) > 0 ? b.X : base.Width,
                         (AutoSizeAxes & Axes.Y) > 0 ? b.Y : base.Height
                     ), AutoSizeDuration, AutoSizeEasing);
@@ -1027,6 +1026,36 @@
             }
         }

+        private void autoSizeResizeTo(Vector2 newSize, double duration = 0, EasingTypes easing = EasingTypes.None)
+        {
+            TransformTo(Size, newSize, duration, easing, new TransformAutoSize());
+        }
+
+        /// <summary>
+        /// A helper method for <see cref="TransformAutoSize"/> to change the size of auto size containers.
+        /// </summary>
+        /// <param name="newSize"></param>
+        private void setBaseSize(Vector2 newSize)
+        {
+            base.Width = newSize.X;
+            base.Height = newSize.Y;
+        }
+
+        /// <summary>
+        /// A special type of transform which can change the size of auto size containers.
+        /// Used for <see cref="AutoSizeDuration"/>.
+        /// </summary>
+        private class TransformAutoSize : TransformVector
+        {
+            public override void Apply(Drawable d)
+            {
+                base.Apply(d);
+
+                Container c = (Container)d;
+                c.setBaseSize(CurrentValue);
+            }
+        }
+
         #endregion
     }
 }


Fix inverted key descriptions

Fix inverted key descriptions

Co-Authored-By: UselessToucan <7340157e4f6e4a620ee62f5ea11858c06197030a@gmail.com>

--- osu.Framework/Input/Bindings/KeyCombination.cs
+++ osu.Framework/Input/Bindings/KeyCombination.cs
@@ -243,10 +243,10 @@
                     return "Media Play";

                 case InputKey.TrackNext:
+                    return "Media Next";
+
+                case InputKey.TrackPrevious:
                     return "Media Previous";
-
-                case InputKey.TrackPrevious:
-                    return "Media Next";

                 case InputKey.MouseLeft:
                     return "M1";


Adjust horizontal padding

Adjust horizontal padding

--- osu.Game/Overlays/Changelog/ChangelogHeader.cs
+++ osu.Game/Overlays/Changelog/ChangelogHeader.cs
@@ -92,7 +92,7 @@
                     AutoSizeAxes = Axes.Y,
                     Padding = new MarginPadding
                     {
-                        Horizontal = 85,
+                        Horizontal = 65,
                         Vertical = 20
                     },
                     Child = Streams = new UpdateStreamBadgeArea()


--- Confuser.Renamer/BAML/BAMLAnalyzer.cs
+++ Confuser.Renamer/BAML/BAMLAnalyzer.cs
@@ -413,8 +413,17 @@
 						value = strings[((TextWithIdRecord)txt).ValueId].Value;

 					string prefix;
-					TypeSig sig = ResolveType(value.Trim(), out prefix);
-					if (sig != null && context.Modules.Contains((ModuleDefMD)sig.ToBasicTypeDefOrRef().ResolveTypeDefThrow().Module)) {
+
+					TypeSig sig = null;
+
+					//Prevent unhandled exception when BAML strings contain invalid TypeName chars
+					try
+					{
+						sig = ResolveType(value.Trim(), out prefix);
+					}
+					catch(TypeNameParserException) {}
+
+				    if (sig != null && context.Modules.Contains((ModuleDefMD)sig.ToBasicTypeDefOrRef().ResolveTypeDefThrow().Module)) {
 						var reference = new BAMLConverterTypeReference(xmlnsCtx, sig, txt);
 						AddTypeSigReference(sig, reference);
 					}


Refactor

Refactor

--- Core/Game/Projectiles/LSProjectile.cs
+++ Core/Game/Projectiles/LSProjectile.cs
@@ -42,7 +42,7 @@

         private int CountDown;

-        private Vector3d Velocity { get; set; }
+        public Vector3d Velocity { get; private set; }

         private Vector3d Direction { get; set; }


changed version in preparation for next release

--- DbExecutor/Properties/AssemblyInfo.cs
+++ DbExecutor/Properties/AssemblyInfo.cs
@@ -7,4 +7,4 @@
 [assembly: AssemblyTitle("AnglicanGeek.DbExecutor")]
 [assembly: AssemblyDescription("A simple abstraction atop the Dapper extension methods for testability.")]
 [assembly: ComVisible(false)]
-[assembly: AssemblyVersion("0.1.2.0")]
+[assembly: AssemblyVersion("0.2.0.0")]


Added GetElapsedPercent Timer helper

Added GetElapsedPercent Timer helper

--- Assets/Scripts/Runtime/Utility/Timer/Timer.cs
+++ Assets/Scripts/Runtime/Utility/Timer/Timer.cs
@@ -119,7 +119,17 @@
         {
             return Elapsed >= time;
         }
-        #endregion // public
+
+        public float GetElapsedPercent( float duration )
+        {
+            if ( duration > 0f )
+            {
+                return Elapsed / duration;
+            }
+
+            return 0f;
+        }
+        #endregion public

         #region private
         private float m_startTimestamp;
@@ -144,6 +154,6 @@
                 }
             }
         }
-        #endregion // private
+        #endregion private
     }
 }


Post slug to handle UTF-8 encoding

Post slug to handle UTF-8 encoding

--- Blogifier.Core/Extensions/StringExtensions.cs
+++ Blogifier.Core/Extensions/StringExtensions.cs
@@ -46,10 +46,10 @@

 			str = str.ToLowerInvariant();
 			var bytes = Encoding.GetEncoding("utf-8").GetBytes(str);
-			str = Encoding.ASCII.GetString(bytes);
+            str = Encoding.UTF8.GetString(bytes);
 			str = Regex.Replace(str, @"\s", "-", RegexOptions.Compiled);
-			str = Regex.Replace(str, @"[^a-z0-9\s-_]", "", RegexOptions.Compiled);
-			str = str.Trim('-', '_');
+            str = Regex.Replace(str, @"^\w+$", "", RegexOptions.Compiled);
+            str = str.Trim('-', '_');
 			str = Regex.Replace(str, @"([-_]){2,}", "$1", RegexOptions.Compiled);
 			return str;
 		}


Fixed compile bug

Fixed compile bug

--- Dev/release/scripts/export/Default.cs
+++ Dev/release/scripts/export/Default.cs
@@ -65,7 +65,12 @@
         string path = string.Empty;
         float[] mag = new float[1];

-        public bool ShouldBeRemoved { get; private set; } = false;
+        public bool ShouldBeRemoved { get; private set; }
+
+		public Magnification()
+		{
+			ShouldBeRemoved = false;
+		}

         public void Show(string path)
         {


Verify that at least one file was backed up in partial fileset.

--- Duplicati/UnitTest/DisruptionTests.cs
+++ Duplicati/UnitTest/DisruptionTests.cs
@@ -74,6 +74,7 @@
             {
                 IListResults lastResults = c.List("*");
                 string[] partialVersionFiles = lastResults.Files.Select(x => x.Path).Where(x => !Utility.IsFolder(x, File.GetAttributes)).ToArray();
+                Assert.GreaterOrEqual(partialVersionFiles.Length, 1);
                 c.Restore(partialVersionFiles);

                 foreach (string filepath in partialVersionFiles)


Fix Look Forward mode toggle

Fix Look Forward mode toggle

--- Editor/AnimationPathAnimatorEditor.cs
+++ Editor/AnimationPathAnimatorEditor.cs
@@ -86,7 +86,7 @@

             EditorGUILayout.Space();

-            EditorGUILayout.ToggleLeft(
+            lookForwardMode.boolValue = EditorGUILayout.ToggleLeft(
                 new GUIContent(
                     "Look Forward Mode",
                     "Ignore target object and look ahead."),


Fix RotateJerk action test by removing the CCSequence.Copy.

--- tests/tests/classes/tests/ActionsTest/ActionsTest.cs
+++ tests/tests/classes/tests/ActionsTest/ActionsTest.cs
@@ -1174,7 +1174,7 @@
                 new CCRotateTo (0.5f, 20));

             var rep1 = new CCRepeat (seq, 10);
-            var rep2 = new CCRepeatForever ((CCActionInterval)(seq.Copy()));
+            var rep2 = new CCRepeatForever (seq);

             m_tamara.RunAction(rep1);
             m_kathia.RunAction(rep2);


handle all CollectionChanged cases in carousel.

--- src/Avalonia.Controls/Presenters/CarouselPresenter.cs
+++ src/Avalonia.Controls/Presenters/CarouselPresenter.cs
@@ -106,7 +106,6 @@
         /// <inheritdoc/>
         protected override void ItemsChanged(NotifyCollectionChangedEventArgs e)
         {
-            // TODO: Handle items changing.
             switch (e.Action)
             {
                 case NotifyCollectionChangedAction.Remove:
@@ -118,6 +117,35 @@
                     }
                     break;

+                case NotifyCollectionChangedAction.Reset:
+                    if(!IsVirtualized)
+                    {
+                        var generator = ItemContainerGenerator;
+                        var containers = generator.Containers.ToList();
+                        generator.Clear();
+                        Panel.Children.RemoveAll(containers.Select(x => x.ContainerControl));
+                    }
+                    break;
+
+                case NotifyCollectionChangedAction.Add:
+                    Panel.Children.InsertRange(e.NewStartingIndex, e.NewItems.OfType<IControl>());
+                    break;
+
+                case NotifyCollectionChangedAction.Replace:
+                    if (!IsVirtualized)
+                    {
+                        for (var i = 0; i < e.OldItems.Count; ++i)
+                        {
+                            var index = i + e.OldStartingIndex;
+                            var child = (IControl)e.NewItems[i];
+                            Panel.Children[index] = child;
+                        }
+                    }
+                    break;
+
+                case NotifyCollectionChangedAction.Move:
+                    Panel.Children.MoveRange(e.OldStartingIndex, e.OldItems.Count, e.NewStartingIndex);
+                    break;
             }
         }


Fix link to ReportUnit project site

Fix link to ReportUnit project site

--- src/Cake.Common/Tools/ReportUnit/ReportUnitAliases.cs
+++ src/Cake.Common/Tools/ReportUnit/ReportUnitAliases.cs
@@ -10,7 +10,7 @@
 namespace Cake.Common.Tools.ReportUnit
 {
     /// <summary>
-    /// <para>Contains functionality related to <see href="http://relevantcodes.com/reportunit-report-generator/">ReportUnit</see>.</para>
+    /// <para>Contains functionality related to <see href="http://reportunit.relevantcodes.com/">ReportUnit</see>.</para>
     /// <para>
     /// In order to use the commands for this alias, include the following in your build.cake file to download and
     /// install from NuGet.org, or specify the ToolPath within the <see cref="ReportUnitSettings" /> class:
@@ -140,4 +140,4 @@
             runner.Run(inputFile, outputFile, settings);
         }
     }
-}+}


Remove underlying exception in SettingsService. Fixes #48

--- src/Caliburn.Micro.Extensions.WIN8/SettingsService.cs
+++ src/Caliburn.Micro.Extensions.WIN8/SettingsService.cs
@@ -65,7 +65,7 @@
         /// <param name="sender">The sender.</param>
         /// <param name="args">The <see cref="SettingsPaneCommandsRequestedEventArgs" /> instance containing the event data.</param>
         protected virtual void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args) {
-            var settingsCommands = commands.Select((c, i) => new SettingsCommand(i, c.Label, h => OnCommandSelected(c)));
+            var settingsCommands = commands.Select(c => new SettingsCommand(Guid.NewGuid(), c.Label, h => OnCommandSelected(c)));

             settingsCommands.Apply(args.Request.ApplicationCommands.Add);
         }


Add project status filter string as a parameter in Index method, fixed project name length displayed in Index.

--- src/CompetitionPlatform/Controllers/HomeController.cs
+++ src/CompetitionPlatform/Controllers/HomeController.cs
@@ -17,9 +17,12 @@
             _projectRepository = projectRepository;
         }

-        public async Task<IActionResult> Index()
+        public async Task<IActionResult> Index(string projectStatusFilter)
         {
             var projects = await _projectRepository.GetProjectsAsync();
+
+            if (projectStatusFilter != null)
+                projects = projects.Where(x => x.Status.ToString() == projectStatusFilter);

             var compactModels = new List<ProjectCompactViewModel>();

@@ -28,7 +31,7 @@
                 var compactModel = new ProjectCompactViewModel()
                 {
                     Id = project.Id,
-                    Name = project.Name.Length > 35 ? project.Name.Substring(0, 32) + "..." : project.Name,
+                    Name = project.Name.Length > 43 ? project.Name.Substring(0, 40) + "..." : project.Name,
                     Description = project.Description.Length > 500 ? project.Description.Substring(0, 497) + "..." : project.Description,
                     Status = project.Status,
                     BudgetFirstPlace = project.BudgetFirstPlace,


Minor code cleanups.

Minor code cleanups.

--- src/Generator/Generators/CSharp/CSharpTextTemplate.cs
+++ src/Generator/Generators/CSharp/CSharpTextTemplate.cs
@@ -765,7 +765,7 @@
                 };

                 var marshal = new CSharpMarshalNativeToManagedPrinter(ctx);
-                decl.Visit(marshal);
+                decl.CSharpMarshalToManaged(marshal);

                 if (!string.IsNullOrWhiteSpace(marshal.Context.SupportBefore))
                     Write(marshal.Context.SupportBefore);
@@ -777,8 +777,7 @@
                 var @var = decl as Variable;
                 var libSymbol = GetDeclarationLibrarySymbol(@var);

-                var typePrinter = TypePrinter as CSharpTypePrinter;
-                typePrinter.PushContext(CSharpTypePrinterContextKind.Native);
+                TypePrinter.PushContext(CSharpTypePrinterContextKind.Native);

                 var location = string.Format("CppSharp.SymbolResolver.ResolveSymbol(\"{0}\", \"{1}\")",
                     libSymbol.Item1, libSymbol.Item2);
@@ -786,7 +785,7 @@
                 WriteLine("var {0} = ({1}*){2};", Helpers.GeneratedIdentifier("ptr"),
                     @var.Type, location);

-                typePrinter.PopContext();
+                TypePrinter.PopContext();

                 var ctx = new CSharpMarshalContext(Driver)
                 {
@@ -796,7 +795,7 @@
                 };

                 var marshal = new CSharpMarshalNativeToManagedPrinter(ctx);
-                decl.Visit(marshal);
+                decl.CSharpMarshalToManaged(marshal);

                 if (!string.IsNullOrWhiteSpace(marshal.Context.SupportBefore))
                     Write(marshal.Context.SupportBefore);
@@ -1702,7 +1701,7 @@
                 };

                 var marshal = new CSharpMarshalNativeToManagedPrinter(ctx);
-                param.Visit(marshal);
+                param.CSharpMarshalToManaged(marshal);

                 if (!string.IsNullOrWhiteSpace(marshal.Context.SupportBefore))
                     Write(marshal.Context.SupportBefore);
@@ -2090,7 +2089,7 @@
             typePrinter.PushContext(CSharpTypePrinterContextKind.Native);

             var retParam = new Parameter { QualifiedType = function.ReturnType };
-            retType = retParam.CSharpType(typePrinter);
+            var retType = retParam.CSharpType(typePrinter);

             var method = function as Method;
             if (method != null && !method.IsStatic)


updated Confirmation constants

updated Confirmation constants

--- src/IdentityModel.HttpSigning/HttpSigningConstants.cs
+++ src/IdentityModel.HttpSigning/HttpSigningConstants.cs
@@ -36,8 +36,9 @@
             public const string ParameterSeparator = "\n";
         }

-        public class Cnf
+        public class Confirmation
         {
+            public const string ConfirmationProperty = "cnf";
             public const string JwkProperty = "jwk";
         }


Add additional asserts

Add additional asserts

--- src/IntegrationTests/MemberWithSubQueryProjections.cs
+++ src/IntegrationTests/MemberWithSubQueryProjections.cs
@@ -92,6 +92,11 @@
                 var result = resultQuery.Single();

                 result.ShouldNotBeNull();
+
+                result.Name.FirstName.ShouldBe("Bob");
+                result.Name.LastName.ShouldBe("Smith");
+                result.FirstItem.Id.ShouldBe(1);
+                result.FirstItem.Code.ShouldBe(1);
             }
         }
     }


escape JSON specials when sending private message via HipChat

--- src/MvbaCore.ThirdParty/HipChatNotificationService.cs
+++ src/MvbaCore.ThirdParty/HipChatNotificationService.cs
@@ -11,6 +11,7 @@
 using System;
 using System.IO;
 using System.Net;
+using System.Runtime.Serialization.Json;
 using System.Web;

 using MvbaCore.Extensions;
@@ -74,15 +75,16 @@
 				return new Notification<HipChatResult>(Notification.ErrorFor(exception.ToString()));
 			}
 		}
+
 		public Notification<HipChatResult> PrivateMessage(PrivateHipChatMessage hipChatMessage)
 		{
 			try
 			{
 				var content = string.Format(@"{{
-""message"": ""{0}"",
+""message"": {0},
 ""message_format"": ""{1}"",
 ""notify"": ""{2}""
-}}", hipChatMessage.Message.Replace("\"", "\"\""), hipChatMessage.MessageFormat.OrDefault().Key, hipChatMessage.Notify.ToString().ToLower());
+}}", EscapeJsonSpecials(hipChatMessage.Message), hipChatMessage.MessageFormat.OrDefault().Key, hipChatMessage.Notify.ToString().ToLower());
 				var result = _webServiceClient.Post(String.Format(ApiMessageUserUrl, hipChatMessage.To, hipChatMessage.ApiKey), content, "application/json");
 				return JsonUtility.Deserialize<HipChatResult>(result);
 			}
@@ -110,6 +112,16 @@
 			{
 				return new Notification<HipChatResult>(Notification.ErrorFor(exception.ToString()));
 			}
+		}
+
+		private static string EscapeJsonSpecials(string input)
+		{
+			var stream = new MemoryStream();
+			var serializer = new DataContractJsonSerializer(typeof(string));
+			serializer.WriteObject(stream, input);
+			stream.Position = 0;
+			var sr = new StreamReader(stream);
+			return sr.ReadToEnd();
 		}
 	}

@@ -155,6 +167,7 @@
 		public string ApiKey { get; set; }
 		public bool Notify { get; set; }
 	}
+
 	public class PrivateHipChatMessage
 	{
 		public string From { get; set; }


Fix MVC null reference build error (#28941)

--- src/Mvc/Mvc.Core/src/Routing/ActionEndpointFactory.cs
+++ src/Mvc/Mvc.Core/src/Routing/ActionEndpointFactory.cs
@@ -455,7 +455,7 @@
                 }

                 var invoker = invokerFactory.CreateInvoker(actionContext);
-                return invoker.InvokeAsync();
+                return invoker!.InvokeAsync();
             };
         }


ResolveUrlTokens on keep alice path

ResolveUrlTokens on keep alice path

--- src/Mvc/MvcTemplates/N2/Resources/KeepAlive/Pinger.cs
+++ src/Mvc/MvcTemplates/N2/Resources/KeepAlive/Pinger.cs
@@ -40,7 +40,7 @@
                 using (WebClient wc = new WebClient())
                 {
                     wc.Headers["N2KeepAlive"] = "true";
-                    url = url.SetPath(config.Scheduler.KeepAlivePath);
+                    url = url.SetPath(config.Scheduler.KeepAlivePath.ResolveUrlTokens());
                     string response = wc.DownloadString(url);
                     Debug.WriteLine("Ping " + url + ": " + response);
                     logger.Debug("Ping " + url + ": " + response);


Test continue with second constraint

Test continue with second constraint

--- src/NBenchmarker/NBenchmarker.Tests/BenchmarkTests.cs
+++ src/NBenchmarker/NBenchmarker.Tests/BenchmarkTests.cs
@@ -92,5 +92,19 @@
             result.NumberOfIterations = 2;
             Assert.IsFalse(benchmark.ShouldContinue(result));
         }
+
+        [TestMethod]
+        public void ContinueWithSecondsConstraint()
+        {
+            var benchmark = new Benchmark();
+            var result = new BenchmarkResult("");
+            benchmark.AddConstraint(new SecondsConstraint(5));
+
+            result.ElapsedTime = TimeSpan.FromSeconds(4.9);
+            Assert.IsTrue(benchmark.ShouldContinue(result));
+
+            result.ElapsedTime = TimeSpan.FromSeconds(5.0);
+            Assert.IsFalse(benchmark.ShouldContinue(result));
+        }
     }
 }


Only check TypeName for null.

Only check TypeName for null.

--- src/Package/Impl/DataInspect/VariableGridHost.xaml.cs
+++ src/Package/Impl/DataInspect/VariableGridHost.xaml.cs
@@ -54,7 +54,7 @@
         internal void SetEvaluation(VariableViewModel wrapper) {
             VsAppShell.Current.AssertIsOnMainThread();

-            if (wrapper.TypeName == null && wrapper.Value == null) {
+            if (wrapper.TypeName == null) {
                 // the variable should have been removed
                 SetError(string.Format(CultureInfo.InvariantCulture, Package.Resources.VariableGrid_Missing, wrapper.Expression));
             } else if (_evaluation == null


swallow exception as this may cause startup errors and result in application pool crash while trying to create temporary folder, better to ignore than crash

--- src/Serenity.Net.Services/Upload/TempUploadStorage.cs
+++ src/Serenity.Net.Services/Upload/TempUploadStorage.cs
@@ -10,8 +10,17 @@
         {
             if (!Directory.Exists(RootPath))
             {
-                Directory.CreateDirectory(RootPath);
-                File.WriteAllText(Path.Combine(RootPath, ".temporary"), "");
+                try
+                {
+                    Directory.CreateDirectory(RootPath);
+                    File.WriteAllText(Path.Combine(RootPath, ".temporary"), "");
+                }
+                catch
+                {
+                    // swallow exception as this causes startup errors
+                    // and application pool crashes if upload folder
+                    // can't be accessed, better to ignore
+                }
             }
         }


Inspections

Inspections

--- src/SqlPersistence/SqlPersistenceSettingsAttribute.cs
+++ src/SqlPersistence/SqlPersistenceSettingsAttribute.cs
@@ -1,4 +1,5 @@
-namespace NServiceBus.Persistence.Sql
+// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
+namespace NServiceBus.Persistence.Sql
 {
     using System;


Nick - Issue with consultations in default display on showcase

--- src/StockportWebapp/ContentFactory/ShowcaseFactory.cs
+++ src/StockportWebapp/ContentFactory/ShowcaseFactory.cs
@@ -29,7 +29,7 @@
             {
                 fields.Items.Add("Primary Items");
                 fields.Items.Add("Featured Items");
-                fields.Items.Add("Consul  tations");
+                fields.Items.Add("Consultations");
                 fields.Items.Add("Key Facts");
                 fields.Items.Add("News");
                 fields.Items.Add("Events");


Remove Updated and UpdatedBy from ValueList

--- src/Stripe.net/Entities/Radar/ValueLists/ValueList.cs
+++ src/Stripe.net/Entities/Radar/ValueLists/ValueList.cs
@@ -40,12 +40,5 @@

         [JsonProperty("name")]
         public string Name { get; set; }
-
-        [JsonProperty("updated")]
-        [JsonConverter(typeof(DateTimeConverter))]
-        public DateTime Updated { get; set; }
-
-        [JsonProperty("updated_by")]
-        public string UpdatedBy { get; set; }
     }
 }