Small change.

Small change.

--- Algo/Storages/BufferMessageAdapter.cs
+++ Algo/Storages/BufferMessageAdapter.cs
@@ -23,7 +23,6 @@
 	using Ecng.Common;
 	using Ecng.Serialization;

-	using StockSharp.BusinessEntities;
 	using StockSharp.Localization;
 	using StockSharp.Messages;

@@ -233,7 +232,8 @@
 		/// <param name="dataType">Data type info.</param>
 		public void Subscribe(SecurityId securityId, DataType dataType)
 		{
-			Subscribe(Tuple.Create(securityId, dataType));
+			lock (_subscriptionsLock)
+				Subscribe(Tuple.Create(securityId, dataType));
 		}

 		private void Subscribe(Tuple<SecurityId, DataType> subscription)
@@ -263,22 +263,10 @@
 				case MarketDataTypes.Board:
 					return DataType.Board;

-				case MarketDataTypes.CandleTick:
-					return DataType.Create(typeof(TickCandleMessage), msg.Arg);
-
-				case MarketDataTypes.CandleVolume:
-					return DataType.Create(typeof(VolumeCandleMessage), msg.Arg);
-
-				case MarketDataTypes.CandleRange:
-					return DataType.Create(typeof(RangeCandleMessage), msg.Arg);
-
-				case MarketDataTypes.CandlePnF:
-					return DataType.Create(typeof(PnFCandleMessage), msg.Arg);
-
-				case MarketDataTypes.CandleRenko:
-					return DataType.Create(typeof(RenkoCandleMessage), msg.Arg);
-
 				default:
+					if (msg.DataType.IsCandleDataType())
+						return DataType.Create(msg.DataType.ToCandleMessage(), msg.Arg);
+
 					return null;
 					//throw new ArgumentOutOfRangeException(nameof(msg), msg.DataType, LocalizedStrings.Str1219);
 			}


TSI-2505 : fix page model serialization

TSI-2505 : fix page model serialization

--- Sdl.Web.Common/Models/Entity/DynamicList.cs
+++ Sdl.Web.Common/Models/Entity/DynamicList.cs
@@ -23,8 +23,7 @@

         [SemanticProperty(IgnoreMapping = true)]
         public bool HasMore { get; set; }
-
-        [JsonIgnore]
+
         [SemanticProperty(IgnoreMapping = true)]
         public List<EntityModel> QueryResults { get; set; }


remove PreSaving in LockeableEntity

remove PreSaving in LockeableEntity

--- Signum.Entities/Patterns/LockeableEntity.cs
+++ Signum.Entities/Patterns/LockeableEntity.cs
@@ -38,14 +38,9 @@
                 return false;

             if (this.locked)
-                throw new ApplicationException( Resources.AttemptToModifyLockedEntity0.Formato(this.ToString()));
+                throw new ApplicationException(Resources.AttemptToModifyLockedEntity0.Formato(this.ToString()));

             return base.Set<T>(ref field, value, property);
         }
-
-        protected internal override void PreSaving(ref bool graphModified)
-        {
-            UnsafeSet(ref toStr, ToString(), () => ToStr);
-        }
     }
 }


Added support for the new csproj format

Added support for the new csproj format

--- Source/AsyncGenerator/AsyncCodeGenerator.cs
+++ Source/AsyncGenerator/AsyncCodeGenerator.cs
@@ -19,6 +19,7 @@
 using AsyncGenerator.Transformation;
 using AsyncGenerator.Transformation.Internal;
 using log4net;
+using Microsoft.Build.Evaluation;
 using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp;
 using Microsoft.CodeAnalysis.CSharp.Syntax;
@@ -117,7 +118,92 @@
 				if (config.ApplyChanges)
 				{
 					Logger.Info($"Applying solution '{config.Path}' changes started");
-					solutionData.Workspace.TryApplyChanges(solutionData.Solution);
+					var changes = solutionData.Solution.GetChanges(solutionData.Workspace.CurrentSolution);
+
+					var newSolution = solutionData.Workspace.CurrentSolution;
+
+					// Apply changes manually as the AddDocument and RemoveDocument methods do not play well with the new csproj format
+					// Problems with AddDocument and RemoveDocument methods:
+					// - When an imported document is removed in a new csproj, TryApplyChanges will throw because the file was imported by a glob
+					// - When a document is added in a new csproj, the file will be explicitly added in the csproj even if there is a glob that could import it
+					foreach (var projectChanges in changes.GetProjectChanges())
+					{
+						var project = new Microsoft.Build.Evaluation.Project(projectChanges.NewProject.FilePath, null, null, new ProjectCollection());
+
+						var importedFiles = project.Items
+							.Where(o => o.IsImported)
+							.GroupBy(o => o.EvaluatedInclude)
+							.Where(o => o.All(g => g.IsImported))
+							.ToDictionary(o => o.Key, o => o.First());
+
+						var globs = project.GetAllGlobs();
+
+						var addedDocuments = projectChanges
+							.GetAddedDocuments()
+							.Select(o => projectChanges.NewProject.GetDocument(o))
+							.ToDictionary(o => o.FilePath.Replace(@"\\", @"\")); // For some reason the added documents have a dobule backslash at the last directory e.g "Folder\\MyFile.cs"
+						var removedDocuments = projectChanges
+							.GetRemovedDocuments()
+							.Select(o => projectChanges.OldProject.GetDocument(o))
+							.ToDictionary(o => o.FilePath);
+
+						// Add new documents or replace the document text if it was already there
+						foreach (var addedDocumentPair in addedDocuments)
+						{
+							var addedDocument = addedDocumentPair.Value;
+							if (removedDocuments.ContainsKey(addedDocumentPair.Key))
+							{
+								var removedDocument = removedDocuments[addedDocumentPair.Key];
+								newSolution = newSolution.GetDocument(removedDocument.Id)
+									.WithText(await addedDocument.GetTextAsync().ConfigureAwait(false))
+									.Project.Solution;
+								continue;
+							}
+
+							var path = $@"{string.Join(@"\", addedDocument.Folders)}\{addedDocument.Name}";
+							var sourceText = await addedDocument.GetTextAsync().ConfigureAwait(false);
+							if (globs.Any(o => o.MsBuildGlob.IsMatch(path)))
+							{
+								using (var writer = new StreamWriter(addedDocument.FilePath, false, Encoding.UTF8))
+								{
+									sourceText.Write(writer);
+								}
+							}
+							else
+							{
+								var newProject = newSolution.GetProject(projectChanges.ProjectId);
+								newSolution = newProject.AddDocument(
+										addedDocument.Name,
+										sourceText,
+										addedDocument.Folders,
+										addedDocument.FilePath)
+									.Project.Solution;
+							}
+						}
+
+						// Remove documents that are not generated anymore
+						foreach (var removedDocumentPair in removedDocuments.Where(o => !addedDocuments.ContainsKey(o.Key)))
+						{
+							var removedDocument = removedDocumentPair.Value;
+							var path = $@"{string.Join(@"\", removedDocument.Folders)}\{removedDocument.Name}";
+							if (!importedFiles.ContainsKey(path))
+							{
+								newSolution = newSolution.RemoveDocument(removedDocument.Id);
+							}
+							File.Delete(removedDocument.FilePath);
+						}
+
+						// Update changed documents
+						foreach (var documentId in projectChanges.GetChangedDocuments())
+						{
+							var newDocument = projectChanges.NewProject.GetDocument(documentId);
+							newSolution = newSolution.GetDocument(documentId)
+								.WithText(await newDocument.GetTextAsync().ConfigureAwait(false))
+								.Project.Solution;
+						}
+					}
+
+					solutionData.Workspace.TryApplyChanges(newSolution);
 					Logger.Info($"Applying solution '{config.Path}' changes completed");
 				}
 			}


Version change to v0.9.5

Version change to v0.9.5

--- AngleSharp/Properties/AssemblyInfo.cs
+++ AngleSharp/Properties/AssemblyInfo.cs
@@ -12,5 +12,5 @@
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
 [assembly: InternalsVisibleToAttribute("AngleSharp.Core.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010001adf274fa2b375134e8e4558d606f1a0f96f5cd0c6b99970f7cce9887477209d7c29f814e2508d8bd2526e99e8cd273bd1158a3984f1ea74830ec5329a77c6ff201a15edeb8b36ab046abd1bce211fe8dbb076d7d806f46b15bfda44def04ead0669971e96c5f666c9eda677f28824fff7aa90d32929ed91d529a7a41699893")]
-[assembly: AssemblyVersion("0.9.4.*")]
-[assembly: AssemblyFileVersion("0.9.4")]+[assembly: AssemblyVersion("0.9.5.*")]
+[assembly: AssemblyFileVersion("0.9.5")]


Fixed errors updating event email configuration.

--- Source/Libraries/openXDA.DataHub/DataHub.cs
+++ Source/Libraries/openXDA.DataHub/DataHub.cs
@@ -354,7 +354,7 @@

         [AuthorizeHubRole("Administrator")]
         [RecordOperation(typeof(UserAccount), RecordOperation.UpdateRecord)]
-        public void UpdateEventEmailConfiguration(UserAccount record)
+        public void UpdateProblematicUserAccount(UserAccount record)
         {
         }


Updated to v0.8.6

Updated to v0.8.6

--- AngleSharp/Properties/AssemblyInfo.cs
+++ AngleSharp/Properties/AssemblyInfo.cs
@@ -12,5 +12,5 @@
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
 [assembly: InternalsVisibleToAttribute("AngleSharp.Core.Tests")]
-[assembly: AssemblyVersion("0.8.5.*")]
-[assembly: AssemblyFileVersion("0.8.5")]+[assembly: AssemblyVersion("0.8.6.*")]
+[assembly: AssemblyFileVersion("0.8.6")]


Match

Match

--- Source/Norma/ViewModels/CommentViewModel.cs
+++ Source/Norma/ViewModels/CommentViewModel.cs
@@ -33,7 +33,11 @@
             => _addToNgCommentCommand ?? (_addToNgCommentCommand = new DelegateCommand(AddToNgComment));

         private void AddToNgComment()
-            => _configuration.Root.Operation.MuteKeywords.Add(new MuteKeyword {IsRegex = false, Keyword = Message});
+            => _configuration.Root.Operation.MuteKeywords.Add(new MuteKeyword
+            {
+                IsRegex = true,
+                Keyword = $"^{Message}$"
+            });

         #endregion


hot fix

hot fix

--- Antiplagiat/Antiplagiat/xakkep9000.cs
+++ Antiplagiat/Antiplagiat/xakkep9000.cs
@@ -14,7 +14,6 @@
 		JAVA,
 		CSHARP,
 		PYTHON,
-
 		PASCAL,
 		UNKNOWN
 	}
