remove unused file

remove unused file

--- TCC.Core/Interop/ProxyOld.cs
+++ TCC.Core/Interop/ProxyOld.cs
@@ -1,473 +0,0 @@
-//namespace TCC.Interop
-//{
-//    //public static class ProxyOld
-//    //{
-//    //    public static event Action<Message> ProxyPacketReceived;
-
-//    //    private static TcpClient _client = new TcpClient();
-//    //    private static ProxyPacketSplitter _splitter = new ProxyPacketSplitter();
-
-//    //    private static int _retries = 2;
-
-//    //    private static void SendData(string data)
-//    //    {
-//    //        try
-//    //        {
-//    //            var stream = _client.GetStream();
-//    //            var utf8 = new UTF8Encoding();
-//    //            var bb = utf8.GetBytes(data);
-//    //            stream.Write(bb, 0, bb.Length);
-//    //        }
-//    //        catch (Exception e)
-//    //        {
-//    //            Debug.WriteLine(e.Message);
-//    //            _retries = 2;
-//    //            //ConnectToProxy();
-//    //        }
-//    //    }
-
-//    //    private static void ReceiveData()
-//    //    {
-//    //        var buffer = new byte[2048];
-//    //        try
-//    //        {
-//    //            while (_client.Connected)
-//    //            {
-//    //                var size = _client.GetStream().Read(buffer, 0, buffer.Length);
-//    //                var data = Encoding.UTF8.GetString(buffer.Take(size).ToArray());
-//    //                //Console.WriteLine($"[Proxy] raw output: {data}");
-//    //                _splitter.Append(data);
-//    //            }
-//    //        }
-//    //        catch (Exception e)
-//    //        {
-//    //            Console.WriteLine(e.ToString());
-//    //        }
-//    //    }
-//    //    private static void ProxyPacketAnalysisLoop()
-//    //    {
-//    //        while (_client.Connected)
-//    //        {
-//    //            var successDequeue = _splitter.Packets.TryDequeue(out var data);
-//    //            if (!successDequeue)
-//    //            {
-//    //                Thread.Sleep(100);
-//    //                continue;
-//    //            }
-
-//    //            if (data.Contains(":tcc"))
-//    //            {
-//    //                HandleGpkData(data.Substring(data.IndexOf(":tcc", StringComparison.Ordinal)));
-//    //            }
-//    //            else
-//    //            {
-//    //                var split = data.Split(new[] { "\t::\t" }, StringSplitOptions.None);
-
-//    //                var type = split[0];
-//    //                if (type == "output")
-//    //                {
-//    //                    //Console.WriteLine($"[Proxy] received output: {split[3]}");
-//    //                    var channel = UInt32.Parse(split[1]);
-//    //                    var author = split[2];
-//    //                    var message = split[3];
-
-//    //                    HandleProxyOutput(author, channel, message.AddFontTagsIfMissing());
-
-//    //                    //var msg = data.StartsWith("<font", StringComparison.InvariantCultureIgnoreCase) ? data : "" + data;
-//    //                    //msg = msg.EndsWith("", StringComparison.InvariantCultureIgnoreCase) ? msg : msg + "";
-//    //                    //PacketHandler.HandleCommandOutput(msg);
-//    //                }
-//    //                else if (type == "packet")
-//    //                {
-//    //                    //Console.WriteLine($"[Proxy] received packet: {split[2]}");
-//    //                    var dir = Boolean.Parse(split[1])
-//    //                        ? MessageDirection.ServerToClient
-//    //                        : MessageDirection.ClientToServer;
-//    //                    ProxyPacketReceived?.Invoke(new Message(DateTime.UtcNow, dir, split[2].Substring(4)));
-//    //                }
-//    //                else if (type == "setval")
-//    //                {
-//    //                    var propName = split[1];
-//    //                    var val = split[2];
-//    //                    SetProperty(propName, val);
-//    //                    //Console.WriteLine($"[Proxy] received setval: {split[1]} - {split[2]}");
-//    //                }
-//    //            }
-
-
-//    //        }
-//    //        // ReSharper disable once FunctionNeverReturns
-//    //    }
-
-
-//    //    public static void HandleProxyOutput(string author, uint channel, string message)
-//    //    {
-//    //        if (author == "undefined") author = "System";
-//    //        if (!ChatWindowManager.Instance.PrivateChannels.Any(x => x.Id == channel && x.Joined))
-//    //            ChatWindowManager.Instance.CachePrivateMessage(channel, author, message);
-//    //        else
-//    //            ChatWindowManager.Instance.AddChatMessage(
-//    //                new ChatMessage((ChatChannel)ChatWindowManager.Instance.PrivateChannels.FirstOrDefault(x =>
-//    //                                    x.Id == channel && x.Joined).Index + 11, author, message));
-//    //    }
-
-//    //    public static void HandleGpkData(string data)
-//    //    {
-//    //        const string chatModeCmd = ":tcc-chatMode:";
-//    //        const string uiModeCmd = ":tcc-uiMode:";
-//    //        const string unkString = "Unknown command ";
-//    //        data = data.Replace(unkString, "").Replace("\"", "").Replace(".", "");
-//    //        if (data.StartsWith(chatModeCmd))
-//    //        {
-//    //            var chatMode = data.Replace(chatModeCmd, "");
-//    //            SessionManager.InGameChatOpen = chatMode == "1" || chatMode == "true"; //too lazy
-//    //        }
-//    //        else if (data.StartsWith(uiModeCmd))
-//    //        {
-//    //            var uiMode = data.Replace(uiModeCmd, "");
-//    //            SessionManager.InGameUiOn = uiMode == "1" || uiMode == "true"; //too lazy
-//    //        }
-//    //    }
-
-//    //    private static void SetProperty(string propName, string val)
-//    //    {
-//    //        var pi = typeof(ProxyOld).GetProperty(propName);
-//    //        pi?.SetValue(null, Convert.ChangeType(val, pi.PropertyType));
-//    //    }
-
-
-//    //    //public static bool IsConnected => _client.Connected;
-//    //    //public static bool IsFpsUtilsAvailable { get; [UsedImplicitly] set; }
-
-//    //    //public static void ConnectToProxy()
-//    //    //{
-//    //    //    if (!App.Settings.EnableProxy) return;
-//    //    //    try
-//    //    //    {
-//    //    //        if (_client.Client != null && _client.Connected) return;
-//    //    //        ChatWindowManager.Instance.AddTccMessage("Trying to connect to tera-proxy...");
-
-//    //    //        _client = new TcpClient();
-//    //    //        _client.Connect("127.0.0.50", 9550);
-//    //    //        ChatWindowManager.Instance.AddTccMessage("Connected to tera-proxy.");
-//    //    //        WindowManager.ViewModels.NotificationArea.Enqueue("TCC", "Successfully connected to tcc-stub.", NotificationType.Success);
-//    //    //        //var t = new Thread(ReceiveData);
-//    //    //        //var analysisThread = new Thread(ProxyPacketAnalysisLoop);
-//    //    //        //t.Start();
-//    //    //        //analysisThread.Start();
-//    //    //        InitStub();
-//    //    //    }
-//    //    //    catch (Exception e)
-//    //    //    {
-//    //    //        _retries--;
-//    //    //        Log.F("Failed to connect to proxy: "+ e.Message);
-//    //    //        Task.Delay(2000).ContinueWith(t =>
-//    //    //        {
-//    //    //            if (_retries <= 0)
-//    //    //            {
-//    //    //                ChatWindowManager.Instance.AddTccMessage("Maximum retries exceeded. tera-proxy functionalities won't be available.");
-//    //    //                WindowManager.ViewModels.NotificationArea.Enqueue("Proxy", "Unable to connect to tera-proxy. Advanced functionalities won't be available. If you don't want to see this message again disable proxy in TCC System Settings.", NotificationType.Error);
-//    //    //                _retries = 2;
-//    //    //                return;
-//    //    //            }
-//    //    //            ConnectToProxy();
-//    //    //        });
-//    //    //    }
-//    //    //}
-//    //    //public static void CloseConnection()
-//    //    //{
-//    //    //    try
-//    //    //    {
-//    //    //        _client?.GetStream().Close();
-//    //    //        _client?.Client?.Close();
-//    //    //        _client?.Close();
-//    //    //    }
-//    //    //    catch
-//    //    //    {
-//    //    //        // ignored
-//    //    //    }
-//    //    //}
-
-
-//    //    //private static void InitStub()
-//    //    //{
-//    //    //    var sb = new StringBuilder("init_stub");
-//    //    //    sb.Append("&use_lfg=");
-//    //    //    sb.Append(App.Settings.LfgWindowSettings.Enabled.ToString().ToLower());
-
-//    //    //    SendData(sb.ToString());
-//    //    //}
-
-//    //    //public static void ChatLinkData(string linkData)
-//    //    //{
-//    //    //    // linkData = T#####DATA
-//    //    //    if (linkData == null) return;
-//    //    //    var sb = new StringBuilder("chat_link");
-//    //    //    sb.Append("&");
-//    //    //    sb.Append(":tcc:");
-//    //    //    sb.Append(linkData.Replace("#####", ":tcc:"));
-//    //    //    sb.Append(":tcc:");
-//    //    //    File.AppendAllText("link-test.txt", sb + "\n");
-//    //    //    SendData(sb.ToString());
-//    //    //}
-//    //    //public static void LootSettings()
-//    //    //{
-//    //    //    var sb = new StringBuilder("loot_settings");
-//    //    //    SendData(sb.ToString());
-//    //    //}
-//    //    //private static int _partyInfoCount = 0;
-//    //    //internal static void ReturnToLobby()
-//    //    //{
-//    //    //    SendData("return_to_lobby");
-//    //    //}
-//    //    //public static void RequestPartyInfo(uint id)
-//    //    //{
-//    //    //    var sb = new StringBuilder("lfg_party_req");
-//    //    //    sb.Append("&id=");
-//    //    //    sb.Append(id);
-
-//    //    //    SendData(sb.ToString());
-//    //    //    _partyInfoCount++;
-//    //    //    Log.CW($"Total party info requests: {_partyInfoCount}");
-//    //    //}
-//    //    public static void ApplyToLfg(uint id)
-//    //    {
-//    //        var sb = new StringBuilder("lfg_apply_req");
-//    //        sb.Append("&id=");
-//    //        sb.Append(id);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void FriendRequest(string name, string message)
-//    //    {
-//    //        var sb = new StringBuilder("friend_req");
-//    //        sb.Append("&name=");
-//    //        sb.Append(name);
-//    //        sb.Append("&msg=");
-//    //        sb.Append(message);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void UnfriendUser(string name)
-//    //    {
-//    //        var sb = new StringBuilder("unfriend");
-//    //        sb.Append("&name=");
-//    //        sb.Append(name);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void BlockUser(string name)
-//    //    {
-//    //        var sb = new StringBuilder("block");
-//    //        sb.Append("&name=");
-//    //        sb.Append(name);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void SetInvitePower(uint serverId, uint playerId, bool v)
-//    //    {
-//    //        var sb = new StringBuilder("power_change");
-//    //        sb.Append("&sId=");
-//    //        sb.Append(serverId);
-//    //        sb.Append("&pId=");
-//    //        sb.Append(playerId);
-//    //        sb.Append("&power=");
-//    //        sb.Append(v ? 1 : 0);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void PublicizeLfg()
-//    //    {
-//    //        var sb = new StringBuilder("lfg_publicize");
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void RemoveLfg()
-//    //    {
-//    //        var sb = new StringBuilder("lfg_remove");
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void UnblockUser(string name)
-//    //    {
-//    //        var sb = new StringBuilder("unblock");
-//    //        sb.Append("&name=");
-//    //        sb.Append(name);
-
-//    //        SendData(sb.ToString());
-//    //    }
-
-//    //    //private static int _lfgListCount = 0;
-//    //    //public static void RequestLfgList()
-//    //    //{
-//    //    //    var min = 60;
-//    //    //    var max = 70;//SessionManager.CurrentPlayer.Level; // potato fix until i make it configurable
-//    //    //    var sb = new StringBuilder("lfg_request_list");
-//    //    //    sb.Append("&minlvl=");
-//    //    //    sb.Append(min);
-//    //    //    sb.Append("&maxlvl=");
-//    //    //    sb.Append(max);
-//    //    //    SendData(sb.ToString());
-//    //    //    _lfgListCount++;
-//    //    //    Log.CW($"Total LFG list requests: {_lfgListCount}");
-
-//    //    //}
-//    //    public static void AskInteractive(uint srvId, string name)
-//    //    {
-//    //        var sb = new StringBuilder("ask_int");
-//    //        sb.Append("&srvId=");
-//    //        sb.Append(srvId);
-//    //        sb.Append("&name=");
-//    //        sb.Append(name);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void DelegateLeader(uint serverId, uint playerId)
-//    //    {
-//    //        var sb = new StringBuilder("leader");
-//    //        sb.Append("&sId=");
-//    //        sb.Append(serverId);
-//    //        sb.Append("&pId=");
-//    //        sb.Append(playerId);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void KickMember(uint serverId, uint playerId)
-//    //    {
-//    //        var sb = new StringBuilder("kick");
-//    //        sb.Append("&sId=");
-//    //        sb.Append(serverId);
-//    //        sb.Append("&pId=");
-//    //        sb.Append(playerId);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void Inspect(string name)
-//    //    {
-//    //        var sb = new StringBuilder("inspect");
-//    //        sb.Append("&name=");
-//    //        sb.Append(name);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void PartyInvite(string name)
-//    //    {
-//    //        var sb = new StringBuilder("inv_party");
-//    //        sb.Append("&name=");
-//    //        sb.Append(name);
-//    //        sb.Append("&raid=");
-//    //        sb.Append(WindowManager.ViewModels.Group.Raid ? 1 : 0);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void GuildInvite(string name)
-//    //    {
-//    //        var sb = new StringBuilder("inv_guild");
-//    //        sb.Append("&name=");
-//    //        sb.Append(name);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void DeclineBrokerOffer(uint playerId, uint listingId)
-//    //    {
-//    //        var sb = new StringBuilder("tb_decline");
-//    //        sb.Append("&player=");
-//    //        sb.Append(playerId);
-//    //        sb.Append("&listing=");
-//    //        sb.Append(listingId);
-
-//    //        SendData(sb.ToString());
-
-//    //    }
-//    //    public static void AcceptBrokerOffer(uint playerId, uint listingId)
-//    //    {
-//    //        var sb = new StringBuilder("tb_accept");
-//    //        sb.Append("&player=");
-//    //        sb.Append(playerId);
-//    //        sb.Append("&listing=");
-//    //        sb.Append(listingId);
-
-//    //        SendData(sb.ToString());
-
-//    //    }
-//    //    public static void DeclineApply(uint playerId)
-//    //    {
-//    //        var sb = new StringBuilder("apply_decline");
-//    //        sb.Append("&player=");
-//    //        sb.Append(playerId);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void ExTooltip(long itemUid, string ownerName)
-//    //    {
-//    //        var sb = new StringBuilder("ex_tooltip");
-//    //        sb.Append("&uid=");
-//    //        sb.Append(itemUid);
-//    //        sb.Append("&name=");
-//    //        sb.Append(ownerName);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void NondbItemInfo(uint itemId)
-//    //    {
-//    //        var sb = new StringBuilder("nondb_info");
-//    //        sb.Append("&id=");
-//    //        sb.Append(itemId);
-
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    //public static void RequestNextLfgPage(int page)
-//    //    //{
-//    //    //    var sb = new StringBuilder("lfg_page_req");
-//    //    //    sb.Append("&page=");
-//    //    //    sb.Append(page);
-//    //    //    SendData(sb.ToString());
-//    //    //}
-//    //    public static void RegisterLfg(string msg, bool raid)
-//    //    {
-//    //        var sb = new StringBuilder("lfg_register");
-//    //        sb.Append("&msg=");
-//    //        sb.Append(msg.EscapeHtml());
-//    //        sb.Append("&raid=");
-//    //        sb.Append(raid.ToString().ToLower());
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void DisbandParty()
-//    //    {
-//    //        var sb = new StringBuilder("disband_group");
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void ResetInstance()
-//    //    {
-//    //        var sb = new StringBuilder("reset_instance");
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void LeaveParty()
-//    //    {
-//    //        var sb = new StringBuilder("leave_party");
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void RequestCandidates()
-//    //    {
-//    //        var sb = new StringBuilder("request_candidates");
-//    //        SendData(sb.ToString());
-//    //    }
-//    //    public static void ForceSystemMessage(string msg, string opcode)
-//    //    {
-//    //        var opc = PacketAnalyzer.Factory.SystemMessageNamer.GetCode(opcode);
-//    //        var badOpc = msg.Split('\v')[0];
-//    //        if (badOpc == "@0") msg = msg.Replace(badOpc, "@" + opc);
-//    //        var sb = new StringBuilder("force_sysmsg");
-//    //        sb.Append("&msg=");
-//    //        sb.Append(msg);
-
-//    //        SendData(sb.ToString());
-
-//    //    }
-//    //    //public static void SendCommand(string command)
-//    //    //{
-//    //    //    var sb = new StringBuilder("command");
-//    //    //    sb.Append("&cmd=");
-//    //    //    sb.Append(command);
-//    //    //    SendData(sb.ToString());
-//    //    //}
-//    //}
-//}


