Simplified translation registrations using parameterFilter

--- src/DotVVM.Framework/Compilation/Javascript/JavascriptTranslatableMethodCollection.cs
+++ src/DotVVM.Framework/Compilation/Javascript/JavascriptTranslatableMethodCollection.cs
@@ -139,7 +139,6 @@
             AddPropertyGetterTranslator(typeof(Nullable<>), "Value", new GenericMethodCompiler((JsExpression[] args, MethodInfo method) => args[0]));
             AddPropertyGetterTranslator(typeof(Nullable<>), "HasValue",
                 new GenericMethodCompiler(args => new JsBinaryExpression(args[0], BinaryOperatorType.NotEqual, new JsLiteral(null))));
-            //AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Count), lengthMethod, new[] { typeof(IEnumerable) });

             JsBindingApi.RegisterJavascriptTranslations(this);
             BindingApi.RegisterJavascriptTranslations(this);
@@ -396,16 +395,12 @@
             {
                 AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Max), parameters: new[] { typeof(IEnumerable<>).MakeGenericType(type) }, translator: new GenericMethodCompiler(args =>
                     new JsIdentifierExpression("dotvvm").Member("translations").Member("arrayHelper").Member("max").Invoke(args[1], selectIdentityFunc.Clone(), new JsLiteral(!type.IsNullable()))));
-                var maxSelect = typeof(Enumerable).GetMethods(BindingFlags.Public | BindingFlags.Static)
-                    .Where(m => m.Name == nameof(Enumerable.Max) && m.GetParameters().Length == 2 && m.GetParameters().Last().ParameterType.GetGenericArguments().Last() == type).Single();
-                AddMethodTranslator(maxSelect, translator: new GenericMethodCompiler(args =>
+                AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Max), parameterCount: 2, parameterFilter: p => p[1].ParameterType.GetGenericArguments().Last() == type, translator: new GenericMethodCompiler(args =>
                     new JsIdentifierExpression("dotvvm").Member("translations").Member("arrayHelper").Member("max").Invoke(args[1], args[2], new JsLiteral(!type.IsNullable()))));

                 AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Min), parameters: new[] { typeof(IEnumerable<>).MakeGenericType(type) }, translator: new GenericMethodCompiler(args =>
                     new JsIdentifierExpression("dotvvm").Member("translations").Member("arrayHelper").Member("min").Invoke(args[1], selectIdentityFunc.Clone(), new JsLiteral(!type.IsNullable()))));
-                var minSelect = typeof(Enumerable).GetMethods(BindingFlags.Public | BindingFlags.Static)
-                    .Where(m => m.Name == nameof(Enumerable.Min) && m.GetParameters().Length == 2 && m.GetParameters().Last().ParameterType.GetGenericArguments().Last() == type).Single();
-                AddMethodTranslator(minSelect, translator: new GenericMethodCompiler(args =>
+                AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Min), parameterCount: 2, parameterFilter: p => p[1].ParameterType.GetGenericArguments().Last() == type, translator: new GenericMethodCompiler(args =>
                     new JsIdentifierExpression("dotvvm").Member("translations").Member("arrayHelper").Member("min").Invoke(args[1], args[2], new JsLiteral(!type.IsNullable()))));
             }

@@ -418,19 +413,17 @@
                     .Invoke(jArgs[1], jArgs[2], new JsLiteral((IsDelegateReturnTypeEnum(dArgs.Last().Type)) ? GetDelegateReturnTypeHash(dArgs.Last().Type) : null)),
                 check: (method, _, arguments) => EnsureIsComparableInJavascript(method, arguments.Last().Type.GetGenericArguments().Last())));

-            var selectMethod = typeof(Enumerable).GetMethods(BindingFlags.Public | BindingFlags.Static)
-                .Where(m => m.Name == nameof(Enumerable.Select) && m.GetParameters().Length == 2 && m.GetParameters().Last().ParameterType.GetGenericTypeDefinition() == typeof(Func<,>)).Single();
-            AddMethodTranslator(selectMethod, translator: new GenericMethodCompiler(args => args[1].Member("map").Invoke(args[2])));
+            AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Select), parameterCount: 2, parameterFilter: p => p[1].ParameterType.GetGenericTypeDefinition() == typeof(Func<,>),
+                translator: new GenericMethodCompiler(args => args[1].Member("map").Invoke(args[2])));
+            AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Skip), parameterCount: 2, translator: new GenericMethodCompiler(args => args[1].Member("slice").Invoke(args[2])));

             AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Take), parameterCount: 2, parameterFilter: p => p[1].ParameterType == typeof(int), translator: new GenericMethodCompiler(args =>
                 args[1].Member("slice").Invoke(new JsLiteral(0), args[2])));
-            AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Skip), parameterCount: 2, translator: new GenericMethodCompiler(args => args[1].Member("slice").Invoke(args[2])));
             AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.ToArray), parameterCount: 1, translator: new GenericMethodCompiler(args => args[1]));
             AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.ToList), parameterCount: 1, translator: new GenericMethodCompiler(args => args[1]));

-            var whereMethod = typeof(Enumerable).GetMethods(BindingFlags.Public | BindingFlags.Static)
-                .Where(m => m.Name == nameof(Enumerable.Where) && m.GetParameters().Length == 2 && m.GetParameters().Last().ParameterType.GetGenericTypeDefinition() == typeof(Func<,>)).Single();
-            AddMethodTranslator(whereMethod, translator: new GenericMethodCompiler(args => args[1].Member("filter").Invoke(args[2])));
+            AddMethodTranslator(typeof(Enumerable), nameof(Enumerable.Where), parameterCount: 2, parameterFilter: p => p[1].ParameterType.GetGenericTypeDefinition() == typeof(Func<,>),
+                translator: new GenericMethodCompiler(args => args[1].Member("filter").Invoke(args[2])));
         }

         private void AddDefaultDictionaryTranslations()


Add test

Add test

--- src/EditorFeatures/CSharpTest/UseSimpleUsingStatement/UseSimpleUsingStatementTests.cs
+++ src/EditorFeatures/CSharpTest/UseSimpleUsingStatement/UseSimpleUsingStatementTests.cs
@@ -472,6 +472,50 @@
         }

         [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseSimpleUsingStatement)]
+        public async Task TestFixAll5()
+        {
+            await TestMissingInRegularAndScriptAsync(
+@"using System;
+
+class C
+{
+    void M()
+    {
+        {|FixAllInDocument:|}using (var a = b) { }
+        using (var c = d) { }
+    }
+}",
+new TestParameters(parseOptions: CSharp8ParseOptions));
+        }
+
+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseSimpleUsingStatement)]
+        public async Task TestFixAll6()
+        {
+            await TestInRegularAndScriptAsync(
+@"using System;
+
+class C
+{
+    void M()
+    {
+        using (var a = b) { }
+        {|FixAllInDocument:|}using (var c = d) { }
+    }
+}",
+@"using System;
+
+class C
+{
+    void M()
+    {
+        using (var a = b) { }
+        using var c = d;
+    }
+}",
+parseOptions: CSharp8ParseOptions);
+        }
+
+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseSimpleUsingStatement)]
         public async Task TestWithFollowingReturn()
         {
             await TestInRegularAndScriptAsync(


Use WebSocket.CreateFromStream in System.Net.WebSockets.Client on Unix

--- src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs
+++ src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs
@@ -164,18 +164,24 @@
                     }
                 }

+                // Get or create the buffer to use
+                const int MinBufferSize = 14; // from ManagedWebSocket.MaxMessageHeaderLength
+                ArraySegment<byte> optionsBuffer = options.Buffer.GetValueOrDefault();
+                Memory<byte> buffer =
+                    optionsBuffer.Count >= MinBufferSize ? optionsBuffer : // use the provided buffer if it's big enough
+                    options.ReceiveBufferSize >= MinBufferSize ? new byte[options.ReceiveBufferSize] : // or use the requested size if it's big enough
+                    Memory<byte>.Empty; // or let WebSocket.CreateFromStream use its default
+
                 // Get the response stream and wrap it in a web socket.
                 Stream connectedStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
                 Debug.Assert(connectedStream.CanWrite);
                 Debug.Assert(connectedStream.CanRead);