@@ -32,9 +31,6 @@
 			this.content = content;
 		}

-        //rm cpp c cs java
-        private void RemoveShitCPLUSPLUS()
-        {
 		//rm cpp c cs java
 		private void RemoveShitCPLUSPLUS()
 		{


added Ambient Sound Idle logic. (Propability driven by animation curve)

--- Assets/Scripts/AmbientSoundManager.cs
+++ Assets/Scripts/AmbientSoundManager.cs
@@ -11,9 +11,18 @@
     [SerializeField]
     private AudioClip[] IdleSounds;

+    [Header("Idle Sounds Logic")]
+    public AnimationCurve IdleProbabilityCurve;
+    public float TryToPlayEvery;
+
+
     [SerializeField]
     [Range(0, 10)]
     private float Intensity;
+
+    private float elapsedTime;
+    private float currentCheckTime;
+    private float[] idleSoundPropabilities;

     void Awake()
     {
@@ -22,11 +31,54 @@

     void Start()
     {
-
+        AudioSource = GetComponent<AudioSource>();
+        idleSoundPropabilities = new float[IdleSounds.Length];
+        for (int i = 0; i < idleSoundPropabilities.Length; i++)
+        {
+            idleSoundPropabilities[i] = 1f / idleSoundPropabilities.Length;
+        }
     }

     void Update()
     {
+        elapsedTime += Time.deltaTime;
+        currentCheckTime += Time.deltaTime;

+        if (currentCheckTime >= TryToPlayEvery)
+        {
+            currentCheckTime = 0f;
+            if (Random.value <= IdleProbabilityCurve.Evaluate(elapsedTime))
+            {
+                elapsedTime = 0f;
+                float addedProbs = 0f;
+                for (int i = 0; i < idleSoundPropabilities.Length; i++)
+                {
+                    addedProbs += idleSoundPropabilities[i];
+                    if (Random.value <= addedProbs || i == idleSoundPropabilities.Length - 1)
+                    {
+                        AudioSource.PlayOneShot(IdleSounds[i]);
+                        adjustProbabilities(i);
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
+    private void adjustProbabilities(int indexThatWasPlayed)
+    {
+
+        float probAdjust = (idleSoundPropabilities[indexThatWasPlayed] * 0.5f) ;
+        for (int i = 0; i < idleSoundPropabilities.Length; i++)
+        {
+            if (i == indexThatWasPlayed)
+            {
+                idleSoundPropabilities[i] *= 0.5f;
+            }
+            else
+            {
+                idleSoundPropabilities[i] += probAdjust / (idleSoundPropabilities.Length - 1);
+            }
+        }
     }
 }


Added a null check

Added a null check


Control, not Alt

Control, not Alt

--- Assets/Scripts/Masters/SceneMaster.cs
+++ Assets/Scripts/Masters/SceneMaster.cs
@@ -113,7 +113,7 @@
             EndingPanel(true);
         }

-        if(Input.GetKey(KeyCode.LeftAlt))
+        if(Input.GetKey(KeyCode.LeftControl))
         {
             if(Input.GetKeyDown(KeyCode.Q))
             {


they get angry when you wake them

they get angry when you wake them


First SuperRotationSystem implementation

--- Assets/Scripts/TetrominoController.cs
+++ Assets/Scripts/TetrominoController.cs
@@ -12,17 +12,17 @@
             return;

         if (Input.GetKeyDown(KeyCode.RightArrow))
-            TryMoveTetromino(ActiveTetromino, new Vector3(1.0f, 0.0f, 0.0f));
+            TryMoveTetromino(ActiveTetromino, new Vector2(1.0f, 0.0f));

         if (Input.GetKeyDown(KeyCode.LeftArrow))
-            TryMoveTetromino(ActiveTetromino, new Vector3(-1.0f, 0.0f, 0.0f));
+            TryMoveTetromino(ActiveTetromino, new Vector2(-1.0f, 0.0f));

         if (Input.GetKeyDown(KeyCode.UpArrow))
-            TryMoveTetromino(ActiveTetromino, new Vector3(0.0f, 1.0f, 0.0f));
+            TryMoveTetromino(ActiveTetromino, new Vector2(0.0f, 1.0f));

         if (Input.GetKeyDown(KeyCode.DownArrow))
         {
-            bool couldMove = TryMoveTetromino(ActiveTetromino, new Vector3(0.0f, -1.0f, 0.0f));
+            bool couldMove = TryMoveTetromino(ActiveTetromino, new Vector2(0.0f, -1.0f));
             if (!couldMove)
             {
                 PlaceTetrominoOnPlayArea(ActiveTetromino);
@@ -32,7 +32,7 @@

         if (Input.GetKeyDown(KeyCode.Q))
         {
-            while(TryMoveTetromino(ActiveTetromino, new Vector3(0.0f, -1.0f, 0.0f)));
+            while(TryMoveTetromino(ActiveTetromino, new Vector2(0.0f, -1.0f)));
             PlaceTetrominoOnPlayArea(ActiveTetromino);
             ActiveTetromino.transform.position = new Vector3(6.0f, 18.0f, 0.0f);
         }
@@ -66,10 +66,11 @@
         }
     }

-    private bool TryMoveTetromino(Tetromino tetromino, Vector3 moveVector)
+    private bool TryMoveTetromino(Tetromino tetromino, Vector2 moveVector)
     {
         Vector3 previousPosition = ActiveTetromino.transform.position;
-        ActiveTetromino.transform.position += moveVector;
+        Vector3 newPosition = previousPosition + new Vector3(moveVector.x, moveVector.y, 0.0f);
+        ActiveTetromino.transform.position += newPosition;
         LimitTetrominoInsidePlayArea(tetromino);

         for (int i = 0; i < tetromino.ChildBlocks.Length; i++)
@@ -95,7 +96,17 @@
         for (int i = 0; i < tetromino.ChildBlocks.Length; i++)
             tetromino.ChildBlocks[i].transform.rotation = Quaternion.identity;

-        return true;
+        Vector2[] testOffsets = SuperRotationSystem.GetTestOffsetsForDefaultTetromino(previousEulerAngles.z, eulerAngles.z);
+        for (int i = 0; i < testOffsets.Length; i++)
+        {
+            if (TryMoveTetromino(tetromino, testOffsets[i]))
+                return true;
+        }
+
+        ActiveTetromino.transform.rotation = Quaternion.Euler(previousEulerAngles);
+        for (int i = 0; i < tetromino.ChildBlocks.Length; i++)
+            tetromino.ChildBlocks[i].transform.rotation = Quaternion.identity;
+        return false;
     }

     private void PlaceTetrominoOnPlayArea(Tetromino tetromino)


re-add name setting for Texture

re-add name setting for Texture

--- Source/GLTFWrapper.cs
+++ Source/GLTFWrapper.cs
@@ -715,6 +715,10 @@
                     {
                         texture.Source = image_index.Value;
                     }
+                    if (gTexture.name != null)
+                    {
+                        texture.Name = gTexture.name;
+                    }

                     textures.Add(texture);
                     indices.Add(textures.Count() - 1);


minor: Remove mono compiler warning in RemoteAdminPlugin

--- OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -1768,7 +1768,7 @@
             m_log.Info("[RADMIN]: Received Estate Reload Request");

             Hashtable responseData = (Hashtable)response.Value;
-            Hashtable requestData = (Hashtable)request.Params[0];
+//            Hashtable requestData = (Hashtable)request.Params[0];

             m_application.SceneManager.ForEachScene(s =>
                 s.RegionInfo.EstateSettings = m_application.EstateDataService.LoadEstateSettings(s.RegionInfo.RegionID, false)


[SharpDX] Add a private exception to get the stacktrace in ObjectTracker. Related to issue #575,

--- Source/SharpDX/Diagnostics/ObjectTracker.cs
+++ Source/SharpDX/Diagnostics/ObjectTracker.cs
@@ -168,11 +168,12 @@
                 }
                 referenceList.Add(new ObjectReference(DateTime.Now, comObject, stacktrace));
 #else
+                // Another WTF: To get a stacktrace, we don't have other ways than throwing an exception on PCL.
                 try
                 {
-                    throw new Exception();
-                }
-                catch(Exception ex)
+                    throw new GetStackTraceException();
+                }
+                catch (GetStackTraceException ex)
                 {
                     referenceList.Add(new ObjectReference(DateTime.Now, comObject, ex.StackTrace));
                 }
@@ -337,5 +338,9 @@
                 handler(null, new ComObjectEventArgs(obj));
             }
         }
+
+        private class GetStackTraceException : Exception
+        {
+        }
    }
 }


2.2.0

--- MSyics.Cacheyi/CacheStore.cs
+++ MSyics.Cacheyi/CacheStore.cs
@@ -12,7 +12,7 @@

 namespace MSyics.Cacheyi
 {
-    interface ICacheStore<TKeyed, TKey, TValue>
+    interface ICacheStore
     {
         bool CanMonitoring { get; }
         bool HasMaxCapacity { get; }
@@ -20,26 +20,33 @@
         int Count { get; }
         int MaxCapacity { get; }
         TimeSpan Timeout { get; }
-        IDataSourceChangeMonitor<TKey> ChangeMonitor { get; }

         void Clear();
         void DoOut();
         void Reset();
         void StartMonitoring();
         void StopMonitoring();
-
+    }
+
+    interface ICacheStore<TKey>
+    {
+        IDataSourceChangeMonitor<TKey> ChangeMonitor { get; }
+    }
+
+    interface ICacheStore<TKey, TValue> : ICacheStore, ICacheStore<TKey>
+    {
+        CacheProxy<TKey, TValue> Alloc(TKey key);
+        bool TryAlloc(TKey key, out CacheProxy<TKey, TValue> cache);
+        IEnumerable<CacheProxy<TKey, TValue>> Alloc(IEnumerable<TKey> keys);
+        bool Remove(TKey key);
+    }
+
+    interface ICacheStore<TKeyed, TKey, TValue> : ICacheStore, ICacheStore<TKey>
+    {
         CacheProxy<TKey, TValue> Alloc(TKeyed keyed);
         bool TryAlloc(TKeyed keyed, out CacheProxy<TKey, TValue> cache);
         IEnumerable<CacheProxy<TKey, TValue>> Alloc(IEnumerable<TKeyed> keyeds);
         bool Remove(TKeyed keyed);
-    }
-
-    interface ICacheStore<TKey, TValue> : ICacheStore<TKey, TKey, TValue>
-    {
-        new CacheProxy<TKey, TValue> Alloc(TKey key);
-        new bool TryAlloc(TKey key, out CacheProxy<TKey, TValue> cache);
-        new IEnumerable<CacheProxy<TKey, TValue>> Alloc(IEnumerable<TKey> keys);
-        new bool Remove(TKey key);
     }

     /// <summary>


* Small adjust to last commit's logging so we only print out one warning when we start dropping requests

--- OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
+++ OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
@@ -140,9 +140,12 @@

                                 if (dispatchedTextureRequestCounts[e.RequestedAssetID] > MAX_ALLOWED_TEXTURE_REQUESTS)
                                 {
-                                    m_log.WarnFormat(
-                                        "[USER TEXTURE DOWNLOAD SERVICE]: No longer sending already dispatched texture {0} to {1} since it has made more than {2} requests for it",
-                                        e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS);
+                                    if (MAX_ALLOWED_TEXTURE_REQUESTS + 1 == dispatchedTextureRequestCounts[e.RequestedAssetID])
+                                    {
+                                        m_log.WarnFormat(
+                                            "[USER TEXTURE DOWNLOAD SERVICE]: No longer sending already dispatched texture {0} to {1} since it has made more than {2} requests for it",
+                                            e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS);
+                                    }

                                     return;
                                 }


Mantis #1961 Thank you, BlueWall, for a patch that adds PRIM_GLOW

--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1013,6 +1013,31 @@
                 return;
             }
         }
+
+        public void SetGlow(SceneObjectPart part, int face, float glow)
+        {
+            LLObject.TextureEntry tex = part.Shape.Textures;
+            if (face > -1)
+            {
+				tex.CreateFace((uint) face);
+                tex.FaceTextures[face].Glow = glow;
+                part.UpdateTexture(tex);
+                return;
+            }
+            else if (face == -1)
+            {
+                for (uint i = 0; i < 32; i++)
+                {
+                    if (tex.FaceTextures[i] != null)
+                    {
+                        tex.FaceTextures[i].Glow = glow;
+                    }
+					tex.DefaultTexture.Glow = glow;
+                }
+                part.UpdateTexture(tex);
+                return;
+            }
+        }

         public double llGetAlpha(int face)
         {
@@ -5404,6 +5429,15 @@
                         SetPointLight(part, (light == 1), lightcolor, intensity, radius, falloff);

                         break;
+                    case (int)ScriptBaseClass.PRIM_GLOW:
+                        if (remain < 2)
+                            return;
+                        face = Convert.ToInt32(rules.Data[idx++]);
+                        float glow = (float)Convert.ToDouble(rules.Data[idx++]);
+
+                        SetGlow(part, face, glow);
+
+                        break;
                 }
             }
         }


