Update to C# 6 syntax

Update to C# 6 syntax

--- Voyagers.Utilities.ObjectComparer/ObjectComparer.cs
+++ Voyagers.Utilities.ObjectComparer/ObjectComparer.cs
@@ -197,11 +197,11 @@
             //                         Compared => Boolean flag for determining whether we can skip comparisons or not
             IQueryable query1 =
                 enumerable1.AsQueryable()
-                           .GroupBy(String.Format("new ({0})", propertyNames), "it")
+                           .GroupBy($"new ({propertyNames})", "it")
                            .Select("new (it.Key, it.Count() as Count, it as Value, false as Compared)");
             IQueryable query2 =
                 enumerable2.AsQueryable()
-                           .GroupBy(String.Format("new ({0})", propertyNames), "it")
+                           .GroupBy($"new ({propertyNames})", "it")
                            .Select("new (it.Key, it.Count() as Count, it as Value, false as Compared)");

             // Make sure if query1 contains more items than query2, or vice versa, can be detected
@@ -259,7 +259,7 @@
             {
                 yield return
                     new ObjectVariance(
-                        String.Format("{0}.Count()", parentVariance != null ? parentVariance.PropertyName : "this"),
+                        $"{(parentVariance != null ? parentVariance.PropertyName : "this")}.Count()",
                         value1List.Count,
                         value2List.Count,
                         parentVariance);
@@ -273,7 +273,7 @@
             {
                 // Optional key object used in here since GetEnumerableVariancesByKey will eventually route to here
                 // propertyName will be assigned "this[i]" when comparing by position or key.ToString() when comparing by key
-                string propertyName = key == null ? String.Format("this[{0}]", i) : key.ToString();
+                string propertyName = key?.ToString() ?? $"this[{i}]";

                 if (AreObjectsTraversed(value1List[i], value2List[i]))
                 {
@@ -342,13 +342,13 @@
             // ReferenceEquals instead of == because == may be overridden
             if (ReferenceEquals(object1, null))
             {
-                throw new ArgumentNullException("object1");
+                throw new ArgumentNullException(nameof(object1));
             }

             // ReferenceEquals instead of == because == may be overridden
             if (ReferenceEquals(object2, null))
             {
-                throw new ArgumentNullException("object2");
+                throw new ArgumentNullException(nameof(object2));
             }

             IEnumerable<PropertyInfo> object1PropertyInfos = ReflectionHelper.GetPropertyInfos(object1.GetType());


Core.AI: QuiescenceSearch is now async

Core.AI: QuiescenceSearch is now async

--- Mzinga.Core/AI/GameAI.cs
+++ Mzinga.Core/AI/GameAI.cs
@@ -498,7 +498,7 @@

         #region QuiescenceSearch

-        private double QuiescenceSearch(GameBoard gameBoard, double alpha, double beta, int color)
+        private async Task<double?> QuiescenceSearchAsync(GameBoard gameBoard, double alpha, double beta, int color, CancellationToken token)
         {
             double standPat = color * CalculateBoardScore(gameBoard);

@@ -513,17 +513,27 @@

             foreach (Move move in GetNoisyMoves(gameBoard))
             {
+                if (token.IsCancellationRequested)
+                {
+                    return null;
+                }
+
                 gameBoard.TrustedPlay(move);
-                double score = -1.0 * QuiescenceSearch(gameBoard, -beta, -alpha, -color);
+                double? value = -1 * await QuiescenceSearchAsync(gameBoard, -beta, -alpha, -color, token);
                 gameBoard.UndoLastMove();

-                if (score >= beta)
+                if (!value.HasValue)
+                {
+                    return null;
+                }
+
+                if (value >= beta)
                 {
                     return beta;
                 }
-                else if (score > alpha)
-                {
-                    alpha = score;
+                else if (value > alpha)
+                {
+                    alpha = value.Value;
                 }
             }


Use NotSupportedException as these operations will never be operational

--- ISP/Vehicles.cs
+++ ISP/Vehicles.cs
@@ -51,22 +51,22 @@

         public void TurnOnRadio()
         {
-            throw new System.NotImplementedException("I don't have a radio - I'm a motorcycle!");
+            throw new System.NotSupportedException("I don't have a radio - I'm a motorcycle!");
         }

         public void TurnOffRadio()
         {
-            throw new System.NotImplementedException("I don't have a radio - I'm a motorcycle!");
+            throw new System.NotSupportedException("I don't have a radio - I'm a motorcycle!");
         }

         public void OpenSunRoof(int percentOpen)
         {
-            throw new System.NotImplementedException("I don't have a Sunroof - I'm a motorcycle!");
+            throw new System.NotSupportedException("I don't have a Sunroof - I'm a motorcycle!");
         }

         public void CloseSunRoof()
         {
-            throw new System.NotImplementedException("I don't have a Sunroof - I'm a motorcycle!");
+            throw new System.NotSupportedException("I don't have a Sunroof - I'm a motorcycle!");
         }
     }

@@ -100,12 +100,12 @@

         public void OpenSunRoof(int percentOpen)
         {
-            throw new System.NotImplementedException("I don't have a Sunroof - It was an optional extra and you didn't shell out for it!");
+            throw new System.NotSupportedException("I don't have a Sunroof - It was an optional extra and you didn't shell out for it!");
         }

         public void CloseSunRoof()
         {
-            throw new System.NotImplementedException("I don't have a Sunroof - It was an optional extra and you didn't shell out for it!");
+            throw new System.NotSupportedException("I don't have a Sunroof - It was an optional extra and you didn't shell out for it!");
         }
     }
 }


Bump version

Bump version

--- RockSniffer/Program.cs
+++ RockSniffer/Program.cs
@@ -23,7 +23,7 @@
 {
     class Program
     {
-        internal const string version = "0.3.1";
+        internal const string version = "0.3.2_PR1";

         internal static ICache cache;
         internal static Config config;


ニトロを設定可能にした

ニトロを設定可能にした

--- Inferno/InfernoScripts/Player/PlayerVehicleNitro.cs
+++ Inferno/InfernoScripts/Player/PlayerVehicleNitro.cs
@@ -4,6 +4,7 @@
 using System;
 using System.Collections.Generic;
 using System.Drawing;
+using Inferno.Utilities;
 using UniRx;

 namespace Inferno
@@ -13,12 +14,36 @@
     /// </summary>
     public class PlayerVehicleNitro : InfernoScript
     {
+
+        class PlayerNitroConf : InfernoConfig
+        {
+            public float StarightAccelerationSpeed { get; set; } = 50;
+            public float JumpAccelerationSpeed { get; set; } = 20;
+            public float CoolDownSeconds { get; set; } = 10.0f;
+
+            public override bool Validate()
+            {
+                if (CoolDownSeconds <= 0) return false;
+                return true;
+            }
+        }
+
+        protected override string ConfigFileName { get; } = "PlayerNitro.conf";
+
+        private PlayerNitroConf conf;
+
         private bool _isNitroOk = true;

         protected override int TickInterval => 50;

+        private float StarightAccelerationSpeed => conf?.StarightAccelerationSpeed ?? 50;
+        private float JumpAccelerationSpeed => conf?.JumpAccelerationSpeed ?? 20;
+        private float CoolDownSeconds => conf?.CoolDownSeconds ?? 10.0f;
+
         protected override void Setup()
         {
+            conf = LoadConfig<PlayerNitroConf>();
+
             IsActive = true;
             OnTickAsObservable
                 .Where(
@@ -49,12 +74,11 @@
                 rotation = this.GetStickValue().Y / 250.0f;
             }

-            if (Game.Player.WantedLevel == 0)
-            {
-                vehicle.Quaternion = Quaternion.RotationAxis(vehicle.RightVector, rotation) * vehicle.Quaternion;
-            }
+
+            vehicle.Quaternion = Quaternion.RotationAxis(vehicle.RightVector, rotation) * vehicle.Quaternion;
+
             var deadZone = 0.25f;
-            var addSpeed = ((rotation > deadZone || rotation < -deadZone) ? 20.0f : 50.0f);
+            var addSpeed = ((rotation > deadZone || rotation < -deadZone) ? JumpAccelerationSpeed : StarightAccelerationSpeed);
             if (this.IsGamePadPressed(GameKey.VehicleHorn))
             {
                 vehicle.Speed -= addSpeed;
@@ -67,17 +91,7 @@
             NitroAction(driver, vehicle);
         }

-        private void ChangeDirverAndVehicleState(Ped driver, Vehicle vehicle, bool isInvincible)
-        {
-            if (driver.IsSafeExist())
-            {
-                driver.IsInvincible = isInvincible;
-            }
-            if (vehicle.IsSafeExist())
-            {
-                vehicle.IsInvincible = isInvincible;
-            }
-        }
+

         /// <summary>
         /// ニトロ処理
@@ -85,8 +99,6 @@
         private void NitroAction(Ped driver, Vehicle vehicle)
         {
             _isNitroOk = false;
-
-            ChangeDirverAndVehicleState(driver, vehicle, true);

             Function.Call(Hash.ADD_EXPLOSION, new InputArgument[]
             {
@@ -106,7 +118,7 @@
         private IEnumerable<Object> NitroAfterTreatment(Ped driver, Vehicle vehicle)
         {
             //カウンタ作成
-            var counter = new ReduceCounter(10000);
+            var counter = new ReduceCounter((int)(CoolDownSeconds * 1000));
             //カウンタを描画
             RegisterProgressBar(
                 new ProgressBarData(counter, new Point(0, 30),
@@ -117,26 +129,7 @@
             //カウンタを自動カウント
             RegisterCounter(counter);

-            //3秒まつ
-
-            foreach (var s in WaitForSeconds(3))
-            {
-                if (!PlayerPed.IsInVehicle() || PlayerPed.IsDead)
-                {
-                    //死んだりクルマから降りたらリセット
-                    counter.Finish();
-                    _isNitroOk = true;
-                    ChangeDirverAndVehicleState(driver, vehicle, false);
-                    yield break;
-                }
-                yield return s;
-            }
-
-            ChangeDirverAndVehicleState(driver, vehicle, false);
-
-            //７秒まつ
-
-            foreach (var s in WaitForSeconds(7))
+            foreach (var s in WaitForSeconds(CoolDownSeconds))
             {
                 if (!PlayerPed.IsInVehicle() || PlayerPed.IsDead)
                 {


update

update

--- Infrastructure/CSharpGL.TestHelpers/OpenGLHelper.cs
+++ Infrastructure/CSharpGL.TestHelpers/OpenGLHelper.cs
@@ -40,8 +40,7 @@
                        select item;
             foreach (var item in list)
             {
-                builder.AppendLine(string.Format("    {0};",
-                    item));
+                builder.AppendLine(string.Format("    {0};", item));
             }
             builder.Append(("}"));
             System.IO.File.WriteAllText("OpenGL.methods.cs", builder.ToString());
@@ -59,8 +58,7 @@
                        select item;
             foreach (var item in list)
             {
-                builder.AppendLine(string.Format("    {0};",
-                    item));
+                builder.AppendLine(string.Format("    {0};", item));
             }
             builder.Append(("}"));
             System.IO.File.WriteAllText("OpenGL.delegates.cs", builder.ToString());


Bug rectif

Bug rectif

--- JediTournamentWPF/ViewModel/Stade/StadeViewModel.cs
+++ JediTournamentWPF/ViewModel/Stade/StadeViewModel.cs
@@ -68,7 +68,7 @@
             {
                 if (value == m_stades.NbPlaces) return;
                 m_stades.NbPlaces = value;
-                OnPropertyChanged("Nombre de places");
+                OnPropertyChanged("NbPlaces");
             }
         }
     }


DEL-1192 Change API endpoint for taxonomies

--- KenticoCloud.Delivery/DeliveryEndpointUrlBuilder.cs
+++ KenticoCloud.Delivery/DeliveryEndpointUrlBuilder.cs
@@ -11,8 +11,8 @@
         private const string URL_TEMPLATE_TYPE = "/types/{0}";
         private const string URL_TEMPLATE_TYPES = "/types";
         private const string URL_TEMPLATE_ELEMENT = "/types/{0}/elements/{1}";
-        private const string URL_TEMPLATE_TAXONOMY = "/taxonomy/{0}";
-        private const string URL_TEMPLATE_TAXONOMIES = "/taxonomy";
+        private const string URL_TEMPLATE_TAXONOMY = "/taxonomies/{0}";
+        private const string URL_TEMPLATE_TAXONOMIES = "/taxonomies";

         private readonly DeliveryOptions _deliveryOptions;


Changed emissiveFactor to Vector3 from Vector4 (based on spec)

--- Source/GLTFWrapper.cs
+++ Source/GLTFWrapper.cs
@@ -597,13 +597,16 @@
             /// <summary>
             /// Contains scaling factors for the "red", "green" and "blue" components of the emissive texture
             /// </summary>
-            public Vector4? emissiveFactor;
+            public Vector3? emissiveFactor;

             /// <summary>
             /// Specifies whether the material is double sided
             /// </summary>
             public bool? doubleSided;

+            /// <summary>
+            /// The alpha rendering mode of the material
+            /// </summary>
             public Material.AlphaModeEnum? alphaMode;
             /// <summary>
             /// The alpha cutoff value of the material
@@ -703,8 +706,7 @@
     				{
         				emissiveFactor.Value.x,
         				emissiveFactor.Value.y,
-        				emissiveFactor.Value.z,
-        				emissiveFactor.Value.w
+        				emissiveFactor.Value.z
         			};

                 }


Added def ctor.

Added def ctor.

--- Source/Linq/TableT.cs
+++ Source/Linq/TableT.cs
@@ -20,6 +20,14 @@
 			Init(dataContext == null ? null : new DataContextInfo(dataContext), expression);
 		}

+#if !SILVERLIGHT
+
+		public Table()
+		{
+			Init(null, null);
+		}
+
+#endif
 		public string DatabaseName;
 		public string SchemaName;
 		public string TableName;


[Refactor] ReqIFHeader readxml and writexml to internal methods

--- ReqIFSharp/ReqIFHeader.cs
+++ ReqIFSharp/ReqIFHeader.cs
@@ -115,7 +115,7 @@
         /// <param name="reader">
         /// an instance of <see cref="XmlReader"/>
         /// </param>
-        public void ReadXml(XmlReader reader)
+        internal void ReadXml(XmlReader reader)
         {
             while (reader.Read())
             {
@@ -161,7 +161,7 @@
         /// <param name="token">
         /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
         /// </param>
-        public async Task ReadXmlAsync(XmlReader reader, CancellationToken token)
+        internal async Task ReadXmlAsync(XmlReader reader, CancellationToken token)
         {
             while (await reader.ReadAsync())
             {
@@ -209,7 +209,7 @@
         /// <param name="writer">
         /// an instance of <see cref="XmlWriter"/>
         /// </param>
-        public void WriteXml(XmlWriter writer)
+        internal void WriteXml(XmlWriter writer)
         {
             writer.WriteAttributeString("IDENTIFIER", this.Identifier);

@@ -240,7 +240,7 @@
         /// <param name="token">
         /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
         /// </param>
-        public async Task WriteXmlAsync(XmlWriter writer, CancellationToken token)
+        internal async Task WriteXmlAsync(XmlWriter writer, CancellationToken token)
         {
             if (token.IsCancellationRequested)
             {


Updated

Updated

--- Commands/Files/AddFile.cs
+++ Commands/Files/AddFile.cs
@@ -215,9 +215,6 @@
             if (Approve)
                 SelectedWeb.ApproveFile(fileUrl, ApproveComment);

-            var listitem = file.EnsureProperty(f => f.ListItemAllFields);
-            var parentList = listitem.EnsureProperty(f => f.ParentList);
-            var rootFolder = parentList.EnsureProperty(f => f.RootFolder);
             WriteObject(file);
         }
     }


Modify controls

Modify controls

--- CompositionTetris/Game.cs
+++ CompositionTetris/Game.cs
@@ -61,17 +61,29 @@
             var isSpaceDownThisFrame = IsKeyDown(VirtualKey.Space);
             var isLeftDownThisFrame = IsKeyDown(VirtualKey.Left);
             var isRightDownThisFrame = IsKeyDown(VirtualKey.Right);
+            var isUpDownThisFrame = IsKeyDown(VirtualKey.Up);
+            var isDownDownThisFrame = IsKeyDown(VirtualKey.Down);

             if (_activeTiles != null)
             {
-                if (_wasSpaceDownLastFrame && !isSpaceDownThisFrame)
+                int dx = 0;
+                int dy = 0;
+
+                if (_wasUpDownLastFrame && !isUpDownThisFrame)
                 {
                     tilesToDrop = _boardHeight;
                     _secondsSinceLastDrop = 0;
                 }

-                int dx = 0;
-                int dy = 0;
+                if (_wasSpaceDownLastFrame && !isSpaceDownThisFrame)
+                {
+
+                }
+
+                if (_wasDownDowmLastFrame && !isDownDownThisFrame)
+                {
+                    dy = 1;
+                }

                 if (_wasLeftDownLastFrame && !isLeftDownThisFrame)
                 {
@@ -84,6 +96,7 @@
                 }

                 TryMoveActivePiece(dx, 0);
+                TryMoveActivePiece(0, dy);

                 if (tilesToDrop > 0)
                 {
@@ -117,6 +130,8 @@
             _wasSpaceDownLastFrame = isSpaceDownThisFrame;
             _wasLeftDownLastFrame = isLeftDownThisFrame;
             _wasRightDownLastFrame = isRightDownThisFrame;
+            _wasUpDownLastFrame = isUpDownThisFrame;
+            _wasDownDowmLastFrame = isDownDownThisFrame;
             return false;
         }

@@ -344,6 +359,8 @@
         private bool _wasSpaceDownLastFrame;
         private bool _wasLeftDownLastFrame;
         private bool _wasRightDownLastFrame;
+        private bool _wasUpDownLastFrame;
+        private bool _wasDownDowmLastFrame;

         private static Random s_random = new Random();
         private static TilePosition[] SPieceTemplate =


Use UTF-8 console input in ConsoleTestApp.

--- ConsoleTestApp/Program.cs
+++ ConsoleTestApp/Program.cs
@@ -1,6 +1,7 @@
 using System;
 using System.IO;
 using System.Reflection;
+using System.Text;
 using System.Threading.Tasks;
 using System.Threading.Tasks.Dataflow;
 using JsonRpc.Dataflow;
@@ -23,6 +24,7 @@

         static void Main(string[] args)
         {
+            Console.OutputEncoding = Encoding.UTF8;
             // Here we use two buffers to simulate the console I/O
             var serverBuffer = new BufferBlock<Message>();      // server --> client
             var clientBuffer = new BufferBlock<Message>();      // client --> server


Update

Update

--- Runtime/Data/DataTypes.cs
+++ Runtime/Data/DataTypes.cs
@@ -1,6 +1,7 @@
-//  Project : game.metro
+//  Project : ecs
 // Contacts : Pix - ask@pixeye.games

+#if ODIN_INSPECTOR
 using System;
 using Sirenix.OdinInspector;
 using UnityEngine;
@@ -14,4 +15,5 @@
 		public Type[] allTypes = new Type[0];

 	}
-}+}
+#endif


[Samples] Fix validation as shaders use ShaderClipDistance

--- Samples/MiniTri/Sample.cs
+++ Samples/MiniTri/Sample.cs
@@ -204,13 +204,19 @@
                 fixed (void* enabledLayerNamesPointer = &enabledLayerNames[0])
                 fixed (void* enabledExtensionNamesPointer = &enabledExtensionNames[0])
                 {
+                    var enabledFeatures = new PhysicalDeviceFeatures
+                    {
+                        ShaderClipDistance = true,
+                    };
+
                     var deviceCreateInfo = new DeviceCreateInfo
                     {
                         StructureType = StructureType.DeviceCreateInfo,
                         QueueCreateInfoCount = 1,
                         QueueCreateInfos = new IntPtr(&queueCreateInfo),
                         EnabledExtensionCount = (uint)enabledExtensionNames.Length,
-                        EnabledExtensionNames = new IntPtr(enabledExtensionNamesPointer)
+                        EnabledExtensionNames = new IntPtr(enabledExtensionNamesPointer),
+                        EnabledFeatures = new IntPtr(&enabledFeatures)
                     };

                     if (validate)


Split by word casing - 100/100 in judge.

--- Lists_Lab/E4.SplitByWordCasing/SplitByWordCasing.cs
+++ Lists_Lab/E4.SplitByWordCasing/SplitByWordCasing.cs
@@ -8,7 +8,7 @@
     {
         String inputText = Console.ReadLine();
         string[] words = inputText
-                            .Split(new char[] { ',', '.', ';', ':', '!', '(', ')', '"', '\'', '\\', '/', '[', ']', ' '});
+                            .Split(new char[] { ',', '.', ';', ':', '!', '(', ')', '"', '\'', '\\', '/', '[', ']', ' '}, StringSplitOptions.RemoveEmptyEntries);

         List<string> lowerCase = new List<string>();
         List<string> upperCase = new List<string>();
@@ -19,11 +19,13 @@
             string upCase = words[i].ToUpper();
             string lowCase = words[i].ToLower();

-            if (words[i].Equals(upCase))
+            //check if the word is the same as the same word, but upper Case
+            if (words[i].Equals(upCase) && !CheckForSymbols(words[i]))
             {
                 upperCase.Add(words[i]);
             }
-            else if (words[i].Equals(lowCase))
+            //check if the word is the same as the same word, but lower Case
+            else if (words[i].Equals(lowCase) && !CheckForSymbols(words[i]))
             {
                 lowerCase.Add(words[i]);
             }
@@ -32,20 +34,21 @@
                 mixedCase.Add(words[i]);
             }
         }
+        Console.WriteLine();

-        Console.Write("Lower case : ");
+        Console.Write("Lower-case: ");
         Console.WriteLine(string.Join(", ", lowerCase));
         //foreach (var word in lowerCase)
         //{
         //    Console.WriteLine(string.Join(" , ", word));
         //}
-        Console.Write("Mixed case : ");
+        Console.Write("Mixed-case: ");
         Console.WriteLine(string.Join(", ", mixedCase));
         //foreach (var word in mixedCase)
         //{
         //    Console.WriteLine(string.Join(" , ", word));
         //}
-        Console.Write("Upper case : ");
+        Console.Write("Upper-case: ");
         Console.WriteLine(string.Join(", ", upperCase));
         //foreach (var word in upperCase)
         //{
@@ -53,4 +56,25 @@
         //}

     }
+
+    /// <summary>
+    /// Returns true if there is a special symbol.
+    /// Checks only for symbols less than 65 in the ascii table
+    /// cuase all other symbols are used for split.
+    /// </summary>
+    /// <param name="word"></param>
+    /// <returns></returns>
+    private static bool CheckForSymbols(string word)
+    {
+        char[] symbols = word.ToCharArray();
+        for (int i = 0; i < word.Length; i++)
+        {
+            if ((int) symbols[i] < 65)
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
 }


Removed events that no longer exist

Removed events that no longer exist

--- LiveSplit/LiveSplit.View/View/TimerForm.Designer.cs
+++ LiveSplit/LiveSplit.View/View/TimerForm.Designer.cs
@@ -102,7 +102,6 @@
             this.openSplitsMenuItem.Name = "openSplitsMenuItem";
             this.openSplitsMenuItem.Size = new System.Drawing.Size(166, 22);
             this.openSplitsMenuItem.Text = "Open Splits";
-            this.openSplitsMenuItem.Click += new System.EventHandler(this.openSplitsMenuItem_Click);
             //
             // saveSplitsMenuItem
             //
@@ -180,7 +179,6 @@
             this.openLayoutMenuItem.Name = "openLayoutMenuItem";
             this.openLayoutMenuItem.Size = new System.Drawing.Size(166, 22);
             this.openLayoutMenuItem.Text = "Open Layout";
-            this.openLayoutMenuItem.Click += new System.EventHandler(this.openLayoutMenuItem_Click);
             //
             // saveLayoutMenuItem
             //


Adressed a Code Analysis warning

Adressed a Code Analysis warning

by explicitly supplying a format provider to string.Format.

--- Src/Exude/TestCase.cs
+++ Src/Exude/TestCase.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using System.Text;
 using Xunit.Sdk;
@@ -205,6 +206,7 @@
             if (!(testClass is T))
                 throw new ArgumentException(
                     string.Format(
+                        CultureInfo.CurrentCulture,
                         "The supplied testClass instance isn't compatible with the generic parameter of this TestCase<{0}>. The instance type was {1}, but should have been convertible to {0}.",
                         typeof(T),
                         testClass.GetType()),


Used 'var' keyword.

Used 'var' keyword.

--- Src/Fare/StatePair.cs
+++ Src/Fare/StatePair.cs
@@ -176,7 +176,7 @@
         {
             unchecked
             {
-                int result = 0;
+                var result = 0;
                 result = (result * 397) ^ (this.FirstState != null ? this.FirstState.GetHashCode() : 0);
                 result = (result * 397) ^ (this.SecondState != null ? this.SecondState.GetHashCode() : 0);
                 return result;


@の記号はcontext名と被るので念のため変更

@の記号はcontext名と被るので念のため変更

--- Sdx.Db/Query/ResultSet.cs
+++ Sdx.Db/Query/ResultSet.cs
@@ -46,7 +46,7 @@
       pkeys.ForEach(column => {
         if (key != "")
         {
-          key += "@SDX_UNIQUE@";
+          key += "%%SDX%%";
         }

         key += row[column + "@" + contextName];


Tighten condition for using new device.

Tighten condition for using new device.

--- Settings/DeviceSection.cs
+++ Settings/DeviceSection.cs
@@ -373,7 +373,7 @@
 		private void HandleSelectClick(object sender, EventArgs e)
 		{
 			var vud = Settings; // Plugin.GetActiveViewportSettings();
-			if (vud != null && RcCore.It.EngineSettings.AllowSelectedDeviceOverride)
+			if (!m_for_app && vud != null && RcCore.It.EngineSettings.AllowSelectedDeviceOverride)
 			{
 				//RcCore.It.EngineSettings.SelectedDeviceStr = vud.SelectedDeviceStr;
 				Rhino.RhinoApp.RunScript("_-SetDisplayMode Wireframe Enter _-SetDisplayMode Raytraced Enter", false);


Removed disabled GetAccessToken test

Removed disabled GetAccessToken test

--- SlackAPI.Tests/Connect.cs
+++ SlackAPI.Tests/Connect.cs
@@ -22,41 +22,6 @@
         {
             var client = this.fixture.UserClient;
             Assert.True(client.IsConnected, "Invalid, doesn't think it's connected.");
-        }
-
-        [Fact(Skip = "Unable to get a working test with data we have in config.json")]
-        public void TestGetAccessToken()
-        {
-            // assemble
-            var clientId = this.fixture.Config.ClientId;
-            var clientSecret = this.fixture.Config.ClientSecret;
-            var authCode = this.fixture.Config.AuthCode;
-
-            // act
-            var accessTokenResponse = GetAccessToken(clientId, clientSecret, "", authCode);
-
-            // assert
-            Assert.NotNull(accessTokenResponse);
-            Assert.NotNull(accessTokenResponse.bot);
-            Assert.NotNull(accessTokenResponse.bot.bot_user_id);
-            Assert.NotNull(accessTokenResponse.bot.bot_access_token);
-        }
-
-        private AccessTokenResponse GetAccessToken(string clientId, string clientSecret, string redirectUri, string authCode)
-        {
-            AccessTokenResponse accessTokenResponse = null;
-
-            using (var sync = new InSync(nameof(SlackClient.GetAccessToken)))
-            {
-                SlackClient.GetAccessToken(response =>
-                {
-                    accessTokenResponse = response;
-                    sync.Proceed();
-
-                }, clientId, clientSecret, redirectUri, authCode);
-            }
-
-            return accessTokenResponse;
         }

         [Fact]


Fixed fullscren resolution.

Fixed fullscren resolution.

--- mugo/Program.cs
+++ mugo/Program.cs
@@ -77,7 +77,7 @@
 		private int distanceCounter;

 		public MugoGame()
-			: base(2560, 1440, new GraphicsMode(32, 24, 8, 2), "", GameWindowFlags.Default, DisplayDevice.Default, 3, 3, GraphicsContextFlags.Default)
+			: base(800, 600, new GraphicsMode(32, 24, 8, 2), "", GameWindowFlags.Default, DisplayDevice.Default, 3, 3, GraphicsContextFlags.Default)
 		{
 		}

@@ -86,7 +86,9 @@
 			base.OnLoad(e);

 			Camera.Init();
-			Camera.SetWidthHeightFov(800, 600, currentFov);
+            WindowState = WindowState.Fullscreen;
+            Camera.SetWidthHeightFov(Width, Height, currentFov);
+

             player = new PlayerModel();


delete extra shape class

delete extra shape class

turns out it was almost empty

--- neon2d/Shape.cs
+++ neon2d/Shape.cs
@@ -1,8 +0,0 @@
-using System;
-
-public class Class1
-{
-	public Class1()
-	{
-	}
-}


refactor

refactor

--- Stove.Demo/Program.cs
+++ Stove.Demo/Program.cs
@@ -31,7 +31,7 @@
                                                .UseNLog()
                                                .RegisterServices(r => r.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly()))
                                                .CreateResolver();
-            var a = new AnimalStoveDbContext();
+
             var someDomainService = resolver.Resolve<SomeDomainService>();
             someDomainService.DoSomeStuff();
         }


Fix creation of Domain

Fix creation of Domain

--- PublicSuffix/Domain.cs
+++ PublicSuffix/Domain.cs
@@ -10,7 +10,7 @@
         public Domain(string publicSuffix, string domain, string subdomain)
         {
             PublicSuffix = publicSuffix ?? throw new ArgumentNullException(nameof(publicSuffix));
-            var registrableDomain = string.IsNullOrEmpty(_domain) ? null : domain + "." + publicSuffix;
+            var registrableDomain = string.IsNullOrEmpty(domain) ? null : domain + "." + publicSuffix;
             _domain = domain;
             Subdomain = subdomain;
             RegistrableDomain = registrableDomain;


Modified parser to fix errors with re-rolls

--- RollDice/DiceParser.cs
+++ RollDice/DiceParser.cs
@@ -190,25 +190,25 @@
             {
                 TokenString = "x",
                 Associativity = AssociativityTypes.Left,
+                Precedence = 7,
+                RequiredValues = 1,
+                IsFunction = false
+            };
+            TokenList.Add(rollXToken);
+            Token rollRToken = new Token
+            {
+                TokenString = "r",
+                Associativity = AssociativityTypes.Left,
                 Precedence = 6,
                 RequiredValues = 1,
                 IsFunction = false
             };
-            TokenList.Add(rollXToken);
-            Token rollRToken = new Token
-            {
-                TokenString = "r",
-                Associativity = AssociativityTypes.Left,
-                Precedence = 6,
-                RequiredValues = 1,
-                IsFunction = false
-            };
             TokenList.Add(rollRToken);
             Token rollPToken = new Token
             {
                 TokenString = "p",
                 Associativity = AssociativityTypes.Left,
-                Precedence = 6,
+                Precedence = 7,
                 RequiredValues = 1,
                 IsFunction = false
             };
@@ -371,11 +371,10 @@
         public List<TraceItem> GetResults(string inputString)
         {
             List<TraceItem> results = new List<TraceItem>();
-            Queue<string> RPN = GetRPN(inputString);
+            LinkedList<string> RPN = GetRPN(inputString);
             Stack<string> TheStack = new Stack<string>();

             int x = 0;
-            int r = 0;
             int p = 0;

             TraceItem tStart = new TraceItem();
@@ -394,7 +393,8 @@
             {
                 TraceItem t = new TraceItem();

-                string nextToken = RPN.Dequeue();
+                string nextToken = RPN.First();
+                RPN.RemoveFirst();

                 double tryInt;

@@ -449,28 +449,45 @@
                             case "g":
                                 int num = (int)Math.Ceiling(double.Parse(rStack.Pop()));
                                 int type = (int)Math.Ceiling(double.Parse(rStack.Pop()));
-                                int rep = r;
-                                do
-                                {
-                                    t.Roll = (SimpleRoll(num, type, nextToken[0], x, p));
-                                    TheStack.Push((t.Roll.Value.total).ToString());
-
-                                    if (rep != r)
-                                    {
-                                        TheStack.Push((double.Parse(TheStack.Pop()) + double.Parse(TheStack.Pop())).ToString());
-                                    }
-
-                                    rep--;
-                                } while (rep >= 0);
+                                t.Roll = (SimpleRoll(num, type, nextToken[0], x, p));
+                                TheStack.Push((t.Roll.Value.total).ToString());
                                 x = 0;
-                                r = 0;
                                 p = 0;
                                 break;
                             case "x":
                                 x = (int)Math.Ceiling(double.Parse(rStack.Pop()));
                                 break;
                             case "r":
-                                r = (int)Math.Ceiling(double.Parse(rStack.Pop()));
+                                int r = (int)Math.Ceiling(double.Parse(rStack.Pop()));
+
+                                string rollX = TheStack.Pop();
+                                string rollY = TheStack.Pop();
+                                string rollZ = RPN.First();
+                                RPN.RemoveFirst();
+
+                                int i;
+
+                                for(i = 0; i < r; i++)
+                                {
+                                    RPN.AddFirst("+");
+                                }
+
+                                for (i = 0; i <= r; i++)
+                                {
+                                    if(x > 0)
+                                    {
+                                        RPN.AddFirst("x");
+                                        RPN.AddFirst(x.ToString());
+                                    }
+                                    if(p > 0)
+                                    {
+                                        RPN.AddFirst("p");
+                                        RPN.AddFirst(p.ToString());
+                                    }
+                                    RPN.AddFirst(rollZ);
+                                    RPN.AddFirst(rollX);
+                                    RPN.AddFirst(rollY);
+                                }
                                 break;
                             case "p":
                                 p = (int)Math.Ceiling(double.Parse(rStack.Pop()));
@@ -504,10 +521,10 @@
             return (results);
         }

-        private Queue<string> GetRPN(string inputString)
+        private LinkedList<string> GetRPN(string inputString)
         {
             TokenParser tokens = new TokenParser(inputString);
-            Queue<string> Output = new Queue<string>();
+            LinkedList<string> Output = new LinkedList<string>();
             Stack<string> OperatorStack = new Stack<string>();

             for (string token = tokens.GetNextToken(); token != null; token = tokens.GetNextToken())
@@ -518,7 +535,7 @@
                 {
                     if (double.TryParse(token, out throwaway))
                     {
-                        Output.Enqueue(token);
+                        Output.AddLast(token);
                     }
                     else if (IsFunction(token))
                     {
@@ -532,7 +549,7 @@
                             {
                                 throw new FormatException();
                             }
-                            Output.Enqueue(OperatorStack.Pop());
+                            Output.AddLast(OperatorStack.Pop());
                         }
                     }
                     else if (IsOpToken(token))
@@ -546,7 +563,7 @@
                                 || ((GetTokenFromString(token).Associativity == AssociativityTypes.Right)
                                 && (GetPrecedence(token) < GetPrecedence(OperatorStack.Peek())))))
                             {
-                                Output.Enqueue(OperatorStack.Pop());
+                                Output.AddLast(OperatorStack.Pop());
                             }
                         }
                         OperatorStack.Push(token);
@@ -563,7 +580,7 @@
                             {
                                 throw new FormatException();
                             }
-                            Output.Enqueue(OperatorStack.Pop());
+                            Output.AddLast(OperatorStack.Pop());
                         }

                         OperatorStack.Pop();
@@ -572,7 +589,7 @@
                         {
                             if (IsFunction(OperatorStack.Peek()))
                             {
-                                Output.Enqueue(OperatorStack.Pop());
+                                Output.AddLast(OperatorStack.Pop());
                             }
                         }
                     }
@@ -586,7 +603,7 @@
                 }
                 else
                 {
-                    Output.Enqueue(OperatorStack.Pop());
+                    Output.AddLast(OperatorStack.Pop());
                 }
             }


Refactorings

Refactorings

--- WWCP_Core/Entities/RoamingNetwork/RoamingNetwork.cs
+++ WWCP_Core/Entities/RoamingNetwork/RoamingNetwork.cs
@@ -2211,6 +2211,17 @@

         #endregion

+        #region ChargingPoolIds
+
+        /// <summary>
+        /// Return all charging pool identifications registered within this roaming network.
+        /// </summary>
+        public IEnumerable<ChargingPool_Id> ChargingPoolids
+
+            => _ChargingStationOperators.SelectMany(cso => cso.ChargingPoolIds);
+
+        #endregion
+
         #region ChargingPoolAdminStatus

         /// <summary>
@@ -2529,7 +2540,18 @@
         /// </summary>
         public IEnumerable<ChargingStation> ChargingStations

-            => _ChargingStationOperators.SelectMany(cso => cso.SelectMany(pool => pool));
+            => _ChargingStationOperators.SelectMany(cso => cso.ChargingStations);
+
+        #endregion
+
+        #region ChargingStationIds
+
+        /// <summary>
+        /// Return all charging station identifications registered within this roaming network.
+        /// </summary>
+        public IEnumerable<ChargingStation_Id> ChargingStationIds
+
+            => _ChargingStationOperators.SelectMany(cso => cso.ChargingStationIds);

         #endregion

@@ -2895,7 +2917,18 @@
         /// </summary>
         public IEnumerable<EVSE> EVSEs

-            => _ChargingStationOperators.SelectMany(cso => cso.SelectMany(pool => pool.SelectMany(station => station)));
+            => _ChargingStationOperators.SelectMany(cso => cso.EVSEs);
+
+        #endregion
+
+        #region EVSEIds
+
+        /// <summary>
+        /// Return all EVSE identifications registered within this roaming network.
+        /// </summary>
+        public IEnumerable<EVSE_Id> EVSEIds
+
+            => _ChargingStationOperators.SelectMany(cso => cso.EVSEIds);

         #endregion


Fix imports.

Fix imports.

--- error-reporting/api/ErrorReportingSample/ErrorReportingSample.cs
+++ error-reporting/api/ErrorReportingSample/ErrorReportingSample.cs
@@ -22,11 +22,10 @@
 */

 // [START error_reporting_quickstart]
-using Google.Apis.Auth.OAuth2;
+
+using Google.Api.Gax.ResourceNames;
 using Google.Cloud.ErrorReporting.V1Beta1;
-using Google.Apis.Services;
 using System;
-using System.Threading.Tasks;

 public class ErrorReportingSample
 {


string

string

--- Node/Node/NodeStarter.cs
+++ Node/Node/NodeStarter.cs
@@ -32,6 +32,7 @@
         public void Start(INodeConfiguration nodeConfiguration,
                           IContainer container)
         {
+            string nodeAddress = nodeConfiguration.BaseAddress.Scheme + "://+:" + nodeConfiguration.BaseAddress.Port + "/";
             // Start OWIN host
             using (WebApp.Start(nodeConfiguration.BaseAddress.ToString(),
                                 appBuilder =>


allowing users to select no default when analyzing archives - we think there could be cases when no default is valid

--- ModAnalyzer/ViewModels/ClassifyArchivesViewModel.cs
+++ ModAnalyzer/ViewModels/ClassifyArchivesViewModel.cs
@@ -33,11 +33,7 @@
         }

         private void AnalyzeMod() {
-            if (ArchiveModOptions.Any(modOption => modOption.Default)) {
-                MessengerInstance.Send(new ArchiveModOptionsSelectedMessage(ArchiveModOptions.ToList()));
-            } else {
-                MessageBox.Show("Please specify at least 1 default archive.", "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
-            }
+            MessengerInstance.Send(new ArchiveModOptionsSelectedMessage(ArchiveModOptions.ToList()));
         }
     }
 }


Add nullcheck (#1647)

Add nullcheck (#1647)

Add nullcheck

--- WalletWasabi/JsonConverters/Uint256JsonConverter.cs
+++ WalletWasabi/JsonConverters/Uint256JsonConverter.cs
@@ -1,4 +1,4 @@
-using NBitcoin;
+using NBitcoin;
 using Newtonsoft.Json;
 using System;
 using WalletWasabi.Helpers;
@@ -24,7 +24,7 @@
 		/// <inheritdoc />
 		public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
 		{
-			writer.WriteValue(((uint256)value).ToString());
+			writer.WriteValue(((uint256)value)?.ToString());
 		}
 	}
 }