-                _webSocket = WebSocket.CreateClientWebSocket( // TODO https://github.com/dotnet/corefx/issues/21537: Use new API when available
+                _webSocket = WebSocket.CreateFromStream(
                     connectedStream,
+                    isServer: false,
                     subprotocol,
-                    options.ReceiveBufferSize,
-                    options.SendBufferSize,
                     options.KeepAliveInterval,
-                    useZeroMaskingKey: false,
-                    internalBuffer:options.Buffer.GetValueOrDefault());
+                    buffer);
             }
             catch (Exception exc)
             {


simplifies tablename for dictionary dto

simplifies tablename for dictionary dto

--- src/Umbraco.Core/Migrations/Upgrade/V_8_6_0/AddDatabaseIndexesMissingOnForeignKeys.cs
+++ src/Umbraco.Core/Migrations/Upgrade/V_8_6_0/AddDatabaseIndexesMissingOnForeignKeys.cs
@@ -15,16 +15,14 @@
         /// if it doesn't already exist
         /// </summary>
         public override void Migrate()
-        {
-            var tableInfo = Context.Database.PocoDataFactory.ForType(typeof(DictionaryDto)).TableInfo;
-            tableInfo.TableName = tableInfo.TableName;
-            var indexName = "IX_" + tableInfo.TableName + "_Parent";
+        {
+            var indexName = "IX_" + DictionaryDto.TableName + "_Parent";

             if (IndexExists(indexName) == false)
             {
                 Create
                      .Index(indexName)
-                     .OnTable(tableInfo.TableName)
+                     .OnTable(DictionaryDto.TableName)
                      .OnColumn("parent")
                      .Ascending()
                      .WithOptions().NonClustered()


Cleanup media uploader in RTE a little

Cleanup media uploader in RTE a little

--- src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs
+++ src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs
@@ -1,19 +1,12 @@
 using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Web;
-using System.Web.SessionState;
 using System.Web.UI;
-using System.Web.UI.WebControls;
 using System.Web.UI.HtmlControls;
 using System.Linq;
 using System.Xml;
 using umbraco.BasePages;
-using umbraco.uicontrols;
+using umbraco.cms.businesslogic.datatype;
 using umbraco.interfaces;
-using umbraco.cms.businesslogic.media;
+using Media = umbraco.cms.businesslogic.media.Media;

 namespace umbraco.controls.Images
 {
@@ -23,7 +16,7 @@
     /// Includes ability to select where in the media you would like it to upload and also supports client
     /// callback methods once complete.
     /// </summary>
-    public partial class UploadMediaImage : System.Web.UI.UserControl
+    public partial class UploadMediaImage : UserControl
     {

         public UploadMediaImage()
@@ -42,7 +35,7 @@
         /// </summary>
         public string OnClientUpload { get; set; }

-        protected IDataType UploadField = new cms.businesslogic.datatype.controls.Factory().GetNewObject(new Guid("5032a6e6-69e3-491d-bb28-cd31cd11086c"));
+        protected IDataType UploadField = DataTypeDefinition.GetByDataTypeId(new Guid("5032a6e6-69e3-491d-bb28-cd31cd11086c")).DataType;

         protected override void OnInit(EventArgs e)
         {
@@ -66,33 +59,29 @@

         protected void SubmitButton_Click(object sender, EventArgs e)
         {
-            int parent = int.Parse(MediaPickerControl.Value);
-            if (BusinessLogic.User.GetCurrent().StartMediaId != -1 && parent == -1)
-                parent = BusinessLogic.User.GetCurrent().StartNodeId;
+            var media = Media.MakeNew(TextBoxTitle.Text, cms.businesslogic.media.MediaType.GetByAlias("image"), BasePage.Current.getUser(), int.Parse(MediaPickerControl.Value));

-            Media m = Media.MakeNew(TextBoxTitle.Text, cms.businesslogic.media.MediaType.GetByAlias("image"), BasePage.Current.getUser(), int.Parse(MediaPickerControl.Value));
-            var props = m.getProperties;
-            foreach (cms.businesslogic.property.Property p in props)
+            foreach (var property in media.GenericProperties)
             {
-                if (p.PropertyType.DataTypeDefinition.DataType.Id == UploadField.Id)
+                if (property.PropertyType.DataTypeDefinition.DataType.Id == UploadField.Id)
                 {
-                    UploadField.DataTypeDefinitionId = p.PropertyType.DataTypeDefinition.Id;
-                    UploadField.Data.PropertyId = p.Id;
+                    UploadField.DataTypeDefinitionId = property.PropertyType.DataTypeDefinition.Id;
+                    UploadField.Data.PropertyId = property.Id;
                 }
             }
             UploadField.DataEditor.Save();

             // Generate xml on image
-            m.XmlGenerate(new XmlDocument());
+            media.XmlGenerate(new XmlDocument());
             pane_upload.Visible = false;

             //this seems real ugly since we apparently already have the properties above (props)... but this data layer is insane and undecipherable:)
-            string mainImage = m.getProperty("umbracoFile").Value.ToString();
+            string mainImage = media.getProperty("umbracoFile").Value.ToString();
             string extension = mainImage.Substring(mainImage.LastIndexOf(".") + 1, mainImage.Length - mainImage.LastIndexOf(".") - 1);
             var thumbnail = mainImage.Remove(mainImage.Length - extension.Length - 1, extension.Length + 1) + "_thumb.jpg";
-            string width = m.getProperty("umbracoWidth").Value.ToString();
-            string height = m.getProperty("umbracoHeight").Value.ToString();
-            int id = m.Id;
+            string width = media.getProperty("umbracoWidth").Value.ToString();
+            string height = media.getProperty("umbracoHeight").Value.ToString();
+            int id = media.Id;

             feedback.Style.Add("margin-top", "8px");
             feedback.type = uicontrols.Feedback.feedbacktype.success;
@@ -106,7 +95,7 @@
                 feedback.Text += @"
                 <script type=""text/javascript"">
                 jQuery(document).ready(function() {
-                " + OnClientUpload + @".call(this, {imagePath: '" + mainImage + @"', thumbnailPath: '" + thumbnail + @"', width: " + width + @", height: " + height + @", id: " + id.ToString() + @"});
+                " + OnClientUpload + @".call(this, {imagePath: '" + mainImage + @"', thumbnailPath: '" + thumbnail + @"', width: " + width + @", height: " + height + @", id: " + id + @"});
                 });
                 </script>";
             }


Fixed for change to Control Find As...

Fixed for change to Control Find As...

--- yafsrc/YetAnotherForum.NET/App_Code/YAF/Modules/PageTitleModule.cs
+++ yafsrc/YetAnotherForum.NET/App_Code/YAF/Modules/PageTitleModule.cs
@@ -117,11 +117,10 @@
 			else
 			{
 				// old style
-				object objTitle = ControlHelper.FindControlRecursiveBoth( CurrentForumPage, "ForumTitle" );
+				HtmlTitle title = ControlHelper.FindControlRecursiveBothAs<HtmlTitle>( CurrentForumPage, "ForumTitle" );

-				if ( objTitle != null && objTitle is HtmlTitle )
+				if ( title != null )
 				{
-					HtmlTitle title = objTitle as HtmlTitle;
 					title.Text = _forumPageTitle;
 				}
 			}


updated catalog card view

updated catalog card view

--- 5/1/IGI/pr1/pr2/Views/Home/Index.cshtml
+++ 5/1/IGI/pr1/pr2/Views/Home/Index.cshtml
@@ -10,7 +10,7 @@
     @for (int i = 0; i < Model.Count; i++)
     {

-
+

@Model[i].title

@Model[i].artist


OrderBookInrementMessageAdapter. Join subscriptions after online.

--- Algo/OrderBookInrementMessageAdapter.cs
+++ Algo/OrderBookInrementMessageAdapter.cs
@@ -10,7 +10,6 @@
 	using StockSharp.Logging;
 	using StockSharp.Messages;
 	using QuotesDict = System.Collections.Generic.SortedDictionary<decimal, decimal>;
-	using BookInfo = Ecng.Common.RefTriple<System.Collections.Generic.SortedDictionary<decimal, decimal>, System.Collections.Generic.SortedDictionary<decimal, decimal>, Messages.QuoteChangeStates>;

 	/// <summary>
 	/// The messages adapter build order book from incremental updates <see cref="QuoteChangeStates.Increment"/>.
@@ -19,7 +18,26 @@
 	{
 		private const QuoteChangeStates _none = (QuoteChangeStates)(-1);

-		private readonly SynchronizedDictionary<long, BookInfo> _states = new SynchronizedDictionary<long, BookInfo>();
+		private class BookInfo
+		{
+			public BookInfo(SecurityId securityId)
+			{
+				SecurityId = securityId;
+			}
+
+			public SecurityId SecurityId { get; }
+
+			public QuoteChangeStates State { get; set; } = _none;
+
+			public readonly QuotesDict Bids = new QuotesDict(new BackwardComparer<decimal>());
+			public readonly QuotesDict Asks = new QuotesDict();
+
+			public readonly CachedSynchronizedSet<long> SubscriptionIds = new CachedSynchronizedSet<long>();
+		}
+
+		private readonly SyncObject _syncObject = new SyncObject();
+		private readonly Dictionary<long, BookInfo> _byId = new Dictionary<long, BookInfo>();
+		private readonly Dictionary<SecurityId, BookInfo> _online = new Dictionary<SecurityId, BookInfo>();

 		/// <summary>
 		/// Initializes a new instance of the <see cref="OrderBookInrementMessageAdapter"/>.
@@ -36,8 +54,15 @@
 			switch (message.Type)
 			{
 				case MessageTypes.Reset:
-					_states.Clear();
-					break;
+				{
+					lock (_syncObject)
+					{
+						_byId.Clear();
+						_online.Clear();
+					}
+
+					break;
+				}

 				case MessageTypes.MarketData:
 				{
@@ -47,12 +72,18 @@
 					{
 						if (mdMsg.IsSubscribe)
 						{
-							if (IsSupportOrderBookIncrements)
-								_states.Add(mdMsg.TransactionId, RefTuple.Create(new QuotesDict(new BackwardComparer<decimal>()), new QuotesDict(), _none));
+							lock (_syncObject)
+							{
+								var info = new BookInfo(mdMsg.SecurityId);
+
+								info.SubscriptionIds.Add(mdMsg.TransactionId);
+
+								_byId.Add(mdMsg.TransactionId, info);
+							}
 						}
 						else
 						{
-							_states.Remove(mdMsg.OriginalTransactionId);
+							RemoveSubscription(mdMsg.OriginalTransactionId);
 						}
 					}

@@ -63,9 +94,39 @@
 			base.OnSendInMessage(message);
 		}

-		private QuoteChangeMessage ApplyNewState(long subscriptionId, BookInfo info, QuoteChangeMessage quoteMsg, QuoteChangeStates newState)
-		{
-			var currState = info.Third;
+		private void RemoveSubscription(long id)
+		{
+			lock (_syncObject)
+			{
+				var info = _byId.TryGetAndRemove(id);
+
+				var changeId = info != null;
+
+				if (info == null)
+				{
+					info = _online.FirstOrDefault(p => p.Value.SubscriptionIds.Contains(id)).Value;
+
+					if (info == null)
+						return;
+				}
+
+				if (info != _online.TryGetValue(info.SecurityId))
+					return;
+
+				info.SubscriptionIds.Remove(id);
+
+				var ids = info.SubscriptionIds.Cache;
+
+				if (ids.Length == 0)
+					_online.Remove(info.SecurityId);
+				else if (changeId)
+					_byId.Add(ids[0], info);
+			}
+		}
+
+		private QuoteChangeMessage ApplyNewState(BookInfo info, QuoteChangeMessage quoteMsg, QuoteChangeStates newState)
+		{
+			var currState = info.State;

 			if (currState != newState)
 			{
@@ -80,8 +141,8 @@
 							return null;
 						}

-						info.First.Clear();
-						info.Second.Clear();
+						info.Bids.Clear();
+						info.Asks.Clear();

 						break;
 					}
@@ -110,7 +171,7 @@
 						throw new ArgumentOutOfRangeException(currState.ToString());
 				}

-				info.Third = currState = newState;
+				info.State = currState = newState;
 			}

 			void Copy(IEnumerable<QuoteChange> from, QuotesDict to)
@@ -124,8 +185,8 @@
 				}
 			}

-			Copy(quoteMsg.Bids, info.First);
-			Copy(quoteMsg.Asks, info.Second);
+			Copy(quoteMsg.Bids, info.Bids);
+			Copy(quoteMsg.Asks, info.Asks);

 			if (currState == QuoteChangeStates.SnapshotStarted || currState == QuoteChangeStates.SnapshotBuilding)
 				return null;
@@ -133,11 +194,10 @@
 			return new QuoteChangeMessage
 			{
 				SecurityId = quoteMsg.SecurityId,
-				Bids = info.First.Select(p => new QuoteChange(Sides.Buy, p.Key, p.Value)).ToArray(),
-				Asks = info.Second.Select(p => new QuoteChange(Sides.Sell, p.Key, p.Value)).ToArray(),
+				Bids = info.Bids.Select(p => new QuoteChange(Sides.Buy, p.Key, p.Value)).ToArray(),
+				Asks = info.Asks.Select(p => new QuoteChange(Sides.Sell, p.Key, p.Value)).ToArray(),
 				IsSorted = true,
 				ServerTime = quoteMsg.ServerTime,
-				SubscriptionId = subscriptionId,
 				OriginalTransactionId = quoteMsg.OriginalTransactionId,
 			};
 		}
@@ -149,6 +209,47 @@

 			switch (message.Type)
 			{
+				case MessageTypes.MarketData:
+				{
+					var mdMsg = (MarketDataMessage)message;
+
+					if (!mdMsg.IsOk())
+						RemoveSubscription(mdMsg.OriginalTransactionId);
+
+					break;
+				}
+
+				case MessageTypes.MarketDataFinished:
+				{
+					RemoveSubscription(((MarketDataFinishedMessage)message).OriginalTransactionId);
+					break;
+				}
+
+				case MessageTypes.SubscriptionOnline:
+				{
+					var onlineMsg = (SubscriptionOnlineMessage)message;
+
+					lock (_syncObject)
+					{
+						var info = _byId.TryGetValue(onlineMsg.OriginalTransactionId);
+
+						if (info != null)
+						{
+							if (_online.TryGetValue(info.SecurityId, out var online))
+							{
+								online.SubscriptionIds.Add(onlineMsg.OriginalTransactionId);
+								_byId.Remove(onlineMsg.OriginalTransactionId);
+							}
+							else
+							{
+								_online.Add(info.SecurityId, info);
+							}
+						}
+					}
+
+					break;
+				}
+
 				case MessageTypes.QuoteChange:
 				{
 					var quoteMsg = (QuoteChangeMessage)message;
@@ -160,10 +261,15 @@

 					foreach (var subscriptionId in quoteMsg.GetSubscriptionIds())
 					{
-						if (!_states.TryGetValue(subscriptionId, out var info))
-							continue;
-
-						var newQuoteMsg = ApplyNewState(subscriptionId, info, quoteMsg, state.Value);
+						BookInfo info;
+
+						lock (_syncObject)
+						{
+							if (!_byId.TryGetValue(subscriptionId, out info))
+								continue;
+						}
+
+						var newQuoteMsg = ApplyNewState(info, quoteMsg, state.Value);

 						if (newQuoteMsg == null)
 							continue;
@@ -171,6 +277,7 @@
 						if (clones == null)
 							clones = new List<QuoteChangeMessage>();

+						newQuoteMsg.SubscriptionIds = info.SubscriptionIds.Cache;
 						clones.Add(newQuoteMsg);
 					}


#4 ハイスコア更新していなくてもニックネームが違う場合はニックネームのみ更新するようにした

--- Assets/Yoshinani/Scripts/NCMBRanking.cs
+++ Assets/Yoshinani/Scripts/NCMBRanking.cs
@@ -80,9 +80,13 @@
         public void SendScore(float newScore, string nickname, bool isForce, Action<bool> callback)
         {
             if (!isForce && this.highScoreData != null && this.highScoreData.score >= newScore) {
-                Debug.Log("送信する必要ないよ！");
-                // 更新必要なし
-                callback(false);
+                if (this.highScoreData != null && this.highScoreData.nickname != nickname) {
+                    UpdateNickname(nickname, callback);
+                } else {
+                    Debug.Log("送信する必要ないよ！");
+                    // 更新必要なし
+                    callback(false);
+                }
                 return;
             }


track when block txes finish reading in utxo look ahead

--- BitSharp.Core/Builders/UtxoLookAhead.cs
+++ BitSharp.Core/Builders/UtxoLookAhead.cs
@@ -21,6 +21,7 @@
         private readonly ParallelReader<Tuple<UInt256, CompletionCount>> utxoWarmupSource;
         private readonly ParallelObserver<Tuple<UInt256, CompletionCount>> utxoReader;

+        private readonly DurationMeasure txesReadDurationMeasure = new DurationMeasure(TimeSpan.FromMinutes(5), TimeSpan.FromSeconds(5));
         private readonly DurationMeasure lookAheadDurationMeasure = new DurationMeasure(TimeSpan.FromMinutes(5), TimeSpan.FromSeconds(5));

         public UtxoLookAhead()
@@ -33,24 +34,17 @@
         {
             this.utxoWarmupSource.Dispose();
             this.utxoReader.Dispose();
+            this.txesReadDurationMeasure.Dispose();
             this.lookAheadDurationMeasure.Dispose();
         }

         public IEnumerable<BlockTx> LookAhead(IEnumerable<BlockTx> blockTxes, DeferredChainStateCursor deferredChainStateCursor)
         {
-            var stopwatch = Stopwatch.StartNew();
             using (var progress = new Progress())
             // create the observable source of each utxo entry to be warmed up: each input's previous transaction, and each new transaction
             using (var utxoWarmupTask = this.utxoWarmupSource.ReadAsync(CreateBlockTxesSource(progress, blockTxes)).WaitOnDispose())
             // subscribe the utxo entries to be warmed up
-            using (var utxoReaderTask = this.utxoReader.SubscribeObservers(utxoWarmupSource, CreateUtxoWarmer(progress, deferredChainStateCursor),
-                finallyAction: ex =>
-                {
-                    stopwatch.Stop();
-                    lookAheadDurationMeasure.Tick(stopwatch.Elapsed);
-                    Throttler.IfElapsed(TimeSpan.FromSeconds(5), () =>
-                        logger.Info("UTXO Look-ahead: {0,12:N3}ms".Format2(lookAheadDurationMeasure.GetAverage().TotalMilliseconds)));
-                }).WaitOnDispose())
+            using (var utxoReaderTask = this.utxoReader.SubscribeObservers(utxoWarmupSource, CreateUtxoWarmer(progress, deferredChainStateCursor)).WaitOnDispose())
             {
                 // return the warmed-up transactions, in the original block order
                 foreach (var blockTx in CreateWarmedTxesSource(progress))
@@ -74,6 +68,10 @@
                         foreach (var txHash in blockTx.Transaction.Inputs.Select(x => x.PreviousTxOutputKey.TxHash))
                             yield return Tuple.Create(txHash, completionCount);
                 }
+
+                txesReadDurationMeasure.Tick(progress.stopwatch.Elapsed);
+                Throttler.IfElapsed(TimeSpan.FromSeconds(5), () =>
+                    logger.Info("Block Txes Read: {0,12:N3}ms".Format2(txesReadDurationMeasure.GetAverage().TotalMilliseconds)));
             }
             finally
             {
@@ -94,6 +92,13 @@

                     if (completionCount.TryComplete())
                         progress.txLoadedEvent.Set();
+                },
+                ex => { },
+                () =>
+                {
+                    lookAheadDurationMeasure.Tick(progress.stopwatch.Elapsed);
+                    Throttler.IfElapsed(TimeSpan.FromSeconds(5), () =>
+                        logger.Info("UTXO Look-ahead: {0,12:N3}ms".Format2(lookAheadDurationMeasure.GetAverage().TotalMilliseconds)));
                 });
         }

@@ -115,8 +120,10 @@
         //TODO
         private sealed class Progress : IDisposable
         {
-            public AutoResetEvent txLoadedEvent = new AutoResetEvent(false);
-            public ConcurrentQueue<Tuple<BlockTx, CompletionCount>> pendingWarmedTxes = new ConcurrentQueue<Tuple<BlockTx, CompletionCount>>();
+            public readonly Stopwatch stopwatch = Stopwatch.StartNew();
+            public readonly AutoResetEvent txLoadedEvent = new AutoResetEvent(false);
+            public readonly ConcurrentQueue<Tuple<BlockTx, CompletionCount>> pendingWarmedTxes = new ConcurrentQueue<Tuple<BlockTx, CompletionCount>>();
+
             public bool completedAdding = false;

             public void Dispose()


(x) Fix issue where property registrations might cause invalid IL when try/catch is automatically generated in static constructors


comments

comments

--- src/Umbraco.Core/Runtime/SqlMainDomLock.cs
+++ src/Umbraco.Core/Runtime/SqlMainDomLock.cs
@@ -172,7 +172,6 @@
                     }
                     catch (Exception ex)
                     {
-                        // unexpected, if this occurs MainDom will be shutdown!
                         _logger.Error<SqlMainDomLock>(ex, "Unexpected error during listening.");

                         // We need to keep on listening unless we've been notified by our own AppDomain to shutdown since


Added Bits context menu entry.

Added Bits context menu entry.

--- UI/MemoryViewControl.Designer.cs
+++ UI/MemoryViewControl.Designer.cs
@@ -46,6 +46,7 @@
 			this.uInt16ToolStripMenuItem = new ReClassNET.UI.TypeToolStripMenuItem();
 			this.uInt8ToolStripMenuItem = new ReClassNET.UI.TypeToolStripMenuItem();
 			this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
+			this.bitsToolStripMenuItem = new ReClassNET.UI.TypeToolStripMenuItem();
 			this.floatToolStripMenuItem = new ReClassNET.UI.TypeToolStripMenuItem();
 			this.doubleToolStripMenuItem = new ReClassNET.UI.TypeToolStripMenuItem();
 			this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
@@ -69,6 +70,7 @@
 			this.arrayOfPointersToolStripMenuItem = new ReClassNET.UI.TypeToolStripMenuItem();
 			this.vTablePointerToolStripMenuItem = new ReClassNET.UI.TypeToolStripMenuItem();
 			this.functionPointerToolStripMenuItem = new ReClassNET.UI.TypeToolStripMenuItem();
+			this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
 			this.addBytesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
 			this.add4BytesToolStripMenuItem = new ReClassNET.UI.IntegerToolStripMenuItem();
 			this.add8BytesToolStripMenuItem = new ReClassNET.UI.IntegerToolStripMenuItem();
@@ -127,6 +129,8 @@
             this.uInt16ToolStripMenuItem,
             this.uInt8ToolStripMenuItem,
             this.toolStripSeparator5,
+            this.bitsToolStripMenuItem,
+            this.toolStripSeparator11,
             this.floatToolStripMenuItem,
             this.doubleToolStripMenuItem,
             this.toolStripSeparator6,
@@ -278,6 +282,15 @@
 			this.toolStripSeparator5.Name = "toolStripSeparator5";
 			this.toolStripSeparator5.Size = new System.Drawing.Size(170, 6);
 			//
+			// bitsToolStripMenuItem
+			//
+			this.bitsToolStripMenuItem.Image = global::ReClassNET.Properties.Resources.B16x16_Button_Bits;
+			this.bitsToolStripMenuItem.Name = "bitsToolStripMenuItem";
+			this.bitsToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
+			this.bitsToolStripMenuItem.Text = "Bits";
+			this.bitsToolStripMenuItem.Value = typeof(ReClassNET.Nodes.BitFieldNode);
+			this.bitsToolStripMenuItem.Click += new System.EventHandler(this.memoryTypeToolStripMenuItem_Click);
+			//
 			// floatToolStripMenuItem
 			//
 			this.floatToolStripMenuItem.Image = global::ReClassNET.Properties.Resources.B16x16_Button_Float;
@@ -464,6 +477,11 @@
 			this.functionPointerToolStripMenuItem.Text = "Function Pointer";
 			this.functionPointerToolStripMenuItem.Value = typeof(ReClassNET.Nodes.FunctionPtrNode);
 			this.functionPointerToolStripMenuItem.Click += new System.EventHandler(this.memoryTypeToolStripMenuItem_Click);
+			//
+			// toolStripSeparator11
+			//
+			this.toolStripSeparator11.Name = "toolStripSeparator11";
+			this.toolStripSeparator11.Size = new System.Drawing.Size(170, 6);
 			//
 			// addBytesToolStripMenuItem
 			//
@@ -656,7 +674,6 @@
 			// editBox
 			//
 			this.editBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
-			this.editBox.HotSpot = null;
 			this.editBox.Location = new System.Drawing.Point(36, 81);
 			this.editBox.MinimumWidth = 0;
 			this.editBox.Name = "editBox";
@@ -679,7 +696,7 @@
 			//
 			this.Controls.Add(this.editBox);
 			this.Name = "MemoryViewControl";
-			this.Size = new System.Drawing.Size(150, 129);
+			this.Size = new System.Drawing.Size(150, 138);
 			this.selectedNodeContextMenuStrip.ResumeLayout(false);
 			this.ResumeLayout(false);
 			this.PerformLayout();
@@ -752,5 +769,7 @@
 		private UI.TypeToolStripMenuItem functionPointerToolStripMenuItem;
 		private UI.TypeToolStripMenuItem arrayOfPointersToolStripMenuItem;
 		private System.Windows.Forms.Timer updateClassTimer;
+		private UI.TypeToolStripMenuItem bitsToolStripMenuItem;
+		private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
 	}
 }


PdfTextExtractor: Allow exact match searching text. Used for column and field search.

--- VAR.PdfTools/PdfTextExtractor.cs
+++ VAR.PdfTools/PdfTextExtractor.cs
@@ -316,12 +316,13 @@
             return sbResult.ToString();
         }

-        private PdfTextElement FindElementByText(string text)
-        {
-            string simpleText = SimplifyText(text);
+        private PdfTextElement FindElementByText(string text, bool fuzzy)
+        {
+            string matchingText = fuzzy ? SimplifyText(text) : text;
             foreach (PdfTextElement elem in _textElements)
             {
-                if (SimplifyText(elem.VisibleText) == simpleText)
+                string elemText = fuzzy ? SimplifyText(elem.VisibleText) : elem.VisibleText;
+                if (elemText == matchingText)
                 {
                     return elem;
                 }
@@ -587,7 +588,12 @@

         public List<string> GetColumn(string column)
         {
-            PdfTextElement columnHead = FindElementByText(column);
+            return GetColumn(column, true);
+        }
+
+        public List<string> GetColumn(string column, bool fuzzy)
+        {
+            PdfTextElement columnHead = FindElementByText(column, fuzzy);
             if(columnHead == null)
             {
                 return new List<string>();
@@ -657,9 +663,14 @@
             return result;
         }

-        public string GetField(string column)
-        {
-            PdfTextElement fieldTitle = FindElementByText(column);
+        public string GetField(string field)
+        {
+            return GetField(field, true);
+        }
+
+        public string GetField(string field, bool fuzzy)
+        {
+            PdfTextElement fieldTitle = FindElementByText(field, fuzzy);
             if (fieldTitle == null)
             {
                 return null;


Improve cursor.

Improve cursor.

--- VRGIN/Visuals/SimulatedCursor.cs
+++ VRGIN/Visuals/SimulatedCursor.cs
@@ -18,6 +18,8 @@
         private Canvas _Canvas;
         private CanvasScaler _Scaler;
         private Image _Cursor;
+        private Texture2D _Sprite;
+        private Vector2 _Scale;

         /// <summary>
         /// Creates a new SimulatedCursor. Use this to make one.
@@ -34,25 +36,28 @@
         protected override void OnAwake()
         {
             base.OnAwake();
-            _Canvas = gameObject.AddComponent<Canvas>();
-            _Canvas.sortingOrder = 100;
-            _Canvas.renderMode = RenderMode.ScreenSpaceOverlay;
-            _Scaler = gameObject.AddComponent<CanvasScaler>();
-            _Scaler.dynamicPixelsPerUnit = 100;
+            _Sprite = UnityHelper.LoadImage("cursor.png");
+            _Scale = new Vector2(_Sprite.width, _Sprite.height) * 0.5f;

-            _Cursor = new GameObject().AddComponent<Image>();
-            _Cursor.transform.SetParent(_Canvas.transform, false);
+            //_Canvas = gameObject.AddComponent<Canvas>();
+            //_Canvas.sortingOrder = 100;
+            //_Canvas.renderMode = RenderMode.ScreenSpaceOverlay;
+            //_Scaler = gameObject.AddComponent<CanvasScaler>();
+            //_Scaler.dynamicPixelsPerUnit = 100;

-            var texture = UnityHelper.LoadImage("cursor.png");
-            _Cursor.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), Vector2.zero, 100);
+            //_Cursor = new GameObject().AddComponent<Image>();
+            //_Cursor.transform.SetParent(_Canvas.transform, false);

-            var rectTransform = _Cursor.GetComponent<RectTransform>();
-            rectTransform.anchorMin = Vector2.zero;
-            rectTransform.anchorMax = Vector2.zero;
-            rectTransform.pivot = new Vector2(0, 1);
-            rectTransform.sizeDelta = new Vector2(texture.width / 2, texture.height / 2);
+            //var texture = UnityHelper.LoadImage("cursor.png");
+            //_Cursor.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), Vector2.zero, 100);

-            gameObject.layer = LayerMask.NameToLayer(VR.Context.UILayer);
+            //var rectTransform = _Cursor.GetComponent<RectTransform>();
+            //rectTransform.anchorMin = Vector2.zero;
+            //rectTransform.anchorMax = Vector2.zero;
+            //rectTransform.pivot = new Vector2(0, 1);
+            //rectTransform.sizeDelta = new Vector2(texture.width / 2, texture.height / 2);
+
+            //gameObject.layer = LayerMask.NameToLayer(VR.Context.UILayer);
         }

         protected override void OnStart()
@@ -60,27 +65,44 @@
             base.OnStart();
         }

-        protected override void OnUpdate()
+//        protected override void OnUpdate()
+//        {
+//            base.OnUpdate();
+
+//#if UNITY_4_5
+//            if (Screen.showCursor)
+//#else
+//            if (Cursor.visible)
+//#endif
+//            {
+//                if (!_Canvas.enabled)
+//                {
+//                    _Canvas.enabled = true;
+//                }
+
+//                _Cursor.GetComponent<RectTransform>().anchoredPosition = Input.mousePosition;
+//            }
+//            else
+//            {
+//                _Canvas.enabled = false;
+//            }
+//        }
+
+        void OnGUI()
         {
-            base.OnUpdate();
-
 #if UNITY_4_5
             if (Screen.showCursor)
 #else
             if (Cursor.visible)
 #endif
             {
-                if (!_Canvas.enabled)
-                {
-                    _Canvas.enabled = true;
-                }
+                var pos = new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y);
+
+                GUI.DrawTexture(new Rect(pos, _Scale), _Sprite);

-                _Cursor.GetComponent<RectTransform>().anchoredPosition = Input.mousePosition;
+                //_Cursor.GetComponent<RectTransform>().anchoredPosition = Input.mousePosition;
             }
-            else
-            {
-                _Canvas.enabled = false;
-            }
+
         }
     }
 }


Bugfix

Bugfix

--- SharpTAL.Tests/TalTests/TalReplaceTests.cs
+++ SharpTAL.Tests/TalTests/TalReplaceTests.cs
@@ -15,7 +15,7 @@
 		{
 		}

-		[OneTimeTearDowng]
+		[OneTimeTearDown]
 		public void CleanupClass()
 		{
 		}


[skip ci] evolve dotnet publish

[skip ci] evolve dotnet publish

--- WalletWasabi.Packager/Program.cs
+++ WalletWasabi.Packager/Program.cs
@@ -81,10 +81,26 @@
 					Console.WriteLine($"Created {currentBinDistDirectory}");
 				}

+				// https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish?tabs=netcore21
+				// -c|--configuration {Debug|Release}
+				//		Defines the build configuration. The default value is Debug.
+				// --force
+				//		Forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is the same as deleting the project.assets.json file.
+				// -o|--output <OUTPUT_DIRECTORY>
+				//		Specifies the path for the output directory.
+				//		If not specified, it defaults to ./bin/[configuration]/[framework]/publish/ for a framework-dependent deployment or
+				//		./bin/[configuration]/[framework]/[runtime]/publish/ for a self-contained deployment.
+				//		If the path is relative, the output directory generated is relative to the project file location, not to the current working directory.
+				// --self-contained
+				//		Publishes the .NET Core runtime with your application so the runtime doesn't need to be installed on the target machine.
+				//		If a runtime identifier is specified, its default value is true. For more information about the different deployment types, see .NET Core application deployment.
+				// -r|--runtime <RUNTIME_IDENTIFIER>
+				//		Publishes the application for a given runtime. This is used when creating a self-contained deployment (SCD).
+				//		For a list of Runtime Identifiers (RIDs), see the RID catalog. Default is to publish a framework-dependent deployment (FDD).
 				var psiPublish = new ProcessStartInfo
 				{
 					FileName = "dotnet",
-					Arguments = $"publish --configuration Release --runtime {target} --output bin/dist/{target}",
+					Arguments = $"publish --configuration Release --force --output bin/dist/{target} --self-contained true --runtime {target}",
 					WorkingDirectory = guiProjectDirectory
 				};
 				var pPublish = Process.Start(psiPublish);


Add GitHub auth. Hide option in UI

Add GitHub auth. Hide option in UI

--- SimpleWAWS/Authentication/AuthUtilities.cs
+++ SimpleWAWS/Authentication/AuthUtilities.cs
@@ -6,9 +6,19 @@
 {
     public static class AuthUtilities
     {
-        public static string GetContentFromUrl(string url)
+        public static string GetContentFromUrl(string url, string method="GET", bool jsonAccept = false, bool addGitHubHeaders = false, string AuthorizationHeader ="")
         {
             var request = (HttpWebRequest)WebRequest.Create(url);
+            request.Method = method;
+            request.UserAgent = "Anything";
+            if (jsonAccept)
+                request.Accept = "application/json";
+            if (addGitHubHeaders)
+                request.Accept = "application/vnd.github.v3+json";
+            if (!String.IsNullOrEmpty(AuthorizationHeader))
+            {
+                request.Headers.Add("Authorization", AuthorizationHeader);
+            }
             using (var response = request.GetResponse())
             {
                 using (var reader = new StreamReader(response.GetResponseStream()))


#11000  Hospital Settings: SSO for Admin user

--- SnapMD.VirtualCare.ApiModels/HospitalInfo.cs
+++ SnapMD.VirtualCare.ApiModels/HospitalInfo.cs
@@ -118,6 +118,27 @@
         public string ClinicianLogin { get; set; }

         /// <summary>
+        /// The level of SSO access required for an admin.
+        /// </summary>
+        [JsonConverter(typeof(StringEnumConverter))]
+        public CustomerSsoType AdminSso { get; set; }
+
+        /// <summary>
+        /// The link text used to allow an admin SSO access.
+        /// </summary>
+        public string AdminSsoLinkText { get; set; }
+
+        /// <summary>
+        /// The URL used for handling encounters through admins.
+        /// </summary>
+        public string AdminConsultEndUrl { get; set; }
+
+        /// <summary>
+        /// The admin's login.
+        /// </summary>
+        public string AdminLogin { get; set; }
+
+        /// <summary>
         /// The api endpoint patient auth token.
         /// </summary>
         public string PatientTokenApi { get; set; }


Changing publish time on new blog post to see if that's why it's not showing up.

--- Somedave/Views/Blog/Posts/my-new-blog.cshtml
+++ Somedave/Views/Blog/Posts/my-new-blog.cshtml
@@ -1,7 +1,7 @@
 @{
     Title = "My New Blog";
     Lead = "Look, Ma, no database!";
-    Published = new DateTime(2014, 9, 5);
+    Published = new DateTime(2014, 9, 4);
     Tags = new[] { "blog", "meta" };
 }


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.21.3850.20210222175520-master-f212938

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "e501f33693418f1ffc5855f5f743ab92edbdaeac";
+        public static string Commit = "f2129386c42a1a40e770cf3834d7da4b870932b9";

         public static string Version = "1.21";
-        public static string Build   = "3849";
+        public static string Build   = "3850";

         public static int BuildYear   = 2021;
         public static int BuildMonth  = 02;
         public static int BuildDay    = 22;
-        public static int BuildHour   = 03;
-        public static int BuildMinute = 20;
-        public static int BuildSecond = 05;
+        public static int BuildHour   = 17;
+        public static int BuildMinute = 55;
+        public static int BuildSecond = 20;
     }
 }


[D3DCompiler] Make ShaderBytecode.Compile API identical between Desktop and StoreApp

--- Source/SharpDX.D3DCompiler/ShaderBytecode.cs
+++ Source/SharpDX.D3DCompiler/ShaderBytecode.cs
@@ -127,7 +127,6 @@
         /// </summary>
         public byte[] Data { get; private set; }

-#if STORE_APP
         /// <summary>
         /// Compiles the provided shader or effect source.
         /// </summary>
@@ -141,8 +140,8 @@
         /// <returns>
         /// The compiled shader bytecode, or <c>null</c> if the method fails.
         /// </returns>
-        public static CompilationResult Compile(string shaderSource, string profile, ShaderFlags shaderFlags,
-                                             EffectFlags effectFlags, string sourceFileName = "unknown", SecondaryDataFlags secondaryDataFlags = SecondaryDataFlags.None, DataStream secondaryData = null)
+        public static CompilationResult Compile(string shaderSource, string profile, ShaderFlags shaderFlags = ShaderFlags.None,
+                                             EffectFlags effectFlags = EffectFlags.None, string sourceFileName = "unknown", SecondaryDataFlags secondaryDataFlags = SecondaryDataFlags.None, DataStream secondaryData = null)
         {
             if (string.IsNullOrEmpty(shaderSource))
             {
@@ -184,7 +183,7 @@
         /// The compiled shader bytecode, or <c>null</c> if the method fails.
         /// </returns>
         public static CompilationResult Compile(string shaderSource, string entryPoint, string profile,
-                                             ShaderFlags shaderFlags, EffectFlags effectFlags, string sourceFileName = "unknown", SecondaryDataFlags secondaryDataFlags = SecondaryDataFlags.None, DataStream secondaryData = null)
+                                             ShaderFlags shaderFlags = ShaderFlags.None, EffectFlags effectFlags = EffectFlags.None, string sourceFileName = "unknown", SecondaryDataFlags secondaryDataFlags = SecondaryDataFlags.None, DataStream secondaryData = null)
         {
             if (string.IsNullOrEmpty(shaderSource))
             {
@@ -397,29 +396,6 @@
                 return new CompilationResult(blobForCode != null ? new ShaderBytecode(blobForCode) : null, resultCode, Utilities.BlobToString(blobForErrors));
             }
         }
-#else
-
-        /// <summary>
-        /// Compiles the provided shader or effect source.
-        /// </summary>
-        /// <param name="shaderSource">A string containing the source of the shader or effect to compile.</param>
-        /// <param name="profile">The shader target or set of shader features to compile against.</param>
-        /// <param name="shaderFlags">Shader compilation options.</param>
-        /// <param name="effectFlags">Effect compilation options.</param>
-        /// <param name="sourceFileName">Name of the source file.</param>
-        /// <returns>
-        /// The compiled shader bytecode, or <c>null</c> if the method fails.
-        /// </returns>
-        public static CompilationResult Compile(string shaderSource, string profile, ShaderFlags shaderFlags,
-                                             EffectFlags effectFlags, string sourceFileName = "unknown")
-        {
-            if (string.IsNullOrEmpty(shaderSource))
-            {
-                throw new ArgumentNullException("shaderSource");
-            }
-            return Compile(Encoding.ASCII.GetBytes(shaderSource), null, profile, shaderFlags, effectFlags, null, null,
-                           sourceFileName);
-        }

         /// <summary>
         /// Compiles the provided shader or effect source.
@@ -439,29 +415,6 @@
         }

         /// <summary>
-        /// Compiles the provided shader or effect source.
-        /// </summary>
-        /// <param name="shaderSource">A string containing the source of the shader or effect to compile.</param>
-        /// <param name="entryPoint">The name of the shader entry-point function, or <c>null</c> for an effect file.</param>
-        /// <param name="profile">The shader target or set of shader features to compile against.</param>
-        /// <param name="shaderFlags">Shader compilation options.</param>
-        /// <param name="effectFlags">Effect compilation options.</param>
-        /// <param name="sourceFileName">Name of the source file.</param>
-        /// <returns>
-        /// The compiled shader bytecode, or <c>null</c> if the method fails.
-        /// </returns>
-        public static CompilationResult Compile(string shaderSource, string entryPoint, string profile, ShaderFlags shaderFlags = ShaderFlags.None,
-                                             EffectFlags effectFlags = EffectFlags.None, string sourceFileName = "unknown")
-        {
-            if (string.IsNullOrEmpty(shaderSource))
-            {
-                throw new ArgumentNullException("shaderSource");
-            }
-            return Compile(Encoding.ASCII.GetBytes(shaderSource), entryPoint, profile, shaderFlags, effectFlags, null,
-                           null, sourceFileName);
-        }
-
-        /// <summary>
         ///   Compiles the provided shader or effect source.
         /// </summary>
         /// <param name = "shaderSource">An array of bytes containing the raw source of the shader or effect to compile.</param>
@@ -477,77 +430,6 @@
         {
             return Compile(shaderSource, entryPoint, profile, shaderFlags, effectFlags, null, null,
                            sourceFileName);
-        }
-
-        /// <summary>
-        /// Compiles the provided shader or effect source.
-        /// </summary>
-        /// <param name="shaderSource">A string containing the source of the shader or effect to compile.</param>
-        /// <param name="profile">The shader target or set of shader features to compile against.</param>
-        /// <param name="shaderFlags">Shader compilation options.</param>
-        /// <param name="effectFlags">Effect compilation options.</param>
-        /// <param name="defines">A set of macros to define during compilation.</param>
-        /// <param name="include">An interface for handling include files.</param>
-        /// <param name="sourceFileName">Name of the source file.</param>
-        /// <returns>
-        /// The compiled shader bytecode, or <c>null</c> if the method fails.
-        /// </returns>
-        public static CompilationResult Compile(string shaderSource, string profile, ShaderFlags shaderFlags,
-                                             EffectFlags effectFlags, ShaderMacro[] defines, Include include,
-                                             string sourceFileName = "unknown")
-        {
-            if (string.IsNullOrEmpty(shaderSource))
-            {
-                throw new ArgumentNullException("shaderSource");
-            }
-            return Compile(Encoding.ASCII.GetBytes(shaderSource), null, profile, shaderFlags, effectFlags, defines,
-                           include, sourceFileName);
-        }
-
-        /// <summary>
-        /// Compiles the provided shader or effect source.
-        /// </summary>
-        /// <param name="shaderSource">An array of bytes containing the raw source of the shader or effect to compile.</param>
-        /// <param name="profile">The shader target or set of shader features to compile against.</param>
-        /// <param name="shaderFlags">Shader compilation options.</param>
-        /// <param name="effectFlags">Effect compilation options.</param>
-        /// <param name="defines">A set of macros to define during compilation.</param>
-        /// <param name="include">An interface for handling include files.</param>
-        /// <param name="sourceFileName">Name of the source file.</param>
-        /// <returns>
-        /// The compiled shader bytecode, or <c>null</c> if the method fails.
-        /// </returns>
-        public static CompilationResult Compile(byte[] shaderSource, string profile, ShaderFlags shaderFlags,
-                                             EffectFlags effectFlags, ShaderMacro[] defines, Include include,
-                                             string sourceFileName = "unknown")
-        {
-            return Compile(shaderSource, null, profile, shaderFlags, effectFlags, defines, include, sourceFileName);
-        }
-
-        /// <summary>
-        /// Compiles the provided shader or effect source.
-        /// </summary>
-        /// <param name="shaderSource">A string containing the source of the shader or effect to compile.</param>
-        /// <param name="entryPoint">The name of the shader entry-point function, or <c>null</c> for an effect file.</param>
-        /// <param name="profile">The shader target or set of shader features to compile against.</param>
-        /// <param name="shaderFlags">Shader compilation options.</param>
-        /// <param name="effectFlags">Effect compilation options.</param>
-        /// <param name="defines">A set of macros to define during compilation.</param>
-        /// <param name="include">An interface for handling include files.</param>
-        /// <param name="sourceFileName">Name of the source file.</param>
-        /// <returns>
-        /// The compiled shader bytecode, or <c>null</c> if the method fails.
-        /// </returns>
-        public static CompilationResult Compile(string shaderSource, string entryPoint, string profile,
-                                             ShaderFlags shaderFlags, EffectFlags effectFlags, ShaderMacro[] defines,
-                                             Include include, string sourceFileName = "unknown")
-        {
-            if (string.IsNullOrEmpty(shaderSource))
-            {
-                throw new ArgumentNullException("shaderSource");
-            }
-            return Compile(Encoding.ASCII.GetBytes(shaderSource), entryPoint, profile, shaderFlags, effectFlags, defines,
-                           include, sourceFileName);
         }

         /// <summary>
@@ -578,105 +460,16 @@
         /// <returns>
         /// The compiled shader bytecode, or <c>null</c> if the method fails.
         /// </returns>
-        public static CompilationResult CompileFromFile(string fileName, string entryPoint, string profile, ShaderFlags shaderFlags = ShaderFlags.None, EffectFlags effectFlags = EffectFlags.None, ShaderMacro[] defines = null, Include include = null)
-        {
-            if (fileName == null)
-            {
-                throw new ArgumentNullException("fileName");
-            }
-            if (profile == null)
-            {
-                throw new ArgumentNullException("profile");
-            }
-            unsafe
-            {
-                var resultCode = Result.Ok;
-
-                Blob blobForCode = null;
-                Blob blobForErrors = null;
-
-                resultCode = D3D.CompileFromFile(
-                    fileName,
-                    PrepareMacros(defines),
-                    IncludeShadow.ToIntPtr(include),
-                    entryPoint,
-                    profile,
-                    shaderFlags,
-                    effectFlags,
-                    out blobForCode,
-                    out blobForErrors);
-
-                if (resultCode.Failure)
-                {
-                    if (blobForErrors != null)
-                    {
-                        if (Configuration.ThrowOnShaderCompileError) throw new CompilationException(resultCode, Utilities.BlobToString(blobForErrors));
-                    }
-                    else
-                    {
-                        throw new SharpDXException(resultCode);
-                    }
-                }
-
-                return new CompilationResult(blobForCode != null ? new ShaderBytecode(blobForCode) : null, resultCode, Utilities.BlobToString(blobForErrors));
-            }
-        }
-
-        /// <summary>
-        /// Compiles the provided shader or effect source.
-        /// </summary>
-        /// <param name="shaderSource">An array of bytes containing the raw source of the shader or effect to compile.</param>
-        /// <param name="entryPoint">The name of the shader entry-point function, or <c>null</c> for an effect file.</param>
-        /// <param name="profile">The shader target or set of shader features to compile against.</param>
-        /// <param name="shaderFlags">Shader compilation options.</param>
-        /// <param name="effectFlags">Effect compilation options.</param>
-        /// <param name="defines">A set of macros to define during compilation.</param>
-        /// <param name="include">An interface for handling include files.</param>
-        /// <param name="sourceFileName">Name of the source file used for reporting errors. Default is "unknown"</param>
-        /// <returns>
-        /// The compiled shader bytecode, or <c>null</c> if the method fails.
-        /// </returns>
-        public static CompilationResult Compile(byte[] shaderSource, string entryPoint, string profile,
-                                             ShaderFlags shaderFlags, EffectFlags effectFlags, ShaderMacro[] defines,
-                                             Include include, string sourceFileName = "unknown")
-        {
-            unsafe
-            {
-                var resultCode = Result.Ok;
-
-                Blob blobForCode = null;
-                Blob blobForErrors = null;
-
-                fixed (void* pData = &shaderSource[0])
-                    resultCode = D3D.Compile(
-                        (IntPtr)pData,
-                        shaderSource.Length,
-                        sourceFileName,
-                        PrepareMacros(defines),
-                        IncludeShadow.ToIntPtr(include),
-                        entryPoint,
-                        profile,
-                        shaderFlags,
-                        effectFlags,
-                        out blobForCode,
-                        out blobForErrors);
-
-                if (resultCode.Failure)
-                {
-                    if (blobForErrors != null)
-                    {
-                        if (Configuration.ThrowOnShaderCompileError) throw new CompilationException(resultCode, Utilities.BlobToString(blobForErrors));
-                    }
-                    else
-                    {
-                        throw new SharpDXException(resultCode);
-                    }
-                }
-
-                return new CompilationResult(blobForCode != null ? new ShaderBytecode(blobForCode) : null, resultCode, Utilities.BlobToString(blobForErrors));
-            }
-        }
-#endif
+        public static CompilationResult CompileFromFile(string fileName,
+            string entryPoint,
+            string profile,
+            ShaderFlags shaderFlags = ShaderFlags.None,
+            EffectFlags effectFlags = EffectFlags.None,
+            ShaderMacro[] defines = null,
+            Include include = null)
+        {
+            return Compile(NativeFile.ReadAllText(fileName), entryPoint, profile, shaderFlags, effectFlags, defines, include);
+        }

         // Win 8.1 SDK removed the corresponding functions from the WinRT platform
 #if DESKTOP_APP


time test

time test

--- src/Magnum.Specs/CommandLine/Output_Specs.cs
+++ src/Magnum.Specs/CommandLine/Output_Specs.cs
@@ -6,6 +6,7 @@
     public class Output_Specs
     {
         [Test]
+        [Repeat(300)] //5.04
         public void NAME()
         {
             OutputV2 o = new OutputV2();
@@ -18,6 +19,24 @@
             o.Execute();

             TestCommand<NullArgs>.WasExecuted.ShouldBeTrue();
+            TestCommand<NullArgs>.WasExecuted = false;
+        }
+
+        [Test]
+        [Repeat(300)] //4.98
+        public void V1()
+        {
+            ParsedCommandLineOutput<NullArgs> a = new ParsedCommandLineOutput<NullArgs>();
+            a.CommandName = "test";
+            a.Command = new TestCommand<NullArgs>();
+            a.Args = new NullArgs();
+
+            TestCommand<NullArgs>.WasExecuted.ShouldBeFalse();
+
+            a.Execute();
+
+            TestCommand<NullArgs>.WasExecuted.ShouldBeTrue();
+            TestCommand<NullArgs>.WasExecuted = false;
         }
     }
 }


LWDEV-2147: disable deposit limit for swift return

--- src/MarginTrading.Services/AccountManager.cs
+++ src/MarginTrading.Services/AccountManager.cs
@@ -67,7 +67,7 @@

         public async Task UpdateBalanceAsync(string clientId, string accountId, double amount, AccountHistoryType historyType, string comment, bool changeTransferLimit = false)
         {
-            if (historyType == AccountHistoryType.Deposit)
+            if (historyType == AccountHistoryType.Deposit && changeTransferLimit)
             {
                 await CheckDepositLimits(clientId, accountId, amount);
             }


git-svn-id: http://monoxna.googlecode.com/svn/trunk@169 0d1dca7f-3429-0410-b39c-edaab0c29397

--- src/Microsoft.Xna.Framework/Input/GamePad.cs
+++ src/Microsoft.Xna.Framework/Input/GamePad.cs
@@ -2,7 +2,7 @@

 /*
 MIT License
-Copyright  2006 The Mono.Xna Team
+Copyright © 2006 The Mono.Xna Team

 All rights reserved.

@@ -52,7 +52,7 @@
         const int LeftTrigger = 7;
         const int RightTrigger = 8;

-        // For the circular axis dead zone, this value is the maximum distance for x + y, when x = y = 1 | -1
+        // For the circular axis dead zone, this value is the maximum distance for x² + y², when x = y = 1 | -1
         const float MaxDistance = 1.4142135623730951f;
         const int MaxSticks = 4;
         #endregion Button Constants
@@ -233,4 +233,4 @@

         #endregion Public Methods
     }
-}+}


2015 07 C# Fix super-basic test

2015 07 C# Fix super-basic test

--- 2015/cs/AdventOfCode2015_CSharp/AdventOfCode2015.Tests/TestDay07.cs
+++ 2015/cs/AdventOfCode2015_CSharp/AdventOfCode2015.Tests/TestDay07.cs
@@ -20,8 +20,7 @@
 NOT x -> h
 NOT y -> i
 ";
-            List<Wire> parsed = Day07.ParseInput(input);
-            Circuit circuit = Circuit.FromInstructions(parsed);
+            Circuit circuit = Day07.ParseInput(input);
             var pairs = Enumerable.Zip(
                 new ushort[] { 72, 507, 492, 114, 65412, 65079, 123, 456},
                 new string[] { "d", "e", "f", "g", "h", "i", "x", "y"},


fixed debug check

fixed debug check

--- BrightWire.Source/Models/FloatMatrix.cs
+++ BrightWire.Source/Models/FloatMatrix.cs
@@ -28,7 +28,7 @@
         public static FloatMatrix Create(FloatVector[] rows)
         {
 #if DEBUG
-            if (rows != null) {
+            if (rows != null && rows.All(r => r != null)) {
                 var firstRowSize = rows.First().Size;
                 Debug.Assert(rows.All(r => r.Size == firstRowSize));
             }


Add another test

Add another test

svn path=/trunk/bitsharp/; revision=117387

--- src/MonoTorrent.Tests/Common/BitFieldTest.cs
+++ src/MonoTorrent.Tests/Common/BitFieldTest.cs
@@ -98,6 +98,14 @@
         }

         [Test]
+        public void FirstTrue_2()
+        {
+            BitField b = new BitField(1025);
+            b[1024] = true;
+            Assert.AreEqual(1024, b.FirstTrue(0, 1025));
+        }
+
+        [Test]
         public void LongByteArrayTest()
         {
             List<byte> list = new List<byte>(initialByteValues);


Socket shutdown - ignore ObjectDisposedException

--- src/NEventSocket/Sockets/ObservableSocket.cs
+++ src/NEventSocket/Sockets/ObservableSocket.cs
@@ -114,9 +114,17 @@
                             }
                             catch (IOException ex)
                             {
-                                //socket comms interrupted - propogate the error up the layers
-                                SafeLog(LogLevel.Error, () => "IO Error reading from stream", ex);
-                                subject.OnError(ex);
+                                if (ex.InnerException is ObjectDisposedException)
+                                {
+                                    //expected - normal shutdown
+                                    subject.OnCompleted();
+                                }
+                                else
+                                {
+                                    //socket comms interrupted - propogate the error up the layers
+                                    SafeLog(LogLevel.Error, () => "IO Error reading from stream", ex);
+                                    subject.OnError(ex);
+                                }
                             }
                             catch (SocketException ex)
                             {


Review test for NH-3333, and ignore it for now.

--- src/NHibernate.Test/Linq/ProjectionsTests.cs
+++ src/NHibernate.Test/Linq/ProjectionsTests.cs
@@ -235,6 +235,20 @@
 		}

 		[Test]
+		[Ignore("Not fixed yet, see NH-3333")]
+		public void ProjectAnonymousTypeWithCollection()
+		{
+			// NH-3333
+			// done by WCF DS: context.Orders.Expand(o => o.OrderLines) from the client
+			var query = from o in db.Orders
+						select new { o, o.OrderLines };
+
+			var result = query.ToList();
+			Assert.That(result.Count, Is.Not.EqualTo(0));
+			Assert.That(result[0].o.OrderLines, Is.EquivalentTo(result[0].OrderLines));
+		}
+
+		[Test]
 		public void CanProjectComplexDictionaryIndexer()
 		{
 			//NH-3000
@@ -351,17 +365,6 @@
 			Assert.That(result[2].Value, Is.EqualTo(value.Substring(result[2].Start)));
 		}

-		[Test]
-		public void ProjectAnonymousTypeWithCollection()
-		{
-			//NH-3333
-			var query = from o in db.Orders
-						select new { o, o.OrderLines }; // done by WCF DS: context.Orders.Expand(o => o.OrderLines) from the client
-
-			var result = query.ToList();
-			Assert.Pass();
-		}
-
 		private string FormatName(string name, DateTime? lastLoginDate)
 		{
 			return string.Format("User {0} logged in at {1}", name, lastLoginDate);


fix #90 Ask about CheckSavedFiles only once

--- CPPCheckPlugin/CppcheckSettings.xaml.cs
+++ CPPCheckPlugin/CppcheckSettings.xaml.cs
@@ -33,16 +33,16 @@
 				Properties.Settings.Default["DefaultArguments"] = Properties.Settings.Default.DefaultArguments.Replace("--template=vs", "--template=\"{file}|{line}|{severity}|{id}|{message}\"");

 			Properties.Settings.Default.Save();
+
+			if (Properties.Settings.Default["CheckSavedFiles"] == null)
+			{
+				CPPCheckPluginPackage.askCheckSavedFiles();
+			}
 		}

 		private void onActivated(object o, EventArgs e)
 		{
 			InconclusiveChecks.IsChecked = Properties.Settings.Default.InconclusiveChecksEnabled;
-
-			if (Properties.Settings.Default["CheckSavedFiles"] == null)
-			{
-				CPPCheckPluginPackage.askCheckSavedFiles();
-			}

 			CheckSavedFiles.IsChecked = Properties.Settings.Default.CheckSavedFiles;
 			Project_OnlyCheckCurrentConfig.IsChecked = Properties.Settings.Default.ProjectOnlyCheckCurrentConfig;


Add padding to the text container

Add padding to the text container

--- osu.Game/Screens/Play/ReplaySettings/PlaybackSettings.cs
+++ osu.Game/Screens/Play/ReplaySettings/PlaybackSettings.cs
@@ -11,6 +11,8 @@
 {
     public class PlaybackSettings : ReplayGroup
     {
+        private const int padding = 10;
+
         protected override string Title => @"playback";

         public IAdjustableClock AdjustableClock { set; get; }
@@ -26,6 +28,7 @@
                 {
                     RelativeSizeAxes = Axes.X,
                     AutoSizeAxes = Axes.Y,
+                    Padding = new MarginPadding { Horizontal = padding },
                     Children = new Drawable[]
                     {
                         new OsuSpriteText
@@ -54,6 +57,8 @@
                     },
                 }
             };
+
+            sliderbar.Bindable.ValueChanged += rateMultiplier => multiplierText.Text = $"{rateMultiplier}x";
         }

         protected override void LoadComplete()
@@ -64,11 +69,7 @@
                 return;

             var clockRate = AdjustableClock.Rate;
-            sliderbar.Bindable.ValueChanged += rateMultiplier =>
-            {
-                AdjustableClock.Rate = clockRate * rateMultiplier;
-                multiplierText.Text = $"{rateMultiplier}x";
-            };
+            sliderbar.Bindable.ValueChanged += rateMultiplier => AdjustableClock.Rate = clockRate * rateMultiplier;
         }
     }
 }


some unit test tweaks

some unit test tweaks

--- Archimedes.Framework.Test/ConfigurationTest/PropertiesParserTest.cs
+++ Archimedes.Framework.Test/ConfigurationTest/PropertiesParserTest.cs
@@ -7,9 +7,6 @@
     {
         [TestCase("simpleKey=simpleValue", "simpleKey", "simpleValue")]
         [TestCase("simpleKeyNumber=254", "simpleKeyNumber", "254")]
-        [TestCase("keywithComplexVal=Iamsooo;Coold--&&23412+()&ç", "keywithComplexVal", "Iamsooo;Coold--&&23412+()&ç")]
-        [TestCase("keyWithValue=TooCool=324;asdf", "keyWithValue", "TooCool=324;asdf")]
-
         public void TestParse(string propertyLine, string expectedKey, string expectedValue)
         {
             var source = new PropertiesPropertySource(propertyLine);
@@ -21,5 +18,17 @@

+        [TestCase("keywithComplexVal=Iamsooo;Coold--&&23412+()&ç", "keywithComplexVal", "Iamsooo;Coold--&&23412+()&ç")]
+        [TestCase("keyWithValue=TooCool=324;asdf", "keyWithValue", "TooCool=324;asdf")]
+        public void TestParse2(string propertyLine, string expectedKey, string expectedValue)
+        {
+            var source = new PropertiesPropertySource(propertyLine);
+
+            var properties = source.Load();
+
+            Assert.AreEqual(properties.Get(expectedKey), expectedValue);
+        }
+
+
     }
 }


Don't enable Save/Cancel due to refreshing devices

--- MultiMiner.Win/MainForm.cs
+++ MultiMiner.Win/MainForm.cs
@@ -229,24 +229,34 @@

         private void LoadGridValuesFromConfiguration()
         {
-            for (int i = 0; i < devices.Count; i++)
-            {
-                Device device = devices[i];
-
-                DeviceConfiguration deviceConfiguration = engineConfiguration.DeviceConfigurations.SingleOrDefault(
-                    c => (c.DeviceKind == device.Kind)
-                    && (c.DeviceIndex == i));
-
-                if (deviceConfiguration != null)
-                {
-                    CryptoCoin coin = knownCoins.Coins.SingleOrDefault(c => c.Symbol.Equals(deviceConfiguration.CoinSymbol));
-                    if (coin != null)
-                        deviceGridView.Rows[i].Cells[coinColumn.Index].Value = coin.Name;
-                }
-                else
-                {
-                    deviceGridView.Rows[i].Cells[coinColumn.Index].Value = string.Empty;
-                }
+            bool saveEnabled = saveButton.Enabled;
+            try
+            {
+                for (int i = 0; i < devices.Count; i++)
+                {
+                    Device device = devices[i];
+
+                    DeviceConfiguration deviceConfiguration = engineConfiguration.DeviceConfigurations.SingleOrDefault(
+                        c => (c.DeviceKind == device.Kind)
+                        && (c.DeviceIndex == i));
+
+                    if (deviceConfiguration != null)
+                    {
+                        CryptoCoin coin = knownCoins.Coins.SingleOrDefault(c => c.Symbol.Equals(deviceConfiguration.CoinSymbol));
+                        if (coin != null)
+                            deviceGridView.Rows[i].Cells[coinColumn.Index].Value = coin.Name;
+                    }
+                    else
+                    {
+                        deviceGridView.Rows[i].Cells[coinColumn.Index].Value = string.Empty;
+                    }
+                }
+            }
+            finally
+            {
+                //restore button states after
+                saveButton.Enabled = saveEnabled;
+                cancelButton.Enabled = saveEnabled;
             }
         }


change long position and length to timespan type

--- NBass.Tests/StreamTests.cs
+++ NBass.Tests/StreamTests.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Threading;
 using NUnit.Framework;

 namespace NBass.Tests
@@ -97,8 +98,9 @@
             bool isEnd = false;
             var stream = _bassContext.Load(MediaPath);
             stream.End += (sender, e) => isEnd = true;
-            stream.Position = stream.Length.Subtract(new TimeSpan(0, 0, 0, 0, 2));
+            stream.Position = stream.Length.Subtract(new TimeSpan( 0, 0, 2));
             stream.Play();
+            Thread.Sleep(new TimeSpan(0, 0, 3));
             Assert.AreEqual(true, isEnd);
         }


WinForms - Improve handling of Load method when called after CreateBrowser and before OnAfterBrowserCreated

Call MainFrame.Load after the browser has been created if the Address property has been set after CreateBrowser and before OnAfterBrowserCreated

--- CefSharp.WinForms/ChromiumWebBrowser.cs
+++ CefSharp.WinForms/ChromiumWebBrowser.cs
@@ -52,6 +52,12 @@
         /// </summary>
         private bool browserCreated;
         /// <summary>
+        /// A flag indicating if the <see cref="Address"/> was used when calling CreateBrowser
+        /// If false and <see cref="Address"/> contains a non empty string Load will be called
+        /// on the main frame
+        /// </summary>
+        private bool initialAddressLoaded;
+        /// <summary>
         /// Browser initialization settings
         /// </summary>
         private IBrowserSettings browserSettings;
@@ -645,6 +651,8 @@
                 {
                     var windowInfo = CreateBrowserWindowInfo(Handle);

+                    initialAddressLoaded = !string.IsNullOrEmpty(Address);
+
                     managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings as BrowserSettings, requestContext as RequestContext, Address);

                     browserSettings = null;
@@ -681,6 +689,13 @@

             ResizeBrowser();

+            //If Load was called after the call to CreateBrowser we'll call Load
+            //on the MainFrame
+            if (!initialAddressLoaded && !string.IsNullOrEmpty(Address))
+            {
+                browser.MainFrame.LoadUrl(Address);
+            }
+
             IsBrowserInitializedChanged?.Invoke(this, EventArgs.Empty);
         }


Text fixes

Text fixes

Very minor fix, closed sentence with "!".

--- NadekoBot/Modules/Games.cs
+++ NadekoBot/Modules/Games.cs
@@ -78,7 +78,7 @@

                 cgb.CreateCommand("poketype")
                     .Parameter("target", Discord.Commands.ParameterType.Required)
-                    .Description("Gets the users element type. Use this to do more damage with strike")
+                    .Description("Gets the users element type. Use this to do more damage with strike!")
                     .Do(async e =>
                     {
                         var usr = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault();


Added Product class that inherits the Model abstract class and implements the IUptadeable interface


properly handle storage exceptions when acquiring leases

--- Common/BookFast.ReliableEvents/DistributedMutex/BlobLeaseManager.cs
+++ Common/BookFast.ReliableEvents/DistributedMutex/BlobLeaseManager.cs
@@ -2,7 +2,6 @@
 using Microsoft.WindowsAzure.Storage;
 using Microsoft.WindowsAzure.Storage.Blob;
 using System;
-using System.Net;
 using System.Threading;
 using System.Threading.Tasks;

@@ -44,32 +43,26 @@
         public async Task<string> AcquireLeaseAsync(CancellationToken token)
         {
             var blobNotFound = false;
+
             try
             {
                 return await leaseBlob.AcquireLeaseAsync(TimeSpan.FromSeconds(60));
             }
             catch (StorageException storageException)
             {
-                logger.LogError($"Error acquiring lease. Details: {storageException}");
-
-                if (storageException.InnerException is WebException webException)
+                var errorCode = storageException.RequestInformation.ExtendedErrorInformation.ErrorCode;
+                if (errorCode.Equals("ContainerNotFound", StringComparison.OrdinalIgnoreCase) ||
+                    errorCode.Equals("BlobNotFound", StringComparison.OrdinalIgnoreCase))
                 {
-                    if (webException.Response is HttpWebResponse response)
-                    {
-                        if (response.StatusCode == HttpStatusCode.NotFound)
-                        {
-                            blobNotFound = true;
-                        }
-
-                        if (response.StatusCode == HttpStatusCode.Conflict)
-                        {
-                            return null;
-                        }
-                    }
-                    else
-                    {
-                        return null;
-                    }
+                    blobNotFound = true;
+                }
+                else if (errorCode.Equals("LeaseAlreadyPresent", StringComparison.OrdinalIgnoreCase))
+                {
+                    return null;
+                }
+                else
+                {
+                    logger.LogError($"Error acquiring lease. Details: {storageException}");
                 }
             }

@@ -98,27 +91,19 @@

         private async Task CreateBlobAsync(CancellationToken token)
         {
-            await leaseBlob.Container.CreateIfNotExistsAsync();
+            try
+            {
+                await leaseBlob.Container.CreateIfNotExistsAsync();

-            if (!await leaseBlob.ExistsAsync())
-            {
-                try
+                if (!await leaseBlob.ExistsAsync())
                 {
                     await leaseBlob.CreateAsync(0);
                 }
-                catch (StorageException e)
-                {
-                    if (e.InnerException is WebException)
-                    {
-                        var webException = e.InnerException as WebException;
-                        var response = webException.Response as HttpWebResponse;
-
-                        if (response == null || response.StatusCode != HttpStatusCode.PreconditionFailed)
-                        {
-                            throw;
-                        }
-                    }
-                }
+            }
+            catch (StorageException storageException)
+            {
+                logger.LogError($"Error creating a mutex blob. Details: {storageException}");
+                throw;
             }
         }
     }


Add more interaction checks

Add more interaction checks

--- Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs
+++ Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs
@@ -262,9 +262,17 @@
                 }
             }

-            if (!ActionBlockerSystem.CanInteract(player) ||
-                ContainerHelpers.TryGetContainer(player, out var container) &&
-                container.Owner != attacked)
+            if (!ActionBlockerSystem.CanInteract(player))
+            {
+                return;
+            }
+
+            // In a container where the attacked entity is not the container's owner and either the attacked entity is null, not contained or in a different container
+            if (ContainerHelpers.TryGetContainer(player, out var playerContainer) &&
+                attacked != playerContainer.Owner &&
+                (attacked == null ||
+                 !ContainerHelpers.TryGetContainer(attacked, out var attackedContainer) ||
+                 attackedContainer != playerContainer))
             {
                 return;
             }


removed some extra extensions since fallback lexer

--- CodeHub/Services/Hilite-me/HiliteAPI.cs
+++ CodeHub/Services/Hilite-me/HiliteAPI.cs
@@ -35,18 +35,9 @@
             { ".h", "c" },
             { ".xaml", "xml" },
             { ".cs", "csharp" },
-            { ".gitignore", "c" },
-            { ".gitattributes", "c" },
-            { ".jshintrc", "c" },
-            { ".yml", "c" },
-            { ".snyk", "c" },
-            { ".lock", "c" },
-            { ".sln", "c" },
             { ".eslintrc", "json" },
             { ".babelrc", "json" },
-            { ".bowerrc", "json" },
-            { ".editorconfig", "c" },
-            { ".eslintignore", "c" }
+            { ".bowerrc", "json" }
         });

         /// <summary>


Must allow to call detach on destructor. Otherwise causes memory leak

--- Source/HelixToolkit.Wpf.SharpDX/Model/Elements3D/AbstractElements3D/GeometryModel3D.cs
+++ Source/HelixToolkit.Wpf.SharpDX/Model/Elements3D/AbstractElements3D/GeometryModel3D.cs
@@ -340,7 +340,7 @@
         protected override void OnAttached()
         {
             base.OnAttached();
-            if (Geometry != null)
+            if (geometryInternal != null)
             {
                 this.Bounds = this.geometryInternal.Bound;
                 this.BoundsSphere = this.geometryInternal.BoundingSphere;
@@ -357,7 +357,7 @@

         private void AttachOnGeometryPropertyChanged()
         {
-            if (Geometry != null)
+            if (geometryInternal != null)
             {
                 geometryInternal.PropertyChanged -= OnGeometryPropertyChangedPrivate;
                 geometryInternal.PropertyChanged += OnGeometryPropertyChangedPrivate;
@@ -366,7 +366,7 @@

         private void DetachOnGeometryPropertyChanged()
         {
-            if (Geometry != null)
+            if (geometryInternal != null)
             {
                 geometryInternal.PropertyChanged -= OnGeometryPropertyChangedPrivate;
             }
@@ -400,10 +400,10 @@
         {
             return viewFrustum.Intersects(ref boundsWithTransform);
         }
-        ~GeometryModel3D()
-        {
-
-        }
+        //~GeometryModel3D()
+        //{
+
+        //}

         //static ulong count = 0;


Allow RoslynHelpers to create generics from complex name syntax nodes (#2065)

--- apis/Google.Cloud.Bigtable.V2/Google.Cloud.Bigtable.V2.GenerateClient/RoslynHelpers.cs
+++ apis/Google.Cloud.Bigtable.V2/Google.Cloud.Bigtable.V2.GenerateClient/RoslynHelpers.cs
@@ -15,6 +15,7 @@
 using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp;
 using Microsoft.CodeAnalysis.CSharp.Syntax;
+using System;
 using System.Collections.Generic;
 using System.Linq;

@@ -90,14 +91,39 @@
         internal static LiteralExpressionSyntax Null() =>
             LiteralExpression(SyntaxKind.NullLiteralExpression);

-        internal static GenericNameSyntax Of(this SyntaxToken typeName, params TypeSyntax[] typeArguments) =>
-            GenericName(typeName, TypeArgumentList(SeparatedList(typeArguments)));
+        internal static AliasQualifiedNameSyntax Of(this AliasQualifiedNameSyntax typeName, params TypeSyntax[] typeArguments) =>
+            typeName.WithName((SimpleNameSyntax)typeName.Name.Of(typeArguments));
+
+        internal static QualifiedNameSyntax Of(this QualifiedNameSyntax typeName, params TypeSyntax[] typeArguments) =>
+            typeName.WithRight((SimpleNameSyntax)typeName.Right.Of(typeArguments));
+
+        internal static GenericNameSyntax Of(this GenericNameSyntax typeName, params TypeSyntax[] typeArguments) =>
+            typeName.WithTypeArgumentList(TypeArgumentList(SeparatedList(typeArguments)));
+
+        internal static GenericNameSyntax Of(this IdentifierNameSyntax typeName, params TypeSyntax[] typeArguments) =>
+            GenericName(typeName.Identifier).Of(typeArguments);
+
+        internal static NameSyntax Of(this NameSyntax typeName, params TypeSyntax[] typeArguments)
+        {
+            switch (typeName.Kind())
+            {
+                case SyntaxKind.AliasQualifiedName:
+                    return ((AliasQualifiedNameSyntax)typeName).Of(typeArguments);
+                case SyntaxKind.QualifiedName:
+                    return ((QualifiedNameSyntax)typeName).Of(typeArguments);
+                case SyntaxKind.IdentifierName:
+                    return GenericName(((IdentifierNameSyntax)typeName).Identifier).Of(typeArguments);
+                case SyntaxKind.GenericName:
+                    return ((GenericNameSyntax)typeName).WithTypeArgumentList(TypeArgumentList(SeparatedList(typeArguments)));
+                default:
+                    throw new ArgumentException();
+            }
+        }

         internal static XmlEmptyElementSyntax SeeTag(CrefSyntax cref) =>
             XmlEmptyElement("see").AddAttributes(XmlCrefAttribute(cref));

-        // TODO: Use ParseName given that it's not a simple identifier.
-        internal static SyntaxToken Task() => Identifier("stt::Task");
+        internal static NameSyntax Task() => ParseName("stt::Task");

         internal static MethodDeclarationSyntax ToAsync(this MethodDeclarationSyntax method) =>
             method.WithReturnType(Task().Of(method.ReturnType)).WithIdentifier(Identifier(method.Identifier.ToString() + "Async"));


Don't crash when the package directory doesn't exist.

--- Libraries/ModInstallation/Implementations/DefaultLocalModManager.cs
+++ Libraries/ModInstallation/Implementations/DefaultLocalModManager.cs
@@ -170,6 +170,11 @@
                 return;
             }

+            if (!Directory.Exists(PackageDirectory))
+            {
+                return;
+            }
+
             foreach (var modDir in Directory.EnumerateDirectories(PackageDirectory))
             {
                 foreach (var versionDir in Directory.EnumerateDirectories(modDir))


[Nodes] Preserve pipeline does not block update anymore

--- Nodes/VVVV.DX11.Nodes/Nodes/Layers/DX11LayerPreservePipelineNode.cs
+++ Nodes/VVVV.DX11.Nodes/Nodes/Layers/DX11LayerPreservePipelineNode.cs
@@ -14,7 +14,7 @@
 namespace VVVV.DX11.Nodes
 {
     [PluginInfo(Name="PreservePipeline",Category="DX11.Layer",Version="", Author="vux")]
-    public class DX11LayerPreservePipelineNode : IPluginEvaluate, IDX11LayerProvider, IDX11UpdateBlocker
+    public class DX11LayerPreservePipelineNode : IPluginEvaluate, IDX11LayerProvider
     {
         [Input("Layer In", AutoValidate = false)]
         protected Pin<DX11Resource<DX11Layer>> FLayerIn;
@@ -82,10 +82,5 @@
         }

         #endregion
-
-        public bool Enabled
-        {
-            get { return this.FEnabled[0]; }
-        }
     }
 }


Fix issue #321: Remember the last selected node when searching and restore it when search is cleared.

--- NuPack.Dialog/PackageManagerUI/BaseProvider/PackagesProviderBase.cs
+++ NuPack.Dialog/PackageManagerUI/BaseProvider/PackagesProviderBase.cs
@@ -1,6 +1,5 @@
 using System;
 using System.ComponentModel;
-using System.Linq;
 using System.Windows;
 using Microsoft.VisualStudio.ExtensionsExplorer;
 using Microsoft.VisualStudio.ExtensionsExplorer.UI;
@@ -9,12 +8,12 @@

 namespace NuGet.Dialog.Providers {
     /// <summary>
-    /// IVsExtensionsProvider implementation responsible for gathering
-    /// a list of packages from a package feed which will be shown in the Add NuGet dialog.
+    /// Base class for all tree node types.
     /// </summary>
     internal abstract class PackagesProviderBase : VsExtensionsProvider {

-        private IVsExtensionsTreeNode _searchNode;
+        private PackagesTreeNodeBase _searchNode;
+        private PackagesTreeNodeBase _lastSelectedNode;
         private readonly ResourceDictionary _resources;

         private object _mediumIconDataTemplate;
@@ -105,44 +104,52 @@
                 return null;
             }

+            RemoveSearchNode();
+
+            if (!String.IsNullOrEmpty(searchTerms) && SelectedNode != null) {
+                _searchNode = new PackagesSearchNode(this, this.RootNode, SelectedNode, searchTerms);
+                AddSearchNode();
+            }
+
+            return _searchNode;
+        }
+
+        private void RemoveSearchNode() {
             if (_searchNode != null) {
                 // dispose any search results
                 RootNode.Nodes.Remove(_searchNode);
                 _searchNode = null;
-            }
-
-            if (!string.IsNullOrEmpty(searchTerms)) {
-                _searchNode = new PackagesSearchNode(this, this.RootNode, SelectedNode, searchTerms) {
-                    IsSelected = true
-                };
-
+
+                if (_lastSelectedNode != null) {
+                    SelectNode(_lastSelectedNode);
+                }
+            }
+        }
+
+        private void AddSearchNode() {
+            if (_searchNode != null && !RootNode.Nodes.Contains(_searchNode)) {
+                // remember the currently selected node so that when search term is cleared, we can restore it.
+                _lastSelectedNode = SelectedNode;
+
                 RootNode.Nodes.Add(_searchNode);
-            }
-
-            return _searchNode;
+                SelectNode(_searchNode);
+            }
+        }
+
+        private void SelectNode(PackagesTreeNodeBase node) {
+            node.IsSelected = true;
+            SelectedNode = node;
         }

         private void CreateExtensionsTree() {
             // The user may have done a search before we finished getting the category list; temporarily remove it
-            if (_searchNode != null) {
-                RootNode.Nodes.Remove(_searchNode);
-            }
+            RemoveSearchNode();

             // give subclass a chance to populate the child nodes under Root node
             FillRootNodes();

-            if (_searchNode != null) {
-                // Re-add the search node and select it if the user was doing a search
-                RootNode.Nodes.Add(_searchNode);
-                _searchNode.IsSelected = true;
-            }
-            else {
-                // If they weren't doing a search, select the first category.
-                var firstChild = RootNode.Nodes.FirstOrDefault();
-                if (firstChild != null) {
-                    firstChild.IsSelected = true;
-                }
-            }
+            // Re-add the search node and select it if the user was doing a search
+            AddSearchNode();
         }

         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]


less dead-player-cursor damage

less dead-player-cursor damage

--- ParticleStormControl/ParticleStormControl/InGame/Level/Crosshair.cs
+++ ParticleStormControl/ParticleStormControl/InGame/Level/Crosshair.cs
@@ -32,7 +32,7 @@
         private const float DEATH_CURSOR_SIZE_PERCENTAGE = 0.25f;    // percentage of MAX_DEATH_EXPL_SIZE that is the normal death cursor size
         private const float MAX_DEATH_EXPL_SIZE = 0.35f;
         private const float EXPL_SCALE_SPEED = 2.0f;
-        private const float DEATH_DAMAGE = 80; // is multiplied by the size, so don't be afraid, this value isn't as high as it looks
+        private const float DEATH_DAMAGE = 60; // is multiplied by the size, so don't be afraid, this value isn't as high as it looks

         public Crosshair (int playerindex, ContentManager contentManager) :


updated item click

updated item click

--- Producer/Producer.Droid/View/Content/ContentRecyclerFragmentBase.cs
+++ Producer/Producer.Droid/View/Content/ContentRecyclerFragmentBase.cs
@@ -94,17 +94,55 @@

 		protected override void OnItemClick (View view, MusicAsset item, int position)
 		{
-			//var partner = item;//DisplayPartners [position];
-			//var partnerLogoImageView = view.FindViewById<AppCompatImageView> (Resource.Id.partner_logo);
-
-			//var detailIntent = new Intent (Context, typeof (PartnerDetailActivity));
-			////var intentData = IntentData.Partner.Create (partner.Id, partner.Name, partner.PartnerTier);
-			//var intentData = IntentData.Create (partner.Id, partner.Name, partner.PartnerTier);
-			//detailIntent.PutIntentData (intentData);
-
-			//TransitionToActivity (detailIntent, partnerLogoImageView);
-
 			//TODO: play media
+			if (ContentClient.Shared.Initialized)// || AssetPersistenceManager.Shared.DownloadState (asset) == MusicAssetDownloadState.Downloaded)
+			{
+				if (item.Music.ContentType == AvContentTypes.Video)
+				{
+					//playerViewController = new AVPlayerViewController ();
+
+					//PresentViewController (playerViewController, true, null);
+				}
+
+				// we're already on the main tread, this prevents hanging while playback starts
+				Activity.RunOnUiThread (() =>
+				{
+					//var playing = AssetPlaybackManager.Shared.TogglePlayback (item);
+
+					//if (playing && indexPathCache != indexPath) Track.Play (item.Music);
+
+					//if (indexPathCache != null && indexPathCache != indexPath && tableView.IndexPathsForVisibleRows.Contains (indexPathCache)
+					//	&& tableView.CellAt (indexPathCache) is ContentMusicTvCell oldCell)
+					//{
+					//	oldCell.SetPlaying (false);
+					//}
+
+					//indexPathCache = indexPath;
+
+					//if (item.Music.ContentType == AvContentTypes.Audio)
+					//{
+					//	if (NavigationController.ToolbarHidden)
+					//	{
+					//		NavigationController.SetToolbarHidden (false, true);
+					//	}
+
+					//	cell.SetPlaying (playing);
+
+					//	var items = ToolbarItems;
+
+					//	items [0] = playing ? pauseButton : playButton;
+
+					//	//items [2].Title = asset.Music.DisplayName;
+					//	titleButton.Title = asset.Music.DisplayName;
+
+					//	SetToolbarItems (items, true);
+					//}
+					//else if (!NavigationController.ToolbarHidden)
+					//{
+					//	NavigationController.SetToolbarHidden (true, false);
+					//}
+				});
+			}
 		}


Added SetRole and LockUser to UserRepository

--- Project/Dev/Project-SSA/Presentation/Repositories/UserRepository.cs
+++ Project/Dev/Project-SSA/Presentation/Repositories/UserRepository.cs
@@ -36,10 +36,44 @@
                         //FoundUser.Area2 = (reader["Area2"] == DBNull.Value ? string.Empty : reader["Area2"].ToString());
                     }
                 }
-
                 con.Close();
             }
             return FoundUser;
         }
+        public static void LockUser(string UserId)
+        {
+            using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString))
+            {
+                con.Open();
+
+                using (SqlCommand cmd = new SqlCommand())
+                {
+                    cmd.Connection = con;
+                    cmd.CommandText = "UPDATE dbo.AspNetUsers SET LockoutEndDateUtc = '2999-12-31' WHERE UserId = @UserId; ";
+                    cmd.Parameters.AddWithValue("UserId", UserId);
+
+                    cmd.ExecuteNonQuery();
+                }
+                con.Close();
+            }
+        }
+        public static void SetRole(string UserId, int RoleValue)
+        {
+            using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString))
+            {
+                con.Open();
+
+                using (SqlCommand cmd = new SqlCommand())
+                {
+                    cmd.Connection = con;
+                    cmd.CommandText = "UPDATE dbo.AspNetUserRoles SET RoleId = @RoleValue WHERE UserId = @UserId;";
+                    cmd.Parameters.AddWithValue("RoleValue", RoleValue);
+                    cmd.Parameters.AddWithValue("UserId", UserId);
+
+                    cmd.ExecuteNonQuery();
+                }
+                con.Close();
+            }
+        }
     }
 }


#79 Refactor

#79 Refactor

--- Projects/Components/Drivers/DefaultDrivers/EF6/EFSqlServerDriver.cs
+++ Projects/Components/Drivers/DefaultDrivers/EF6/EFSqlServerDriver.cs
@@ -4,7 +4,7 @@
 // </copyright>
 // --------------------------------------------------------------------------------------------------------------------

-namespace DotNetScaffolder.Components.Drivers.DefaultDrivers
+namespace DotNetScaffolder.Components.Drivers.DefaultDrivers.EF6
 {
     #region Usings


Alterada tela de limite de calendários para não exibir o combo de DRE e Escola quando o alcance é toda a rede. #20000006-873 #12

--- Src/GestaoEscolar/Academico/CalendarioAnual/CadastroLimites.aspx.cs
+++ Src/GestaoEscolar/Academico/CalendarioAnual/CadastroLimites.aspx.cs
@@ -200,7 +200,11 @@

         protected void ddlAlcance_SelectedIndexChanged(object sender, EventArgs e)
         {
-            if (ddlAlcance.SelectedValue == "2")
+            if (ddlAlcance.SelectedValue == "-1" || ddlAlcance.SelectedValue == "1")
+            {
+                UCComboUAEscola.Visible = false;
+            }
+            else if (ddlAlcance.SelectedValue == "2")
             {
                 UCComboUAEscola.Visible = true;


Fixed failing test

Fixed failing test

--- Twice.Tests/ViewModels/Columns/ColumnConfigurationViewModelTests.cs
+++ Twice.Tests/ViewModels/Columns/ColumnConfigurationViewModelTests.cs
@@ -22,7 +22,7 @@
 		}

 		[TestMethod, TestCategory( "ViewModels.Columns" )]
-		public void SaveCommandRaisesEvent()
+		public void SaveCommandRaisesEventWhenChanged()
 		{
 			// Arrange
 			var vm = new ColumnConfigurationViewModel( new ColumnDefinition( ColumnType.Activity ) );
@@ -31,9 +31,15 @@

 			// Act
 			vm.SaveCommand.Execute( null );
+			bool noChange = raised;
+
+			vm.PopupEnabled = !vm.PopupEnabled;
+			vm.SaveCommand.Execute( null );
+			bool change = raised;

 			// Assert
-			Assert.IsTrue( raised );
+			Assert.IsFalse( noChange );
+			Assert.IsTrue( change );
 		}

 		[TestMethod, TestCategory( "ViewModels.Columns" )]