Inherited dependencies are now injected as expected.

--- Model/DependencyComponent.cs
+++ Model/DependencyComponent.cs
@@ -2,7 +2,6 @@
 ///
 /// The `DependencyComponent` is a `Component` that is aware of its dependencies,
 /// and will automatically attempt to inject them during synchronization.
-///

 /// ##Source
 using System;
@@ -15,6 +14,21 @@
     /// Represents a component that can specify and inject dependencies.
     /// </summary>
     public abstract class DependencyComponent : Component {
+        /// <summary>
+        /// Determines whether the given type is not a sub-class of `DependencyComponent`.
+        /// </summary>
+        static bool CanDependOn(Type type) {
+            /// > This may seem arbitrary, but when *behaviors* (i.e. `DependencyComponent`s) can only depend on
+            /// *attributes* (i.e. `Component`s that primarily hold data) we have effectively eliminated any potential
+            /// cyclic dependency/adding order issues.
+            ///
+            /// Though there's nothing stopping `Component`s from having logic, enforcing this rule encourages the use
+            /// of behavior/attribute convention when building components.
+            return
+                CanCreate(type);/* &&
+                !type.IsSubclassOf(typeof(DependencyComponent));*/
+        }
+
         Dictionary<FieldInfo, RequireComponentAttribute> _dependencies =
             new Dictionary<FieldInfo, RequireComponentAttribute>();

@@ -34,21 +48,35 @@
         void FindDependencies() {
             _dependencies.Clear();

+            Type type = GetType();
+
+            FindDependencies(type, _dependencies);
+
+            while ((type = type.BaseType) != null) {
+                if (!Component.CanCreate(type)) {
+                    break;
+                }
+
+                FindDependencies(type, _dependencies);
+            }
+        }
+
+        void FindDependencies(Type type, Dictionary<FieldInfo, RequireComponentAttribute> deps) {
             /// > It wouldn't be complete insanity to ditch the attributing entirely
             ///   and just consider all `IComponent`-types as dependencies.
             /// But, it *would* ultimately be an assumption, and it could very well
             /// lead to some *just what exactly is going on behind the scenes?*-confusion.
-            FieldInfo[] fields = GetType().GetFields(
+            FieldInfo[] fields = type.GetFields(
                 BindingFlags.Instance |
                 BindingFlags.Public |
                 BindingFlags.NonPublic);
-
+
             foreach (FieldInfo field in fields) {
-                foreach (RequireComponentAttribute dependency in
+                foreach (RequireComponentAttribute dependency in
                             field.GetCustomAttributes(typeof(RequireComponentAttribute), false)) {
                     Type componentType = field.FieldType;

-                    if (CanCreate(componentType)) {
+                    if (CanDependOn(componentType)) {
                         if (dependency.Automatically) {
                             if (componentType.GetConstructor(Type.EmptyTypes) == null) {
                                 throw new InvalidOperationException(
@@ -60,7 +88,7 @@
                     } else {
                         throw new InvalidOperationException(
                             String.Format(CultureInfo.InvariantCulture,
-                                "This field can not be marked as a dependency because its type does not implement 'IComponent'.",
+                                "This field can not be marked as a dependency because its type does not implement 'IComponent' or is a subclass of 'DependencyComponent'.",
                                 field.DeclaringType.ToString() + "." + field.Name));
                     }

@@ -92,6 +120,7 @@
                 return;
             }

+            System.Diagnostics.Debug.WriteLine("" + this);
             foreach (KeyValuePair<FieldInfo, RequireComponentAttribute> pair in _dependencies) {
                 FieldInfo field = pair.Key;
                 RequireComponentAttribute dependency = pair.Value;
@@ -151,7 +180,7 @@
         /// Occurs when the component is dettached from an entity. All managed dependencies are null'ed.
         /// </summary>
         /// <remarks>
-        /// > If you don't want the dependencies to get lost, then override this method and don't base.
+        /// > If you don't want the dependencies to get lost, then override this method and don't call base.
         /// </remarks>
         protected override void OnRemoved(ComponentStateEventArgs registrationArgs) {
             base.OnRemoved(registrationArgs);


Fixe FlxText shadow

Fixe FlxText shadow

--- MonoFlixel/flixel/FlxText.cs
+++ MonoFlixel/flixel/FlxText.cs
@@ -5,23 +5,38 @@

 namespace MonoFlixel
 {
-    public class FlxText : FlxSprite
-    {
+	public class FlxText : FlxSprite
+	{
 	/*
 	 * Text rectangle size
-	 * */
-	private Rectangle bounds;
-	private Vector2 origin = Vector2.Zero;
-
-	private Vector2 _fontmeasure = Vector2.Zero;
-	private float _scale = 1f;
-
-		public int textWidth
-		{
+	 */
+		private Rectangle bounds;
+
+	/*
+	 * Keeps track of the center of the text rect
+	 */
+		private Vector2 origin = Vector2.Zero;
+
+	/*
+	 * Font based rect size
+	 */
+		private Vector2 _fontmeasure = Vector2.Zero;
+
+	/*
+	 * Scaling size
+	 */
+		private float _scale = 1f;
+
+	/*
+	 * Text width based on Font
+	 */
+		public int textWidth {
 			get { return (int)_fontmeasure.X; }
 		}
-		public int textHeight
-		{
+	/*
+	 * Text height based on Font
+	 */
+		public int textHeight {
 			get { return (int)_fontmeasure.Y; }
 		}

@@ -29,78 +44,80 @@
 	* Internal tracker for the alignment of the text.
 	*/
 		protected String _alignment = "CENTER";
-		/**
+	/**
 	 * The default vertex shader that will be used.
 	 */
 		//private final String VERTEX = "org/flixel/data/shaders/vertex.glsl";
-		/**
+	/**
 	 * The default fragment shader that will be used for distance field.
 	 */
 		//public final String DISTANCE_FIELD_FRAGMENT = "org/flixel/data/shaders/distance_field.glsl";
-		/*
+	/*
 	 * Internal reference to a libgdx BitmapFontCache object.
 	 */
 		protected SpriteBatch _textField;
-		/**
+	/**
    * Loaded font
    */
 		protected SpriteFont LoadedFont = FlxG.defaultFont;
-		/**
+	/**
 	 * Internal tracker for the text shadow color, default is clear/transparent.
 	 */
-		protected Color _shadow = Color.Black;
-		/**
+		protected Color _shadow = Color.Transparent;
+
+	/**
 	 * Internal tracker for the alignment of the text.
 	 */
-	//	protected HAlignment _alignment;
+		//	protected HAlignment _alignment;
 		/**
 	 * Internal reference to the text to be drawn.
 	 */
 		public string text { get; set; }
-		/**
+
+	/**
 	 * Internal helper for rotation.
 	 */
-	//	protected Matrix4 _matrix;
-		/**
+		//	protected Matrix4 _matrix;
+	/**
 	 * Internal reference to the font.
 	 */
 		protected String _font;
-		/**
+	/**
 	 * Internal tracker for the size of the text.
 	 */
 		protected int _size;

-		/**
+	/**
 	 * Internal tracker for the x-position of the shadow, default is 1.
 	 */
 		protected float _shadowX;
-		/**
+	/**
 	 * Internal tracker for the y-position of the shadow, default is 1.
 	 */
 		protected float _shadowY;

-		/**
+	/**
 	 * Parameters that is used for generating the BitmapFont.
 	 */
 		//private BitmapFontParameter _bitmapFontParameter;
-		/**
+	/**
 	 * The shader program that is used for distance field.
 	 */
 		//private ShaderProgram _distanceFieldShader;
-		/**
+	/**
 	 * Internal tracker whether the distance field is enabled.
 	 */
 		private Boolean _distanceFieldEnabled;
-		/**
+	/**
 	 * The padding that is set for generating the bitmap font.
 	 */
 		private int _padding;
-		/**
+	/**
 	 * The smoothness of the font.
 	 */
 		private float _smoothness;

-		/**
+	/**
 	 * Creates a new FlxText object at the specified position.
 	 *
 	 * @param X The X position of the text.
@@ -110,9 +127,9 @@
 	 * @param Text The actual text you would like to display initially.
 	 * @param EmbeddedFont Whether this text field uses embedded fonts or not.
 	 */
-		public FlxText(float x, float y, int width, String Text = null, Boolean EmbeddedFont = true) : base (x,y)
-		{
-			if(Text == null)
+		public FlxText (float x, float y, int width, String Text = null, Boolean EmbeddedFont = true) : base (x, y)
+		{
+			if (Text == null)
 				Text = "";

 			Width = FrameWidth = width;
@@ -120,26 +137,27 @@
 			AllowCollisions = None;
 			//_bitmapFontParameter = new BitmapFontParameter();
 			//_bitmapFontParameter.flip = true;
-			setFormat(null, 8, Color.White, "left", Color.Black, 1f, 1f);
+			setFormat (null, 8, Color.White, "left", Color.Black, 1f, 1f);
 			X = x;
 			Y = y;
 		}

-		/**
+	/**
 	 * Clean up memory.
 	 */

-		public override void destroy()
-		{
-			_textField.Dispose();
+		public override void destroy ()
+		{
+			_textField.Dispose ();
 			_textField = null;
 			text = null;
 			//_bitmapFontParameter = null;
 			//_distanceFieldShader = null;
-			base.destroy();
-		}
-
-		/**
+			base.destroy ();
+		}
+
+
+	/**
 	 * You can use this if you have a lot of text parameters to set instead of
 	 * the individual properties.
 	 *
@@ -156,130 +174,143 @@
 	 * @return This FlxText instance (nice for chaining stuff together, if
 	 *         you're into that).
 	 */
-		public FlxText setFormat(String Font, float size, Color color, String Alignment, Color ShadowColor, float ShadowX = 1f, float ShadowY = 1f)
-		{
-			if(Font == null)
+		public FlxText setFormat (String Font, float size, Color color, String Alignment, Color ShadowColor, float ShadowX = 1f, float ShadowY = 1f)
+		{
+			if (Font == null)
 				Font = _font;

-			if(Font != null && (!Font.Equals(_font) || size != _size))
-			{
-				try
-				{
+			if (Font != null && (!Font.Equals (_font) || size != _size)) {
+				try {
 					//_textField = new SpriteBatch(FlxG.loadFont(Font, FlxU.round(Size), _bitmapFontParameter));
 					//_textField = new SpriteBatch(GraphicsDevice);

-				}
-				catch(Exception e)
-				{
+				} catch (Exception e) {
 					Console.WriteLine (e.Message);
-					//FlxG.log(e.getMessage());
+					FlxG.log(e.Message);
 					//_textField = new SpriteBatch(FlxG.loadFont("org/flixel/data/font/nokiafc.fnt", 22, _bitmapFontParameter));
 				}

 				_font = Font;
-				//size = FlxU.floor(size);
-				_size = (int)FlxU.round(size);
+				_size = (int)FlxU.floor (size);
 				LoadedFont = FlxS.ContentManager.Load<SpriteFont> (_font);
 			}

 			Color = color;
-			if(Alignment != null)
-				_alignment = (Alignment.ToUpper());
+			if (Alignment != null)
+				_alignment = (Alignment.ToUpper ());
 			_shadow = ShadowColor;
 			_shadowX = ShadowX;
 			_shadowY = ShadowY;

-			calcFrame();
+			calcFrame ();

 			return this;
 		}

-		/**
+	/**
+	 * You can use this if you have a lot of text parameters to set instead of
+	 * the individual properties.
+	 *
+	 * @param Font The name of the font face for the text display.
+	 * @param Size The size of the font (in pixels essentially).
+	 * @param Color The color of the text in 0xRRGGBB format.
+	 * @param Alignment A string representing the desired alignment
+	 *        ("left,"right" or "center").
+	 *
+	 * @return This FlxText instance (nice for chaining stuff together, if
+	 *         you're into that).
+	 */
+		public FlxText setFormat (String Font, float size, Color color, String Alignment) {
+
+			return setFormat (Font, size, color, Alignment, Color.Transparent);
+		}
+
+	/**
 	 * The text being displayed.
 	 */
-		public String getText()
+		public String getText ()
 		{
 			return text;
 		}

-		/**
+	/**
 	 * The text being displayed.
 	 */
-		public void setText(string Text)
+		public void setText (string Text)
 		{
 			text = Text;
-			calcFrame();
-		}
-
-		/**
+			calcFrame ();
+		}
+
+	/**
 	 * The size of the text being displayed.
 	 */
-		public float getSize()
+		public float getSize ()
 		{
 			return _size;
 		}

-		/**
+	/**
 	 * The size of the text being displayed.
 	 */
-		public void setSize(float Size)
-		{
-			if(Size == _size)
+		public void setSize (float Size)
+		{
+			if (Size == _size)
 				return;

-			setFormat(_font, Size, _color, getAlignment(), _shadow, _shadowX, _shadowY);
-		}
-
-		/**
+			setFormat (_font, Size, _color, getAlignment (), _shadow, _shadowX, _shadowY);
+		}
+
+	/**
 	 * The font used for this text.
 	 */
-		public String getFont()
+		public String getFont ()
 		{
 			return _font;
 		}

-		/**
+	/**
 	 * The font used for this text.
 	 */
-		public void setFont(String Font, float Size)
-		{
-			if(Font == null || Font.Equals(_font))
+		public void setFont (String Font, float Size)
+		{
+			if (Font == null || Font.Equals (_font))
 				return;

-			setFormat(Font, Size, _color, getAlignment(), _shadow, _shadowX, _shadowY);
-		}
-
-		/**
+			setFormat (Font, Size, _color, getAlignment (), _shadow, _shadowX, _shadowY);
+		}
+
+	/**
 	 * The font used for this text.
 	 */
-		public void setFont(String Font)
-		{
-			setFont(Font, _size);
-		}
-
-		/**
+		public void setFont (String Font)
+		{
+			setFont (Font, _size);
+		}
+
+	/**
 	 * The alignment of the font ("left", "right", or "center").
 	 */
-		public String getAlignment()
-		{
-			return null;//_alignment.toString().toLowerCase();// Locale.ENGLISH);
-		}
-
-		/**
+		public String getAlignment ()
+		{
+			return _alignment.ToLower();
+		}
+
+	/**
 	 * The alignment of the font ("left", "right", or "center").
 	 */
-		public void setAlignment(String Alignment)
-		{
-			if(Alignment == null)
+		public void setAlignment (String Alignment)
+		{
+			if (Alignment == null)
 				return;
-			_alignment = Alignment.ToUpper();
-			calcFrame();
+			_alignment = Alignment.ToUpper ();
+			calcFrame ();
 		}

 		/**
 	 * The color of the text shadow in 0xAARRGGBB hex format.
 	 */
-		public Color getShadow()
+		public Color getShadow ()
 		{
 			return _shadow;
 		}
@@ -287,7 +318,7 @@
 		/**
 	 * The color of the text shadow in 0xAARRGGBB hex format.
 	 */
-		public void setShadow(Color color)
+		public void setShadow (Color color)
 		{
 			_shadow = color;
 		}
@@ -298,7 +329,7 @@
 	 * @param ShadowX The x-position
 	 * @param ShadowY The y-position
 	 */
-		public void setShadow(float ShadowX, float ShadowY)
+		public void setShadow (float ShadowX, float ShadowY)
 		{
 			_shadowX = ShadowX;
 			_shadowY = ShadowY;
@@ -307,7 +338,7 @@
 		/**
 	 * The x-position of the text shadow.
 	 */
-		public void setShadowX(float ShadowX)
+		public void setShadowX (float ShadowX)
 		{
 			_shadowX = ShadowX;
 		}
@@ -315,7 +346,7 @@
 		/**
 	 * The y-position of the text shadow.
 	 */
-		public void setShadowY(float ShadowY)
+		public void setShadowY (float ShadowY)
 		{
 			_shadowY = ShadowY;
 		}
@@ -357,7 +388,7 @@
 	 * @param Name The name of the shader.
 	 * @return The shader program that will be used
 	 */
-			/*
+		/*
 		public ShaderProgram setDistanceField(boolean Enabled, int Padding, float Smoothness, String Name)
 		{
 			return setDistanceField(Enabled, Padding, Smoothness, Name, DISTANCE_FIELD_FRAGMENT);
@@ -371,7 +402,7 @@
 	 * @param Smoothness The smoothness between 0 and 1.
 	 * @return The shader program that will be used
 	 */
-			/*
+		/*
 		public ShaderProgram setDistanceField(boolean Enabled, int Padding, float Smoothness)
 		{
 			return setDistanceField(Enabled, Padding, Smoothness, _font, DISTANCE_FIELD_FRAGMENT);
@@ -380,7 +411,7 @@
 		/**
 	 * Sets the distance field shader in the batch.
 	 */
-		private void drawDistanceField()
+		private void drawDistanceField ()
 		{
 			//FlxG.Batch. flush();
 			/*
@@ -395,18 +426,15 @@
 			_tagPoint.Y += Scale.X * _padding;
 			//_textField.setPosition(_tagPoint.X, _tagPoint.Y);
 		}
-
-		protected override void calcFrame()
-		{
-			try
-			{
-				_fontmeasure = LoadedFont.MeasureString(text) * _scale;
-				origin = new Vector2(_fontmeasure.X / 2, _fontmeasure.Y / 2);
-
-				bounds = new Rectangle((int)X, (int)Y, (int)textWidth, (int)textHeight);
-			}
-			catch
-			{
+
+		protected override void calcFrame ()
+		{
+			try {
+				_fontmeasure = LoadedFont.MeasureString (text) * _scale;
+				origin = new Vector2 (_fontmeasure.X / 2, _fontmeasure.Y / 2);
+
+				bounds = new Rectangle ((int)X, (int)Y, (int)textWidth, (int)textHeight);
+			} catch {
 				_fontmeasure = Vector2.Zero;
 			}
 			//TextBounds bounds = _textField.setWrappedText(_text, 2, 3, Width, _alignment);
@@ -415,25 +443,24 @@
 			// in most cases.
 			//Height = FrameHeight = (int) FlxU.ceil(bounds.height + 7);
 		}
-
-		public override void draw()
-		{
-			if(_flickerTimer != 0)
-			{
+
+		public override void draw ()
+		{
+			if (_flickerTimer != 0) {
 				_flicker = !_flicker;
-				if(_flicker)
+				if (_flicker)
 					return;
 			}

 			FlxCamera camera = FlxG.camera;//._activeCamera;

-			if(Cameras == null)
+			if (Cameras == null)
 				Cameras = FlxG.cameras;

-			if(!Cameras.Contains(camera))
+			if (!Cameras.Contains (camera))
 				return;

-			if(!onScreen(camera))
+			if (!onScreen (camera))
 				return;

 			_tagPoint.X = X - (camera.Scroll.X * ScrollFactor.X) - Offset.X;
@@ -442,18 +469,16 @@
 			_tagPoint.Y += (_tagPoint.Y > 0) ? 0.0000001f : -0.0000001f;

 			// scaling
-			if(Scale.X != 1f || Scale.Y != 1f)
-			{
+			if (Scale.X != 1f || Scale.Y != 1f) {
 				//_textField.getFont().setScale(Scale.X, Scale.Y);
-				calcFrame();
+				calcFrame ();
 			}

 			// position
 			//_textField.setPosition(_tagPoint.X, _tagPoint.Y);

 			// rotation
-			if(Angle != 0)
-			{
+			if (Angle != 0) {
 				/*
 				_matrix = FlxG.Batch.getTransformMatrix().cpy();

@@ -482,8 +507,8 @@
 			*/

 			// distance field
-			if(_distanceFieldEnabled)
-				drawDistanceField();
+			if (_distanceFieldEnabled)
+				drawDistanceField ();

 			int tintColor;
 			/*
@@ -520,19 +545,25 @@
 			*/

 			Point point = bounds.Center;
-			Vector2 pos = new Vector2(point.X, point.Y);
-
-			if ( _alignment == "RIGHT" )
+			Vector2 pos = new Vector2 (point.X, point.Y);
+
+			if (_alignment == "RIGHT")
 				pos.X += Width - textWidth;

 			if (_alignment == "CENTER")
 				pos.X += ((Width - textWidth) / 2);
-				pos.Y += ((Height - textHeight) / 2);
-
-			FlxS.SpriteBatch.DrawString( LoadedFont, text, pos, Color, 0, origin, 1, SpriteEffects.None, 0 );
-		}
-
-
-
-    }
+			pos.Y += ((Height - textHeight) / 2);
+
+			// Render shadow behind the text
+			if(_shadow != Color.Transparent)
+			{
+				FlxS.SpriteBatch.DrawString (LoadedFont, text, new Vector2(pos.X+_shadowX, pos.Y+_shadowY), _shadow, 0, origin, 1, SpriteEffects.None, 0);
+			}
+
+			FlxS.SpriteBatch.DrawString (LoadedFont, text, pos, Color, 0, origin, 1, SpriteEffects.None, 0);
+		}
+
+
+
+	}
 }


Fixes and tuning from RoyGoode.

Fixes and tuning from RoyGoode.

This does:

	* Fix the default capitalization to be Sentences (the previous default)
	  instead of the All change from John Dick

	* Make the EntryElement the first responder when Tapped

	* Scroll the UITableView to make the element visible

--- MonoTouch.Dialog/Elements.cs
+++ MonoTouch.Dialog/Elements.cs
@@ -1351,7 +1351,7 @@

 		UIKeyboardType keyboardType = UIKeyboardType.Default;
 		UIReturnKeyType? returnKeyType = null;
-		UITextAutocapitalizationType autocapitalizationType = UITextAutocapitalizationType.AllCharacters;
+		UITextAutocapitalizationType autocapitalizationType = UITextAutocapitalizationType.Sentences;
 		UITextAutocorrectionType autocorrectionType = UITextAutocorrectionType.Default;
 		bool isPassword, becomeResponder;
 		UITextField entry;
@@ -1508,8 +1508,7 @@
 				entry.Started += delegate {
 					EntryElement self = null;

-					if (!returnKeyType.HasValue)
-					{
+					if (!returnKeyType.HasValue) {
 						var returnType = UIReturnKeyType.Default;

 						foreach (var e in (Parent as Section).Elements){
@@ -1519,9 +1518,10 @@
 								returnType = UIReturnKeyType.Next;
 						}
 						entry.ReturnKeyType = returnType;
-					}
-					else
+					} else
 						entry.ReturnKeyType = returnKeyType.Value;
+
+					tv.ScrollToRow (IndexPath, UITableViewScrollPosition.Middle, true);
 				};
 			}
 			if (becomeResponder){
@@ -1565,6 +1565,12 @@
 					entry = null;
 				}
 			}
+		}
+
+		public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath indexPath)
+		{
+			BecomeFirstResponder(true);
+			tableView.DeselectRow (indexPath, true);
 		}

 		public override bool Matches (string text)


Avoid unnecessary constant condition in DamageStatConcretizer

Remove additional always true ConditionalValue from DamageStatConcretizer's value converter by using an empty/null condition by default.

--- PoESkillTree.Computation.Builders/Stats/DamageStatConcretizer.cs
+++ PoESkillTree.Computation.Builders/Stats/DamageStatConcretizer.cs
@@ -33,7 +33,7 @@
             bool canApplyToSkillDamage = false, bool canApplyToAilmentDamage = false)
             : this(statFactory, specificationBuilder,
                 CanApplyToDefault(canApplyToSkillDamage), CanApplyToDefault(canApplyToAilmentDamage),
-                _ => ConstantConditionBuilder.True)
+                _ => new NullConditionBuilder())
         {
         }

@@ -170,6 +170,8 @@
             var condition = _condition(spec).Build(parameters);
             if (condition.HasStatConverter)
                 throw new InvalidOperationException("Conditions passed to With must not have stat converters");
+            if (!condition.HasValue)
+                return result.ValueConverter;
             return result.ValueConverter.AndThen(v => v.If(condition.Value));
         }

@@ -203,5 +205,14 @@

         private IReadOnlyList<IStat> ConcretizeStats(IDamageSpecification spec, IEnumerable<IStat> resultStats) =>
             resultStats.Select(s => _statFactory.ConcretizeDamage(s, spec)).ToList();
+
+        private class NullConditionBuilder : IConditionBuilder
+        {
+            public IConditionBuilder Resolve(ResolveContext context) => this;
+            public IConditionBuilder And(IConditionBuilder condition) => condition;
+            public IConditionBuilder Or(IConditionBuilder condition) => condition;
+            public IConditionBuilder Not => this;
+            public ConditionBuilderResult Build(BuildParameters parameters) => new ConditionBuilderResult();
+        }
     }
 }


Remove some noise

Remove some noise

--- NevronPoC/MainWindow.xaml.cs
+++ NevronPoC/MainWindow.xaml.cs
@@ -279,27 +279,13 @@

             ZoomInFillStyle = new Nevron.GraphicsCore.NColorFillStyle ( System.Drawing.Color.FromArgb ( 125, System.Drawing.Color.Navy ) );
             ZoomInBorderStyle.Color = System.Drawing.Color.FromArgb ( 125, System.Drawing.Color.Navy );
-            //m_ChartControl.MouseDown += OnMouseDown;
             this.AlwaysZoomIn = true;
         }

-        public override void DoBeginDrag ( object sender, Nevron.Chart.Windows.NMouseEventArgs e )
-        {
-            Console.WriteLine ( "Beginning drag.." );
-            base.DoBeginDrag ( sender, e );
-        }
-
-        public override void OnMouseDown ( object sender, Nevron.Chart.Windows.NMouseEventArgs e )
-        {
-            Console.WriteLine ( "Mouse down" );
-            base.OnMouseDown ( sender, e );
-        }
-
         private bool m_notFirst = false;

         public override void OnEndDrag ( object sender, Nevron.Chart.Windows.NMouseEventArgs e )
         {
-            Console.WriteLine ( System.Windows.Application.Current.Dispatcher.CheckAccess ( ) );
             m_SelectedChart.Document.Lock ( );
             List<Data> entities = new List<Data> ( );
             Data entity;
@@ -321,85 +307,60 @@
                 rangeX.Normalize ( );
                 rangeY.Normalize ( );

-                // this is the dumbest thing i have had to write in along time...
-                // to "reset" the ones that should not have a style set. This is the crude version of the one inline below
-                if ( m_notFirst )
-                {
-                    //for ( int x = 0 ; x < 3 ; x++ )
-                    //    Reset ( );
-                }
-                //else
-
-                {
-                    m_notFirst = true;
-
-                    int selectCount = 0;
-                    int notSelectedCount = 0;
-
-                    StringBuilder sb = new StringBuilder ( );
-
-                    sb.AppendLine ( "Range: " + rangeX.Begin + ", " + rangeY.Begin + " to " + rangeX.End + "," + rangeY.End );
-                    for ( int j = 0 ; j < m_SelectedChart.Series.Count ; j++ )
+                m_notFirst = true;
+
+                int selectCount = 0;
+                int notSelectedCount = 0;
+
+                StringBuilder sb = new StringBuilder ( );
+
+                sb.AppendLine ( "Range: " + rangeX.Begin + ", " + rangeY.Begin + " to " + rangeX.End + "," + rangeY.End );
+                for ( int j = 0 ; j < m_SelectedChart.Series.Count ; j++ )
+                {
+                    var series = m_SelectedChart.Series [ j ] as Nevron.Chart.NPointSeries;
+                    if ( series != null )
                     {
-                        var series = m_SelectedChart.Series [ j ] as Nevron.Chart.NPointSeries;
-                        if ( series != null )
+                        Nevron.Chart.NPointSeries pointSeries = series;
+
+                        int count = pointSeries.GetDataPointCount ( );
+
+                        for ( int i = 0 ; i < count ; i++ )
                         {
-                            Nevron.Chart.NPointSeries pointSeries = series;
-
-                            // if this series is not displayed, then we don't want to select it
-                            // as the user can't see it
-                            if ( !pointSeries.Visible )
-                                continue;
-
-                            int count = pointSeries.GetDataPointCount ( );
-
-                            //if ( Util.CheckPointSeriesNames ( pointSeries ) )
+                            if ( rangeX.Contains ( (double)pointSeries.XValues [ i ] ) &&
+                                rangeY.Contains ( (double)pointSeries.Values [ i ] ) )
                             {
-                                for ( int i = 0 ; i < count ; i++ )
+                                sb.AppendLine ( pointSeries.XValues [ i ] + " x " + pointSeries.Values [ i ] );
+                                pointSeries.MarkerStyles [ i ] = m_highLightMarkerStyle;
+
+                                selectCount++;
+                            }
+                            else
+                            {
+                                pointSeries.FillStyles [ i ] = null; //Remove marker if not selected
+                                pointSeries.MarkerStyles [ i ] = null;
+
+                                //NOTE: NEVRON LOOK HERE
+                                // a small percent do not "take" for reasons unknown.  So we just try real hard and they go through.
+                                int cnt = 0;
+                                while ( pointSeries.MarkerStyles [ i ] != null )
                                 {
-                                    if ( rangeX.Contains ( (double)pointSeries.XValues [ i ] ) &&
-                                        rangeY.Contains ( (double)pointSeries.Values [ i ] ) )
-                                    {
-                                        sb.AppendLine ( pointSeries.XValues [ i ] + " x " + pointSeries.Values [ i ] );
-                                        pointSeries.MarkerStyles [ i ] = m_highLightMarkerStyle;
-
-                                        selectCount++;
-                                    }
-                                    else
-                                    {
-                                        pointSeries.FillStyles [ i ] = null; //Remove marker if not selected
-                                        pointSeries.MarkerStyles [ i ] = null;
-
-                                        //NOTE: NEVRON LOOK HERE
-                                        // a small percent do not "take" for reasons unknown.  So we just try real hard and they go through.
-                                        int cnt = 0;
-                                        while ( pointSeries.MarkerStyles [ i ] != null )
-                                        {
-                                            System.Threading.Thread.Sleep ( 1 );
-                                            Console.Write ( "." );
-                                            pointSeries.MarkerStyles [ i ] = null;
-                                            cnt++;
-                                            if ( cnt > 100 )
-                                                System.Diagnostics.Debugger.Break ( );
-                                        }
-                                        if ( cnt > 0 )
-                                            Console.WriteLine ( i + " : " + cnt );
-                                        //System.Diagnostics.Debugger.Break ( );
-                                        notSelectedCount++;
-                                    }
+                                    System.Threading.Thread.Sleep ( 1 );
+                                    Console.Write ( "." );
+                                    pointSeries.MarkerStyles [ i ] = null;
+                                    cnt++;
+                                    if ( cnt > 100 )
+                                        System.Diagnostics.Debugger.Break ( );
                                 }
+                                if ( cnt > 0 )
+                                    Console.WriteLine ( i + " : " + cnt );
+                                notSelectedCount++;
                             }
                         }
-                        else if ( m_SelectedChart.Series [ j ] != null )
-                        {
-                            Console.WriteLine ( "Odd series type: " + m_SelectedChart.Series [ j ].GetType ( ).Name );
-                            System.Diagnostics.Debugger.Break ( );
-                        }
                     }
-
-                    System.Diagnostics.Debug.WriteLine ( "OnEndDrag, " + selectCount + " points selected, " + notSelectedCount + " points NOT selected\r\n\ttotal: " + ( selectCount + notSelectedCount ) );
-                    System.IO.File.WriteAllText ( @"C:\temp\point_select\Selected_" + DateTime.Now.ToOADate ( ) + ".txt", sb.ToString ( ) );
-                }
+                }
+
+                System.Diagnostics.Debug.WriteLine ( "OnEndDrag, " + selectCount + " points selected, " + notSelectedCount + " points NOT selected\r\n\ttotal: " + ( selectCount + notSelectedCount ) );
+                //System.IO.File.WriteAllText ( @"C:\temp\point_select\Selected_" + DateTime.Now.ToOADate ( ) + ".txt", sb.ToString ( ) );
             }

             m_SelectedChart.Document.Unlock ( );


Allow the API plugin to be installed during a "clean" nopCommerce installation without throwing any errors

--- Nop.Plugin.Api/ApiStartup.cs
+++ Nop.Plugin.Api/ApiStartup.cs
@@ -61,6 +61,12 @@

         public void Configure(IApplicationBuilder app)
         {
+            // During a clean install we should not register any middlewares i.e IdentityServer as it won't be able to create its
+            // tables without a connection string and will throw an exception
+            var dataSettings = DataSettingsManager.LoadSettings();
+            if (!dataSettings?.IsValid ?? true)
+                return;
+
             // The default route templates for the Swagger docs and swagger - ui are "swagger/docs/{apiVersion}" and "swagger/ui/index#/{assetPath}" respectively.
             //app.UseSwagger();
             //app.UseSwaggerUI(options =>
@@ -82,9 +88,10 @@

             SeedData(app);

+
             var rewriteOptions = new RewriteOptions()
-                .AddRewrite("oauth/(.*)", "connect/$1",true)
-                .AddRewrite("api/token", "connect/token",true);
+                .AddRewrite("oauth/(.*)", "connect/$1", true)
+                .AddRewrite("api/token", "connect/token", true);

             app.UseRewriter(rewriteOptions);

@@ -160,10 +167,13 @@
         }

         private void AddTokenGenerationPipeline(IServiceCollection services)
-        {
+        {
             RsaSecurityKey signingKey = CryptoHelper.CreateRsaSecurityKey();

             DataSettings dataSettings = DataSettingsManager.LoadSettings();
+            if (!dataSettings?.IsValid ?? true)
+                return;
+
             string connectionStringFromNop = dataSettings.DataConnectionString;

             var migrationsAssembly = typeof(ApiStartup).GetTypeInfo().Assembly.GetName().Name;


Update Customer.cs

Update Customer.cs

--- Openpay/Entities/Customer.cs
+++ Openpay/Entities/Customer.cs
@@ -34,5 +34,8 @@

         [JsonProperty(PropertyName = "creation_date")]
         public DateTime? CreationDate { get; set; }
+
+        [JsonProperty(PropertyName = "requires_account")]
+        public Boolean RequiresAccount { get; set; }
     }
 }


Rust player tracking abstraction for fields that specify the OnlinePlayers attribute

--- Oxide.Ext.Rust/RustPlugin.cs
+++ Oxide.Ext.Rust/RustPlugin.cs
@@ -1,4 +1,5 @@
-using System.Reflection;
+using System;
+using System.Reflection;

 using Oxide.Core;
 using Oxide.Core.Libraries;
@@ -25,6 +26,31 @@

         public override void HandleAddedToManager(PluginManager manager)
         {
+            foreach (FieldInfo field in GetType().GetFields(BindingFlags.NonPublic | BindingFlags.Instance))
+            {
+                var attributes = field.GetCustomAttributes(typeof(OnlinePlayersAttribute), true);
+                if (attributes.Length > 0)
+                {
+                    var plugin_field = new PluginFieldInfo(this, field);
+                    if (plugin_field.GenericArguments.Length != 2 || plugin_field.GenericArguments[0] != typeof(BasePlayer))
+                    {
+                        Puts("[{0}] The {1} field is not a Hash with a BasePlayer key! (online players will not be tracked)", Name, field.Name);
+                        continue;
+                    }
+                    if (!plugin_field.LookupMethod("Add", plugin_field.GenericArguments))
+                    {
+                        Puts("[{0}] The {1} field does not support adding BasePlayer keys! (online players will not be tracked)", Name, field.Name);
+                        continue;
+                    }
+                    if (!plugin_field.LookupMethod("Remove", typeof(BasePlayer)))
+                    {
+                        Puts("[{0}] The {1} field does not support removing BasePlayer keys! (online players will not be tracked)", Name, field.Name);
+                        continue;
+                    }
+                    onlinePlayerFields.Add(plugin_field);
+                }
+            }
+
             foreach (MethodInfo method in GetType().GetMethods(BindingFlags.NonPublic | BindingFlags.Instance))
             {
                 var attributes = method.GetCustomAttributes(typeof(ConsoleCommandAttribute), true);
@@ -42,8 +68,31 @@
                     cmd.AddChatCommand(attribute.Command, this, method.Name);
                 }
             }
+
+            if (onlinePlayerFields.Count > 0)
+            {
+                foreach (var player in BasePlayer.activePlayerList)
+                {
+                    foreach (var plugin_field in onlinePlayerFields)
+                        plugin_field.Call("Add", player, Activator.CreateInstance(plugin_field.GenericArguments[1], (object)player));
+                }
+            }

             base.HandleAddedToManager(manager);
+        }
+
+        [HookMethod("OnPlayerInit")]
+        void base_OnPlayerInit(BasePlayer player, Network.Connection connection)
+        {
+            foreach (var plugin_field in onlinePlayerFields)
+                plugin_field.Call("Add", player, Activator.CreateInstance(plugin_field.GenericArguments[1], (object)player));
+        }
+
+        [HookMethod("OnPlayerDisconnected")]
+        void base_OnPlayerDisconnected(BasePlayer player)
+        {
+            foreach (var plugin_field in onlinePlayerFields)
+                plugin_field.Call("Remove", player);
         }

         /// <summary>


refactor kScriptsDefaultApp usages

refactor kScriptsDefaultApp usages

--- resharper/src/resharper-unity/Unity3dRider/Assets/Plugins/Editor/JetBrains/RiderPlugin.cs
+++ resharper/src/resharper-unity/Unity3dRider/Assets/Plugins/Editor/JetBrains/RiderPlugin.cs
@@ -22,7 +22,7 @@

     private static string GetDefaultApp()
     {
-        var alreadySetPath = EditorPrefs.GetString("kScriptsDefaultApp");
+        var alreadySetPath = GetExternalScriptEditor();
         if (!string.IsNullOrEmpty(alreadySetPath) && alreadySetPath.ToLower().Contains("rider") &&
             RiderPathExist(alreadySetPath))
           return alreadySetPath;
@@ -43,7 +43,7 @@
               if (!string.IsNullOrEmpty(newPath.FullName))
               {
                 if (EnableLogging) Debug.Log("[Rider] " + string.Format("Update {0} to {1} product version: {2}", alreadySetPath, newPath, FileVersionInfo.GetVersionInfo(newPath.FullName).ProductVersion));
-                EditorPrefs.SetString("kScriptsDefaultApp", newPath.FullName);
+                SetExternalScriptEditor(newPath.FullName);
               }
             }
             break;
@@ -59,13 +59,13 @@
               if (!string.IsNullOrEmpty(newPathMac.FullName))
               {
                 if (EnableLogging) Debug.Log("[Rider] " + string.Format("Update {0} to {1}", alreadySetPath, newPathMac));
-                EditorPrefs.SetString("kScriptsDefaultApp", newPathMac.FullName);
+                SetExternalScriptEditor(newPathMac.FullName);
               }
             }
             break;
         }

-        var riderPath = EditorPrefs.GetString("kScriptsDefaultApp");
+        var riderPath = GetExternalScriptEditor();
         if (!RiderPathExist(riderPath))
         {
           EditorUtility.DisplayDialog("Rider executable not found",
@@ -109,10 +109,21 @@
       var projectName = Path.GetFileName(projectDirectory);
       SlnFile = Path.Combine(projectDirectory, string.Format("{0}.sln", projectName));

+      SetExternalScriptEditor(GetDefaultApp());
       InitializeEditorInstanceJson(projectDirectory);

       Debug.Log("[Rider] " + "Rider plugin initialized. You may enabled more Rider Debug output via Preferences -> Rider -> Enable Logging");
       Initialized = true;
+    }
+
+    private static string GetExternalScriptEditor()
+    {
+      return EditorPrefs.GetString("kScriptsDefaultApp");
+    }
+
+    private static void SetExternalScriptEditor(string path)
+    {
+      EditorPrefs.SetString("kScriptsDefaultApp", path);
     }

     private static bool RiderPathExist(string path)


Fix GetHashCode()

Fix GetHashCode()

--- Src/WHampson.Cascara/Types/CascaraChar16.cs
+++ Src/WHampson.Cascara/Types/CascaraChar16.cs
@@ -87,7 +87,7 @@

         public override int GetHashCode()
         {
-            return m_value | (m_value << 8);
+            return m_value | (m_value << 16);
         }

         public override string ToString()


Fixed not calling stop on server close

Fixed not calling stop on server close

If we do not call UdpConnectionManager.Stop() the thread will run
unnecessary.

--- Sharpex.GameLibrary/Framework/Network/Protocols/Udp/UdpServer.cs
+++ Sharpex.GameLibrary/Framework/Network/Protocols/Udp/UdpServer.cs
@@ -346,6 +346,7 @@
         {
             SendNotificationPackage(NotificationMode.ServerShutdown, null);
             _listener.Close();
+            _connectionManager.Stop();
             IsActive = false;
         }
     }


Added a no menus found text

Added a no menus found text

--- TUMCampusApp/controls/CanteenWidget.xaml.cs
+++ TUMCampusApp/controls/CanteenWidget.xaml.cs
@@ -93,6 +93,15 @@
                 setMenuType(id, "Tagesgericht", true, date);
                 setMenuType(id, "Aktionsessen", true, date);
                 setMenuType(id, "Self-Service", false, date);
+                if(menus_sckl.Children.Count <= 0)
+                {
+                    menus_sckl.Children.Add(new TextBlock()
+                    {
+                        Text = "No menus found!",
+                        HorizontalAlignment = HorizontalAlignment.Center,
+                        FontSize = 25
+                    });
+                }
             }).AsTask().Wait();

             if (date.CompareTo(DateTime.MaxValue) == 0)


TablatureLoaded event and PrintPreview() added to TablatureTextEditorBase.

--- Tabster.Controls/TablatureTextEditorBase.cs
+++ Tabster.Controls/TablatureTextEditorBase.cs
@@ -63,7 +63,12 @@

         public virtual void LoadTablature(ITablature tablature)
         {
-            Text = tablature.Contents;
+            TextBoxBase.Text = tablature.Contents;
+
+            if (TablatureLoaded != null)
+            {
+                TablatureLoaded(this, EventArgs.Empty);
+            }
         }

         public void Clear()
@@ -102,6 +107,16 @@
         }

         [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+        public bool HasScrollableContents
+        {
+            get
+            {
+                var size = TextRenderer.MeasureText(TextBoxBase.Text, TextBoxBase.Font);
+                return size.Width >= TextBoxBase.Width || size.Height >= TextBoxBase.Height;
+            }
+        }
+
+        [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
         public bool Modified
         {
             get { return TextBoxBase.Modified; }
@@ -113,32 +128,51 @@
         #region Events

         public event EventHandler ContentsModified;
+        public event EventHandler TablatureLoaded;

         #endregion

         #region Printing

-        public void Print(TablaturePrintDocumentSettings settings = null, bool showDialog = true)
-        {
-            var documentName = string.Format("Tablature Document {0}", DateTime.Now.ToString());
-
-            using (var printDocument = new TablaturePrintDocument(new AttributedTablature {Contents = Text}, TextBoxBase.Font) {DocumentName = documentName, Settings = settings ?? new TablaturePrintDocumentSettings()})
-            {
-                if (showDialog)
+        public void PrintPreview(TablaturePrintDocumentSettings settings = null)
+        {
+            var documentName = string.Format("Tablature Document {0}", DateTime.Now);
+
+            using (
+                var printDocument = new TablaturePrintDocument(new AttributedTablature {Contents = Text},
+                    TextBoxBase.Font)
                 {
-                    using (var dialog = new PrintPreviewDialog {Document = printDocument})
+                    DocumentName = documentName,
+                    Settings = settings ?? new TablaturePrintDocumentSettings()
+                })
+            {
+
+                using (var dialog = new PrintPreviewDialog {Document = printDocument})
+                {
+                    if (dialog.ShowDialog() == DialogResult.OK)
                     {
-                        if (dialog.ShowDialog() == DialogResult.OK)
-                        {
-                            printDocument.Print();
-                        }
+                        printDocument.Print();
                     }
                 }

-                else
+            }
+        }
+
+        public void Print(TablaturePrintDocumentSettings settings = null)
+        {
+            var documentName = string.Format("Tablature Document {0}", DateTime.Now);
+
+            using (
+                var printDocument = new TablaturePrintDocument(new AttributedTablature {Contents = Text},
+                    TextBoxBase.Font)
                 {
-                    printDocument.Print();
-                }
+                    DocumentName = documentName,
+                    Settings = settings ?? new TablaturePrintDocumentSettings()
+                })
+            {
+
+                printDocument.Print();
+
             }
         }


Revert AssemblyInfo attribute as otherwise AppVeyor won't patch version

--- StaMa/AssemblyInfo.cs
+++ StaMa/AssemblyInfo.cs
@@ -45,8 +45,7 @@
 // You can specify all the values or you can default the Revision and Build Numbers
 // by using the '*'.

-// Assembly version commented out by intention. Will be filled in by AppVeyor build system.
-//[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyVersion("0.0.0.0")]

 //
 // In order to sign your assembly you must specify a key to use. Refer to the


Fix issue with removing of symbolic directory links.

--- src/SilDev/Data.cs
+++ src/SilDev/Data.cs
@@ -5,7 +5,7 @@
 // ==============================================
 //
 // Filename: Data.cs
-// Version:  2017-01-02 10:23
+// Version:  2017-01-17 19:27
 //
 // Copyright (c) 2017, Si13n7 Developments (r)
 // All rights reserved.
@@ -587,7 +587,7 @@
         private static void UnLinker(string path, bool pathIsDir, bool backup = false, bool elevated = false)
         {
             var link = PathEx.Combine(path);
-            var cmd = $"{(pathIsDir ? "RD /S /Q" : "DEL /F /Q")}{(link.DirOrFileIsLink() ? " /A:L" : string.Empty)} \"{link}\"";
+            var cmd = $"{(pathIsDir ? "RD /Q" : "DEL /F /Q")}{(!pathIsDir && link.DirOrFileIsLink() ? " /A:L" : string.Empty)} \"{link}\"";
             if (backup && PathEx.DirOrFileExists($"{link}.SI13N7-BACKUP"))
                 cmd += $" & MOVE /Y \"{link}.SI13N7-BACKUP\" \"{link}\"";
             if (string.IsNullOrEmpty(cmd))


Fix build problem.

Fix build problem.

--- Tests/ServiceBelt.Tests/CorsFeatureTests.cs
+++ Tests/ServiceBelt.Tests/CorsFeatureTests.cs
@@ -15,6 +15,14 @@

         #region IAppHost

+        public List<Action<IAppHost>> OnDisposeCallbacks
+        {
+            get
+            {
+                throw new NotImplementedException();
+            }
+        }
+
         public string ResolveLocalizedString(string text, IRequest request)
         {
             throw new NotImplementedException();


Exceptions - Try/catch

Exceptions - Try/catch

--- Training.CSharpWorkshop.Tests/Exceptions.cs
+++ Training.CSharpWorkshop.Tests/Exceptions.cs
@@ -30,5 +30,41 @@
                     throw new ArgumentException("User does not exist");
             }
         }
+
+        [TestMethod]
+        public void TryCatchTest()
+        {
+            // Arrange
+            var userId = 2;
+            var expected = "Dave";
+
+            // Act
+            string actual = String.Empty;
+
+            try
+            {
+                switch (userId)
+                {
+                    case 1:
+                        actual = "Andrew";
+                        break;
+
+                    case 2:
+                        actual = "Dave";
+                        break;
+
+                    default:
+                        throw new ArgumentException("User does not exist");
+                }
+            }
+
+            // Assert
+            catch (Exception ex)
+            {
+                Assert.Fail(ex.Message);
+            }
+
+            Assert.AreEqual(expected, actual);
+        }
     }
 }


Use Migrate instead of EnsureCreated for the sample app (these are mutually exclusive)

--- samples/Basic/Startup.cs
+++ samples/Basic/Startup.cs
@@ -76,7 +76,7 @@
 			using (var scope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope())
 			{
 				var provider = scope.ServiceProvider;
-				provider.GetRequiredService<AppDbContext>().Database.EnsureCreated();
+				provider.GetRequiredService<AppDbContext>().Database.Migrate();
 			}

 			// Starts the processing server


Add culture test of ThrowIfAny

Add culture test of ThrowIfAny

--- Tests/FluentAssertions.Specs/Primitives/StringComparisonSpecs.cs
+++ Tests/FluentAssertions.Specs/Primitives/StringComparisonSpecs.cs
@@ -292,7 +292,7 @@
         public void When_stringifying_a_validation_context_it_should_ignore_culture()
         {
             // Arrange
-            var root = FluentAssertions.Equivalency.Node.From<int>(() => string.Empty);
+            var root = Node.From<int>(() => string.Empty);
             var context = new EquivalencyValidationContext(root)
             {
                 Subject = 1.234,
@@ -306,6 +306,25 @@
             str.Should().Match("*1.234*5.678*", "it should always use . as decimal separator");
         }

+        [CulturedFact("tr-TR")]
+        public void When_formatting_the_context_it_should_ignore_culture()
+        {
+            // Arrange
+            var context = new Dictionary<string, object>
+            {
+                ["FOO"] = 1.234
+            };
+            var strategy = new CollectingAssertionStrategy();
+            strategy.HandleFailure(string.Empty);
+
+            // Act
+            Action act = () => strategy.ThrowIfAny(context);
+
+            // Assert
+            act.Should().Throw<XunitException>()
+                .WithMessage("*1.234*", "it should always use . as decimal separator");
+        }
+
         public static IEnumerable<object[]> EquivalencyData
         {
             get


ProcessBridge: Remove dead code

ProcessBridge: Remove dead code

--- WalletWasabi/Microservices/ProcessBridge.cs
+++ WalletWasabi/Microservices/ProcessBridge.cs
@@ -36,18 +36,6 @@
 			if (openConsole && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
 			{
 				throw new PlatformNotSupportedException($"{RuntimeInformation.OSDescription} is not supported.");
-				//var escapedArguments = (hwiPath + " " + arguments).Replace("\"", "\\\"");
-				//useShellExecute = false;
-				//if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
-				//{
-				//	fileName = "xterm";
-				//	finalArguments = $"-e \"{escapedArguments}\"";
-				//}
-				//else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
-				//{
-				//	fileName = "osascript";
-				//	finalArguments = $"-e 'tell application \"Terminal\" to do script \"{escapedArguments}\"'";
-				//}
 			}

 			ProcessStartInfo startInfo = new ProcessStartInfo


add option to use apikey commandline

add option to use apikey commandline

--- source/OgCli/Program.cs
+++ source/OgCli/Program.cs
@@ -14,13 +14,14 @@
             if (Parser.Default.ParseArguments(args, options))
             {

-                if (!File.Exists(options.Config))
+                if (!File.Exists(options.Config) && string.IsNullOrWhiteSpace(options.Key))
                 {
                     Console.WriteLine("Config file not found.");
                     return;
                 }

-                var opsGenieClient = OpsGenieHelper.CreateOpsGenieClient(OpsGenieHelper.GetOpsGenieConfig(options.Config));
+                var opsGenieClient = OpsGenieHelper.CreateOpsGenieClient(
+                    OpsGenieHelper.GetOpsGenieConfig(options.Config, options.Key));

                 switch (options.Action)
                 {
@@ -55,6 +56,9 @@
             [Option('c', "config", DefaultValue = "OpsGenie.config")]
             public string Config { get; set; }

+            [Option('k', "apikey", DefaultValue = "")]
+            public string Key { get; set; }
+
             [Option('s', "source", DefaultValue = "Sourcet")]
             public string Source { get; set; }


Remove smartassness.

Remove smartassness.

--- WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
+++ WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -83,12 +83,6 @@

 			EnqueueCommand = ReactiveCommand.Create(async () =>
 			{
-				var increasePeersInAdvance = false;
-				if (RequiredBTC - AmountQueued > Money.Zero)
-				{
-					increasePeersInAdvance = true;
-				}
-
 				var selectedCoins = AvailableCoinsList.Coins.Where(c => c.IsSelected).ToList();

 				if (!selectedCoins.Any())
@@ -123,11 +117,6 @@
 				{
 					coin.IsSelected = false;
 				}
-
-				if (RequiredBTC - AmountQueued <= Money.Zero && increasePeersInAdvance && PeersRegistered < PeersNeeded) // The status response will come a few seconds later, but here we can already guess the peers are increased.
-				{
-					PeersRegistered++;
-				}
 			});

 			DequeueCommand = ReactiveCommand.Create(async () =>
@@ -158,11 +147,6 @@
 				}

 				WarningMessageDequeue = string.Empty;
-
-				if (RequiredBTC - AmountQueued > Money.Zero && PeersRegistered > 0) // The status response will come a few seconds later, but here we can already guess the peers are decreased.
-				{
-					PeersRegistered--;
-				}
 			});
 		}


fixed bug

fixed bug

--- src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_StringInterpolation.cs
+++ src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_StringInterpolation.cs
@@ -32,14 +32,15 @@
             return result;
         }

-        private static bool CanLowerToStringConcatenation(BoundInterpolatedString node)
+        private bool CanLowerToStringConcatenation(BoundInterpolatedString node)
         {
             foreach (var part in node.Parts)
             {
                 if (part is BoundStringInsert fillin)
                 {
                     // this is one of the expression holes
-                    if (fillin.HasErrors ||
+                    if (_inExpressionLambda ||
+                        fillin.HasErrors ||
                         fillin.Value.Type?.SpecialType != SpecialType.System_String ||
                         fillin.Alignment != null ||
                         fillin.Format != null)
@@ -119,7 +120,7 @@

             BoundExpression result;

-            if (!_inExpressionLambda && CanLowerToStringConcatenation(node))
+            if (CanLowerToStringConcatenation(node))
             {
                 // All fill-ins, if any, are strings, and none of them have alignment or format specifiers.
                 // We can lower to a more efficient string concatenation


size fix

size fix

--- Wire/ValueSerializers/DateTimeSerializer.cs
+++ Wire/ValueSerializers/DateTimeSerializer.cs
@@ -6,7 +6,7 @@
     public class DateTimeSerializer : SessionAwareValueSerializer<DateTime>
     {
         public const byte Manifest = 5;
-        public const int Size = sizeof(long);
+        public const int Size = sizeof(long) + sizeof(byte);
         public static readonly DateTimeSerializer Instance = new DateTimeSerializer();

         public DateTimeSerializer() : base(Manifest, () => WriteValueImpl, ()=> ReadValueImpl)
@@ -15,12 +15,13 @@

         private static unsafe void WriteValueImpl(Stream stream, DateTime dateTime, SerializerSession session)
         {
-            var bytes1 = session.GetBuffer(Size+1);
+            //datetime size is 9 ticks + kind
+            var bytes1 = session.GetBuffer(Size);
             fixed (byte* b = bytes1)
                 *((long*) b) = dateTime.Ticks;
-            bytes1[Size] = (byte) dateTime.Kind;
+            bytes1[Size-1] = (byte) dateTime.Kind;

-            stream.Write(bytes1, 0, Size+1);
+            stream.Write(bytes1, 0, Size);
         }

         public static DateTime ReadValueImpl(Stream stream, DeserializerSession session)
@@ -31,10 +32,10 @@

         private static DateTime ReadDateTime(Stream stream, DeserializerSession session)
         {
-            var buffer = session.GetBuffer(Size + 1);
-            stream.Read(buffer, 0, Size + 1);
+            var buffer = session.GetBuffer(Size);
+            stream.Read(buffer, 0, Size );
             var ticks = BitConverter.ToInt64(buffer, 0);
-            var kind = (DateTimeKind) buffer[Size]; //avoid reading a single byte from the stream
+            var kind = (DateTimeKind) buffer[Size-1]; //avoid reading a single byte from the stream
             var dateTime = new DateTime(ticks, kind);
             return dateTime;
         }


[Gtk] Fix TableViewBackend accessibility support

--- Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs
+++ Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs
@@ -71,6 +71,9 @@
 				// Gtk.ComboBoxEntry a11y doesn't work with Gtk/AtkCocoa.
 				// Workaround: Set a11y properties to its Gtk.Entry
 				Initialize ((backend?.Widget as Gtk.Bin)?.Child, eventSink);
+			} else if (backend is TableViewBackend && backend.Widget is Gtk.ScrolledWindow) {
+				// due to special Gtk.TreeView scrolling behaviour we need to apply a11y preferences to the tree
+				Initialize ((backend.Widget as Gtk.ScrolledWindow)?.Child, eventSink);
 			} else
 				Initialize (backend?.Widget, eventSink);
 		}


[WPF] Fix FileDialogBackend for no filters

--- Xwt.WPF/Xwt.WPFBackend/FileDialogBackend.cs
+++ Xwt.WPF/Xwt.WPFBackend/FileDialogBackend.cs
@@ -61,14 +61,21 @@

 		public FileDialogFilter ActiveFilter
 		{
-			get { return this.filters [this.dialog.FilterIndex - 1]; }
+			get
+			{
+				if (this.filters.Count == 0)
+					return null;
+
+				return this.filters [this.dialog.FilterIndex - 1];
+			}
+
 			set { this.dialog.FilterIndex = this.filters.IndexOf (value); }
 		}

 		public bool Run (IWindowFrameBackend parent)
 		{
 			bool? ok;
-
+
 			WindowBackend windowBackend = parent as WindowBackend;
 			if (windowBackend != null){
 				ok = this.dialog.ShowDialog (windowBackend.Window);