Twitter updates

Twitter updates

--- ArtSourceWrapper/Twitter.cs
+++ ArtSourceWrapper/Twitter.cs
@@ -34,9 +34,12 @@
         private Task<List<TwitterSubmissionWrapper>> GetSubmissions(int count) {
             return Auth.ExecuteOperationWithCredentials(_credentials, async () => {
                 List<TwitterSubmissionWrapper> list = _cache?.ToList() ?? new List<TwitterSubmissionWrapper>();
+				int originalCount = list.Count;

                 // Find the oldest tweet that exists in the already obtained page.
-                long minObtainedTweetId = list.Select(w => w.Tweet.Id).DefaultIfEmpty(0).Min();
+                long? minObtainedTweetId = list.Any()
+					? list.Select(w => w.Tweet.Id).Min()
+					: (long?)null;

                 if (_user == null) {
                     _user = await UserAsync.GetAuthenticatedUser();
@@ -44,36 +47,36 @@
                 }

                 // Multiple calls may be needed (because retweets and tweets w/o photos are skipped).
-                int i = 0;
+				int tries = 0;
                 while (list.Count < count) {
-                    if (++i > 10) {
-                        throw new TwitterWrapperException("No pictures were found in your recent tweets.");
-                    }
+					if (tries++ > 10) {
+						throw new TwitterWrapperException("No pictures were found in your recent tweets.");
+					}

-                    var ps = new UserTimelineParameters {
+					var ps = new UserTimelineParameters {
                         ExcludeReplies = false,
                         IncludeEntities = true,
                         IncludeRTS = true,
-                        MaximumNumberOfTweetsToRetrieve = 200
+                        MaximumNumberOfTweetsToRetrieve = 5
                     };
-                    ps.MaxId = minObtainedTweetId - 1;
+					ps.MaxId = (minObtainedTweetId ?? 0) - 1;

-                    // Get the tweets
-                    _lastUpdateGalleryParameters.Progress?.Report(i / 10.0);
+					// Get the tweets
+					double newlyAdded = list.Count - originalCount;
+					double needed = count - originalCount;
+                    _lastUpdateGalleryParameters.Progress?.Report(newlyAdded / needed);
                     var tweets = await TimelineAsync.GetUserTimeline(_user, ps);

-                    tweets = tweets.Where(t => t.CreatedAt > new DateTime(2017, 7, 1)).ToList();
-
-                    // If no tweets were returned, then there are no more tweets
-                    if (!tweets.Any()) {
-                        break;
-                    }
+					// If no tweets were returned, then there are no more tweets
+					if (!tweets.Any()) {
+						break;
+					}

                     // Wrap tweets
                     // Take no more than the size of the consumer's page (_lastUpdateGalleryParameters.Count)
                     // Skip retweets and tweets with no photos
                     foreach (var t in tweets.OrderByDescending(t => t.CreatedAt)) {
-                        minObtainedTweetId = Math.Min(minObtainedTweetId, t.Id);
+                        minObtainedTweetId = Math.Min(minObtainedTweetId ?? long.MaxValue, t.Id);

                         if (t.IsRetweet) continue;

@@ -81,6 +84,7 @@
                         if (firstPhoto == null) continue;

                         list.Add(new TwitterSubmissionWrapper(t, firstPhoto));
+						tries = 0;
                     }
                 }

@@ -118,7 +122,7 @@
             _lastUpdateGalleryParameters = p;
             _cache.Clear();
             _currentOffset = 0;
-            var list = (await GetSubmissions(3))
+            var list = (await GetSubmissions(p.Count + 1))
                 .Select(w => (ISubmissionWrapper)w)
                 .ToList();
             return new UpdateGalleryResult {


fix glitch for tiles, added TextureWrapMode.Clamp

--- Assets/Scripts/MapLoader.cs
+++ Assets/Scripts/MapLoader.cs
@@ -368,7 +368,8 @@
                                            new Vector2 (0.0f, 1.0f),//the pivot is relative 1 is max 0.5 half 0.0 min
                                            100);
             //we want pixelperfect!
-            sprite.texture.filterMode = FilterMode.Point;//This disable the antialias filter
+            sprite.texture.filterMode = FilterMode.Point;//This disable the antialias filter
+            sprite.texture.wrapMode = TextureWrapMode.Clamp;
             sprite.name = "Tile Sprite gid:" + gid;
             renderer.sprite = sprite;


Fixed issue in Singleton

Fixed issue in Singleton

--- Assets/Scripts/Singleton.cs
+++ Assets/Scripts/Singleton.cs
@@ -2,7 +2,7 @@
 using System.Collections.Generic;
 using UnityEngine;

-public class Singleton<T> : MonoBehaviour where T : Singleton<T>
+public class Singleton<T> where T : Singleton<T>
 {
     private static T instance;

@@ -16,7 +16,7 @@

 	public Singleton()
 	{
-		if (!instance)
+		if (instance == null)
 		{
 			instance = (T)this;
 		}


Apply default background color only to Twitter and TweetDeck websites

--- Browser/TweetDeckBrowser.cs
+++ Browser/TweetDeckBrowser.cs
@@ -76,8 +76,6 @@
 			this.browser.RegisterJsBridge("$TD", tdBridge);
 			this.browser.RegisterJsBridge("$TDU", updateBridge);

-			// ReSharper disable once PossiblyImpureMethodCallOnReadonlyVariable
-			this.browser.BrowserSettings.BackgroundColor = (uint) TwitterUtils.BackgroundColor.ToArgb();
 			this.browser.Dock = DockStyle.None;
 			this.browser.Location = ControlExtensions.InvisibleLocation;
 			this.browser.SetupZoomEvents();
@@ -135,7 +133,7 @@
 			if (frame.IsMain) {
 				string url = frame.Url;

-				if (!TwitterUrls.IsTwitterLogin2Factor(url)) {
+				if (TwitterUrls.IsTweetDeck(url) || (TwitterUrls.IsTwitter(url) && !TwitterUrls.IsTwitterLogin2Factor(url))) {
 					frame.ExecuteJavaScriptAsync(TwitterUtils.BackgroundColorOverride);
 				}
 			}


Release v2.0

Release v2.0

--- Build/CommonAssemblyInfo.cs
+++ Build/CommonAssemblyInfo.cs
@@ -15,6 +15,6 @@
 //
 // You can specify all the values or you can default the Revision and Build Numbers
 // by using the '*' as shown below:
-[assembly: AssemblyVersion("1.9.3")]
-[assembly: AssemblyFileVersion("1.9.3")]
-[assembly: AssemblyInformationalVersion("2.0-alpha6")]
+[assembly: AssemblyVersion("2.0.0")]
+[assembly: AssemblyFileVersion("2.0.0")]
+//[assembly: AssemblyInformationalVersion("2.0-alpha6")]


update

update

--- CSharpGL/Canvas/GLCanvas.cs
+++ CSharpGL/Canvas/GLCanvas.cs
@@ -59,8 +59,8 @@
             this.fullname = this.GetType().FullName;
         }

-        private bool showingCursor = true;
-        private bool showSystemCursor = true;
+        //private bool showingCursor = true;
+        //private bool showSystemCursor = true;

         ///// <summary>
         ///// show/hide system's cursor.


[LUCENENET-442] ParallelMultiSearcher threads don't handle all exceptions

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

--- src/core/Search/ParallelMultiSearcher.cs
+++ src/core/Search/ParallelMultiSearcher.cs
@@ -76,7 +76,7 @@
 		private int[] starts;

 		/// <summary>Creates a searchable which searches <i>searchables</i>. </summary>
-		public ParallelMultiSearcher(Searchable[] searchables):base(searchables)
+		public ParallelMultiSearcher(params Searchable[] searchables):base(searchables)
 		{
 			this.searchables = searchables;
 			this.starts = GetStarts();
@@ -247,7 +247,7 @@
 		private int i;
 		private PriorityQueue hq;
 		private int[] starts;
-		private System.IO.IOException ioe;
+		private System.Exception ioe;
 		private Sort sort;

 		public MultiSearcherThread(Searchable searchable, Weight weight, Filter filter, int nDocs, HitQueue hq, int i, int[] starts, System.String name):base(name)
@@ -280,9 +280,9 @@
 				docs = (sort == null)?searchable.Search(weight, filter, nDocs):searchable.Search(weight, filter, nDocs, sort);
 			}
 			// Store the IOException for later use by the caller of this thread
-			catch (System.IO.IOException ioe)
-			{
-				this.ioe = ioe;
+			catch (System.Exception e)
+			{
+				this.ioe = e;
 			}
 			if (this.ioe == null)
 			{
@@ -339,7 +339,8 @@

 		public virtual System.IO.IOException GetIOException()
 		{
-			return ioe;
+            if (ioe == null) return null;
+            return new System.IO.IOException(ioe.Message);
 		}
 	}
 }


Add alpha values into the stored palette options

--- elbgb_ui/MainForm.cs
+++ elbgb_ui/MainForm.cs
@@ -162,15 +162,15 @@
 		{
 			_palettes = new Dictionary<string, uint[]>
 			{
-				{"default", new uint[] {0xFFFFFF, 0xB7B7B7, 0x686868, 0x000000} },
+				{"default",			new uint[] {0xFFFFFFFF, 0xFFB7B7B7, 0xFF686868, 0xFF000000} },

 				// the following palettes from http://www.hardcoregaming101.net/gbdebate/gbcolours.htm
-				{"dark yellow",	new uint[] {0xFFF77B, 0xB5AE4A, 0x6B6931, 0x212010} },
-				{"light yellow", new uint[] {0xFFFF94, 0xD0D066, 0x949440, 0x666625} },
-				{"green", new uint[] {0xB7DC11, 0x88A808, 0x306030, 0x083808} },
-				{"greyscale", new uint[] {0xFFEFEFEF, 0xFFB2B2B2, 0xFF757575, 0xFF383838} },
-				{"stark b/w", new uint[] {0xFFFFFF, 0xB2B2B2, 0x757575, 0x000000} },
-				{"gb pocket", new uint[] {0xE3E6C9, 0xC3C4A5, 0x8E8B61, 0x6C6C4E} },
+				{"dark yellow",		new uint[] {0xFFFFF77B, 0xFFB5AE4A, 0xFF6B6931, 0xFF212010} },
+				{"light yellow",	new uint[] {0xFFFFFF94, 0xFFD0D066, 0xFF949440, 0xFF666625} },
+				{"green",			new uint[] {0xFFB7DC11, 0xFF88A808, 0xFF306030, 0xFF083808} },
+				{"greyscale",		new uint[] {0xFFEFEFEF, 0xFFB2B2B2, 0xFF757575, 0xFF383838} },
+				{"stark b/w",		new uint[] {0xFFFFFFFF, 0xFFB2B2B2, 0xFF757575, 0xFF000000} },
+				{"gb pocket",		new uint[] {0xFFE3E6C9, 0xFFC3C4A5, 0xFF8E8B61, 0xFF6C6C4E} },
 			};
 		}


Image modification

Image modification

--- ClientWPF/Windowadd.xaml.cs
+++ ClientWPF/Windowadd.xaml.cs
@@ -122,6 +122,13 @@

 				else // Modifier
 				{
+                    if (u != null)
+                    {
+                        BitmapImage bi = new BitmapImage(u);
+                        bien.PhotoPrincipaleBase64 = BitmapImagetoBase64(bi);
+                        bien.PhotosBase64 = new ObservableCollection<string>();
+                        bien.PhotosBase64.Add(bien.PhotoPrincipaleBase64);
+                    }
 					ServiceAgence.ResultatBool res = client.ModifierBienImmobilier(bien);

 				}


make CoapStack subclass of LayerStack

make CoapStack subclass of LayerStack

--- CoAP.NET/Stack/CoapStack.cs
+++ CoAP.NET/Stack/CoapStack.cs
@@ -10,6 +10,7 @@
  */

 using CoAP.Net;
+using CoAP.Server;

 namespace CoAP.Stack
 {
@@ -17,51 +18,14 @@
     /// Builds up the stack of CoAP layers
     /// that process the CoAP protocol.
     /// </summary>
-    public class CoapStack
+    public class CoapStack : LayerStack
     {
-        private LayerStack _stack = new LayerStack();
-
         public CoapStack(ICoapConfig config)
         {
-            _stack.AddLast("Observe", new ObserveLayer(config));
-            _stack.AddLast("Blockwise", new BlockwiseLayer(config));
-            _stack.AddLast("Token", new TokenLayer(config));
-            _stack.AddLast("Reliability", new ReliabilityLayer(config));
-        }
-
-        public LayerStack Layers
-        {
-            get { return _stack; }
-        }
-
-        public void SendRequest(Request request)
-        {
-            _stack.SendRequest(request);
-        }
-
-        public void SendResponse(Exchange exchange, Response response)
-        {
-            _stack.SendResponse(exchange, response);
-        }
-
-        public void SendEmptyMessage(Exchange exchange, EmptyMessage message)
-        {
-            _stack.SendEmptyMessage(exchange, message);
-        }
-
-        public void ReceiveRequest(Exchange exchange, Request request)
-        {
-            _stack.ReceiveRequest(exchange, request);
-        }
-
-        public void ReceiveResponse(Exchange exchange, Response response)
-        {
-            _stack.ReceiveResponse(exchange, response);
-        }
-
-        public void ReceiveEmptyMessage(Exchange exchange, EmptyMessage message)
-        {
-            _stack.ReceiveEmptyMessage(exchange, message);
+            this.AddLast("Observe", new ObserveLayer(config));
+            this.AddLast("Blockwise", new BlockwiseLayer(config));
+            this.AddLast("Token", new TokenLayer(config));
+            this.AddLast("Reliability", new ReliabilityLayer(config));
         }
     }
 }


Updated version number

Updated version number

--- src/SolutionVersion.cs
+++ src/SolutionVersion.cs
@@ -4,10 +4,10 @@

 [assembly: AssemblyProduct("Burrows")]
 [assembly: AssemblyCopyright("Copyright 2014 Eric Swann, et. al. - All rights reserved.")]
-[assembly: AssemblyVersion("0.3.2")]
-[assembly: AssemblyFileVersion("0.3.2")]
+[assembly: AssemblyVersion("0.3.3")]
+[assembly: AssemblyFileVersion("0.3.3")]

-[assembly: AssemblyInformationalVersion("0.3.2.0")]
+[assembly: AssemblyInformationalVersion("0.3.3.0")]
 [assembly: ComVisible(false)]
 [assembly: CLSCompliant(false)]


不要部分削除

不要部分削除

--- src/StringExtension.cs
+++ src/StringExtension.cs
@@ -19,7 +19,7 @@
     /// stringの拡張メソッド関係
     public static class StringExtension {

-        #region static
+        #region static methods

         /// コピーを返す
         /// <seealso cref="string.Copy(string)"/>
@@ -86,125 +86,6 @@
         //
         //

-#if false
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToByte(string)"/>
-        public static byte ToUInt8(this string self) {
-            return Convert.ToByte(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToUInt16(string)"/>
-        public static UInt16 ToUInt16(this string self) {
-            return Convert.ToUInt16(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToUInt32(string)"/>
-        public static UInt32 ToUInt32(this string self) {
-            return Convert.ToUInt32(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToUInt64(string)"/>
-        public static UInt64 ToUInt64(this string self) {
-            return Convert.ToUInt64(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToSByte(string)"/>
-        public static sbyte ToInt8(this string self) {
-            return Convert.ToSByte(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToInt16(string)"/>
-        public static Int16 ToInt16(this string self) {
-            return Convert.ToInt16(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToInt32(string)"/>
-        public static Int32 ToInt32(this string self) {
-            return Convert.ToInt32(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToInt64(string)"/>
-        public static Int64 ToInt64(this string self) {
-            return Convert.ToInt64(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToByte(string, int)"/>
-        public static byte ToUInt8(this string self, int fbase) {
-            return Convert.ToByte(self, fbase);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToUInt16(string, int)"/>
-        public static UInt16 ToUInt16(this string self, int fbase) {
-            return Convert.ToUInt16(self, fbase);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToUInt32(string, int)"/>
-        public static UInt32 ToUInt32(this string self, int fbase) {
-            return Convert.ToUInt32(self, fbase);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToUInt64(string, int)"/>
-        public static UInt64 ToUInt64(this string self, int fbase) {
-            return Convert.ToUInt64(self, fbase);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToSByte(string, int)"/>
-        public static sbyte ToInt8(this string self, int fbase) {
-            return Convert.ToSByte(self, fbase);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToInt16(string, int)"/>
-        public static Int16 ToInt16(this string self, int fbase) {
-            return Convert.ToInt16(self, fbase);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToInt32(string, int)"/>
-        public static Int32 ToInt32(this string self, int fbase) {
-            return Convert.ToInt32(self, fbase);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToInt64(string, int)"/>
-        public static Int64 ToInt64(this string self, int fbase) {
-            return Convert.ToInt64(self, fbase);
-        }
-
-        /// 論理値へ変換します
-        /// <seealso cref="Convert.ToBoolean(string)"/>
-        public static bool ToBoolean(this string self) {
-            return Convert.ToBoolean(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToSingle(string)"/>
-        public static float ToSingle(this string self) {
-            return Convert.ToSingle(self);
-        }
-
-        /// 数値へ変換します
-        /// <seealso cref="Convert.ToDouble(string)"/>
-        public static double ToDouble(this string self) {
-            return Convert.ToDouble(self);
-        }
-#endif
-        //
-        //
-        //
-
         #region option

         /// BASE64文字列からバイト配列へ変換します
@@ -232,8 +113,6 @@
             return count;
         }

-        #endregion
-
     }
 }


Added option to specify output file name

--- ExcelToTable/Program.cs
+++ ExcelToTable/Program.cs
@@ -31,6 +31,7 @@
             #region Define supported arguments
             List<SimpleArg> supportedArgs = new List<SimpleArg>();
             supportedArgs.Add(new SimpleArg { Name = "-filename", IsSwitch = false, Required = true, DefaultValue = null, ArgType = SimpleArgType.String, ExmaplePlaceholder="excelfilename", Description="Required. The Microsoft Excel file name" });
+            supportedArgs.Add(new SimpleArg { Name = "-outfile", IsSwitch = false, Required = false, DefaultValue = null, ArgType = SimpleArgType.String, ExmaplePlaceholder = "outputfilename", Description = "Optional. Output file. Defaults to [excelfilename] with format specific extension appended." });
             supportedArgs.Add(new SimpleArg { Name = "-format", IsSwitch = false, Required = false, DefaultValue = "html", ArgType = SimpleArgType.String, ExmaplePlaceholder = "html|wikitable|jsonsobjects|jsonarrays", Description = "Optional. Output file format [html|wikitable|jsonsobjects|jsonarrays]. Defaults to html." });
             supportedArgs.Add(new SimpleArg { Name = "-worksheet", IsSwitch = false, Required = false, DefaultValue = 1, ArgType = SimpleArgType.Integer, ExmaplePlaceholder = "1-n", Description = "Optional. A one-based index of the worksheet to export data from. Defaults to 1." });
             supportedArgs.Add(new SimpleArg { Name = "-range", IsSwitch = false, Required = false, DefaultValue = null, ArgType = SimpleArgType.String, ExmaplePlaceholder = "excelrange", Description = "Optional. Excel cell range to export. e.g. A12:C23. Defaults to the worksheet's used extents." });
@@ -59,6 +60,14 @@
             {
                 ar["-filename"] = System.IO.Path.GetFullPath(ar["-filename"]);
             }
+
+
+            string outfile = string.Empty;
+            if(ar.ContainsKey("-outfile"))
+            {
+                outfile = System.IO.Path.GetFullPath(ar["-outfile"]);
+            }
+

             WorkSheetRangeCoordinates wsrc = null;
@@ -118,9 +127,15 @@
                 fileext = ".html";
             }

-

-            System.IO.File.WriteAllText(System.IO.Path.GetFileName(ar["-filename"]) + fileext, text);
+            if (!String.IsNullOrWhiteSpace(outfile))
+            {
+                System.IO.File.WriteAllText(outfile, text);
+            }
+            else
+            {
+                System.IO.File.WriteAllText(System.IO.Path.GetFileName(ar["-filename"]) + fileext, text);
+            }
             #endregion
         }
     }


Add an InitData hot reload function to LoadHelper

--- Framework/LoadHelper.cs
+++ Framework/LoadHelper.cs
@@ -52,6 +52,24 @@
             catch (DirectoryNotFoundException) { }
             catch (FileNotFoundException) { }
         }
+        public static void ReloadPrefabs(EntityManager manager)
+        {
+            ((InitDataParser)ContentHelper.ContentParsers[typeof(InitData)]).Clear();
+            foreach (var plugin in SpectrumGame.Game.Plugins.Values)
+                LoadHelper.LoadPrefabs(plugin);
+            foreach (var prefab in InitData.Prefabs)
+            {
+                foreach (var entity in manager.FindByPrefab(prefab.Key))
+                {
+                    // Clear render properties so removing fields like Texture will work
+                    if (entity is GameObject gameObject)
+                    {
+                        gameObject.RenderProperties = new RenderProperties();
+                    }
+                    prefab.Value.Apply(entity);
+                }
+            }
+        }
         public static void LoadTypes(string LocalDir = null)
         {
             SpectrumGame.Game.Plugins["Main"] = Plugin.CreatePlugin("Main", ContentHelper.Single, Assembly.GetEntryAssembly());


Component type name used as component's initial name.

--- FritzTheDog/MainForm.cs
+++ FritzTheDog/MainForm.cs
@@ -157,7 +157,11 @@
         if( e.Data.GetDataPresent( DataFormats.StringFormat ) )
         {
           var info = (ComponentInfo)uiComponentTypes.SelectedItem;
-          ComponentControl componentControl = CreateComponent( info.FullTypeName );
+
+          ComponentControl componentControl =
+            CreateComponent(
+              info.FullTypeName,
+              info.FriendlyName );

           if( componentControl == null )
           {
@@ -177,11 +181,11 @@

     //-------------------------------------------------------------------------

-    ComponentControl CreateComponent( string typeName )
-    {
-      try
-      {
-        IComponent newComponent = Components.AddComponent( typeName, "New Component" );
+    ComponentControl CreateComponent( string typeName, string name )
+    {
+      try
+      {
+        IComponent newComponent = Components.AddComponent( typeName, name );

         return new ComponentControl( newComponent, Components );
       }


Remove comment that is on interface

Remove comment that is on interface

--- src/EditorFeatures/Core/Implementation/SmartIndent/AbstractIndentationService.cs
+++ src/EditorFeatures/Core/Implementation/SmartIndent/AbstractIndentationService.cs
@@ -58,16 +58,6 @@
             return indenter.GetDesiredIndentation(indentStyle);
         }

-        /// <summary>
-        /// Determines indentation for a blank line (i.e. after hitting enter at the end of a line,
-        /// or after moving to a blank line).
-        ///
-        /// Specifically, this function operates as if the line specified by <paramref name="lineNumber"/>
-        /// is blank.  The actual contents of the line do not matter.  All indentation information is
-        /// determined from the previous lines in the document.
-        ///
-        /// This function will always succeed.
-        /// </summary>
         public IndentationResult GetBlankLineIndentation(
             Document document, int lineNumber, FormattingOptions.IndentStyle indentStyle, CancellationToken cancellationToken)
         {


Adding doc comments to InsertElseIfClause & RemoveElseIfClause

--- src/Features/Core/Portable/SplitOrMergeIfStatements/IIfLikeStatementGenerator.cs
+++ src/Features/Core/Portable/SplitOrMergeIfStatements/IIfLikeStatementGenerator.cs
@@ -50,8 +50,15 @@
         /// </summary>
         SyntaxNode ToElseIfClause(SyntaxNode ifLikeStatement);

+        /// <summary>
+        /// Inserts <paramref name="elseIfClause"/> as a new else-if clause directly below
+        /// <paramref name="afterIfLikeStatement"/>, between it and any of its existing else-if clauses.
+        /// </summary>
         void InsertElseIfClause(SyntaxEditor editor, SyntaxNode afterIfLikeStatement, SyntaxNode elseIfClause);

+        /// <summary>
+        /// Removes <paramref name="elseIfClause"/> from a sequence of else-if clauses, preserving any subsequent clauses.
+        /// </summary>
         void RemoveElseIfClause(SyntaxEditor editor, SyntaxNode elseIfClause);
     }
 }


Missed a .NET assembly version

Missed a .NET assembly version

--- dotnet/src/webdriver/Properties/AssemblyInfo.cs
+++ dotnet/src/webdriver/Properties/AssemblyInfo.cs
@@ -49,5 +49,5 @@
 //      Minor Version
 //      Build Number
 //      Revision
-[assembly: AssemblyVersion("2.35.0.0")]
+[assembly: AssemblyVersion("2.36.0.0")]
 [assembly: AssemblyFileVersion("2.36.0.0")]


come on spidey

come on spidey


Change ActionMethodExecuted to be Verbose

--- src/Microsoft.AspNet.Mvc.Core/Logging/ControllerActionInvokerLoggerExtensions.cs
+++ src/Microsoft.AspNet.Mvc.Core/Logging/ControllerActionInvokerLoggerExtensions.cs
@@ -21,7 +21,7 @@
                 "Executing action method {ActionName} with arguments ({Arguments}) - ModelState is {ValidationState}'");

             _actionMethodExecuted = LoggerMessage.Define<string, string>(
-                LogLevel.Information,
+                LogLevel.Verbose,
                 2,
                 "Executed action method {ActionName}, returned result {ActionResult}.'");
         }


Replace DI of HttpContext in ShippingPriceService by direct injection of IServiceProvider #924 (#925)

--- src/Modules/SimplCommerce.Module.ShippingPrices/Services/ShippingPriceService.cs
+++ src/Modules/SimplCommerce.Module.ShippingPrices/Services/ShippingPriceService.cs
@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
-using Microsoft.AspNetCore.Http;
 using Microsoft.EntityFrameworkCore;
 using Microsoft.Extensions.DependencyInjection;
 using SimplCommerce.Infrastructure.Data;
@@ -12,12 +11,12 @@
 {
     public class ShippingPriceService : IShippingPriceService
     {
-        private HttpContext _httpContext;
+        private readonly IServiceProvider _serviceProvider;
         private readonly IRepositoryWithTypedId<ShippingProvider, string> _shippingProviderRepository;

-        public ShippingPriceService(IHttpContextAccessor contextAccessor, IRepositoryWithTypedId<ShippingProvider, string> shippingProviderRepository)
+        public ShippingPriceService(IServiceProvider serviceProvider, IRepositoryWithTypedId<ShippingProvider, string> shippingProviderRepository)
         {
-            _httpContext = contextAccessor.HttpContext;
+            _serviceProvider = serviceProvider;
             _shippingProviderRepository = shippingProviderRepository;
         }

@@ -25,7 +24,7 @@
         {
             var applicableShippingPrices = new List<ShippingPrice>();
             var providers = await _shippingProviderRepository.Query().ToListAsync();
-            var shippingRateServices = _httpContext.RequestServices.GetServices<IShippingPriceServiceProvider>();
+            var shippingRateServices = _serviceProvider.GetServices<IShippingPriceServiceProvider>();

             foreach(var provider in providers)
             {


CreateXml output when isDebug=true was UTF8, but xml encoding of mappings was UTF-16.

git-svn-id: bab0c2de90ee11a20376049c2cdee62584491f34@1959 73e77b4c-caa6-f847-a29a-24ab75ae54b6

--- ActiveRecord/Castle.ActiveRecord/Framework/Internal/Visitors/XmlGenerationVisitor.cs
+++ ActiveRecord/Castle.ActiveRecord/Framework/Internal/Visitors/XmlGenerationVisitor.cs
@@ -57,7 +57,7 @@
 				{
 					String xml = Xml;

-					byte[] ba = System.Text.ASCIIEncoding.UTF8.GetBytes(xml);
+					byte[] ba = System.Text.ASCIIEncoding.Unicode.GetBytes(xml);

 					fs.Write(ba, 0, ba.Length);


Delete AssemblyInfo.cs

Delete AssemblyInfo.cs

--- CSharp-2/02.Multidimensional-Arrays/05.SortArrayOfStrings/Properties/AssemblyInfo.cs
+++ CSharp-2/02.Multidimensional-Arrays/05.SortArrayOfStrings/Properties/AssemblyInfo.cs
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("05.SortArrayOfStrings")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("05.SortArrayOfStrings")]
-[assembly: AssemblyCopyright("Copyright ©  2014")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("e502e977-9ce7-4721-9915-a076f1a3a59c")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]


Fixed retry mechanism for async tasks.

Fixed retry mechanism for async tasks.

--- FlubuCore/Tasks/TaskBase.cs
+++ FlubuCore/Tasks/TaskBase.cs
@@ -178,7 +178,7 @@
                     retriedTimes++;
                     contextInternal.LogInfo($"Task failed. Retriying for {retriedTimes} time(s). Number of all retries {NumberOfRetries}.");
                     Thread.Sleep(RetryDelay);
-                    Execute(context);
+                    await ExecuteAsync(context);
                 }

                 throw;


refactor: Replace some iar item name generation in tests with helper function

--- OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -219,8 +219,7 @@
             UUID userItemCreatorUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");

             string itemName = "b.lsl";
-            string archiveItemName
-                = string.Format("{0}{1}{2}", itemName, "_", UUID.Random());
+            string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random());

             MemoryStream archiveWriteStream = new MemoryStream();
             TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
@@ -313,8 +312,7 @@
             //UUID userItemCreatorUuid = UUID.Parse("00000000-0000-0000-0000-000000008888");

             string itemName = "b.lsl";
-            string archiveItemName
-                = string.Format("{0}{1}{2}", itemName, "_", UUID.Random());
+            string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random());

             MemoryStream archiveWriteStream = new MemoryStream();
             TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
@@ -381,8 +379,7 @@
             string user2LastName = "Mitty";

             string itemName = "b.lsl";
-            string archiveItemName
-                = string.Format("{0}{1}{2}", itemName, "_", UUID.Random());
+            string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random());

             MemoryStream archiveWriteStream = new MemoryStream();
             TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);


Removes unused using statements.

Removes unused using statements.

--- ProjectHekate.Scripting/Bytecode.Generators/PropertyIdentifierExpressionGenerator.cs
+++ ProjectHekate.Scripting/Bytecode.Generators/PropertyIdentifierExpressionGenerator.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using ProjectHekate.Scripting.Helpers;
+using ProjectHekate.Scripting.Helpers;
 using ProjectHekate.Scripting.Interfaces;

 namespace ProjectHekate.Scripting.Bytecode.Generators


Fix bug where calling a method which returns a BaseForm didn't show the form.

--- AppModule.cs
+++ AppModule.cs
@@ -597,7 +597,7 @@
 					Response.AddHeader("Expires", DateTime.UtcNow.ToString("R"));
 					if (method.ReturnType == typeof(void))
 						Respond();									// Builds response from template
-					else if(method.ReturnType.IsSubclassOf(typeof(BaseForm)))
+					else if(o is BaseForm)
 						(o as BaseForm).Show();
 					else
 						WriteResponse(o, null, HttpStatusCode.OK);	// Builds response from return value


Delete BlackHole.cs

Delete BlackHole.cs

--- BlackHole.cs
+++ BlackHole.cs
@@ -1,39 +0,0 @@
-using UnityEngine;
-using System.Collections;
-
-public class BlackHole : MonoBehaviour
-{
-    public bool active = true;
-    bool activateTriggers = false;
-    public int numberController = 0;
-    private float speed = 500f;
-    public Vector2 velocity;
-    public Rigidbody2D rigidBody;
-    public BlackHoleTrigger firstTrigger;
-    public BlackHoleTrigger secondTrigger;
-
-    // Use this for initialization
-    void Start ()
-    {
-        rigidBody = GetComponent<Rigidbody2D>();
-	}
-
-	// Update is called once per frame
-	void Update ()
-    {
-        if(!activateTriggers && active)
-        {
-            firstTrigger.SetInnerTrigger("Player", numberController);
-            secondTrigger.SetOuterTrigger("Player", numberController);
-            firstTrigger.Activate();
-            secondTrigger.Activate();
-            activateTriggers = true;
-        }
-        if (active && activateTriggers)
-        {
-            rigidBody.AddForce(velocity.normalized * speed * Time.deltaTime);
-            Destroy(gameObject, 5f);
-        }
-	}
-
-}


Removed NotImplementedException from Adventurer.Update.

--- Game/Entities/Adventurer.cs
+++ Game/Entities/Adventurer.cs
@@ -6,7 +6,6 @@
 	{
 		public override void Update()
 		{
-			throw new System.NotImplementedException();
 		}

 		public override void Paint(Graphics g)


Fixes #111 - target file should be always overwritten while renaming

--- GitTfs.VsCommon/Wrappers.cs
+++ GitTfs.VsCommon/Wrappers.cs
@@ -442,8 +442,16 @@

         public int PendRename(string pathFrom, string pathTo)
         {
+			//looks like TFS Api cannot overwrite existing target file
+			EnsureTargetFileDoesNotExist(pathTo);
+
             return _workspace.PendRename(pathFrom, pathTo);
         }
+
+    	private void EnsureTargetFileDoesNotExist(string pathTo)
+    	{
+    		File.Delete(pathTo);
+    	}

         public void ForceGetFile(string path, int changeset)
         {


stylecop

stylecop

--- GoldenFox/PartsTraverser.cs
+++ GoldenFox/PartsTraverser.cs
@@ -24,13 +24,7 @@
             return n;
         }

-        private PartsTraverser Skip()
-        {
-            _parts = _parts.Skip(1).ToList();
-            return this;
-        }
-
-        public string Peek()
+       public string Peek()
         {
             return _parts.Any() ? _parts.First() : null;
         }
@@ -72,5 +66,11 @@
             _parts = _parts.Skip(1).ToList();
             return this;
         }
+
+        private PartsTraverser Skip()
+        {
+            _parts = _parts.Skip(1).ToList();
+            return this;
+        }
     }
 }


add support for ping

add support for ping

--- HappyFunTimes/GameServer.cs
+++ HappyFunTimes/GameServer.cs
@@ -42,6 +42,7 @@
     public class Options {
         public Options() {
             cwd = System.IO.Directory.GetCurrentDirectory();
+            disconnectPlayersIfGameDisconnects = true;
         }
         public string gameId;
         public string controllerUrl;    // not used! left over so things don't break
@@ -59,7 +60,7 @@
         m_gameSystem = new GameSystem(this);

         m_eventProcessor = m_gameObject.AddComponent<EventProcessor>();
-		m_eventProcessor.Init(this);
+        m_eventProcessor.Init(this);
     }

     public void Init() {
@@ -156,6 +157,11 @@
         //invoke when socket message
         if ( e!= null && e.Type == Opcode.Text) {
             try {
+                // Handle ping.
+                if (e.Data == "P") {
+                    Send("P");
+                    return;
+                }
                 MessageToClient m = m_deserializer.Deserialize<MessageToClient>(e.Data);
                 // TODO: make this a dict to callback
                 if (m.cmd.Equals("start")) {


change regex for parsing harmony response - makes it work on mono/pi

--- HarmonyHub/HarmonyClient.cs
+++ HarmonyHub/HarmonyClient.cs
@@ -170,7 +170,7 @@
                 // Activity commands send 100 (continue) until they finish
                 if (iq.InnerXml.Contains("errorcode=\"200\""))
                 {
-                    const string identityRegEx = "errorstring=\"OK\">(.*)</oa>";
+                    const string identityRegEx = "\">(.*)</oa>";
                     var regex = new Regex(identityRegEx, RegexOptions.IgnoreCase | RegexOptions.Singleline);

                     switch (_clientCommand)


Minor optimization

Minor optimization

--- Heroes.ReplayParser/Unit.cs
+++ Heroes.ReplayParser/Unit.cs
@@ -639,10 +639,10 @@
             // Add 'estimated' minion positions based on their fixed pathing
             // Without these positions, minions can appear to travel through walls straight across the map
             // These estimated positions are actually quite accurate, as minions always follow a path connecting each fort/keep in their lane
-            var numberOfStructureTiers = replay.Units.Where(i => i.Name.StartsWith("TownTownHall")).Select(i => i.Name).Distinct().Count();
-            var uniqueTierName = replay.Units.First(i => i.Name.StartsWith("TownTownHall")).Name;
-            var numberOfLanes = replay.Units.Count(i => i.Name == uniqueTierName && i.Team == 0);
-            var minionWayPoints = replay.Units.Where(i => i.Name.StartsWith("TownTownHall")).Select(j => j.PointBorn).OrderBy(j => j.X).Skip(numberOfLanes).OrderByDescending(j => j.X).Skip(numberOfLanes).OrderBy(j => j.Y);
+            var townHallUnits = replay.Units.Where(i => i.Name.StartsWith("TownTownHall")).ToArray();
+            var numberOfStructureTiers = townHallUnits.Select(i => i.Name).Distinct().Count();
+            var numberOfLanes = replay.Units.Count(i => i.Name == townHallUnits[0].Name && i.Team == 0);
+            var minionWayPoints = townHallUnits.Select(j => j.PointBorn).OrderBy(j => j.X).Skip(numberOfLanes).OrderByDescending(j => j.X).Skip(numberOfLanes).OrderBy(j => j.Y);
             for (var team = 0; team <= 1; team++)
             {
                 // Gather all minion units for this team


Table reformated scsm info

Table reformated scsm info

--- ITSWebMgmt/SCSMTest.aspx.cs
+++ ITSWebMgmt/SCSMTest.aspx.cs
@@ -70,6 +70,10 @@

             sb.Append("
Open Requests

");

+            var helper = new HTMLTableHelper(4);
+            sb.Append(helper.printStart());
+            sb.Append(helper.printRow(new string[]{"ID","Title", "Status", "Last Change" }, true));
+
             for (int i = 0; i < json["MyRequest"].Length; i++)
             {
                 if (!"Closed".Equals(json["MyRequest"][i]["Status"]["Name"])) {
@@ -83,12 +87,23 @@
                     {
                         link = "https://service.aau.dk/ServiceRequest/Edit/" + id;
                     }
-
-                    sb.Append("" + json["MyRequest"][i]["Id"] + " - " + json["MyRequest"][i]["Title"] + " - " + json["MyRequest"][i]["Status"]["Name"] + "
");
+                    string sID = "" + json["MyRequest"][i]["Id"] + "
";
+                    string sTitle = json["MyRequest"][i]["Title"];
+                    string sStatus = json["MyRequest"][i]["Status"]["Name"];
+                    string tmp = json["MyRequest"][i]["LastModified"];
+                    string sLastChange = Convert.ToDateTime(tmp).ToString();
+
+                    sb.Append(helper.printRow(new String[] { sID, sTitle, sStatus, sLastChange }));
+                    //sb.Append("" + json["MyRequest"][i]["Id"] + " - " + json["MyRequest"][i]["Title"] + " - " + json["MyRequest"][i]["Status"]["Name"] + "
");
                 }
             }
+            sb.Append(helper.printEnd());

             sb.Append("

Closed Requests
");
+            sb.Append(helper.printStart());
+            sb.Append(helper.printRow(new string[] { "ID", "Title", "Status", "Last Change" }, true));
+
+
             for (int i = 0; i < json["MyRequest"].Length; i++)
             {
                 if ("Closed".Equals(json["MyRequest"][i]["Status"]["Name"]))
@@ -103,11 +118,19 @@
                     {
                         link = "https://service.aau.dk/ServiceRequest/Edit/" + id;
                     }
-
-                    sb.Append("" + json["MyRequest"][i]["Id"] + " - " + json["MyRequest"][i]["Title"] + " - " + json["MyRequest"][i]["Status"]["Name"] + "
");
+                    string sID = "" + json["MyRequest"][i]["Id"] + "
";
+                    string sTitle = json["MyRequest"][i]["Title"];
+                    string sStatus = json["MyRequest"][i]["Status"]["Name"];
+                    string tmp = json["MyRequest"][i]["LastModified"];
+                    string sLastChange = Convert.ToDateTime(tmp).ToString();
+
+                    sb.Append(helper.printRow(new String[] { sID, sTitle, sStatus, sLastChange }));
                 }
             }
-
+
+            sb.Append(helper.printEnd());
+
+
             //sb.Append("

IsAssignedToUser
");
             //foreach (dynamic s in json["IsAssignedToUser"])
             //for (int i = 0; i < json["IsAssignedToUser"].Length; i++)


Починил тесты после перехода на ulong

Починил тесты после перехода на ulong

--- VkNet.Tests/Categories/GroupsCategoryTest.cs
+++ VkNet.Tests/Categories/GroupsCategoryTest.cs
@@ -83,7 +83,7 @@
 				  }";

 			var groups = GetMockedGroupCategory(url, json);
-			bool result = groups.Leave(-1);
+			bool result = groups.Leave(0);

 			Assert.That(result, Is.True);
 		}
@@ -486,7 +486,7 @@
 				  }";

 			var groups = GetMockedGroupCategory(url, json);
-			This.Action(() => groups.IsMember(-1, 4793858)).Throws<InvalidParameterException>()
+			This.Action(() => groups.IsMember(0, 4793858)).Throws<InvalidParameterException>()
 				.Message.ShouldEqual("Invalid group id");
 		}

@@ -500,7 +500,7 @@
 				  }";

 			var groups = GetMockedGroupCategory(url, json);
-			bool result = groups.IsMember(637247, -1);
+			bool result = groups.IsMember(637247, 0);
 			Assert.That(result, Is.False);
 		}

@@ -640,7 +640,7 @@
 			var groups = GetMockedGroupCategory(url, json);

 			int totalCount;
-			This.Action(() => groups.GetMembers(-1, out totalCount)).Throws<InvalidParameterException>();
+			This.Action(() => groups.GetMembers(0, out totalCount)).Throws<InvalidParameterException>();
 		}

 		[Test]
@@ -909,7 +909,7 @@

 			var cat = GetMockedGroupCategory(url, json);

-			This.Action(() => cat.GetById(-1)).Throws<InvalidParameterException>();
+			This.Action(() => cat.GetById(0)).Throws<InvalidParameterException>();
 		}

 		[Test]
@@ -944,7 +944,7 @@

 			var cat = GetMockedGroupCategory(url, json);

-			This.Action(() => cat.GetById(new long[] { -1 })).Throws<InvalidParameterException>();
+			This.Action(() => cat.GetById(new ulong[] { 0 })).Throws<InvalidParameterException>();
 		}

 		[Test]
@@ -982,7 +982,7 @@
 				  }";

 			var cat = GetMockedGroupCategory(url, json);
-			var groups = cat.GetById(new long[] { 17683660, 637247 }).ToList();
+			var groups = cat.GetById(new ulong[] { 17683660, 637247 }).ToList();

 			Assert.That(groups.Count == 2);
 			Assert.That(groups[0].Id, Is.EqualTo(17683660));
@@ -1055,7 +1055,7 @@

 			var category = GetMockedGroupCategory(url, json);

-			var groups = category.GetById(new long[] { 17683660, 637247 }, GroupsFields.All).ToList();
+			var groups = category.GetById(new ulong[] { 17683660, 637247 }, GroupsFields.All).ToList();

 			Assert.That(groups.Count, Is.EqualTo(2));
 			Assert.That(groups[0].Id, Is.EqualTo(17683660));


Revert change to access token logic. Restores two-step acquisition of access tokens on asynchronous calls.

--- src/ProxyExtensions/Microsoft.OData.ProxyExtensions/DataServiceContextWrapper.cs
+++ src/ProxyExtensions/Microsoft.OData.ProxyExtensions/DataServiceContextWrapper.cs
@@ -15,6 +15,8 @@
 {
     public partial class DataServiceContextWrapper : DataServiceContext
     {
+        private object _syncLock = new object();
+        private string _accessToken;
         private readonly Func<Task<string>> _accessTokenGetter;
         private readonly HashSet<EntityBase> _modifiedEntities = new HashSet<EntityBase>();

@@ -27,6 +29,15 @@
             }
         }

+        private async Task SetToken()
+        {
+            var token = await _accessTokenGetter();
+            lock (_syncLock)
+            {
+                _accessToken = token;
+            }
+        }
+
         public DataServiceContextWrapper(Uri serviceRoot, ODataProtocolVersion maxProtocolVersion, Func<Task<string>> accessTokenGetter)
             : base(serviceRoot, maxProtocolVersion)
         {
@@ -34,7 +45,7 @@

             IgnoreMissingProperties = true;

-            BuildingRequest += async (sender, args) => args.Headers.Add("Authorization", "Bearer " + await _accessTokenGetter());
+            BuildingRequest += (sender, args) => args.Headers.Add("Authorization", "Bearer " + _accessToken);

             Configurations.RequestPipeline.OnEntryStarting(args =>
             {
@@ -92,6 +103,8 @@
         {
             try
             {
+                await SetToken();
+
                 return await Task.Factory.FromAsync(
                     inner.BeginExecute,
                     i => inner.EndExecute(i).Cast<TInterface>().SingleOrDefault(),
@@ -115,6 +128,8 @@
             try
             {
                 var requests = (from i in queries select (DataServiceRequest)i.Query).ToArray();
+
+                await SetToken();

                 var responses = await Task.Factory.FromAsync<DataServiceRequest[], DataServiceResponse>(
                     (q, callback, state) => BeginExecuteBatch(callback, state, q), // need to reorder parameters
@@ -165,9 +180,9 @@

         public async Task<Stream> GetStreamAsync(Uri requestUriTmp, IDictionary<string, string> headers)
         {
-            using (var client = new System.Net.Http.HttpClient())
-            {
-                using (var request = new System.Net.Http.HttpRequestMessage(System.Net.Http.HttpMethod.Get, requestUriTmp))
+            using (var client = new HttpClient())
+            {
+                using (var request = new HttpRequestMessage(HttpMethod.Get, requestUriTmp))
                 {
                     request.Headers.Add("Authorization", "Bearer " + await _accessTokenGetter());
                     request.Headers.Add("Accept", "*/*");
@@ -210,6 +225,8 @@
             {
                 if (!string.IsNullOrEmpty(streamName))
                 {
+                    await SetToken();
+
                     var resp = await Task.Factory.FromAsync<object, string, DataServiceRequestArgs, DataServiceStreamResponse>(
                         BeginGetReadStream,
                         EndGetReadStream,
@@ -248,6 +265,8 @@
         {
             try
             {
+                await SetToken();
+
                 return await Task.Factory.FromAsync(
                     inner.BeginExecute,
                     new Func<IAsyncResult, IPagedCollection<TInterface>>(
@@ -380,6 +399,8 @@
         {
             try
             {
+                await SetToken();
+
                 return await Task.Factory.FromAsync(
                     (callback, state) => BeginExecute(token, callback, state),
                     i => (QueryOperationResponse<TSource>)EndExecute<TSource>(i),
@@ -402,6 +423,8 @@
         {
             try
             {
+                await SetToken();
+
                 var result = await Task.Factory.FromAsync(
                     BeginSaveChanges,
                     new Func<IAsyncResult, DataServiceResponse>(EndSaveChanges),
@@ -440,6 +463,8 @@
         {
             try
             {
+                await SetToken();
+
                 return await Task.Factory.FromAsync(
                     (callback, state) => BeginLoadProperty(entity, path, callback, state),
                     new Func<IAsyncResult, IPagedCollection<TInterface>>(
@@ -521,7 +546,7 @@
             return null;
         }

-        private static async Task<Exception> ProcessErrorAsync(System.Net.Http.HttpResponseMessage response)
+        private static async Task<Exception> ProcessErrorAsync(HttpResponseMessage response)
         {
             if (response.Content == null)
             {
@@ -530,7 +555,7 @@

             if (response.Content.Headers.ContentType == null)
             {
-                return new System.Net.Http.HttpRequestException(await response.Content.ReadAsStringAsync());
+                return new HttpRequestException(await response.Content.ReadAsStringAsync());
             }

             using (var stream = await response.Content.ReadAsStreamAsync())


they pass with Include

they pass with Include

--- src/UnitTests/MappingInheritance/ShouldSupportOnlyDestinationTypeBeingDerived.cs
+++ src/UnitTests/MappingInheritance/ShouldSupportOnlyDestinationTypeBeingDerived.cs
@@ -46,7 +46,7 @@
             {
                 cfg.CreateMap<Order, OrderDTO>();
                 cfg.CreateMap<Customer, CustomerDTO>();
-                cfg.CreateMap<Customer, CustomerStubDTO>().As<CustomerDTO>();
+                cfg.CreateMap<Customer, CustomerStubDTO>().Include<Customer, CustomerDTO>();
             });
             var orderDto = Mapper.Map<Order, OrderDTO>(order);

@@ -94,7 +94,7 @@
             {
                 cfg.CreateMap(typeof(Order), typeof(OrderDTO));
                 cfg.CreateMap(typeof(Customer), typeof(CustomerDTO));
-                cfg.CreateMap(typeof(Customer), typeof(CustomerStubDTO)).As(typeof(CustomerDTO));
+                cfg.CreateMap(typeof(Customer), typeof(CustomerStubDTO)).Include(typeof(Customer), typeof(CustomerDTO));
             });
             var orderDto = Mapper.Map<Order, OrderDTO>(order);


Remove full namespace

Remove full namespace

--- BusObject.cs
+++ BusObject.cs
@@ -323,7 +323,7 @@
 			modBdef = asmBdef.DefineDynamicModule ("Defs.dll", "Defs.dll");
 		}

-		static System.Collections.Generic.Dictionary<Type,Type> map = new System.Collections.Generic.Dictionary<Type,Type> ();
+		static Dictionary<Type,Type> map = new Dictionary<Type,Type> ();

 		public static Type DefineType (Type declType)
 		{


Remove unnecessary type specification

Remove unnecessary type specification

--- osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs
+++ osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs
@@ -26,7 +26,7 @@
         {
             InputManager.MoveMouseTo(Vector2.Zero);

-            Children = boxes = new IdleTrackingBox[]
+            Children = boxes = new[]
             {
                 box1 = new IdleTrackingBox(2000)
                 {


Add failing test case

Add failing test case

--- osu.Game.Tests/Visual/Online/TestSceneMessageNotifier.cs
+++ osu.Game.Tests/Visual/Online/TestSceneMessageNotifier.cs
@@ -2,6 +2,7 @@
 // See the LICENCE file in the repository root for full licence text.

 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using NUnit.Framework;
 using osu.Framework.Allocation;
@@ -178,6 +179,36 @@
             AddAssert("1 notification fired", () => testContainer.NotificationOverlay.UnreadCount.Value == 1);
         }

+        /// <summary>
+        /// Ensures that <see cref="MessageNotifier"/> handles channels which have not been or could not be resolved (i.e. <see cref="Channel.Id"/> = 0).
+        /// </summary>
+        [Test]
+        public void TestSendInUnresolvedChannel()
+        {
+            int i = 1;
+            Channel unresolved = null;
+
+            AddRepeatStep("join unresolved channels", () => testContainer.ChannelManager.JoinChannel(unresolved = new Channel(new APIUser
+            {
+                Id = 100 + i,
+                Username = $"Foreign #{i++}",
+            })), 5);
+
+            AddStep("send message in unresolved channel", () =>
+            {
+                Debug.Assert(unresolved.Id == 0);
+
+                unresolved.AddLocalEcho(new LocalEchoMessage
+                {
+                    Sender = API.LocalUser.Value,
+                    ChannelId = unresolved.Id,
+                    Content = "Some message",
+                });
+            });
+
+            AddAssert("no notifications fired", () => testContainer.NotificationOverlay.UnreadCount.Value == 0);
+        }
+
         private void receiveMessage(APIUser sender, Channel channel, string content) => channel.AddNewMessages(createMessage(sender, channel, content));

         private Message createMessage(APIUser sender, Channel channel, string content) => new Message(messageIdCounter++)


Don't mix DOS and Unix newline characters

--- projects/ndocproc/src/NDocProc.cs
+++ projects/ndocproc/src/NDocProc.cs
@@ -20,12 +20,12 @@
 // THE SOFTWARE.
 //
 using System;
-using System.Collections;
+using System.Collections;
 using System.Collections.Generic;
 using System.IO;
 using System.Reflection;
 using System.Text;
-using System.Xml;
+using System.Xml;
 using System.Linq;

 namespace com.rabbitmq.tools.ndocproc {
@@ -67,9 +67,9 @@
         }

         public NDocProc(ArrayList args) {
-            Banner();
-
-            while (args.Count > 0 && IsOptionName((string)args[0]))
+            Banner();
+
+            while (args.Count > 0 && IsOptionName((string)args[0]))
             {
                 HandleOption((string) args[0]);
                 args.RemoveAt(0);
@@ -90,11 +90,11 @@

             Reflect();
             Generate();
-        }
-
-        private static bool IsOptionName(string s)
-        {
-            return (s.StartsWith("/no") || s.StartsWith("/supress"));
+        }
+
+        private static bool IsOptionName(string s)
+        {
+            return (s.StartsWith("/no") || s.StartsWith("/supress"));
         }

         ///////////////////////////////////////////////////////////////////////////
@@ -104,7 +104,7 @@
         public IDictionary<string, Assembly> assemblies = new Dictionary<string, Assembly>();
         public IDictionary<string, XmlNode> members = new Dictionary<string, XmlNode>();
         public IDictionary<string, ArrayList> namespaces = new Dictionary<string, ArrayList>();
-        public IDictionary<string, Type> types = new Dictionary<string, Type>();
+        public IDictionary<string, Type> types = new Dictionary<string, Type>();
         public IDictionary<Type, ArrayList> knownSubtypes = new Dictionary<Type, ArrayList>();
         public IDictionary<string, string> suppressedNamespaces = new Dictionary<string, string>();

@@ -183,7 +183,7 @@
         }

         public void Reflect() {
-            foreach (var entry in assemblies) {
+            foreach (var entry in assemblies) {
                 var a = entry.Value;
                 foreach (Type t in a.GetTypes()) {
                     if (!namespaces.ContainsKey(Namespace(t))) {
@@ -228,11 +228,11 @@
             ArrayList result = new ArrayList(other);
             result.Sort(cmp);
             return result;
-        }
-
-        public SortedDictionary<K, V> Sorted<K, V>(IDictionary<K, V> other, IComparer<K> cmp)
-        {
-            return new SortedDictionary<K, V>(other, cmp);
+        }
+
+        public SortedDictionary<K, V> Sorted<K, V>(IDictionary<K, V> other, IComparer<K> cmp)
+        {
+            return new SortedDictionary<K, V>(other, cmp);
         }

         public bool NotSuppressed(string nsName) {
@@ -288,9 +288,9 @@
             w.Flush();
             w.Close();

-            var typesToIterate = types.Values.ToList<Type>();
-            typesToIterate.RemoveAll(t => t.FullName.Contains("<"));
-            foreach (Type t in typesToIterate)
+            var typesToIterate = types.Values.ToList<Type>();
+            typesToIterate.RemoveAll(t => t.FullName.Contains("<"));
+            foreach (Type t in typesToIterate)
             {
                 if (NotSuppressed(Namespace(t))) {
                     GenerateTypePage(t);
@@ -305,8 +305,8 @@
             }
         }

-        public void GenerateTypePage(Type t) {
-            var filename = "type-" + t.FullName + ".xml";
+        public void GenerateTypePage(Type t) {
+            var filename = "type-" + t.FullName + ".xml";
             Console.WriteLine("Generating page for type {0} at {1}", t.FullName, filename);
             XmlWriter w = OpenOut(filename);
             w.WriteStartDocument();
@@ -355,9 +355,9 @@
             foreach (EventInfo ei
                      in Sorted(t.GetEvents(LiberalFlags), new MemberInfoNameComparer())) {
                 GenerateEventDoc(w, ei);
-            }
+            }
             var mbs = Sorted(t.GetConstructors(LiberalFlags), new MemberInfoNameComparer());
-            foreach (MethodBase mi in mbs) {
+            foreach (MethodBase mi in mbs) {
                 Console.WriteLine("\tProcessing method {0}", mi.Name);
                 GenerateMethodDoc(w, mi);
             }


Tie JoinRoom() and PartRoom() together

Tie JoinRoom() and PartRoom() together

--- osu.Game/Online/Multiplayer/StatefulMultiplayerClient.cs
+++ osu.Game/Online/Multiplayer/StatefulMultiplayerClient.cs
@@ -4,7 +4,6 @@
 #nullable enable

 using System;
-using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
 using System.Threading.Tasks;
@@ -109,30 +108,54 @@
             });
         }

+        private readonly object joinOrLeaveTaskLock = new object();
+        private Task? joinOrLeaveTask;
+
         /// <summary>
         /// Joins the <see cref="MultiplayerRoom"/> for a given API <see cref="Room"/>.
         /// </summary>
         /// <param name="room">The API <see cref="Room"/>.</param>
         public async Task JoinRoom(Room room)
         {
-            if (Room != null)
-                throw new InvalidOperationException("Cannot join a multiplayer room while already in one.");
-
-            Debug.Assert(room.RoomID.Value != null);
-
-            apiRoom = room;
-            playlistItemId = room.Playlist.SingleOrDefault()?.ID ?? 0;
-
-            Room = await JoinRoom(room.RoomID.Value.Value);
-
-            Debug.Assert(Room != null);
-
-            var users = await getRoomUsers();
-            Debug.Assert(users != null);
-
-            await Task.WhenAll(users.Select(PopulateUser));
-
-            updateLocalRoomSettings(Room.Settings);
+            Task? lastTask;
+            Task newTask;
+
+            lock (joinOrLeaveTaskLock)
+            {
+                lastTask = joinOrLeaveTask;
+                joinOrLeaveTask = newTask = Task.Run(async () =>
+                {
+                    if (lastTask != null)
+                        await lastTask;
+
+                    // Should be thread-safe since joinOrLeaveTask is locked on in both JoinRoom() and LeaveRoom().
+                    if (Room != null)
+                        throw new InvalidOperationException("Cannot join a multiplayer room while already in one.");
+
+                    Debug.Assert(room.RoomID.Value != null);
+
+                    // Join the server-side room.
+                    var joinedRoom = await JoinRoom(room.RoomID.Value.Value);
+                    Debug.Assert(joinedRoom != null);
+
+                    // Populate users.
+                    Debug.Assert(joinedRoom.Users != null);
+                    await Task.WhenAll(joinedRoom.Users.Select(PopulateUser));
+
+                    // Update the stored room (must be done on update thread for thread-safety).
+                    await scheduleAsync(() =>
+                    {
+                        Room = joinedRoom;
+                        apiRoom = room;
+                        playlistItemId = room.Playlist.SingleOrDefault()?.ID ?? 0;
+                    });
+
+                    // Update room settings.
+                    await updateLocalRoomSettings(joinedRoom.Settings);
+                });
+            }
+
+            await newTask;
         }

         /// <summary>
@@ -142,21 +165,35 @@
         /// <returns>The joined <see cref="MultiplayerRoom"/>.</returns>
         protected abstract Task<MultiplayerRoom> JoinRoom(long roomId);

-        public virtual Task LeaveRoom()
-        {
-            Scheduler.Add(() =>
-            {
-                if (Room == null)
-                    return;
-
-                apiRoom = null;
-                Room = null;
-                CurrentMatchPlayingUserIds.Clear();
-
-                RoomUpdated?.Invoke();
-            }, false);
-
-            return Task.CompletedTask;
+        public virtual async Task LeaveRoom()
+        {
+            Task? lastTask;
+            Task newTask;
+
+            lock (joinOrLeaveTaskLock)
+            {
+                lastTask = joinOrLeaveTask;
+                joinOrLeaveTask = newTask = Task.Run(async () =>
+                {
+                    if (lastTask != null)
+                        await lastTask;
+
+                    // Should be thread-safe since joinOrLeaveTask is locked on in both JoinRoom() and LeaveRoom().
+                    if (Room == null)
+                        return;
+
+                    await scheduleAsync(() =>
+                    {
+                        apiRoom = null;
+                        Room = null;
+                        CurrentMatchPlayingUserIds.Clear();
+
+                        RoomUpdated?.Invoke();
+                    });
+                });
+            }
+
+            await newTask;
         }

         /// <summary>
@@ -433,61 +470,34 @@
         protected async Task PopulateUser(MultiplayerRoomUser multiplayerUser) => multiplayerUser.User ??= await userLookupCache.GetUserAsync(multiplayerUser.UserID);

         /// <summary>
-        /// Retrieve a copy of users currently in the joined <see cref="Room"/> in a thread-safe manner.
-        /// This should be used whenever accessing users from outside of an Update thread context (ie. when not calling <see cref="Drawable.Schedule"/>).
-        /// </summary>
-        /// <returns>A copy of users in the current room, or null if unavailable.</returns>
-        private Task<List<MultiplayerRoomUser>?> getRoomUsers()
-        {
-            var tcs = new TaskCompletionSource<List<MultiplayerRoomUser>?>();
-
-            // at some point we probably want to replace all these schedule calls with Room.LockForUpdate.
-            // for now, as this would require quite some consideration due to the number of accesses to the room instance,
-            // let's just add a manual schedule for the non-scheduled usages instead.
-            Scheduler.Add(() =>
-            {
-                var users = Room?.Users.ToList();
-                tcs.SetResult(users);
-            }, false);
-
-            return tcs.Task;
-        }
-
-        /// <summary>
         /// Updates the local room settings with the given <see cref="MultiplayerRoomSettings"/>.
         /// </summary>
         /// <remarks>
         /// This updates both the joined <see cref="MultiplayerRoom"/> and the respective API <see cref="Room"/>.
         /// </remarks>
         /// <param name="settings">The new <see cref="MultiplayerRoomSettings"/> to update from.</param>
-        private void updateLocalRoomSettings(MultiplayerRoomSettings settings)
+        private Task updateLocalRoomSettings(MultiplayerRoomSettings settings) => scheduleAsync(() =>
         {
             if (Room == null)
                 return;

-            Scheduler.Add(() =>
-            {
-                if (Room == null)
-                    return;
-
-                Debug.Assert(apiRoom != null);
-
-                // Update a few properties of the room instantaneously.
-                Room.Settings = settings;
-                apiRoom.Name.Value = Room.Settings.Name;
-
-                // The playlist update is delayed until an online beatmap lookup (below) succeeds.
-                // In-order for the client to not display an outdated beatmap, the playlist is forcefully cleared here.
-                apiRoom.Playlist.Clear();
-
-                RoomUpdated?.Invoke();
-
-                var req = new GetBeatmapSetRequest(settings.BeatmapID, BeatmapSetLookupType.BeatmapId);
-                req.Success += res => updatePlaylist(settings, res);
-
-                api.Queue(req);
-            }, false);
-        }
+            Debug.Assert(apiRoom != null);
+
+            // Update a few properties of the room instantaneously.
+            Room.Settings = settings;
+            apiRoom.Name.Value = Room.Settings.Name;
+
+            // The playlist update is delayed until an online beatmap lookup (below) succeeds.
+            // In-order for the client to not display an outdated beatmap, the playlist is forcefully cleared here.
+            apiRoom.Playlist.Clear();
+
+            RoomUpdated?.Invoke();
+
+            var req = new GetBeatmapSetRequest(settings.BeatmapID, BeatmapSetLookupType.BeatmapId);
+            req.Success += res => updatePlaylist(settings, res);
+
+            api.Queue(req);
+        });

         private void updatePlaylist(MultiplayerRoomSettings settings, APIBeatmapSet onlineSet)
         {
@@ -534,5 +544,25 @@
             else
                 CurrentMatchPlayingUserIds.Remove(userId);
         }
+
+        private Task scheduleAsync(Action action)
+        {
+            var tcs = new TaskCompletionSource<bool>();
+
+            Scheduler.Add(() =>
+            {
+                try
+                {
+                    action();
+                    tcs.SetResult(true);
+                }
+                catch (Exception ex)
+                {
+                    tcs.SetException(ex);
+                }
+            });
+
+            return tcs.Task;
+        }
     }
 }


Cache DrawableHitObject for skinnables to access (#5463)

Cache DrawableHitObject for skinnables to access

--- osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs
+++ osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs
@@ -17,6 +17,7 @@

 namespace osu.Game.Rulesets.Objects.Drawables
 {
+    [Cached(typeof(DrawableHitObject))]
     public abstract class DrawableHitObject : SkinReloadableDrawable
     {
         public readonly HitObject HitObject;


Never run subtree masking

Never run subtree masking

--- osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs
+++ osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs
@@ -398,7 +398,7 @@
             }
         }

-        public override bool UpdateSubTreeMasking(Drawable source, RectangleF maskingBounds) => AllJudged && base.UpdateSubTreeMasking(source, maskingBounds);
+        public override bool UpdateSubTreeMasking(Drawable source, RectangleF maskingBounds) => false;

         protected override void UpdateAfterChildren()
         {


s/internalPeriod/_period

--- osu.Game/Screens/Tournament/Components/VisualiserLine.cs
+++ osu.Game/Screens/Tournament/Components/VisualiserLine.cs
@@ -70,23 +70,23 @@
         /// <summary>
         /// The period offset this line was constructed with, in radians.
         /// </summary>
-        private float initialPeriodOffset;
+        private readonly float initialPeriodOffset;
         /// <summary>
         /// The rolling period offset (by transformation), in radians.
         /// </summary>
-        private float internalPeriodOffset;
+        private float _periodOffset;
         /// <summary>
         /// The final period offset, in radians.
         /// </summary>
         private float periodOffset
         {
-            get { return initialPeriodOffset + internalPeriodOffset; }
-            set
-            {
-                if (internalPeriodOffset == value)
-                    return;
-
-                internalPeriodOffset = value;
+            get { return initialPeriodOffset + _periodOffset; }
+            set
+            {
+                if (_periodOffset == value)
+                    return;
+
+                _periodOffset = value;
                 Invalidate(Invalidation.DrawNode, shallPropagate: false);
             }
         }


Fixing unique config keys and mono build (no redis)

--- test/CacheManager.Tests/MicrosoftConfigurationTests.cs
+++ test/CacheManager.Tests/MicrosoftConfigurationTests.cs
@@ -216,18 +216,19 @@
         [Fact]
         public void Configuration_CacheHandle_KnownType_Redis()
         {
+            var key = Guid.NewGuid().ToString();
             var data = new Dictionary<string, string>
             {
                 {"cacheManagers:0:name", "name"},
                 {"cacheManagers:0:handles:0:knownType", "Redis"},
-                {"cacheManagers:0:handles:0:key", "key"},
+                {"cacheManagers:0:handles:0:key", key},
             };

             var config = GetConfiguration(data).GetCacheConfiguration("name");
             config.Name.Should().Be("name");
             config.CacheHandleConfigurations.Count.Should().Be(1);
             config.CacheHandleConfigurations[0].HandleType.Should().Be(typeof(Redis.RedisCacheHandle<>));
-            config.CacheHandleConfigurations[0].Key.Should().Be("key");
+            config.CacheHandleConfigurations[0].Key.Should().Be(key);
             config.CacheHandleConfigurations[0].Name.Should().NotBeNullOrWhiteSpace();  // name is random in this case
         }

@@ -266,18 +267,19 @@
         [Fact]
         public void Configuration_CacheHandle_KnownType_Couchbase()
         {
+            var key = Guid.NewGuid().ToString();
             var data = new Dictionary<string, string>
             {
                 {"cacheManagers:0:name", "name"},
                 {"cacheManagers:0:handles:0:knownType", "Couchbase"},
-                {"cacheManagers:0:handles:0:key", "key"},
+                {"cacheManagers:0:handles:0:key", key},
             };

             var config = GetConfiguration(data).GetCacheConfiguration("name");
             config.Name.Should().Be("name");
             config.CacheHandleConfigurations.Count.Should().Be(1);
             config.CacheHandleConfigurations[0].HandleType.Should().Be(typeof(Couchbase.BucketCacheHandle<>));
-            config.CacheHandleConfigurations[0].Key.Should().Be("key");
+            config.CacheHandleConfigurations[0].Key.Should().Be(key);
             config.CacheHandleConfigurations[0].Name.Should().NotBeNullOrWhiteSpace();  // name is random in this case
         }

@@ -316,18 +318,19 @@
         [Fact]
         public void Configuration_CacheHandle_KnownType_Memcached()
         {
+            var key = Guid.NewGuid().ToString();
             var data = new Dictionary<string, string>
             {
                 {"cacheManagers:0:name", "name"},
                 {"cacheManagers:0:handles:0:knownType", "Memcached"},
-                {"cacheManagers:0:handles:0:key", "key"},
+                {"cacheManagers:0:handles:0:key", key},
             };

             var config = GetConfiguration(data).GetCacheConfiguration("name");
             config.Name.Should().Be("name");
             config.CacheHandleConfigurations.Count.Should().Be(1);
             config.CacheHandleConfigurations[0].HandleType.Should().Be(typeof(Memcached.MemcachedCacheHandle<>));
-            config.CacheHandleConfigurations[0].Key.Should().Be("key");
+            config.CacheHandleConfigurations[0].Key.Should().Be(key);
             config.CacheHandleConfigurations[0].Name.Should().NotBeNullOrWhiteSpace();  // name is random in this case
         }

@@ -382,6 +385,7 @@
         [Fact]
         public void Configuration_CacheHandle_AllProperties()
         {
+            var key = Guid.NewGuid().ToString();
             var data = new Dictionary<string, string>
             {
                 {"cacheManagers:0:name", "cacheName"},
@@ -392,7 +396,7 @@
                 {"cacheManagers:0:handles:0:expirationTimeout", "0:10:0"},
                 {"cacheManagers:0:handles:0:isBackPlateSource", "true"},
                 {"cacheManagers:0:handles:0:name", "handleName"},
-                {"cacheManagers:0:handles:0:key", "key"}
+                {"cacheManagers:0:handles:0:key", key}
             };

             var config = GetConfiguration(data).GetCacheConfiguration("cacheName");
@@ -403,7 +407,7 @@
             config.CacheHandleConfigurations[0].ExpirationTimeout.Should().Be(TimeSpan.FromMinutes(10));
             config.CacheHandleConfigurations[0].IsBackPlateSource.Should().BeTrue();
             config.CacheHandleConfigurations[0].Name.Should().Be("handleName");
-            config.CacheHandleConfigurations[0].Key.Should().Be("key");
+            config.CacheHandleConfigurations[0].Key.Should().Be(key);
         }

         [Fact]
@@ -569,45 +573,44 @@
         [Fact]
         public void Configuration_BackPlate_Redis_Valid()
         {
+            var key = Guid.NewGuid().ToString();
             var data = new Dictionary<string, string>
             {
                 {"cacheManagers:0:name", "name"},
                 {"cacheManagers:0:handles:0:knownType", "Redis"},
-                {"cacheManagers:0:handles:0:key", "key"},
+                {"cacheManagers:0:handles:0:key", key},
                 {"cacheManagers:0:handles:0:isBackPlateSource", "true"},
                 {"cacheManagers:0:backPlate:knownType", "Redis"},
                 {"cacheManagers:0:backPlate:channelName", "channelName"},
-                {"cacheManagers:0:backPlate:key", "key"},
+                {"cacheManagers:0:backPlate:key", key},
                 {"redis:1:connectionString", "127.0.0.1:6379"},
-                {"redis:1:key", "key"}
-            };
-
-            var config = GetConfiguration(data).GetCacheConfiguration("name");
-            var cache = new BaseCacheManager<string>(config);
+                {"redis:1:key", key}
+            };
+
+            var config = GetConfiguration(data).GetCacheConfiguration("name");

             config.BackPlateChannelName.Should().Be("channelName");
-            config.BackPlateConfigurationKey.Should().Be("key");
+            config.BackPlateConfigurationKey.Should().Be(key);
             config.BackPlateType.Should().Be(typeof(Redis.RedisCacheBackPlate));
             config.HasBackPlate.Should().BeTrue();
-            cache.Put("test", "test");
-            cache.Get("test").Should().Be("test");
         }

         [Fact]
         public void Configuration_BackPlate_SomeType_Valid()
         {
+            var key = Guid.NewGuid().ToString();
             var data = new Dictionary<string, string>
             {
                 {"cacheManagers:0:name", "name"},
                 {"cacheManagers:0:handles:0:knownType", "Dictionary"},
                 {"cacheManagers:0:backPlate:type", "System.Object"},
                 {"cacheManagers:0:backPlate:channelName", "channelName"},
-                {"cacheManagers:0:backPlate:key", "key"},
+                {"cacheManagers:0:backPlate:key", key},
             };

             var config = GetConfiguration(data).GetCacheConfiguration("name");
             config.BackPlateChannelName.Should().Be("channelName");
-            config.BackPlateConfigurationKey.Should().Be("key");
+            config.BackPlateConfigurationKey.Should().Be(key);
             config.BackPlateType.Should().Be(typeof(object));
             config.HasBackPlate.Should().BeTrue();
         }


Increase Cassandra delay after startup

Increase Cassandra delay after startup

--- test/Evolve.Test.Utilities/CassandraDockerContainer.cs
+++ test/Evolve.Test.Utilities/CassandraDockerContainer.cs
@@ -11,7 +11,7 @@
         public string HostPort => "9042";
         public string ClusterName => "evolve";
         public string DataCenter => "dc1";
-        public TimeSpan DelayAfterStartup => TimeSpan.FromSeconds(45);
+        public TimeSpan DelayAfterStartup => TimeSpan.FromMinutes(1);

         public bool Start(bool fromScratch = false)
         {


Cannot define now total particles

Cannot define now total particles

--- examples/ChipmunkExample/Common/Extensions/LogoNode.cs
+++ examples/ChipmunkExample/Common/Extensions/LogoNode.cs
@@ -22,7 +22,6 @@
 				BlendFunc = new CCBlendFunc(1, 772),
 				EmissionRate = 50,
 				Gravity = new CCPoint(0, 200),
-				TotalParticles = 100,
 				Life = 1f,
 				Speed = 15,
 				SpeedVar = 5,
@@ -39,7 +38,6 @@
 				AngleVar = 360,
 				BlendFunc = new CCBlendFunc(772, 772),
 				EmissionRate = 50,
-				TotalParticles = 100,
 				Life = 0.5f,
 				Speed = 60,
 				SpeedVar = 10,


Documentation

Documentation

--- LanguageExt.Core/NewType.cs
+++ LanguageExt.Core/NewType.cs
@@ -15,10 +15,14 @@
     /// https://wiki.haskell.org/Newtype
     /// Derive type from this one to get: Equatable, Comparable, Appendable, Subtractable,
     /// Multiplicable, Divisible, Foldable, Monadic, Functor, Interable: strongly typed values.
+    ///
     /// For example:
-    ///     class Metres : NewType<double>
-    ///     class Hours : NewType<double>
+    ///
+    ///     class Metres : NewType<double> { public class Metres(int x) : base(x) {} }
+    ///     class Hours : NewType<double> { public class Hours(int x) : base(x) {} }
+    ///
     /// Will not accept null values
+    ///
     /// </summary>
 #if !COREFX
     [Serializable]


Implement testable functionality of BlobNode

--- Leaf/Leaf/Nodes/BlobNode.cs
+++ Leaf/Leaf/Nodes/BlobNode.cs
@@ -9,6 +9,8 @@
     /// </summary>
     public class BlobNode : Node
     {
+        private byte[] _bytes;
+
         /// <summary>
         /// Retrieve the ID for the type of node.
         /// This can be used to identify, serialize, and cast a node to its type.
@@ -16,7 +18,7 @@
         /// </summary>
         public override NodeId TypeId
         {
-            get { throw new NotImplementedException(); }
+            get { return NodeId.Blob; }
         }

         /// <summary>
@@ -24,8 +26,13 @@
         /// </summary>
         public byte[] Bytes
         {
-            get { throw new NotImplementedException(); }
-            set { throw new NotImplementedException(); }
+            get { return _bytes; }
+            set
+            {
+                if(value == null)
+                    throw new ArgumentNullException();
+                _bytes = value;
+            }
         }

         /// <summary>
@@ -34,7 +41,9 @@
         /// <param name="bytes">Byte array of the data to store in the node.</param>
         public BlobNode(byte[] bytes)
         {
-            throw new NotImplementedException();
+            if(bytes == null)
+                throw new ArgumentNullException("bytes");
+            _bytes = bytes;
         }

         /// <summary>


Multithreading-related debug logging added

--- isc.onec.adapter/V8Service.cs
+++ isc.onec.adapter/V8Service.cs
@@ -1,6 +1,8 @@
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Threading;
 using isc.general;
 using NLog;

@@ -20,7 +22,8 @@
 	///
this.client may be contained in journal (if non-null)

 	///

 	///

-	/// Synchronization policy: thread confined.
+	/// Synchronization policy: thread confined
+	/// (except for the Disconnect() method which can be called concurrently).
 	/// Each client connected maintains its own instance.
 	///
 	internal sealed class V8Service {
@@ -35,7 +38,7 @@
 			private set;
 		}

-		private readonly object connectionLock = new object();
+		private readonly object disconnectionLock = new object();

 		private static readonly Logger Logger = LogManager.GetCurrentClassLogger();

@@ -69,13 +72,25 @@
 			 * before any exception is thrown.
 			 */
 			this.Client = client;
+
+			int currentThreadId = Thread.CurrentThread.ManagedThreadId;
+			int instanceHashCode = RuntimeHelpers.GetHashCode(this);
 			try {
 				if (this.Client != null) {
+					Logger.Debug("V8Service.Connect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") about to acquire the lock on Clients");
 					lock (Clients) {
+						Logger.Debug("V8Service.Connect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") has acquired the lock on Clients");
 						if (Clients.ContainsKey(this.Client)) {
 							Logger.Debug("Client with Id = " + this.Client + " was already connected. Disconnecting the other instance...");
 							V8Service that = Clients[this.Client];
 							Debug.Assert(that != null, "V8Service value at key " + this.Client + " not found");
+							/*
+							 * If the below condition doesn't hold
+							 * (i.e. the same instance can be accessed by multiple threads),
+							 * this would be a violation of synchronization policy for this class.
+							 */
+							Logger.Debug("V8Service instances " + instanceHashCode + " and " + RuntimeHelpers.GetHashCode(that) + " are different: " + (this != that));
+							Debug.Assert(that != this, "V8Service value at key " + this.Client + " should be a different instance.");
 							Clients.Remove(this.Client);
 							try {
 								/*
@@ -90,6 +105,7 @@
 						}
 						Clients.Add(this.Client, this);
 					}
+					Logger.Debug("V8Service.Connect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") has released the lock on Clients");
 				}

 				this.context = this.adapter.Connect(url);
@@ -99,9 +115,12 @@
 				Debug.Assert(this.context == null, "Context should be null");

 				if (this.Client != null) {
+					Logger.Debug("V8Service.Connect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") about to acquire the lock on Clients");
 					lock (Clients) {
+						Logger.Debug("V8Service.Connect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") has acquired the lock on Clients");
 						Clients.Remove(this.Client);
 					}
+					Logger.Debug("V8Service.Connect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") has released the lock on Clients");
 				}

 				/*
@@ -168,12 +187,16 @@
 		/// Can be called from multiple threads.
 		///
 		internal void Disconnect() {
-			Logger.Debug("disconnecting from #" + this.Client + ". Adapter is " + this.adapter);
-
+			Logger.Debug("Client with Id = " + this.Client + " disconnecting. Adapter is " + this.adapter);
+
+			int currentThreadId = Thread.CurrentThread.ManagedThreadId;
+			int instanceHashCode = RuntimeHelpers.GetHashCode(this);
+			Logger.Debug("V8Service.Disconnect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") about to acquire disconnectionLock");
 			/*
 			 * Locks *instance* state.
 			 */
-			lock (this.connectionLock) {
+			lock (this.disconnectionLock) {
+				Logger.Debug("V8Service.Disconnect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") has acquired disconnectionLock");
 				if (!this.Connected) {
 					return;
 				}
@@ -188,30 +211,39 @@
 				this.adapter.Disconnect();

 				if (this.Client != null) {
+					Logger.Debug("V8Service.Disconnect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") about to acquire the lock on Clients");
 					/*
 					 * Locks *static* (shared) state. Stricter lock, narrower scope.
 					 */
 					lock (Clients) {
+						Logger.Debug("V8Service.Disconnect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") has acquired the lock on Clients");
 						Clients.Remove(this.Client);
 					}
+					Logger.Debug("V8Service.Disconnect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") has released the lock on Clients");
 				}

 				this.context = null;
 				this.Client = null;
 			}
+			Logger.Debug("V8Service.Disconnect(): Thread " + currentThreadId + " (V8Service instance " + instanceHashCode + ") has released disconnectionLock");
 		}

 		///
 		/// Only used for logging purposes.
+		///
XXX: Formally, this code is not safe, either, as it accesses an unguarded #adapter property from other instances.

 		///
 		private static void DumpClients() {
 			var report = string.Empty;

+			int currentThreadId = Thread.CurrentThread.ManagedThreadId;
+			Logger.Debug("V8Service.DumpClients(): Thread " + currentThreadId + " about to acquire the lock on Clients");
 			lock (Clients) {
+				Logger.Debug("V8Service.DumpClients(): Thread " + currentThreadId + " has acquired the lock on Clients");
 				foreach (KeyValuePair<string, V8Service> client in Clients) {
 					report += client.Key + "   " + client.Value.adapter.Url + "\n";
 				}
 			}
+			Logger.Debug("V8Service.DumpClients(): Thread " + currentThreadId + " has released the lock on Clients");

 			if (report.Length != 0) {
 				Logger.Debug(report);


Code cleanup.

Code cleanup.

--- src/WorldTileFilter.cs
+++ src/WorldTileFilter.cs
@@ -197,7 +197,7 @@
         }

         /// <summary>
-        /// Get a random settle-able tile from the filtered tiles.
+        ///     Get a random settle-able tile from the filtered tiles.
         /// </summary>
         /// <returns>A random tile ID (or Tile.Invalid if no tile could be found).</returns>
         public int RandomFilteredTile()
@@ -215,31 +215,25 @@

                 int tileId;
                 if ((from _ in Enumerable.Range(0, minRange)
-                    select Rand.Range(0, _matchingTileIds.Count)).TryRandomElementByWeight(delegate (int x)
+                    select Rand.Range(0, _matchingTileIds.Count)).TryRandomElementByWeight(delegate(int x)
                 {
                     var tile = Find.WorldGrid[x];

                     if (!PrepareLanding.Instance.GameData.UserData.Options.AllowImpassableHilliness &&
                         tile.hilliness == Hilliness.Impassable)
-                    {
                         return 0f;
-                    }

                     if (!tile.biome.canBuildBase || !tile.biome.implemented)
-                    {
                         return 0f;
-                    }
+
                     if (!tile.biome.canAutoChoose)
-                    {
                         return 0f;
-                    }
+
                     return tile.biome.factionBaseSelectionWeight;
                 }, out tileId))
                 {
                     if (TileFinder.IsValidTileForNewSettlement(tileId))
-                    {
                         return tileId;
-                    }
                 }
             }


Add includeforsaledata since it is available in nuget SteamKit now

--- IRC/Commands/PubFile.cs
+++ IRC/Commands/PubFile.cs
@@ -78,7 +78,7 @@
                 includetags = true,
                 includekvtags = true,
                 includevotes = true,
-                //includeforsaledata = true, // TODO: Needs updated steamkit
+                includeforsaledata = true,
             };

             pubFileRequest.publishedfileids.Add(pubFileId);


Fix deprecations for Unity 2017.1

Fix deprecations for Unity 2017.1


Fix test after rename of Default to Domain.

--- tests/Microsoft.Owin.Host.IntegrationTests/TestBase.cs
+++ tests/Microsoft.Owin.Host.IntegrationTests/TestBase.cs
@@ -73,7 +73,7 @@
             Directory.SetCurrentDirectory(targetDirectory);

             var server = WebApplication.Start(
-                boot: "Default",
+                boot: "Domain",
                 server: serverName,
                 app: applicationName,
                 port: port,


B-0 fixed typo

B-0 fixed typo

--- gc-helper-tests/tests/UnmanagedObjectLifecycleTests.cs
+++ gc-helper-tests/tests/UnmanagedObjectLifecycleTests.cs
@@ -117,7 +117,7 @@
       obj.Dispose();
       Assert.IsFalse(obj.destroyed);
       Assert.IsFalse(obj2.destroyed);
-      TesterClass.UnmanagedObjectLifecycle.RemoveDependecy(typeof(TesterClass).Name, obj2.Handle, typeof(TesterClass).Name, obj.Handle);
+      TesterClass.UnmanagedObjectLifecycle.RemoveDependency(typeof(TesterClass).Name, obj2.Handle, typeof(TesterClass).Name, obj.Handle);
       Assert.IsTrue(obj.destroyed);
       Assert.IsFalse(obj2.destroyed);
       obj2.Dispose();
@@ -132,7 +132,7 @@
     {
       var obj = new TesterClass(new IntPtr[] { });
       var obj2 = new TesterClass(new[] { obj.Handle });
-      TesterClass.UnmanagedObjectLifecycle.RemoveDependecy(typeof(TesterClass).Name, obj.Handle, typeof(TesterClass).Name, obj2.Handle);
+      TesterClass.UnmanagedObjectLifecycle.RemoveDependency(typeof(TesterClass).Name, obj.Handle, typeof(TesterClass).Name, obj2.Handle);
     }

     [Test]
@@ -279,7 +279,7 @@
         Assert.IsTrue(o.destroyed);
         Assert.AreEqual(o.destroyedHandle, o.Handle);
       }
-      Assert.Less(Math.Abs(Environment.TickCount - startTicks), 100);
+      Assert.Less(Math.Abs(Environment.TickCount - startTicks), 200);
     }

     [Test]
@@ -299,7 +299,7 @@
       Assert.IsFalse(obj2.destroyed);
       Assert.IsFalse(obj3.destroyed);
       /* Only way to get objects destroyed is by removing one dependency to destroy the circle */
-      TesterClass.UnmanagedObjectLifecycle.RemoveDependecy(typeof(TesterClass).Name, obj.Handle, typeof(TesterClass).Name, obj3.Handle);
+      TesterClass.UnmanagedObjectLifecycle.RemoveDependency(typeof(TesterClass).Name, obj.Handle, typeof(TesterClass).Name, obj3.Handle);
       Assert.IsTrue(obj.destroyed);
       Assert.IsTrue(obj2.destroyed);
       Assert.IsTrue(obj3.destroyed);
@@ -332,15 +332,15 @@
       Assert.IsFalse(obj.destroyed);
       Assert.IsFalse(obj2.destroyed);
       Assert.IsFalse(obj3.destroyed);
-      TesterClass.UnmanagedObjectLifecycle.RemoveDependecy(typeof(TesterClass).Name, obj.Handle, typeof(TesterClass).Name, obj3.Handle);
-      Assert.IsFalse(obj.destroyed);
-      Assert.IsFalse(obj2.destroyed);
-      Assert.IsFalse(obj3.destroyed);
-      TesterClass.UnmanagedObjectLifecycle.RemoveDependecy(typeof(TesterClass).Name, obj.Handle, typeof(TesterClass).Name, obj2.Handle);
-      Assert.IsFalse(obj.destroyed);
-      Assert.IsFalse(obj2.destroyed);
-      Assert.IsFalse(obj3.destroyed);
-      TesterClass.UnmanagedObjectLifecycle.RemoveDependecy(typeof(TesterClass).Name, obj2.Handle, typeof(TesterClass).Name, obj3.Handle);
+      TesterClass.UnmanagedObjectLifecycle.RemoveDependency(typeof(TesterClass).Name, obj.Handle, typeof(TesterClass).Name, obj3.Handle);
+      Assert.IsFalse(obj.destroyed);
+      Assert.IsFalse(obj2.destroyed);
+      Assert.IsFalse(obj3.destroyed);
+      TesterClass.UnmanagedObjectLifecycle.RemoveDependency(typeof(TesterClass).Name, obj.Handle, typeof(TesterClass).Name, obj2.Handle);
+      Assert.IsFalse(obj.destroyed);
+      Assert.IsFalse(obj2.destroyed);
+      Assert.IsFalse(obj3.destroyed);
+      TesterClass.UnmanagedObjectLifecycle.RemoveDependency(typeof(TesterClass).Name, obj2.Handle, typeof(TesterClass).Name, obj3.Handle);
       Assert.IsTrue(obj.destroyed);
       Assert.IsTrue(obj2.destroyed);
       Assert.IsTrue(obj3.destroyed);


Make interanal

Make interanal

--- Kip/PrintSchemaReader.cs
+++ Kip/PrintSchemaReader.cs
@@ -274,13 +274,13 @@
         }
     }

-    public interface PrintSchemaChildElement
+    internal interface PrintSchemaChildElement
     {
         void AddTo(PrintSchemaElement element);
     }

-    public interface PrintSchemaElement
+    internal interface PrintSchemaElement
     {
         void Add(Feature feature);

@@ -299,7 +299,7 @@
         void Add(Value value);
     }

-    public abstract class DefaultPrintSchemaElement : PrintSchemaElement
+    internal abstract class DefaultPrintSchemaElement : PrintSchemaElement
     {
         public abstract string TagName
         {
@@ -347,7 +347,7 @@
         }
     }

-    public class PrintSchemaCapabilities : DefaultPrintSchemaElement
+    internal class PrintSchemaCapabilities : DefaultPrintSchemaElement
     {
         public PrintSchemaCapabilities()
         {
@@ -383,7 +383,7 @@
         }
     }

-    public class PrintSchemaTicket : DefaultPrintSchemaElement
+    internal class PrintSchemaTicket : DefaultPrintSchemaElement
     {
         public PrintSchemaTicket()
         {
@@ -419,7 +419,7 @@
         }
     }

-    public class PrintSchemaFeature : DefaultPrintSchemaElement, PrintSchemaChildElement
+    internal class PrintSchemaFeature : DefaultPrintSchemaElement, PrintSchemaChildElement
     {
         private Feature _feature;

@@ -457,7 +457,7 @@
         }
     }

-    public class PrintSchemaOption : DefaultPrintSchemaElement, PrintSchemaChildElement
+    internal class PrintSchemaOption : DefaultPrintSchemaElement, PrintSchemaChildElement
     {
         private Option _option;

@@ -490,7 +490,7 @@
         }
     }

-    public class PrintSchemaParameterDef : DefaultPrintSchemaElement, PrintSchemaChildElement
+    internal class PrintSchemaParameterDef : DefaultPrintSchemaElement, PrintSchemaChildElement
     {
         private ParameterDef _parameterDef;

@@ -518,7 +518,7 @@
         }
     }

-    public class PrintSchemaParameterInit : DefaultPrintSchemaElement, PrintSchemaChildElement
+    internal class PrintSchemaParameterInit : DefaultPrintSchemaElement, PrintSchemaChildElement
     {
         private ParameterInit _parameterInit;

@@ -546,7 +546,7 @@
         }
     }

-    public class PrintSchemaParameterRef : DefaultPrintSchemaElement, PrintSchemaChildElement
+    internal class PrintSchemaParameterRef : DefaultPrintSchemaElement, PrintSchemaChildElement
     {
         private ParameterRef _parameterRef;

@@ -569,7 +569,7 @@
         }
     }

-    public class PrintSchemaProperty : DefaultPrintSchemaElement, PrintSchemaChildElement
+    internal class PrintSchemaProperty : DefaultPrintSchemaElement, PrintSchemaChildElement
     {
         private XName _name;
         private Value _value;
@@ -606,7 +606,7 @@
         }
     }

-    public class PrintSchemaScoredProperty : DefaultPrintSchemaElement, PrintSchemaChildElement
+    internal class PrintSchemaScoredProperty : DefaultPrintSchemaElement, PrintSchemaChildElement
     {
         private XName _name;
         private Value _value;
@@ -654,7 +654,7 @@
         }
     }

-    public class PrintSchemaValue : DefaultPrintSchemaElement, PrintSchemaChildElement
+    internal class PrintSchemaValue : DefaultPrintSchemaElement, PrintSchemaChildElement
     {
         static public PrintSchemaValue Empty = new PrintSchemaValue();


changed javascript callback method, added javascript console message handling

--- ecologylab/semantics/documentparsers/WebViewParser.cs
+++ ecologylab/semantics/documentparsers/WebViewParser.cs
@@ -88,6 +88,8 @@
             //Console.WriteLine("json:\n" + jsonMMD + "\n");
             //jsonMMD = jsonMMD.Replace("\\", "\\\\");

+            webView.JSConsoleMessageAdded += new JSConsoleMessageAddedEventHandler(JSConsoleEvent);
+
             webView.ExecuteJavascript(jsonMMD);
             webView.ExecuteJavascript(WebBrowserPool.MmdDomHelperJsString);
             Console.WriteLine("Done js code execution, calling function. --" + DateTime.Now + " : " + DateTime.Now.Millisecond);
@@ -98,7 +100,7 @@

             //webView.ExecuteJavascript("CallBack.MetadataExtracted('some value');");
             //Return happens through the task, on completion of the method via the callback
-            webView.ExecuteJavascript("extractMetadata(mmd);");
+            webView.ExecuteJavascript("extractMetadataWithCallback(mmd);");

             _requestTimedOut.Start();
         }
@@ -131,5 +133,10 @@

             _closure.TaskCompletionSource.TrySetResult(myShinyNewMetadata);
         }
+
+        public void JSConsoleEvent(object sender, JSConsoleMessageEventArgs e)
+        {
+            Console.WriteLine(e.Message);
+        }
     }
 }


Update MSDN documentation linl

Update MSDN documentation linl

--- source/Htc.Vita.Core/Interop/Windows.User32.cs
+++ source/Htc.Vita.Core/Interop/Windows.User32.cs
@@ -7,6 +7,7 @@
     {
         /**
          * https://msdn.microsoft.com/en-us/library/windows/desktop/aa376868.aspx
+         * https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-exitwindowsex
          */
         [Flags]
         internal enum ExitType : uint
@@ -25,6 +26,7 @@

         /**
          * https://msdn.microsoft.com/en-us/library/windows/desktop/aa376868.aspx
+         * https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-exitwindowsex
          */
         [DllImport(Libraries.WindowsUser32,
                 CallingConvention = CallingConvention.Winapi,


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "3.3.0";
-				ClientTag = "dotnet:18-03-03";
+				ClientTag = "dotnet:18-03-04";
 		}

 		#region Properties


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "3.3.0";
-				ClientTag = "dotnet:18-02-22";
+				ClientTag = "dotnet:18-02-23";
 		}

 		#region Properties