Edit Add new Vehicle

Edit Add new Vehicle

--- ECheckerSource/ApiApp/Controllers/VehicleController.cs
+++ ECheckerSource/ApiApp/Controllers/VehicleController.cs
@@ -61,13 +61,13 @@

             if (vehicle.VehicleTypeId ==11)
             {
-                //vehicle.FormId = 11;
-                vehicle.FormId = 1;
+                vehicle.FormId = 11;
+                //vehicle.FormId = 1;
             }
             else if (vehicle.VehicleTypeId == 13)
             {
-                //vehicle.FormId = 13;
-                vehicle.FormId = 1;
+                vehicle.FormId = 13;
+                //vehicle.FormId = 1;
             }

             vehicle.PayDate = DateTime.Today;


CodeMaid

CodeMaid

--- Elementary.Hierarchy.Collections/ImmutableHierarchy.cs
+++ Elementary.Hierarchy.Collections/ImmutableHierarchy.cs
@@ -157,7 +157,7 @@
                     object tmp = this.value;
                     Interlocked.CompareExchange<object>(ref this.value, Node.ValueNotSet, tmp);
                 }
-
+
                 return this;
             }

@@ -553,9 +553,9 @@
                 if (hierarchyPath.IsRoot)
                 {
                     if (!this.rootNode.HasValue)
-                        return false; // Sematically, an empty root node cant be deleted.
-
-                    // The root node cant be removed from ist parent node.
+                        return false; // Sematically, an empty root node cant be deleted.
+
+                    // The root node cant be removed from ist parent node.
                     // the old hierachy is just abandonded and a new root is created.

                     this.writeLock.Enter(ref isLocked);


fix spaces to tabs

fix spaces to tabs

--- EntityFrameworkCore.PrimaryKey/PrimaryKeyDictionary.cs
+++ EntityFrameworkCore.PrimaryKey/PrimaryKeyDictionary.cs
@@ -17,20 +17,20 @@
 				return false;
 			if (ReferenceEquals(this, other))
 				return true;
-		    if (!(other is Dictionary<String, Object> pkd))
+			if (!(other is Dictionary<String, Object> pkd))
 				return false;
 			return EqualsKeysAndValues(pkd);
 		}

 		public Boolean Equals(Dictionary<String, Object> other) => ReferenceEquals(Dictionary, other) || EqualsKeysAndValues(other);

-	    private Boolean EqualsKeysAndValues(Dictionary<String, Object> other) {
+		private Boolean EqualsKeysAndValues(Dictionary<String, Object> other) {
 			if (Keys.Count != other.Keys.Count)
 				return false;
-		    foreach (var key in Keys)
-		        if (!other.TryGetValue(key, out var otherValue) || !this[key].Equals(otherValue))
-		            return false;
-		    return true;
+			foreach (var key in Keys)
+				if (!other.TryGetValue(key, out var otherValue) || !this[key].Equals(otherValue))
+					return false;
+			return true;
 		}

 		public override Int32 GetHashCode() {


Reformat

Reformat

--- ExpressionToCodeLib/Internal/CSharpFriendlyTypeName.cs
+++ ExpressionToCodeLib/Internal/CSharpFriendlyTypeName.cs
@@ -3,26 +3,22 @@
 using System.Linq;
 using System.Reflection;

-namespace ExpressionToCodeLib.Internal
-{
-    struct CSharpFriendlyTypeName
-    {
+namespace ExpressionToCodeLib.Internal {
+    struct CSharpFriendlyTypeName {
         public bool UseFullName;
         public bool IncludeGenericTypeArgumentNames;

         public string GetTypeName(Type type)
             => AliasNameOrNull(type) ?? GetUnaliasedTypeName(type);

-        string GetUnaliasedTypeName(Type type)
-        {
+        string GetUnaliasedTypeName(Type type) {
             var typeNameWithoutNamespace =
                 GenericTypeName(type)
                 ?? NormalName(type);
             return UseFullName ? type.Namespace + "." + typeNameWithoutNamespace : typeNameWithoutNamespace;
         }

-        string AliasNameOrNull(Type type)
-        {
+        string AliasNameOrNull(Type type) {
             if (type == typeof(bool)) {
                 return "bool";
             } else if (type == typeof(byte)) {
@@ -64,8 +60,7 @@
             }
         }

-        string NormalName(Type type)
-        {
+        string NormalName(Type type) {
             if (type.DeclaringType != null) {
                 var settingsWithoutUseFullname = this;
                 settingsWithoutUseFullname.UseFullName = false;
@@ -76,8 +71,7 @@
             }
         }

-        string GenericTypeName(Type type)
-        {
+        string GenericTypeName(Type type) {
             if (!type.GetTypeInfo().IsGenericType) {
                 return null;
             }
@@ -117,8 +111,7 @@
             return string.Join(".", revNestedTypeNames);
         }

-        string ArrayTypeNameOrNull(Type type)
-        {
+        string ArrayTypeNameOrNull(Type type) {
             if (!type.IsArray) {
                 return null;
             }


Fixing physical code gen to name buffer variables correctly when there is a displacement

--- GenerateUserTypesFromPdb/UserTypes/PhysicalUserType.cs
+++ GenerateUserTypesFromPdb/UserTypes/PhysicalUserType.cs
@@ -85,7 +85,7 @@
                 {
                     Access = "protected",
                     ConstructorText = "buffer",
-                    FieldName = "buffer",
+                    FieldName = "memoryBuffer",
                     FieldType = "CsScriptManaged.Utility.MemoryBuffer",
                     FieldTypeInfoComment = null,
                     OverrideWithNew = true,
@@ -99,7 +99,7 @@
                 {
                     Access = "protected",
                     ConstructorText = "offset",
-                    FieldName = "offset",
+                    FieldName = "memoryBufferOffset",
                     FieldType = "int",
                     FieldTypeInfoComment = null,
                     OverrideWithNew = true,
@@ -113,7 +113,7 @@
                 {
                     Access = "protected",
                     ConstructorText = "bufferAddress",
-                    FieldName = "bufferAddress",
+                    FieldName = "memoryBufferAddress",
                     FieldType = "ulong",
                     FieldTypeInfoComment = null,
                     OverrideWithNew = true,


Reverting change to CCWindow: return IsUseDepthTesting property

--- src/CCWindow.cs
+++ src/CCWindow.cs
@@ -54,6 +54,12 @@
             }
         }

+        public bool IsUseDepthTesting
+        {
+            get { return DrawManager.DepthTest; }
+            set { DrawManager.DepthTest = value; }
+        }
+
         public bool DisplayStats
         {
             get { return Stats.IsEnabled; }
@@ -133,6 +139,7 @@

             IsUseAlphaBlending = true;
+            IsUseDepthTesting = false;

             this.XnaWindow = xnaWindow;
             xnaWindow.OrientationChanged += OnOrientationChanged;


Renaming of CCWindow:ActiveDirector to DefaultDirector

* a window can have multiple running directors, so rename removes ambiguity as to whether ActiveDirector represents only running director

--- src/CCWindow.cs
+++ src/CCWindow.cs
@@ -38,7 +38,7 @@

         protected CCStats Stats { get; private set; }

-		public CCDirector ActiveDirector { get; internal set; }
+        public CCDirector DefaultDirector { get; internal set; }

         public bool IsUseAlphaBlending
         {
@@ -122,7 +122,7 @@
         {
             sceneDirectors = new List<CCDirector>();

-			AddSceneDirector(new CCDirector());
+            AddSceneDirector(new CCDirector());

             EventDispatcher = new CCEventDispatcher(this);
             //Stats = new CCStats();
@@ -165,42 +165,53 @@
                 sceneDirectors.Add(sceneDirector);
             }

-			if (sceneDirectors.Count == 1)
-				ActiveDirector = sceneDirector;
+            if (sceneDirectors.Count == 1)
+                DefaultDirector = sceneDirector;

         }

         public void RemoveSceneDirector(CCDirector sceneDirector)
         {
             sceneDirectors.Remove(sceneDirector);
-			if (ActiveDirector == sceneDirector)
-				ActiveDirector = null;
-
-			// TODO: make this smarter
-			if (sceneDirectors.Count > 0)
-				ActiveDirector = sceneDirectors[0];
+            if (DefaultDirector == sceneDirector)
+                DefaultDirector = null;
+
+            // TODO: make this smarter
+            if (sceneDirectors.Count > 0)
+                DefaultDirector = sceneDirectors[0];

         }

         public void RemoveAllSceneDirectors()
         {
             sceneDirectors.Clear();
-			ActiveDirector = null;
-        }
-
-		public void SetActiveDirector(int index)
-		{
-			Debug.Assert(index < sceneDirectors.Count, "CococsSharp CCWindow: index out of range.");
-			ActiveDirector = sceneDirectors[index];
-		}
-
-		public void RunWithScene(CCScene scene)
-		{
-			if (scene.Window == null)
-				scene.Window = this;
-
-			ActiveDirector.RunWithScene(scene);
-		}
+            DefaultDirector = null;
+        }
+
+        public void SetDefaultDirector(int index)
+        {
+            Debug.Assert(index < sceneDirectors.Count, "CococsSharp CCWindow: index out of range.");
+            DefaultDirector = sceneDirectors[index];
+        }
+
+        public void RunWithScene(CCScene scene)
+        {
+            if (scene.Window == null)
+                scene.Window = this;
+
+            CCDirector sceneDirector = scene.Director;
+
+            if (sceneDirector != null)
+            {
+                AddSceneDirector(sceneDirector);
+            }
+            else
+            {
+                sceneDirector = DefaultDirector;
+            }
+
+            sceneDirector.RunWithScene(scene);
+        }

         #endregion Scene director management
@@ -328,8 +339,8 @@
                 {
                     director.NextScene.Viewport.DisplayOrientation = orientation;
                     director.NextScene.Viewport.LandscapeScreenSizeInPixels = landscapeWindowSize;
-					if (director.NextScene.Window == null)
-						director.NextScene.Window = this;
+                    if (director.NextScene.Window == null)
+                        director.NextScene.Window = this;
                     director.SetNextScene();
                 }
             }


Clear the ready list once the lobby is left (#1791)

--- Content.Client/State/LobbyState.cs
+++ Content.Client/State/LobbyState.cs
@@ -107,7 +107,10 @@
         {
             _playerManager.PlayerListUpdated -= PlayerManagerOnPlayerListUpdated;
             _clientGameTicker.InfoBlobUpdated -= UpdateLobbyUi;
-            _clientGameTicker.LobbyStatusUpdated -= UpdateLobbyUi;
+            _clientGameTicker.LobbyStatusUpdated -= LobbyStatusUpdated;
+            _clientGameTicker.LobbyReadyUpdated -= LobbyReadyUpdated;
+
+            _clientGameTicker.Ready.Clear();

             _lobby.Dispose();
             _characterSetup.Dispose();


Added April 2015 Event

Added April 2015 Event

--- NwaDg.Web/Views/Home/Index.cshtml
+++ NwaDg.Web/Views/Home/Index.cshtml
@@ -42,7 +42,7 @@

UPCOMING EVENTS

                 View EventBrite Events

-

Sell Tickets through Eventbrite

+

Sell Tickets through Eventbrite


Added base ability to send key-strokes to current app

--- ArduinoWindowsRemoteControl/Helpers/WinAPIHelpers.cs
+++ ArduinoWindowsRemoteControl/Helpers/WinAPIHelpers.cs
@@ -3,7 +3,9 @@
 using System.Diagnostics;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
+using System.Windows.Forms;

 namespace ArduinoWindowsRemoteControl.Helpers
 {
@@ -22,5 +24,47 @@

             return process.ProcessName;
         }
+
+        /// <summary>
+        /// Sends key presses to current active application.
+        /// Format: Ctrl-A-B,Shift-C,a,f
+        /// </summary>
+        /// <param name="message">Sequence of keys to be sent</param>
+        public static void SendKeyboardMessage(string message)
+        {
+            var commands = message.Split(',');
+            foreach (string command in commands)
+            {
+                //get separate keys from Ctrl-A-B
+                var keys = command.Split('-');
+                foreach (var key in keys)
+                {
+                    byte keyCode = GetVirtualCodeForKey(key);
+                    WinAPIMethods.keybd_event(keyCode, (byte)WinAPIMethods.MapVirtualKey(keyCode, WinAPIMethods.MAPVK_VK_TO_VSC), WinAPIMethods.KEYEVENTF_EXTENDEDKEY, 0);
+                }
+                Thread.Sleep(100);
+                foreach (var key in keys.Reverse())
+                {
+                    byte keyCode = GetVirtualCodeForKey(key);
+                    WinAPIMethods.keybd_event(keyCode, (byte)WinAPIMethods.MapVirtualKey(keyCode, WinAPIMethods.MAPVK_VK_TO_VSC), WinAPIMethods.KEYEVENTF_EXTENDEDKEY | WinAPIMethods.KEYEVENTF_KEYUP, 0);
+                }
+            }
+        }
+
+        public static byte GetVirtualCodeForKey(string key)
+        {
+            return KeyToVKMapping[key];
+        }
+
+        private static Dictionary<string, byte> KeyToVKMapping = new Dictionary<string, byte>
+        {
+            { "CTRL", (byte)Keys.ControlKey },
+            { "ALT", (byte)Keys.Menu },
+            { "SHIFT", (byte)Keys.ShiftKey },
+            { "ESC", (byte)Keys.Escape },
+            { "F4", (byte)Keys.F4 },
+            { "A", (byte)Keys.A },
+            { "N", (byte)Keys.N }
+        };
     }
 }


Adding UIPermissionAttribute to AttributesToAvoidReplicating used with Castle Dynamic Proxy.

To make it possible to substitute interfaces that exposes methods or
properties that uses System.Windows.IDataObject.

--- Source/NSubstitute/Proxies/CastleDynamicProxy/CastleDynamicProxyFactory.cs
+++ Source/NSubstitute/Proxies/CastleDynamicProxy/CastleDynamicProxyFactory.cs
@@ -103,6 +103,7 @@
 #if NET4
             AttributesToAvoidReplicating.Add<System.Runtime.InteropServices.TypeIdentifierAttribute>();
 #endif
+            AttributesToAvoidReplicating.Add<UIPermissionAttribute>();
         }
     }
 }


getter is async

getter is async

--- Controllers/SchedulerController.cs
+++ Controllers/SchedulerController.cs
@@ -68,7 +68,7 @@
         public async Task<IActionResult> ViewCalendar()
         {
             var currentUser = await _userManager.GetUserAsync(HttpContext.User);
-            var calendarViewModels = _calendarViewModelGetter.GetByUserId(currentUser.Id);
+            var calendarViewModels = await _calendarViewModelGetter.GetByUserId(currentUser.Id);

             return View(calendarViewModels);
         }


feat(SDKManager): load the previously used SDK Setup

The SDK Manager now tries to use the same SDK Setup that was used
previously (even when it was used in another scene).

--- Assets/VRTK/Scripts/Utilities/SDK/VRTK_SDKManager.cs
+++ Assets/VRTK/Scripts/Utilities/SDK/VRTK_SDKManager.cs
@@ -178,6 +178,7 @@
         /// The loaded SDK Setup. <see langword="null"/> if no setup is currently loaded.
         /// </summary>
         public VRTK_SDKSetup loadedSetup { get; private set; }
+        private static HashSet<VRTK_SDKInfo> _previouslyUsedSetupInfos = new HashSet<VRTK_SDKInfo>();

         /// <summary>
         /// All behaviours that need toggling whenever <see cref="loadedSetup"/> changes.
@@ -387,11 +388,25 @@
         /// <summary>
         /// Tries to load a valid <see cref="VRTK_SDKSetup"/> from <see cref="setups"/>.
         /// </summary>
-        public void TryLoadSDKSetupFromList()
+        public void TryLoadSDKSetupFromList(bool tryUseLastLoadedSetup = true)
         {
             int index = 0;

-            if (VRSettings.enabled)
+            if (tryUseLastLoadedSetup && _previouslyUsedSetupInfos.Count > 0)
+            {
+                index = Array.FindIndex(
+                    setups,
+                    setup => _previouslyUsedSetupInfos.SetEquals(
+                        new[]
+                        {
+                            setup.systemSDKInfo,
+                            setup.boundariesSDKInfo,
+                            setup.headsetSDKInfo,
+                            setup.controllerSDKInfo
+                        })
+                );
+            }
+            else if (VRSettings.enabled)
             {
                 // Use the SDK Setup for the current VR Device if it's working already
                 // (may be due to command line argument '-vrmode')
@@ -554,6 +569,20 @@
             {
                 OnLoadedSetupChanged(new LoadedSetupChangeEventArgs(previousLoadedSetup, null, null));
             }
+
+            _previouslyUsedSetupInfos.Clear();
+            if (previousLoadedSetup != null)
+            {
+                _previouslyUsedSetupInfos.UnionWith(
+                    new[]
+                    {
+                        previousLoadedSetup.systemSDKInfo,
+                        previousLoadedSetup.boundariesSDKInfo,
+                        previousLoadedSetup.headsetSDKInfo,
+                        previousLoadedSetup.controllerSDKInfo
+                    }
+                );
+            }
         }

         static VRTK_SDKManager()


Again Visual Studio

Again Visual Studio

--- Tests/Mapsui.Rendering.OpenTK.Android.Tests/Resources/Resource.Designer.cs
+++ Tests/Mapsui.Rendering.OpenTK.Android.Tests/Resources/Resource.Designer.cs
@@ -26,6 +26,8 @@

 		public static void UpdateIdValues()
 		{
+			global::Mapsui.Rendering.OpenTK.Resource.String.ApplicationName = global::Mapsui.Rendering.OpenTK.Android.Tests.Resource.String.ApplicationName;
+			global::Mapsui.Rendering.OpenTK.Resource.String.Hello = global::Mapsui.Rendering.OpenTK.Android.Tests.Resource.String.Hello;
 			global::SQLite.Net.Platform.XamarinAndroid.Resource.String.ApplicationName = global::Mapsui.Rendering.OpenTK.Android.Tests.Resource.String.ApplicationName;
 			global::SQLite.Net.Platform.XamarinAndroid.Resource.String.Hello = global::Mapsui.Rendering.OpenTK.Android.Tests.Resource.String.Hello;
 		}


RabbitMQ test fix

RabbitMQ test fix

--- InfinniPlatform.MessageQueue.Tests/RabbitMqTestBase.cs
+++ InfinniPlatform.MessageQueue.Tests/RabbitMqTestBase.cs
@@ -29,6 +29,7 @@
         {
             var appEnvironmentMock = new Mock<IAppEnvironment>();
             appEnvironmentMock.SetupGet(env => env.Name).Returns(TestConstants.ApplicationName);
+            appEnvironmentMock.SetupGet(env => env.Id).Returns(TestConstants.ApplicationName);

             var logMock = new Mock<ILog>();
             logMock.Setup(log => log.Error(It.IsAny<object>(), It.IsAny<Dictionary<string, object>>(), It.IsAny<Exception>()))


Disk model

Disk model

--- Infrastructure/CSharpGL.Models/HanoiTower/DiskModel.cs
+++ Infrastructure/CSharpGL.Models/HanoiTower/DiskModel.cs
@@ -16,91 +16,97 @@

         public DiskModel(float radius, float holeRadius, float halfThickness, uint sliceCount, uint secondSliceCount)
         {
-            uint upPlane, downPlane;
-            uint[] upSphere = new uint[sliceCount];
-            uint[] downSphere = new uint[sliceCount];
+            float planeRadius = radius - holeRadius - halfThickness;
+            uint[] outUpSphere = new uint[sliceCount];
+            uint[] outDownSphere = new uint[sliceCount];
+            uint[] inUpSphere = new uint[sliceCount];
+            uint[] inDownSphere = new uint[sliceCount];
             {
-                var positions = new vec3[sliceCount * secondSliceCount + sliceCount + sliceCount];
+                var positions = new vec3[sliceCount * ((secondSliceCount + 1) * 2)];
                 uint t = 0;
                 var y = new vec3(0, 1, 0);
                 for (int i = 0; i < sliceCount; i++)
                 {
-                    upSphere[i] = t;
+                    outUpSphere[i] = t;
                     double di = 2 * Math.PI * i / sliceCount;
                     var center = new vec3(radius * (float)Math.Sin(di), 0, radius * (float)Math.Cos(di));
-                    float length = center.length();
                     center = center.normalize();
-                    for (int j = 0; j < secondSliceCount; j++)
+                    for (int j = 0; j < (secondSliceCount + 1); j++)
                     {
-                        double dj = Math.PI / 2 + Math.PI * j / (secondSliceCount - 1);
-                        positions[t++] = center * (length - halfThickness * (float)Math.Cos(dj))
+                        double dj = Math.PI / 2 + Math.PI * j / (secondSliceCount);
+                        positions[t++] = center * ((radius + planeRadius) - halfThickness * (float)Math.Cos(dj))
                             + y * (halfThickness * (float)Math.Sin(dj));
                     }
-                    downSphere[i] = t - 1;
+                    outDownSphere[i] = t - 1;
                 }
-                upPlane = t;
                 for (int i = 0; i < sliceCount; i++)
                 {
+                    inDownSphere[i] = t;
                     double di = 2 * Math.PI * i / sliceCount;
-                    positions[t++] = new vec3(holeRadius * (float)Math.Sin(di), halfThickness, holeRadius * (float)Math.Cos(di));
+                    var center = new vec3(radius * (float)Math.Sin(di), 0, radius * (float)Math.Cos(di));
+                    center = center.normalize();
+                    for (int j = 0; j < (secondSliceCount + 1); j++)
+                    {
+                        double dj = Math.PI / 2 + Math.PI + Math.PI * j / (secondSliceCount);
+                        positions[t++] = center * ((radius - planeRadius) - halfThickness * (float)Math.Cos(dj))
+                            + y * (halfThickness * (float)Math.Sin(dj));
+                    }
+                    inUpSphere[i] = t - 1;
                 }
-                downPlane = t;
-                for (int i = 0; i < sliceCount; i++)
-                {
-                    double di = 2 * Math.PI * i / sliceCount;
-                    positions[t++] = new vec3(holeRadius * (float)Math.Sin(di), -halfThickness, holeRadius * (float)Math.Cos(di));
-                }
+
                 BoundingBox box = positions.Move2Center();
                 this.positions = positions;
                 this.modelSize = box.MaxPosition - box.MinPosition;
             }
             {
-                var indexes = new uint[sliceCount * (secondSliceCount - 1) * 2 * 3
-                    + sliceCount * 2 * 3 + sliceCount * 2 * 3
-                    + sliceCount * 2 * 3];
+                var indexes = new uint[(sliceCount * (secondSliceCount) * 2 * 3 * 2)
+                    + sliceCount * 2 * 3 + sliceCount * 2 * 3];
                 uint t = 0;
                 for (uint i = 0; i < sliceCount; i++)
                 {
-                    for (uint j = 0; j < secondSliceCount - 1; j++)
+                    for (uint j = 0; j < secondSliceCount; j++)
                     {
-                        indexes[t++] = i * secondSliceCount + j;
-                        indexes[t++] = i * secondSliceCount + (j + 1) % secondSliceCount;
-                        indexes[t++] = (i * secondSliceCount + secondSliceCount + (j + 1) % secondSliceCount) % (sliceCount * secondSliceCount);
+                        indexes[t++] = outUpSphere[i] + j;
+                        indexes[t++] = outUpSphere[i] + (j + 1);
+                        indexes[t++] = outUpSphere[(i + 1) % sliceCount] + j + 1;

-                        indexes[t++] = i * secondSliceCount + j;
-                        indexes[t++] = (i * secondSliceCount + secondSliceCount + (j + 1) % secondSliceCount) % (sliceCount * secondSliceCount);
-                        indexes[t++] = (i * secondSliceCount + secondSliceCount + j) % (sliceCount * secondSliceCount);
+                        indexes[t++] = outUpSphere[i] + j;
+                        indexes[t++] = outUpSphere[(i + 1) % sliceCount] + j + 1;
+                        indexes[t++] = outUpSphere[(i + 1) % sliceCount] + j;
                     }
                 }
                 for (uint i = 0; i < sliceCount; i++)
                 {
-                    indexes[t++] = upPlane + i;
-                    indexes[t++] = upSphere[i];
-                    indexes[t++] = upPlane + (i + 1) % sliceCount;
+                    for (uint j = 0; j < secondSliceCount; j++)
+                    {
+                        indexes[t++] = inDownSphere[i] + j;
+                        indexes[t++] = inDownSphere[i] + (j + 1);
+                        indexes[t++] = inDownSphere[(i + 1) % sliceCount] + j + 1;

-                    indexes[t++] = upPlane + (i + 1) % sliceCount;
-                    indexes[t++] = upSphere[i];
-                    indexes[t++] = upSphere[(i + 1) % sliceCount];
+                        indexes[t++] = inDownSphere[i] + j;
+                        indexes[t++] = inDownSphere[(i + 1) % sliceCount] + j + 1;
+                        indexes[t++] = inDownSphere[(i + 1) % sliceCount] + j;
+                    }
                 }
                 for (uint i = 0; i < sliceCount; i++)
                 {
-                    indexes[t++] = downPlane + i;
-                    indexes[t++] = downPlane + (i + 1) % sliceCount;
-                    indexes[t++] = downSphere[i];
+                    indexes[t++] = inUpSphere[i];
+                    indexes[t++] = outUpSphere[i];
+                    indexes[t++] = outUpSphere[(i + 1) % sliceCount];

-                    indexes[t++] = downPlane + (i + 1) % sliceCount;
-                    indexes[t++] = downSphere[(i + 1) % sliceCount];
-                    indexes[t++] = downSphere[i];
+                    indexes[t++] = inUpSphere[i];
+                    indexes[t++] = outUpSphere[(i + 1) % sliceCount];
+                    indexes[t++] = inUpSphere[(i + 1) % sliceCount];
                 }
                 for (uint i = 0; i < sliceCount; i++)
                 {
-                    indexes[t++] = upPlane + i;
-                    indexes[t++] = upPlane + (i + 1) % sliceCount;
-                    indexes[t++] = downPlane + i;
+                    indexes[t++] = inDownSphere[i];
+                    indexes[t++] = outDownSphere[(i + 1) % sliceCount];
+                    indexes[t++] = outDownSphere[i];

-                    indexes[t++] = downPlane + i;
-                    indexes[t++] = upPlane + (i + 1) % sliceCount;
-                    indexes[t++] = downPlane + (i + 1) % sliceCount;
+                    indexes[t++] = inDownSphere[i];
+                    indexes[t++] = inDownSphere[(i + 1) % sliceCount];
+                    indexes[t++] = outDownSphere[(i + 1) % sliceCount];
                 }
                 this.indexes = indexes;
             }


fix master changes

fix master changes

--- DSharpPlus/Net/DiscordApiClient.cs
+++ DSharpPlus/Net/DiscordApiClient.cs
@@ -1818,30 +1818,6 @@
         }
         #endregion

-        #region Emoji
-
-        internal async Task<DiscordEmoji> CreateGuildEmojiAsync(ulong guild_id, string name, string image, IEnumerable<DiscordRole> roles)
-        {
-            var payload = new RestEmojiCreatePayload
-            {
-                Name = name,
-                Image = image,
-                Roles = roles,
-            };
-
-            var route = string.Concat(Endpoints.GUILDS, "/:guild_id", Endpoints.EMOJIS);
-            var bucket = this.Rest.GetBucket(RestRequestMethod.GET, route, new { guild_id = guild_id.ToString(CultureInfo.InvariantCulture) }, out var path);
-
-            var url = new Uri(string.Concat(Utilities.GetApiBaseUri(), path));
-            var res = await this.DoRequestAsync(this.Discord, bucket, url, RestRequestMethod.POST, Utilities.GetBaseHeaders(), JsonConvert.SerializeObject(payload));
-
-            var emoji = JsonConvert.DeserializeObject<DiscordEmoji>(res.Response);
-            emoji.Discord = this.Discord;
-            return emoji;
-        }
-
-        #endregion
-
         #region Misc
         internal Task<DiscordApplication> GetCurrentApplicationInfoAsync()
             => this.GetApplicationInfoAsync("@me");


#9: Additional transaction samples

#9: Additional transaction samples

--- Dapper.MoqTests.Samples/Samples.cs
+++ Dapper.MoqTests.Samples/Samples.cs
@@ -239,7 +239,7 @@
         }

         [Test]
-        public async Task SupportsTransactions()
+        public async Task SupportsExpectedTransactionVerification()
         {
             var connectionFactory = new Mock<IDbConnectionFactory>();
             var connection = new MockDbConnection();
@@ -259,6 +259,28 @@
             await repository.DeleteCarAsync("Vauxhall");

             connection.Verify(c => c.ExecuteAsync(It.IsAny<string>(), It.IsAny<object>(), transaction));
+        }
+
+        [Test]
+        public async Task SupportsTransactionVerificationWithoutSetup()
+        {
+            var connectionFactory = new Mock<IDbConnectionFactory>();
+            var connection = new MockDbConnection();
+            var repository = new SampleRepository(connectionFactory.Object);
+            var vauxhall = new Car
+            {
+                Registration = "ABC123",
+                Make = "Vauxhall",
+                Model = "Astra"
+            };
+            var transaction = new MockDbTransaction();
+            connectionFactory
+                .Setup(f => f.OpenConnection())
+                .Returns(connection);
+
+            await repository.DeleteCarAsync("Vauxhall");
+
+            connection.Verify(c => c.ExecuteAsync(It.IsAny<string>(), It.IsAny<object>(), It.IsAny<IDbTransaction>()));
         }
     }
 }


Added RNG for strings

Added RNG for strings

--- src/EZRandom.cs
+++ src/EZRandom.cs
@@ -1,5 +1,8 @@
 using System;
+using System.Diagnostics;
+using System.Linq;
 using System.Security.Cryptography;
+using System.Text;

 namespace EZRNG
 {
@@ -21,7 +24,9 @@
         /// <summary>
         /// Generates a cryptographically secure unsigned 32-bit random integer
         /// </summary>
-        /// <returns>A random unsigned 32-bit random integer</returns>
+        /// <returns>
+        /// A random unsigned 32-bit random integer
+        /// </returns>
         public static uint GenerateInt()
         {
             var buffer = new byte[sizeof(uint)];
@@ -34,7 +39,9 @@
         /// Generates a cryptographically secure unsigned 32-bit random integer equal to or below a provided maximum
         /// </summary>
         /// <param name="maximum">The maximum value of the integer required</param>
-        /// <returns>A random unsigned 32-bit random integer equal to or below the provided maximum</returns>
+        /// <returns>
+        /// A random unsigned 32-bit random integer equal to or below the provided maximum
+        /// </returns>
         public static uint GenerateInt(uint maximum)
             => GenerateInt(uint.MinValue, maximum);

@@ -43,7 +50,9 @@
         /// </summary>
         /// <param name="minimum">The minimum value of the integer required</param>
         /// <param name="maximum">The maximum value of the integer required</param>
-        /// <returns>A random unsigned 32-bit random integer within the provided range</returns>
+        /// <returns>
+        /// A random unsigned 32-bit random integer within the provided range
+        /// </returns>
         public static uint GenerateInt(uint minimum, uint maximum)
         {
             if (minimum > maximum)
@@ -76,7 +85,9 @@
         /// <summary>
         /// Generates a cryptographically secure unsigned 64-bit random integer
         /// </summary>
-        /// <returns>A random unsigned 64-bit random integer</returns>
+        /// <returns>
+        /// A random unsigned 64-bit random integer
+        /// </returns>
         public static ulong GenerateLong()
         {
             var buffer = new byte[sizeof(ulong)];
@@ -89,7 +100,9 @@
         /// Generates a cryptographically secure unsigned 64-bit random integer equal to or below a provided maximum
         /// </summary>
         /// <param name="maximum">The maximum value of the integer required</param>
-        /// <returns>A random unsigned 64-bit integer equal to or below the provided maximum</returns>
+        /// <returns>
+        /// A random unsigned 64-bit integer equal to or below the provided maximum
+        /// </returns>
         public static ulong GenerateLong(ulong maximum)
             => GenerateLong(ulong.MinValue, maximum);

@@ -98,7 +111,9 @@
         /// </summary>
         /// <param name="minimum">The minimum value of the integer required</param>
         /// <param name="maximum">The maximum value of the integer required</param>
-        /// <returns>A random unsigned 64-bit integer within the provided range</returns>
+        /// <returns>
+        /// A random unsigned 64-bit integer within the provided range
+        /// </returns>
         public static ulong GenerateLong(ulong minimum, ulong maximum)
         {
             if (minimum > maximum)
@@ -131,7 +146,9 @@
         /// <summary>
         /// Generates a cryptographically secure positive random 32-bit floating point number between 0 and 1
         /// </summary>
-        /// <returns>A random 32-bit positive floating point number between 0 and 1</returns>
+        /// <returns>
+        /// A random 32-bit positive floating point number between 0 and 1
+        /// </returns>
         public static float GenerateFloat()
             => (float)GenerateDouble();

@@ -142,7 +159,9 @@
         /// <summary>
         /// Generates a cryptographically secure positive random 64-bit floating point number between 0 and 1
         /// </summary>
-        /// <returns>A random 64-bit positive floating point number between 0 and 1</returns>
+        /// <returns>
+        /// A random 64-bit positive floating point number between 0 and 1
+        /// </returns>
         public static double GenerateDouble()
             => GenerateInt() / (uint.MaxValue + 1d);

@@ -153,7 +172,9 @@
         /// <summary>
         /// Generates a cryptographically secure random boolean
         /// </summary>
-        /// <returns>A random boolean</returns>
+        /// <returns>
+        /// A random boolean
+        /// </returns>
         public static bool GenerateBool()
         {
             return GenerateInt() % 2 == 0;
@@ -167,7 +188,9 @@
         /// Generates a cryptographically secure random byte array
         /// </summary>
         /// <param name="length">The length of the byte array required</param>
-        /// <returns>An array of random bytes</returns>
+        /// <returns>
+        /// An array of random bytes
+        /// </returns>
         public static byte[] GenerateByteArray(int length)
         {
             var buffer = new byte[length];
@@ -179,7 +202,81 @@

         #region Strings

-        // TODO :: RNG for strings
+        /// <summary>
+        /// Generates a cryptographically secure random string
+        /// </summary>
+        /// <param name="length">The length of the output required</param>
+        /// <returns>
+        /// A random string containing upper- and lower-case (ISO basic Latin) alphabetical letters, numbers, hyphens, and underscores of the requested length
+        /// </returns>
+        public static string GenerateString(int length)
+        {
+            const string validCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_";
+            return GenerateString(validCharacters, length);
+        }
+
+        /// <summary>
+        /// Generates a cryptographically secure random string
+        /// </summary>
+        /// <param name="validCharacters">A string wrapping the character set of the output.</param>
+        /// <param name="length">The length of the output required</param>
+        /// <param name="removeDuplicates">Whether or not to sanitise the input string to remove duplicate characters</param>
+        /// <returns>
+        /// A random string containing only characters present in <paramref name="validCharacters"/> of the requested length
+        /// </returns>
+        /// <remarks>
+        /// WARNING: If 256 cannot evenly divide the number of characters (or number of distinct characters if <paramref name="removeDuplicates"/> is true) in <paramref name="validCharacters"/>,
+        /// then the entropy of the output is compromised. For best results, ensure that 256 evenly divides the number of valid characters.
+        /// </remarks>
+        public static string GenerateString(string validCharacters, int length, bool removeDuplicates = true)
+        {
+            var validCharacterArray = validCharacters.ToCharArray();
+
+            if (removeDuplicates)
+                validCharacterArray = validCharacterArray.Distinct().ToArray();
+
+            return GenerateString(validCharacterArray, length, removeDuplicates);
+        }
+
+        /// <summary>
+        /// Generates a cryptographically secure random string
+        /// </summary>
+        /// <param name="validCharacters">The character set of the output</param>
+        /// <param name="length">The length of the output required</param>
+        /// <param name="removeDuplicates">Whether or not to sanitise the input string to remove duplicate characters</param>
+        /// <returns>
+        /// A random string containing only characters present in <paramref name="validCharacters"/> of the requested length
+        /// </returns>
+        /// <remarks>
+        /// WARNING: If 256 cannot evenly divide the number of characters (or number of distinct characters if <paramref name="removeDuplicates"/> is true) in <paramref name="validCharacters"/>,
+        /// then the entropy of the output is compromised. For best results, ensure that 256 evenly divides the number of valid characters.
+        /// </remarks>
+        public static string GenerateString(char[] validCharacters, int length, bool removeDuplicates = true)
+        {
+            if (removeDuplicates)
+                validCharacters = validCharacters.Distinct().ToArray();
+
+            var validCharactersLength = validCharacters.Length;
+
+            if (validCharactersLength <= 1)
+                throw new ArgumentException("Only one output is possible - output is determinable from inputs", nameof(validCharacters));
+
+            if (256 % validCharactersLength != 0)
+                Trace.TraceWarning("The number of valid characters supplied cannot be evenly divided by 256. The entropy of the output is compromised.");
+
+            var stringBuilder = new StringBuilder();
+
+            var buffer = new byte[sizeof(uint)];
+
+            while (length-- > 0)
+            {
+                _prng.GetBytes(buffer);
+                var index = BitConverter.ToUInt32(buffer, 0);
+                stringBuilder.Append(validCharacters[(int)(index % (uint)validCharactersLength)]);
+            }
+
+            return stringBuilder.ToString();
+        }

         #endregion Strings
     }


Remove stray debug line.

Remove stray debug line.

--- DarkUI/Docking/DarkDockSplitter.cs
+++ DarkUI/Docking/DarkDockSplitter.cs
@@ -134,7 +134,6 @@

         public void UpdateBounds()
         {
-            _control.SetBounds(_control.Bounds.X, _control.Bounds.Y, _control.Bounds.Width, _control.Bounds.Height);
             var bounds = _parentControl.RectangleToScreen(_control.Bounds);

             switch (_splitterType)


AI is less impatient. Score is updated after cards finished moving.

--- GreenMemory/GameView.xaml.cs
+++ GreenMemory/GameView.xaml.cs
@@ -180,13 +180,11 @@
                         this.CardGrid.Children[(int)this.gameModel.FirstCardIndex].IsEnabled = false;
                         this.CardGrid.Children[(int)this.gameModel.SecondCardIndex].IsEnabled = false;
                         currentPlayerModel.AddCollectedPair((int)this.gameModel.FirstCardIndex);
-                        currentPlayerView.setPoints(playerModel.Score);
-
-                        this.gameModel.ClearPicked();
-                        checkForAI();

                         card.addFlipListener((Action)(() =>
                         {
+                            this.gameModel.ClearPicked();
+                            checkForAI();
                             // Delay here or not??
                             Task.Delay(FLIPDELAY).ContinueWith(_ =>
                             {
@@ -200,13 +198,13 @@

                                         if (firstDummyCard.distanceTo(currentPlayerView.myStack) > secondDummyCard.distanceTo(currentPlayerView.myStack))
                                         {
-                                            firstDummyCard.addCompletedMoveListener((Action)checkGameOver);
+                                            firstDummyCard.addCompletedMoveListener((Action)(() => { updateScore(); checkGameOver(); }));

                                             secondDummyCard.addCompletedMoveListener((Action)(() => { playerView.myStack.Fill = firstDummyCard.myImage.Fill; }));
                                         }
                                         else
                                         {
-                                            secondDummyCard.addCompletedMoveListener((Action)checkGameOver);
+                                            secondDummyCard.addCompletedMoveListener((Action)(() => { updateScore(); checkGameOver(); }));

                                             firstDummyCard.addCompletedMoveListener((Action)(() => { playerView.myStack.Fill = firstDummyCard.myImage.Fill; }));
                                         }
@@ -286,6 +284,12 @@
             }
         }

+        private void updateScore()
+        {
+            playerTwoView.setPoints(playerTwoModel.Score);
+            playerOneView.setPoints(playerOneModel.Score);
+        }
+
         private void checkGameOver()
         {
             --dummyPairsInPlay;


Add missing members to IStorageFactory

Add missing members to IStorageFactory

--- DataTanker/Core/IStorageFactory.cs
+++ DataTanker/Core/IStorageFactory.cs
@@ -1,7 +1,6 @@
 namespace DataTanker
 {
     using System;
-
     using Settings;

     /// <summary>
@@ -9,6 +8,101 @@
     /// </summary>
     public interface IStorageFactory
     {
+        /// <summary>
+        /// Creates a new bytearray storage instance with specified type of keys using built-in serialization routines for keys.
+        /// Supported types of keys are: int, long, uint, ulong, double, float, DateTime, Guid, string and byte[]
+        /// </summary>
+        /// <typeparam name="TKey">The type of key</typeparam>
+        /// <param name="settings">Setiings of creating storage</param>
+        /// <returns>New storage instance</returns>
+        IKeyValueStorage<ComparableKeyOf<TKey>, ValueOf<byte[]>> CreateBPlusTreeByteArrayStorage<TKey>(BPlusTreeStorageSettings settings)
+            where TKey : IComparable;
+
+        /// <summary>
+        /// Creates a new storage instance with specified type of keys and values using built-in serialization routines for keys.
+        /// Supported types of keys are: int, long, uint, ulong, double, float, DateTime, Guid, string and byte[]
+        /// </summary>
+        /// <typeparam name="TKey">The type of key</typeparam>
+        /// <typeparam name="TValue">The type of value</typeparam>
+        /// <param name="valueSerializer">Object implementing ISerializer interface for value serialization</param>
+        /// <param name="settings">Setiings of creraating storage</param>
+        /// <returns>New storage instance</returns>
+        IKeyValueStorage<ComparableKeyOf<TKey>, ValueOf<TValue>> CreateBPlusTreeStorage<TKey, TValue>(ISerializer<TValue> valueSerializer,
+                                                                                BPlusTreeStorageSettings settings)
+            where TKey : IComparable;
+
+        /// <summary>
+        /// Creates a new storage instance with specified type of keys and values using built-in serialization routines for keys
+        /// and BinaryFormatter serialization for values.
+        /// Supported types of keys are: int, long, uint, ulong, double, float, DateTime, Guid, string and byte[]
+        /// </summary>
+        /// <typeparam name="TKey">The type of key</typeparam>
+        /// <typeparam name="TValue">The type of value</typeparam>
+        /// <param name="settings">Setiings of creraating storage</param>
+        /// <returns>New storage instance</returns>
+        IKeyValueStorage<ComparableKeyOf<TKey>, ValueOf<TValue>> CreateBPlusTreeStorage<TKey, TValue>(BPlusTreeStorageSettings settings)
+            where TKey : IComparable;
+
+        /// <summary>
+        /// Creates a new storage instance with specified type of keys using built-in serialization routines.
+        /// Supported types of keys are: int, long, uint, ulong, double, float, DateTime, Guid, string and byte[]
+        /// </summary>
+        /// <typeparam name="TKey">The type of key</typeparam>
+        /// <typeparam name="TValue">The type of value</typeparam>
+        /// <param name="serializeValue">Value serialization method</param>
+        /// <param name="deserializeValue">Value deserialization method</param>
+        /// <param name="settings">Setiings of creraating storage</param>
+        /// <returns>New storage instance</returns>
+        IKeyValueStorage<ComparableKeyOf<TKey>, ValueOf<TValue>> CreateBPlusTreeStorage<TKey, TValue>(Func<TValue, byte[]> serializeValue,
+                                                                                Func<byte[], TValue> deserializeValue,
+                                                                                BPlusTreeStorageSettings settings)
+            where TKey : IComparable;
+
+        /// <summary>
+        /// Creates a new storage instance with specified types of keys using built-in serialization routines.
+        /// Supported types of keys are: int, long, uint, ulong, double, float, DateTime, Guid, string and byte[]
+        /// </summary>
+        /// <typeparam name="TKey">The type of key</typeparam>
+        /// <typeparam name="TValue">The type of value</typeparam>
+        /// <param name="serializeValue">Value serialization method</param>
+        /// <param name="deserializeValue">Value deserialization method</param>
+        /// <param name="settings">Setiings of creating storage</param>
+        /// <returns>New storage instance</returns>
+        IKeyValueStorage<KeyOf<TKey>, ValueOf<TValue>> CreateRadixTreeStorage<TKey, TValue>(Func<TValue, byte[]> serializeValue,
+                                                                                Func<byte[], TValue> deserializeValue,
+                                                                                RadixTreeStorageSettings settings);
+
+        /// <summary>
+        /// Creates a new storage instance with specified types of keys using built-in serialization routines.
+        /// Supported types of keys are: int, long, uint, ulong, double, float, DateTime, Guid, string and byte[]
+        /// </summary>
+        /// <typeparam name="TKey">The type of key</typeparam>
+        /// <typeparam name="TValue">The type of value</typeparam>
+        /// <param name="valueSerializer">Object implementing ISerializer interface for value serialization</param>
+        /// <param name="settings">Setiings of creating storage</param>
+        /// <returns>New storage instance</returns>
+        IKeyValueStorage<KeyOf<TKey>, ValueOf<TValue>> CreateRadixTreeStorage<TKey, TValue>(ISerializer<TValue> valueSerializer, RadixTreeStorageSettings settings);
+
+        /// <summary>
+        /// Creates a new storage instance with specified types of keys using built-in serialization routines.
+        /// and BinaryFormatter serialization for values.
+        /// Supported types of keys are: int, long, uint, ulong, double, float, DateTime, Guid, string and byte[]
+        /// </summary>
+        /// <typeparam name="TKey">The type of key</typeparam>
+        /// <typeparam name="TValue">The type of value</typeparam>
+        /// <param name="settings">Setiings of creating storage</param>
+        /// <returns>New storage instance</returns>
+        IKeyValueStorage<KeyOf<TKey>, ValueOf<TValue>> CreateRadixTreeStorage<TKey, TValue>(RadixTreeStorageSettings settings);
+
+        /// <summary>
+        /// Creates a new bytearray storage instance with specified type of keys using built-in serialization routines.
+        /// Supported types of keys are: int, long, uint, ulong, double, float, DateTime, Guid, string and byte[]
+        /// </summary>
+        /// <typeparam name="TKey">The type of key</typeparam>
+        /// <param name="settings">Setiings of creating storage</param>
+        /// <returns>New storage instance</returns>
+        IKeyValueStorage<KeyOf<TKey>, ValueOf<byte[]>> CreateRadixTreeByteArrayStorage<TKey>(RadixTreeStorageSettings settings);
+
         /// <summary>
         /// Creates a new storage instance with specified types of keys and values.
         /// </summary>


use new field [Column Expression=xx]

use new field [Column Expression=xx]

git-svn-id: 1800f71f313d917366f95485fa960eed04b40598@163 33146b6e-df29-0410-a1ca-39be37fb9416

--- DbLinq/vendor/Pgsql/VendorPgsql.cs
+++ DbLinq/vendor/Pgsql/VendorPgsql.cs
@@ -52,11 +52,22 @@

             //changing IsPk->IsDbGen after discussion with Andrus:
             //ColumnAttribute idColAttrib = colAttribs.FirstOrDefault(c => c.IsPrimaryKey);
-            ColumnAttribute idColAttrib = colAttribs.FirstOrDefault(c => c.IsDbGenerated);
+            ColumnAttribute idColAttrib = colAttribs.FirstOrDefault(c => c.IsDbGenerated);

             string idColName = idColAttrib == null ? "ERROR_L93_MissingIdCol" : idColAttrib.Name;
-            string sequenceName = projData.tableAttribute.Name + "_" + idColName + "_seq";
-            sbIdentity.Append(";SELECT currval('" + sequenceName + "')");
+            if (idColAttrib!=null && idColAttrib.Expression != null)
+            {
+                //sequence name is known, is stored in Expression
+                string nextvalExpr = idColAttrib.Expression;                     //eg. "nextval('suppliers_supplierid_seq')"
+                string currvalExpr = nextvalExpr.Replace("nextval", "currval");  //eg. "currval('suppliers_supplierid_seq')"
+                sbIdentity.Append(";SELECT " + currvalExpr);
+            }
+            else
+            {
+                //assume standard format of sequence name
+                string sequenceName = projData.tableAttribute.Name + "_" + idColName + "_seq";
+                sbIdentity.Append(";SELECT currval('" + sequenceName + "')");
+            }

             return null; //we have not created a param object (only Oracle does)
         }


Added implementation to start Quartz scheduler to execute HealthCheck checks

--- HealthCheck/HealthService.cs
+++ HealthCheck/HealthService.cs
@@ -1,29 +1,30 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Linq;
 using HealthCheck.Framework;
 using NLog;
+using Quartz;
+using Quartz.Impl;
+using Quartz.Spi;

 namespace HealthCheck
 {
     /// <summary>
     ///   Health Check Windows Service
     /// </summary>
-    public class HealthService
+    public class HealthService : IJobFactory
     {
         private static readonly Logger _log = LogManager.GetCurrentClassLogger();
-        private PluginManager _manager;
-        private IHealthCheckConfigurationReader _reader;
+        private readonly PluginManager _manager;
+        private readonly IHealthCheckConfigurationReader _reader;
+        private readonly IScheduler _scheduler;

         /// <summary>
         ///   Initializes a new instance of the <see cref="HealthService" /> class.
         /// </summary>
-        public HealthService()
+        public HealthService() : this(new ConfigurationFileReader(), new PluginManager(new ComponentFactory()))
         {
-            Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
-            _reader = new ConfigurationFileReader();
-            _manager = new PluginManager(new ComponentFactory());
-            Groups = new List<HealthCheckGroup>();
         }

         /// <summary>
@@ -34,15 +35,58 @@
         /// <param name="manager">The implementation of the plug-in manager.</param>
         public HealthService(IHealthCheckConfigurationReader reader, PluginManager manager)
         {
+            Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
             _reader = reader ?? new ConfigurationFileReader();
             _manager = manager ?? new PluginManager(new ComponentFactory());
             Groups = new List<HealthCheckGroup>();
+
+            _scheduler = new StdSchedulerFactory().GetScheduler().Result;
+            _scheduler.JobFactory = this;
         }

         /// <summary>
         ///   Gets or sets the list of configuration groups
         /// </summary>
         public List<HealthCheckGroup> Groups { get; set; }
+
+        /// <summary>
+        ///   Creates new job.
+        /// </summary>
+        /// <param name="bundle">
+        ///   The TriggerFiredBundle from which the <see cref="T:Quartz.IJobDetail" /> and other
+        ///   info relating to the trigger firing can be obtained.
+        /// </param>
+        /// <param name="scheduler">a handle to the scheduler that is about to execute the job</param>
+        /// <returns>the newly instantiated Job</returns>
+        /// <throws>SchedulerException if there is a problem instantiating the Job.</throws>
+        public IJob NewJob(TriggerFiredBundle bundle, IScheduler scheduler)
+        {
+            _log.Info($"Searching for job '{bundle.JobDetail.Key}' ...");
+
+            foreach (var group in Groups)
+            {
+                var job = group.Checks.FirstOrDefault(c => c.Id == bundle.JobDetail.Key.Name) as IJob;
+
+                if (job != null)
+                {
+                    _log.Info($"Found job. Id: {bundle.JobDetail.Key.Name}");
+                    return job;
+                }
+            }
+
+            _log.Error($"Unable to find a matching job. Id: {bundle.JobDetail.Key.Name}");
+
+            return null;
+        }
+
+        /// <summary>
+        ///   Allows the job factory to destroy/cleanup the job if needed.
+        /// </summary>
+        /// <param name="job">A class that implements the IJob interface.</param>
+        public void ReturnJob(IJob job)
+        {
+            _log.Debug($"{job} is returning...");
+        }

         /// <summary>
         ///   Starts the health check service.
@@ -52,6 +96,41 @@
             _log.Info("----> HealthCheck Service is Starting...");

             Groups = _reader.ReadAll();
+
+            _log.Debug("Initializing Plugins...");
+
+            foreach (var group in Groups)
+            {
+                foreach (var check in group.Checks)
+                {
+                    _manager.InitializeCheckJob(check, group);
+                }
+            }
+
+            _log.Debug("Configuring job schedules and triggers...");
+
+            var counter = 0;
+
+            foreach (var group in Groups)
+            {
+                foreach (var check in group.Checks)
+                {
+                    counter++;
+
+                    var detail = new JobDetailImpl(check.Id, group.Name, typeof(HealthCheckJob));
+
+                    foreach (var trigger in check.Triggers)
+                    {
+                        _scheduler.ScheduleJob(detail, trigger);
+                    }
+                }
+            }
+
+            _log.Info($"Found {counter} health check jobs");
+
+            _log.Info("Starting Scheduler...");
+
+            _scheduler.Start();
         }

         /// <summary>
@@ -60,6 +139,8 @@
         public void Stop()
         {
             _log.Info("----> HealthCheck Service is Stoping...");
+
+            _ = _scheduler.Shutdown(true);
         }
     }
 }


modify: Event#ToStringを文字列補間の実装に変更

modify: Event#ToStringを文字列補間の実装に変更

--- src/IO/Event.cs
+++ src/IO/Event.cs
@@ -97,7 +97,7 @@
         /// <returns>このインスタンスを表す文字列。</returns>
         public override string ToString()
         {
-            return string.Format("{0}", this.Type);
+            return $"{this.Type}";
         }
         #endregion
     }


change method name.

change method name.

Also fixed first-byte detection of the ShiftJIS encoding.

--- TerminalEmulator/Encoding.cs
+++ TerminalEmulator/Encoding.cs
@@ -197,8 +197,8 @@
             _encoding = enc;
         }

-        // Check if the byte is the first byte of a character which should be converted the character code.
-        protected abstract bool IsLeadByte(byte b);
+        // Check if the byte is the first byte of a character which should be converted to the character code.
+        protected abstract bool IsFirstByte(byte b);

         // Determine how long byte length of a character is.
         protected abstract int GetCharLength(byte b);
@@ -287,7 +287,7 @@
             protected override int GetCharLength(byte b) {
                 return 1;
             }
-            protected override bool IsLeadByte(byte b) {
+            protected override bool IsFirstByte(byte b) {
                 return b >= 0xA0;
             }
             protected override bool IsIgnoreableChar(char[] charBuff, int len) {
@@ -306,8 +306,12 @@
             protected override int GetCharLength(byte b) {
                 return (b >= 0xA1 && b <= 0xDF) ? 1 : 2;
             }
-            protected override bool IsLeadByte(byte b) {
-                return b >= 0x81 && b <= 0xFC;
+            protected override bool IsFirstByte(byte b) {
+                // JIS X0208 Annex 1
+                // 0x81 - 0x9F : 1st byte of the double-byte characters
+                // 0xA1 - 0xDF : half-width katakana
+                // 0xE0 - 0xEF : 1st byte of the double-byte characters
+                return b >= 0x81 && b <= 0xEF;
             }
             protected override bool IsIgnoreableChar(char[] charBuff, int len) {
                 return false;
@@ -325,7 +329,10 @@
             protected override int GetCharLength(byte b) {
                 return b == 0x8F ? 3 : b >= 0x8E ? 2 : 1;
             }
-            protected override bool IsLeadByte(byte b) {
+            protected override bool IsFirstByte(byte b) {
+                // 0x8E : SS2
+                // 0x8F : SS3
+                // 0xA1 - 0xFE : byte of the character code
                 return b >= 0x8E && b <= 0xFE;
             }
             protected override bool IsIgnoreableChar(char[] charBuff, int len) {
@@ -371,7 +378,7 @@
                 return 1;
             }

-            protected override bool IsLeadByte(byte b) {
+            protected override bool IsFirstByte(byte b) {
                 return b >= 0x80;
             }

@@ -444,7 +451,7 @@
             protected override int GetCharLength(byte b) {
                 return 2;
             }
-            protected override bool IsLeadByte(byte b) {
+            protected override bool IsFirstByte(byte b) {
                 return b >= 0xA1 && b <= 0xF7;
             }
             protected override bool IsIgnoreableChar(char[] charBuff, int len) {
@@ -464,7 +471,7 @@
             protected override int GetCharLength(byte b) {
                 return 2;
             }
-            protected override bool IsLeadByte(byte b) {
+            protected override bool IsFirstByte(byte b) {
                 return b >= 0x81 && b <= 0xFE;
             }
             protected override bool IsIgnoreableChar(char[] charBuff, int len) {
@@ -484,7 +491,7 @@
             protected override int GetCharLength(byte b) {
                 return 2;
             }
-            protected override bool IsLeadByte(byte b) {
+            protected override bool IsFirstByte(byte b) {
                 return b >= 0xA1 && b <= 0xF7;
             }
             protected override bool IsIgnoreableChar(char[] charBuff, int len) {
@@ -504,7 +511,7 @@
             protected override int GetCharLength(byte b) {
                 return 2;
             }
-            protected override bool IsLeadByte(byte b) {
+            protected override bool IsFirstByte(byte b) {
                 return b >= 0xA1 && b <= 0xFE;
             }
             protected override bool IsIgnoreableChar(char[] charBuff, int len) {
@@ -524,7 +531,7 @@
             protected override int GetCharLength(byte b) {
                 return 1;
             }
-            protected override bool IsLeadByte(byte b) {
+            protected override bool IsFirstByte(byte b) {
                 return b >= 0x80;
             }
             protected override bool IsIgnoreableChar(char[] charBuff, int len) {


Moved field

Moved field

--- Test/Core/ContainerEditor.cs
+++ Test/Core/ContainerEditor.cs
@@ -10,6 +10,7 @@
     public class ContainerEditor : XObject
     {
         private IContainer _container;
+        private XShape _shape;
         private Tool _currentTool;
         private State _currentState;
         private bool _defaultIsFilled;
@@ -107,8 +108,6 @@
                 }
             }
         }
-
-        private XShape _shape;

         public ContainerEditor(IContainer container)
         {


Added Dashboard message

Added Dashboard message

--- CmsEngine.Ui/Areas/Cms/Controllers/HomeController.cs
+++ CmsEngine.Ui/Areas/Cms/Controllers/HomeController.cs
@@ -18,6 +18,7 @@

         public IActionResult Index()
         {
+            this.SetupMessages("Dashboard");
             return View();
         }
     }


Removed extra spaces

Removed extra spaces

--- CmsEngine.Ui/Areas/Cms/Controllers/PostController.cs
+++ CmsEngine.Ui/Areas/Cms/Controllers/PostController.cs
@@ -110,8 +110,6 @@
             return await this.PrepareAndUploadFiles(_env.WebRootPath, "Post");
         }

-
-
         private IActionResult Save(PostEditModel postEditModel)
         {
             var returnValue = service.SavePost(postEditModel);
@@ -127,8 +125,5 @@

             return RedirectToAction("Index");
         }
-
-
-
     }
 }


Lines starting with '#' indicate optional statments based on target language. E.g., a line starting with '#cs' only shows up in C# tests.

--- TestCaseGenerator/Program.cs
+++ TestCaseGenerator/Program.cs
@@ -77,14 +77,14 @@
                     },
                 },
                 ExecuteDelegate = args => {
-                    ExecuteDelegate(args, generator);
+                    ExecuteDelegate(args, generator, name);
                 },
             };

             return cmd;
         }

-        static void ExecuteDelegate(Dictionary<string, object> args, Action<List<TestFixture>, TextWriter> generator)
+        static void ExecuteDelegate(Dictionary<string, object> args, Action<List<TestFixture>, TextWriter> generator, string language)
         {
             var input = (string)args["input-filename"];
             var fixtures = new List<TestFixture>();
@@ -106,6 +106,16 @@

                     var trimmed = line.Trim();
                     var parts = trimmed.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
+
+                    if (parts[0].StartsWith("#"))
+                    {
+                        var targets = parts[0].Split(',');
+                        if (!targets.Contains(language))
+                        {
+                            continue;
+                        }
+                    }
+
                     string name;
                     switch (parts[0].ToLower())
                     {


arreglos menores nombre alumno grande

arreglos menores nombre alumno grande

--- Testing/AlumnoGrande.aspx.cs
+++ Testing/AlumnoGrande.aspx.cs
@@ -138,7 +138,7 @@
                     + "
"
                         + ""
                         + "
"
-                            + "
"+nombre+ apellido+"
"
+                            + "
"+nombre+ "
" +apellido+"
"
                              + "
"+clave+"
"
                               + "
"+Edad+"
"
                            + "
"


bug fix when file save (the file is not refresh)

--- WPFHexaEditor.Control/HexaEditor.xaml.cs
+++ WPFHexaEditor.Control/HexaEditor.xaml.cs
@@ -996,7 +996,9 @@
         private void Provider_ChangesSubmited(object sender, EventArgs e)
         {
             //Refresh filename
-            FileName = FileName;
+            var filename = FileName;
+            CloseFile();
+            FileName = filename;
         }

@@ -1019,7 +1021,7 @@
         private static void FileName_PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
         {
             HexaEditor ctrl = d as HexaEditor;
-
+
             ctrl.OpenFile((string)e.NewValue);
         }

@@ -1034,6 +1036,15 @@
             if (ByteProvider.CheckIsOpen(_provider))
             {
                 _provider.CloseFile();
+
+                try
+                {
+                    FileName = string.Empty;
+                }
+                catch
+                {
+
+                }

                 ReadOnlyMode = false;
                 VerticalScrollBar.Value = 0;


Added another multivariable NSolve test

Added another multivariable NSolve test


Added D14_ProjectedProductList test which generates invalid SQL

git-svn-id: 1800f71f313d917366f95485fa960eed04b40598@487 33146b6e-df29-0410-a1ca-39be37fb9416

--- Tests/Test_NUnit/ReadTest.cs
+++ Tests/Test_NUnit/ReadTest.cs
@@ -353,6 +353,23 @@
           internal object PenId;
         }

+
+        [Test]
+        public void D14_ProjectedProductList() {
+          Northwind db = CreateDB();
+
+          var prod = (from pr in db.Products
+                      select new {
+                        pr.ProductID,
+                        pr.ProductName,
+                        pr.Supplier,         // exception!
+                        pr.UnitPrice,        // exception!
+                        pr.UnitsInStock,
+                        pr.UnitsOnOrder
+                      }).ToList();
+
+        }
+
         #endregion

         [Test]


Allow you to return anything that extends IEnumerable<KMSelectable>

--- TwitchPlaysAssembly/Src/ComponentSolvers/Helpers/ComponentSolverFactory.cs
+++ TwitchPlaysAssembly/Src/ComponentSolvers/Helpers/ComponentSolverFactory.cs
@@ -926,7 +926,7 @@
 			return false;
 		}

-		if (candidateMethod.ReturnType == typeof(KMSelectable[]) || candidateMethod.ReturnType == typeof(IEnumerable<KMSelectable>))
+		if (typeof(IEnumerable<KMSelectable>).IsAssignableFrom(candidateMethod.ReturnType))
 		{
 			DebugLog("Found a valid candidate ProcessCommand method in {0} (using easy/simple API).", type.FullName);
 			commandType = ModCommandType.Simple;


Allow access for hasInitialized for testability

--- UnityProject/Assets/Plugins/Zenject/Source/Runtime/InitializableManager.cs
+++ UnityProject/Assets/Plugins/Zenject/Source/Runtime/InitializableManager.cs
@@ -12,7 +12,7 @@
     {
         List<InitializableInfo> _initializables;

-        bool _hasInitialized;
+        protected bool _hasInitialized;

         [Inject]
         public InitializableManager(


A small tweak to how the INI file is created and managed.

--- Launcher/LauncherWFP/Data/Context/MainWindowContext.cs
+++ Launcher/LauncherWFP/Data/Context/MainWindowContext.cs
@@ -240,6 +240,7 @@
                 Properties.Settings.Default.IsOnDevelopBranch ?
                     Properties.Settings.Default.DevelopName :
                     Properties.Settings.Default.ReleaseName);
+            _iniManager = new Management.OpenRctIniManager();

             // Before update runs, let's see if openrct2 is running already.
             // this is a pretty nice quality-of-life feature to have.
@@ -313,9 +314,10 @@

                 // Create the INI file.
                 Management.OpenRctIniManager.Create();
-                _iniManager = new Management.OpenRctIniManager();
-                _iniManager.GamePath = Properties.Settings.Default.RctInstallDir;
-                _iniManager.Save();
+                var localManager = new Management.OpenRctIniManager();
+                localManager = new Management.OpenRctIniManager();
+                localManager.GamePath = Properties.Settings.Default.RctInstallDir;
+                localManager.Save();

             }
         }


Fuegt lokale Aenderungen und die aus GitHub zusammen.

--- CommandCanExecute/CommandCanExecute/MainViewModel.cs
+++ CommandCanExecute/CommandCanExecute/MainViewModel.cs
@@ -6,8 +6,7 @@
 {
     class MainViewModel : ViewModelBase
     {
-        private SpeichernCommand dateiSpeichernCommand;
-        private bool istSpeichernAktiv = false;
+        private SpeichernCommand dateiSpeichernCommand = null;

         public ICommand DateiSpeichernCommand
         {


fixing unhandled exception when no key found

--- DjToKey/Models/GlobalDictionary.cs
+++ DjToKey/Models/GlobalDictionary.cs
@@ -67,7 +67,14 @@
         /// <returns></returns>
         public object Get(string key)
         {
-            return dict[key];
+            try
+            {
+                return dict[key];
+            }
+            catch (KeyNotFoundException)
+            {
+                return null;
+            }
         }
     }
 }


Set include path as weell as file path when creating a new TU.

--- src/AST/TranslationUnit.cs
+++ src/AST/TranslationUnit.cs
@@ -19,6 +19,7 @@
         public TranslationUnit(string file) : this()
         {
             FilePath = file;
+            IncludePath = file;
         }

         /// Contains the macros present in the unit.


Mark a test that confirms a bug fix Fixes #9121

--- src/Compilers/CSharp/Test/Semantic/Semantics/PatternMatchingTests_Scope.cs
+++ src/Compilers/CSharp/Test/Semantic/Semantics/PatternMatchingTests_Scope.cs
@@ -988,7 +988,7 @@
             Assert.Equal("System.Int32", model.GetTypeInfo(x1Ref[0]).Type.ToTestDisplayString());
         }

-        [Fact]
+        [Fact, WorkItem(9121, "https://github.com/dotnet/roslyn/issues/9121")]
         public void ScopeOfPatternVariables_If_01()
         {
             var source =


Greater rescaling support

Greater rescaling support

--- src/Tesserae.cs
+++ src/Tesserae.cs
@@ -21,7 +21,9 @@
         public int width, height;

         // Temporary
-        public Map tmxMap;
+        public Map tmxMap;      // TMX data (try to remove this)
+        public Canvas canvas;   // Viewport details
+        public Tile tile;       // Tile element details

         public Mosaic(Game game, string mapName) : base(game)
         {
@@ -29,6 +31,10 @@
             tmxMap = new Map(mapName);
             width = tmxMap.width;
             height = tmxMap.height;
+
+            // Temporary code
+            canvas = new Canvas(game);
+            canvas.tHeight = 15;

             // Load spritesheets
             // Note: Currently path-based
@@ -98,10 +104,11 @@
                         if (id == 0) continue;

                         var position = new Vector2(
-                                            (float)(tmxMap.tileWidth * i),
-                                            (float)(tmxMap.tileHeight * j));
+                                    tmxMap.tileWidth * canvas.tileScale * i,
+                                    tmxMap.tileHeight * canvas.tileScale * j);
                         batch.Draw(spriteSheet[idSheet[id]], position,
-                            tileRect[id], Color.White);
+                            tileRect[id], Color.White, 0.0f, Vector2.Zero,
+                            canvas.tileScale, SpriteEffects.None, 0);
                     }
                 }
             }
@@ -129,8 +136,7 @@
         }
     }

-    // Don't worry about updating this information at the moment, just focus on
-    // integrating its data with Draw
+
     public class Canvas
     {
         // User-defined (or derived) quantities
@@ -141,10 +147,11 @@
         // Window-defined properties
         public int pWidth;          // Viewport width in pixels
         public int pHeight;         // Viewport height in pixels
-        public double aspectRatio;  // Viewport width-to-height ratio
+        public float aspectRatio;  // Viewport width-to-height ratio

         // Necessary?
         Game game;
+        public float tileScale = 3.0f;

         public Canvas(Game inGame)
         {
@@ -152,7 +159,10 @@

             pWidth = game.GraphicsDevice.Viewport.Bounds.Width;
             pHeight = game.GraphicsDevice.Viewport.Bounds.Height;
-            aspectRatio = (double)pWidth / (double)pHeight;
+            aspectRatio = (float)pWidth / (float)pHeight;
+
+            // Temp
+            tileScale = 3.0f;

             game.Window.ClientSizeChanged += new EventHandler<EventArgs>
                 (UpdateViewport);
@@ -164,10 +174,19 @@
             pHeight = game.GraphicsDevice.Viewport.Bounds.Height;
             aspectRatio = (float)pWidth / (float)pHeight;

+            tileScale = (float)pHeight / (float)(tHeight * 15);
+
             // Testing
             Console.WriteLine("Pixel Width: {0}", pWidth);
             Console.WriteLine("Pixel Height: {0}", pHeight);
             Console.WriteLine("Aspect Ratio: {0}", aspectRatio);
         }
     }
+
+
+    public class Tile
+    {
+        public int pWidth;      // Tile width in pixels
+        public int pHeight;     // Tile height in pixels
+    }
 }


Fix preview changes not working for new inline rename (#64264)

--- src/EditorFeatures/Core.Wpf/InlineRename/UI/Adornment/RenameFlyout.xaml.cs
+++ src/EditorFeatures/Core.Wpf/InlineRename/UI/Adornment/RenameFlyout.xaml.cs
@@ -94,14 +94,36 @@

         private void RenameFlyout_IsKeyboardFocusWithinChanged(object sender, DependencyPropertyChangedEventArgs e)
         {
-            if (!IsKeyboardFocusWithin)
+            // When previewing changes, focus will be lost and put
+            // into a preview changes window. If we're returning back
+            // to this UI, reset the flag to false. Otherwise, just ignore
+            // this focus change. No need to cancel in that case
+            if (_viewModel.PreviewChangesFlag)
+            {
+                if (IsKeyboardFocused)
+                {
+                    _viewModel.PreviewChangesFlag = false;
+                }
+
+                return;
+            }
+
+            if (!IsKeyboardFocused)
             {
                 _viewModel.Cancel();
             }
         }

         private void TextView_LostFocus(object sender, EventArgs e)
-            => _viewModel.Cancel();
+        {
+            // Preview changes is happening, no need to act on focus changes.
+            if (_viewModel.PreviewChangesFlag)
+            {
+                return;
+            }
+
+            _viewModel.Cancel();
+        }

         private void TextView_ViewPortChanged(object sender, EventArgs e)
             => PositionAdornment();