Visualización del login corregida

Visualización del login corregida

--- WebApp/Views/Shared/_Layout.cshtml
+++ WebApp/Views/Shared/_Layout.cshtml
@@ -14,48 +14,39 @@
             display: inline-flex;
         }

-        .fields, .loginbuttons {
+        .fields {
+            width: 75%;
             float: left;
-            height: 100px;
+            display: inline;
         }

-        .fields {
-            width: 75%;
-            height: auto;
-        }
-
-            .fields .field {
-                height: 40%;
+            .fields input {
+                float: right;
+                border: 0;
+                border-radius: 7px;
+                padding: 0 17px;
+                border-bottom: 5px solid #bdc3c7;
+                height: 30px;
+                font-family: 'Roboto',sans-serif;
+                color: #7f8c8d;
+                font-size: 19px;
+                margin-top: 5px;
+                margin-left: 5px;
             }

-        .field label {
-            float: left;
-            font-family: 'Holtwood One SC',serif;
-            color: #fff;
-            margin-top:7px;
-        }
-
-        .field input {
-            float: right;
-            border: 0;
-            border-radius: 7px;
-            padding: 0 17px;
-            border-bottom: 5px solid #bdc3c7;
-            height: 30px;
-            font-family: 'Roboto',sans-serif;
-            color: #7f8c8d;
-            font-size: 19px;
-            margin-top: 5px;
-        }
-
-        .loginbuttons {
-            width: 25%;
-        }
         #login img {
             top: -4px;
             display: inline-block;
             position: relative;
         }
+        .loginbuttons {
+            top: 5px;
+            position: relative;
+            float: left;
+        }
+            .loginbuttons img {
+                width: 30px;
+            }
     </style>

@@ -74,12 +65,8 @@

-

-                        Usuario:<input id="user" name="user" type="text">
-

-

-                        Clave:<input id="password" name="password" type="password">
-

+                    <input id="user" name="user" type="text" placeholder="Usuario">
+                    <input id="password" name="password" type="password" placeholder="Clave">

@@ -171,7 +158,7 @@
             $("body").niceScroll({ styler: "fb", cursorcolor: "#000", horizrailenabled: false, zindex: 9999 });
         });
         $("#login").on("click", function () {
-            $(".righthead").animate({ "right": "-500px" }, "slow", function () {
+            $(".righthead").animate({ "right": -$(window).width() + "px" }, "slow", function () {
                 $(".search").hide();
                 $(".login").show();
                 $(".righthead").animate({ "right": "0px" }, "slow");
@@ -179,7 +166,7 @@
             return false;
         });
         $("#loginstop").on("click", function () {
-            $(".righthead").animate({ "right": "-500px" }, "slow", function () {
+            $(".righthead").animate({ "right": -$(window).width() + "px" }, "slow", function () {
                 $(".login").hide();
                 $(".search").show();
                 $(".righthead").animate({ "right": "0px" }, "slow");


add missing comment

add missing comment

--- WordPressPCL/Utility/HttpHelper.cs
+++ WordPressPCL/Utility/HttpHelper.cs
@@ -81,6 +81,7 @@
         /// <paramref name="httpClient"/>
         /// </summary>
         /// <param name="httpClient">Http client which would be used for sending requests to the WordPress API endpoint.</param>
+        /// <param name="defaultPath">Relative path to standard API endpoints, defaults to "wp/v2/"</param>
         public HttpHelper(HttpClient httpClient, string defaultPath)
         {
             _httpClient = httpClient;


Be tolerant of template errors when loading a game in Edit mode

--- WorldModel/WorldModel/Templates.cs
+++ WorldModel/WorldModel/Templates.cs
@@ -36,7 +36,17 @@

         public string GetText(string t)
         {
-            if (!m_templateLookup.ContainsKey(t)) throw new Exception(string.Format("No template named '{0}'", t));
+            if (!m_templateLookup.ContainsKey(t))
+            {
+                if (m_worldModel.EditMode)
+                {
+                    return string.Format("{{UNKNOWN TEMPLATE: {0}}}", t);
+                }
+                else
+                {
+                    throw new Exception(string.Format("No template named '{0}'", t));
+                }
+            }
             return m_templateLookup[t].Fields[FieldDefinitions.Text];
         }


[FIXED] Removed postback from dropdown and popover toggle

--- yafsrc/YAF.Web/Controls/ThemeButton.cs
+++ yafsrc/YAF.Web/Controls/ThemeButton.cs
@@ -551,6 +551,11 @@
             }

             output.WriteAttribute("role", "button");
+
+            if (this.DataToggle.IsSet() && (this.DataToggle == "dropdown" || this.DataToggle == "popover"))
+            {
+                this.NavigateUrl = "#";
+            }

             output.WriteAttribute(
                 "href",


Fix newpp map command

Fix newpp map command

--- den0bot.Modules.Osu/ModBeatmap.cs
+++ den0bot.Modules.Osu/ModBeatmap.cs
@@ -75,8 +75,7 @@
 							message.Chat.Id,
 							map.GetFormattedMapInfo(beatmapLinkData.Mods),
 							Telegram.Bot.Types.Enums.ParseMode.Html,
-							0,
-							buttons);
+							replyMarkup: buttons);

 						if (sentMessage != null)
 						{
@@ -135,8 +134,7 @@
 					var json = new { Map = beatmapLinkData.ID.ToString(), Mods = beatmapLinkData.Mods.ToArray() };
 					try
 					{
-						var mapJson = await Web.PostJson("https://newpp.stanr.info/api/CalculateMap",
-							JsonConvert.SerializeObject(json));
+						var mapJson = await Web.PostJson("https://newpp.stanr.info/api/maps/calculate", JsonConvert.SerializeObject(json));
 						if (!string.IsNullOrEmpty(mapJson))
 						{
 							var map = JsonConvert.DeserializeObject<RebalanceMap>(mapJson);


[Mac] fix swapped keys in KeyboardUtil.GetXwtKey

--- Xwt.XamMac/Xwt.Mac/KeyboardUtil.cs
+++ Xwt.XamMac/Xwt.Mac/KeyboardUtil.cs
@@ -177,8 +177,8 @@
 				case '2': return Key.K2;
 				case '3': return Key.K3;
 				case '4': return Key.K4;
-				case '5': return Key.K6;
-				case '6': return Key.K5;
+				case '5': return Key.K5;
+				case '6': return Key.K6;
 				case '7': return Key.K7;
 				case '8': return Key.K8;
 				case '9': return Key.K9;


Refactored class

Refactored class

--- YinYang/Steam/SteamLoginHandler.cs
+++ YinYang/Steam/SteamLoginHandler.cs
@@ -10,62 +10,78 @@
 	{
 		private const string SteamClaimNamespace = "http://steamcommunity.com/openid/id/";
 		private const string FailureMessage = "Invalid Identity";
+
 		public async Task HandleRequest(HttpListenerContext context)
+		{
+			LightOpenID openID = InitializeOpenID(context);
+			switch (context.Request.Url.AbsolutePath)
+			{
+				case "/login":
+					await AuthenticationRedirect(context, openID);
+					break;
+
+				case "/login/landing":
+					await HandleLanding(context, openID);
+					break;
+			}
+		}
+
+		private static async Task AuthenticationRedirect(HttpListenerContext context, LightOpenID openID)
+		{
+			string s = await openID.GetAuthUrl("http://steamcommunity.com/openid/");
+			context.Response.Redirect(s);
+		}
+
+		private static LightOpenID InitializeOpenID(HttpListenerContext context)
+		{
+			var openID = new LightOpenID(context.Request.Url);
+			openID.Realm = new Uri(context.Request.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped));
+			openID.ReturnUrl = new Uri(openID.Realm, "/login/landing");
+			return openID;
+		}
+
+		private async Task HandleLanding(HttpListenerContext context, LightOpenID openID)
 		{
 			using (StreamWriter content = new StreamWriter(context.Response.OutputStream))
 			{
-				var openID = new LightOpenID(context.Request.Url);
-				openID.Realm = new Uri(context.Request.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped));
-				openID.ReturnUrl = new Uri(openID.Realm, "/login/landing");
-				switch (context.Request.Url.AbsolutePath)
+				bool valid = await openID.Validate();
+
+				if (!valid)
 				{
-					case "/login":
-						string s = await openID.GetAuthUrl("http://steamcommunity.com/openid/");
-						context.Response.Redirect(s);
-						break;
+					context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
+					await content.WriteAsync(FailureMessage);
+					return;
+				}

-					case "/login/landing":
-						bool valid = await openID.Validate();
+				if (openID.ClaimedID == null || !openID.ClaimedID.StartsWith(SteamClaimNamespace))
+				{
+					context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
+					await content.WriteAsync(FailureMessage);
+					return;
+				}

-						if (!valid)
-						{
-							context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
-							await content.WriteAsync(FailureMessage);
-							return;
-						}
+				long steamID64;
+				if (!long.TryParse(openID.ClaimedID.Substring(SteamClaimNamespace.Length), out steamID64))
+				{
+					context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
+					await content.WriteAsync(FailureMessage);
+					return;
+				}

-						if (openID.ClaimedID == null || !openID.ClaimedID.StartsWith(SteamClaimNamespace))
-						{
-							context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
-							await content.WriteAsync(FailureMessage);
-							return;
-						}
+				var steamID = new SteamID(steamID64);

-						long steamID64;
-						if (!long.TryParse(openID.ClaimedID.Substring(SteamClaimNamespace.Length), out steamID64))
-						{
-							context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
-							await content.WriteAsync(FailureMessage);
-							return;
-						}
+				if (!steamID.IsValid())
+				{
+					context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
+					await content.WriteAsync(FailureMessage);
+					return;
+				}

-						var steamID = new SteamID(steamID64);
-
-						if (!steamID.IsValid())
-						{
-							context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
-							await content.WriteAsync(FailureMessage);
-							return;
-						}
-
-						await content.WriteLineAsync($"Login accepted");
-						await content.WriteLineAsync($"Universe: {steamID.Universe}");
-						await content.WriteLineAsync($"Instance: {steamID.Instance}");
-						await content.WriteLineAsync($"Type: {steamID.Type}");
-						await content.WriteLineAsync($"AccountID: {steamID.AccountID}");
-
-						break;
-				}
+				await content.WriteLineAsync($"Login accepted");
+				await content.WriteLineAsync($"Universe: {steamID.Universe}");
+				await content.WriteLineAsync($"Instance: {steamID.Instance}");
+				await content.WriteLineAsync($"Type: {steamID.Type}");
+				await content.WriteLineAsync($"AccountID: {steamID.AccountID}");
 			}
 		}
 	}


Add solution to part 2 of day 1

Add solution to part 2 of day 1

Finds the position of the first character that causes Santa to enter the
basement (floor -1).

--- 2015/day-1/AdventOfCode.Day1/Program.cs
+++ 2015/day-1/AdventOfCode.Day1/Program.cs
@@ -32,6 +32,9 @@
             }

             int floor = 0;
+            int instruction = 0;
+
+            bool hasVisitedBasement = false;

             using (Stream stream = File.OpenRead(args[0]))
             {
@@ -42,6 +45,7 @@
                     while (!reader.EndOfStream)
                     {
                         ch = (char)reader.Read();
+                        instruction++;

                         switch (ch)
                         {
@@ -56,6 +60,15 @@
                             default:
                                 break;
                         }
+
+                        if (!hasVisitedBasement)
+                        {
+                            if (floor == -1)
+                            {
+                                hasVisitedBasement = true;
+                                Console.WriteLine("Santa first enters the basement after following instruction {0:N0}.", instruction);
+                            }
+                        }
                     }
                 }
             }


StreamExtensions 클래스에 대해 CS1591을 비활성화 시킵니다.

--- src/ReactiveMvvm/ReactiveMvvm/StreamExtensions.cs
+++ src/ReactiveMvvm/ReactiveMvvm/StreamExtensions.cs
@@ -3,6 +3,10 @@

 namespace ReactiveMvvm
 {
+    // TODO: StreamExtensions 클래스의 디자인이 성숙 단계에 이르면
+    // XML 주석을 추가하고 아래 pragma 지시문을 제거합니다.
+#pragma warning disable CS1591
+
     public static class StreamExtensions
     {
         public static void OnNext<TModel, TId>(


document on-disk scan

document on-disk scan

--- src/Sir.Store/NodeReader.cs
+++ src/Sir.Store/NodeReader.cs
@@ -175,24 +175,26 @@
                         }
                     }

-                    // we need to determine if we can traverse further left
+                    // We need to determine if we can traverse further left.
                     bool canGoLeft = cursor.Terminator == 0 || cursor.Terminator == 1;

                     if (canGoLeft)
                     {
-                        // there is a left and a right child or simply a left child
-                        // either way, next node in bitmap is the left child
+                        // There exists a left and a right child or just a left child.
+                        // Either way, we want to go left and the next node in bitmap is the left child.

                         cursor = ReadNode(indexStream, vectorStream);
                     }
                     else
                     {
-                        // there is no left child.
-
-                        if (pages.Count == 0) break;
-
+                        // There is no left child.
+
+                        if (pages.Count == 0)
+                            break; // There are no more pages.
+
+                        // There are more pages.
+                        // We can continue scanning by picking up at the first node of the next page.
                         indexStream.Seek(pages.Dequeue().offset, SeekOrigin.Begin);
-
                         cursor = ReadNode(indexStream, vectorStream);
                     }
                 }
@@ -215,30 +217,34 @@
                         }
                     }

-                    // we need to determine if we can traverse further to the right
+                    // We need to determine if we can traverse further to the right.

                     if (cursor.Terminator == 0)
                     {
-                        // there is a left and a right child
-                        // next node in bitmap is the left child
-                        // to find cursor's right child we must skip over the left tree
+                        // There exists a left and a right child.
+                        // Next node in bitmap is the left child.
+                        // To find cursor's right child we must skip over the left tree.

                         SkipTree(indexStream);
-
                         cursor = ReadNode(indexStream, vectorStream);
                     }
                     else if (cursor.Terminator == 2)
                     {
-                        // next node in bitmap is the right child
+                        // Next node in bitmap is the right child,
+                        // which is good because we want to go right.

                         cursor = ReadNode(indexStream, vectorStream);
                     }
                     else
                     {
-                        if (pages.Count == 0) break;
-
+                        // There is no right child.
+
+                        if (pages.Count == 0)
+                            break; // There are no more pages.
+
+                        // There are more pages.
+                        // We can continue scanning by picking up at the first node of the next page.
                         indexStream.Seek(pages.Dequeue().offset, SeekOrigin.Begin);
-
                         cursor = ReadNode(indexStream, vectorStream);
                     }
                 }


Fix typo on SyncReleases.Program.main

Fix typo on SyncReleases.Program.main

--- src/SyncReleases/Program.cs
+++ src/SyncReleases/Program.cs
@@ -69,7 +69,7 @@
                     return 0;
                 } catch (Exception ex) {
                     githubException = ex;
-                    Console.Error.WriteLine("Attemping to sync URL as remote RELEASES folder");
+                    Console.Error.WriteLine("Attempting to sync URL as remote RELEASES folder");
                 }

                 try {


[Cosmetics]  Hid Queries

[Cosmetics]  Hid Queries

--- src/XrmFramework.DeployUtils/WebResourceHelper.cs
+++ src/XrmFramework.DeployUtils/WebResourceHelper.cs
@@ -38,41 +38,29 @@

             service.OrganizationServiceProxy?.EnableProxyTypes();

-            var query = new QueryExpression(SolutionDefinition.EntityName);
-            query.ColumnSet.AddColumn(SolutionDefinition.Columns.UniqueName);
-            query.ColumnSet.AddColumn(SolutionDefinition.Columns.PublisherId);
-            query.ColumnSet.AddColumn(SolutionDefinition.Columns.IsManaged);
-            query.Criteria.AddCondition(SolutionDefinition.Columns.UniqueName, ConditionOperator.Equal, solutionName);
-            var result = service.RetrieveMultiple(query);
-
-            var solution = result.Entities.FirstOrDefault();
+            var solution = GetSolution(service, solutionName);
             if (solution == null)
             {
-                Console.WriteLine(@"Error : Solution not found : {0}", solutionName);
+                Console.WriteLine(@$"Error : Solution not found : {solutionName}");
                 return;
             }

             if (solution.GetAttributeValue<bool>(SolutionDefinition.Columns.IsManaged))
             {
-                Console.WriteLine(@"Error : Solution {0} is managed, no deployment possible.", solutionName);
+                Console.WriteLine(@$"Error : Solution {solutionName} is managed, no deployment possible.");
                 return;
             }

             var publisherId = solution.GetAttributeValue<EntityReference>(SolutionDefinition.Columns.PublisherId).Id;

-            query = new QueryExpression(PublisherDefinition.EntityName);
-            query.ColumnSet.AddColumn(PublisherDefinition.Columns.CustomizationPrefix);
-            query.Criteria.AddCondition(PublisherDefinition.Columns.Id, ConditionOperator.Equal, publisherId);
-            result = service.RetrieveMultiple(query);
-
-            var publisher = result.Entities.FirstOrDefault();
+            var publisher = GetPublisher(service, publisherId);
             if (publisher == null)
             {
-                Console.WriteLine(@"Error : Publisher not found : {0}", solutionName);
+                Console.WriteLine(@$"Error : Publisher not found : {solutionName}");
                 return;
             }
             var prefix = publisher.GetAttributeValue<string>(PublisherDefinition.Columns.CustomizationPrefix);
-            Console.WriteLine(" ==> Prefix : {0}", prefix);
+            Console.WriteLine($" ==> Prefix : {prefix}");

             DirectoryInfo root = new DirectoryInfo(webresourcesPath);
             var resourcesToPublish = string.Empty;
@@ -82,7 +70,7 @@
                     .Select(file => new FileInfo(file))
                     .Where(fi => IsWebResource(fi.Extension))
                     .Select(fi => new WebResource(fi, root, prefix))
-                .ToList();
+                    .ToList();

             foreach (var fi in files)
             {
@@ -158,7 +146,9 @@
         private static WebResource GetWebResource(string name, IOrganizationService service)
         {
             var query = new QueryExpression(WebResourceDefinition.EntityName);
-            query.ColumnSet.AddColumns(WebResourceDefinition.Columns.Content, WebResourceDefinition.Columns.DependencyXml, WebResourceDefinition.Columns.Name);
+            query.ColumnSet.AddColumns(WebResourceDefinition.Columns.Content,
+                                       WebResourceDefinition.Columns.DependencyXml,
+                                       WebResourceDefinition.Columns.Name);
             query.Criteria.AddCondition(WebResourceDefinition.Columns.Name, ConditionOperator.Equal, name);
             var result = service.RetrieveMultiple(query);

@@ -270,5 +260,37 @@
                     return false;
             }
         }
+
+        /// <summary>
+        /// Gets the Solution
+        /// </summary>
+        /// <param name="service"></param>
+        /// <param name="solutionName"></param>
+        /// <returns></returns>
+        private static Entity GetSolution(CrmServiceClient service, string solutionName)
+        {
+            var query = new QueryExpression(SolutionDefinition.EntityName);
+            query.ColumnSet.AddColumns(SolutionDefinition.Columns.UniqueName,
+                                       SolutionDefinition.Columns.PublisherId,
+                                       SolutionDefinition.Columns.IsManaged);
+            query.Criteria.AddCondition(SolutionDefinition.Columns.UniqueName, ConditionOperator.Equal, solutionName);
+
+            return service.RetrieveMultiple(query).Entities.FirstOrDefault();
+        }
+
+        /// <summary>
+        /// Gets the Publisher
+        /// </summary>
+        /// <param name="service"></param>
+        /// <param name="publisherId"></param>
+        /// <returns></returns>
+        private static Entity GetPublisher(CrmServiceClient service, Guid publisherId)
+        {
+            var query = new QueryExpression(PublisherDefinition.EntityName);
+            query.ColumnSet.AddColumn(PublisherDefinition.Columns.CustomizationPrefix);
+            query.Criteria.AddCondition(PublisherDefinition.Columns.Id, ConditionOperator.Equal, publisherId);
+
+            return service.RetrieveMultiple(query).Entities.FirstOrDefault();
+        }
     }
 }


removing the legacy naming

removing the legacy naming

--- src/ImTools/ImTools.cs
+++ src/ImTools/ImTools.cs
@@ -209,8 +209,8 @@
     }

     /// Wraps the `T` in a named `TBox` class in a one-line declaration,
-    /// so the <c><![CDATA[class Name : Data<Name, string>]]></c>
-    /// is different from the <c><![CDATA[class Address : Data<Address, string>]]></c>
+    /// so the <c><![CDATA[class Name : Box<Name, string>]]></c>
+    /// is different from the <c><![CDATA[class Address : Box<Address, string>]]></c>
     public abstract class Box<TBox, T> : I<T>, IEquatable<Box<TBox, T>>
         where TBox : Box<TBox, T>, new()
     {
@@ -232,7 +232,7 @@
         public override int GetHashCode() => EqualityComparer<T>.Default.GetHashCode(Value);

         /// <inheritdoc />
-        public override string ToString() => UnionTools.ToString<TBox, T>(Value, "data(");
+        public override string ToString() => UnionTools.ToString<TBox, T>(Value, "box(");
     }

     /// Unnamed discriminated union (with Empty name), shorter name for simplified inline usage


moar moar

moar moar

--- src/ImTools/ImTools.cs
+++ src/ImTools/ImTools.cs
@@ -5757,6 +5757,7 @@
             private ImMap<K, V>.Branch2Plus1 _b21LeftWasEnumerated;

             private ImMap<K, V>.Entry _a, _b, _c, _d, _e, _f, _g, _h;
+            private ImMap<K, V>.Entry _ha; // is for possibly HashConflictingEntries
             private ImMapEntry<K, V> _current;

             /// <inheritdoc />
@@ -5797,7 +5798,7 @@
                         goto Label0;
                     case 1:
                         // end of enumeration
-                        _state = -1;
+                        _state = -1;
                         _current = null;
                         return false;
                     case 2:
@@ -5822,7 +5823,7 @@
                     case 9:
                         return SetCurrentAndState(_g, 10, 9);
                     case 10:
-                        if (_h == null)
+                        if (_h == null)
                         {
                             _state = -1;
                             goto Label2;
@@ -5900,6 +5901,10 @@
                         _a = null;
                         _nextBranch = null;
                         goto Label0;
+                    case 41:
+                        goto HashConflictingEntryLabel0;
+                    case 42:
+                        goto HashConflictingEntryLabel1;
                     default:
                         return false;
                 }
@@ -5940,12 +5945,9 @@
                     goto AllLeafsAndEntryLabel;

                 _g = null; _h = null;
+            HashConflictingEntryLabel0:
                 if (_b21LeftWasEnumerated != null)
-                {
-                    _current = _b21LeftWasEnumerated.B.MidEntry;
-                    _state = 2;
-                    return true;
-                }
+                    return SetCurrentAndState(_b21LeftWasEnumerated.B.MidEntry, 2, 41);

                 var branch2Plus1 = (ImMap<K, V>.Branch2Plus1)_map;
                 var b21b = branch2Plus1.B;
@@ -6040,11 +6042,14 @@
                             }
                         }
                     }
-
-                    _current = e0;
-                    _state = 3;
-                    return true;
-                }
+                    _ha = e0;
+                }
+            HashConflictingEntryLabel1:
+                var res = SetCurrentAndState(_ha, 3, 42);
+                if (_state == 3)
+                    _ha = null; // reset hash conflicting thing if we done with it
+                return res;
+
             Label2:
                 _a = null; _b = null; _c = null; _d = null; _e = null; _f = null;

@@ -6209,14 +6214,14 @@
                         }
                     }

-                    _current = e0;
+                    _current = e0;
                     _state = 32;
                     return true;
                 }

                 if (leafOrEntryMap is ImMap<K, V>.Entry e)
                 {
-                    _current = e;
+                    _current = e;
                     _state = 39;
                     return true;
                 }


added disposing to shared memory shenanigans

--- raw/RawMemoryMappedFile.cs
+++ raw/RawMemoryMappedFile.cs
@@ -20,7 +20,7 @@
         Author = "microdee",
         AutoEvaluate = true
         )]
-    public class RawMemoryMappedFile : IPluginEvaluate
+    public class RawMemoryMappedFile : IPluginEvaluate, IDisposable
     {
         [Input("Name")]
         public ISpread<string> FName;
@@ -99,6 +99,13 @@
                 FOutput.Flush(true);
             }
         }
+        public void Dispose()
+        {
+            foreach (var mmf in _mmfs.Values)
+            {
+                mmf.Dispose();
+            }
+        }
     }

     [PluginInfo(
@@ -108,7 +115,7 @@
         Author = "microdee",
         AutoEvaluate = true
     )]
-    public class RawCreateMemoryMappedFile : IPluginEvaluate
+    public class RawCreateMemoryMappedFile : IPluginEvaluate, IDisposable
     {
         [Input("Name")]
         public ISpread<string> FName;
@@ -150,6 +157,14 @@
                 FMmf[i] = mmf;
             }
         }
+
+        public void Dispose()
+        {
+            foreach (var mmf in _mmfs.Values)
+            {
+                mmf.Dispose();
+            }
+        }
     }

     [PluginInfo(
@@ -159,7 +174,7 @@
         Author = "microdee",
         AutoEvaluate = true
     )]
-    public class RawCreateMutex : IPluginEvaluate
+    public class RawCreateMutex : IPluginEvaluate, IDisposable
     {
         [Input("Name")]
         public ISpread<string> NameIn;
@@ -197,6 +212,14 @@
                 }

                 MutexOut[i] = mutex;
+            }
+        }
+
+        public void Dispose()
+        {
+            foreach (var mutex in _mutexes.Values)
+            {
+                mutex.Dispose();
             }
         }
     }


Consistent call signatures

Consistent call signatures

--- AngleSharp/Parser/Html/HtmlTokenizer.cs
+++ AngleSharp/Parser/Html/HtmlTokenizer.cs
@@ -192,7 +192,7 @@
                         break;

                     case Symbols.LessThan:
-                        return TagOpen();
+                        return TagOpen(GetNext());

                     case Symbols.Null:
                         RaiseErrorOccurred(HtmlParseError.Null);
@@ -240,7 +240,7 @@
                         if (c == Symbols.Solidus)
                         {
                             _stringBuffer.Clear();
-                            return RCDataEndTag();
+                            return RCDataEndTag(GetNext());
                         }

                         _textBuffer.Append(Symbols.LessThan);
@@ -266,11 +266,10 @@
         /// <summary>
         /// See 8.2.4.12 RCDATA end tag open state
         /// </summary>
-        /// <returns>The emitted token.</returns>
-        HtmlToken RCDataEndTag()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        /// <returns>The emitted token.</returns>
+        HtmlToken RCDataEndTag(Char c)
+        {
             if (c.IsUppercaseAscii())
             {
                 _stringBuffer.Clear().Append(Char.ToLower(c));
@@ -347,7 +346,7 @@
                 switch (c)
                 {
                     case Symbols.LessThan:
-                        return RawtextLT();
+                        return RawtextLT(GetNext());

                     case Symbols.Null:
                         RaiseErrorOccurred(HtmlParseError.Null);
@@ -369,14 +368,13 @@
         /// <summary>
         /// See 8.2.4.14 RAWTEXT less-than sign state
         /// </summary>
-        HtmlToken RawtextLT()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        HtmlToken RawtextLT(Char c)
+        {
             if (c == Symbols.Solidus)
             {
                 _stringBuffer.Clear();
-                return RawtextEndTag();
+                return RawtextEndTag(GetNext());
             }
             else
             {
@@ -388,10 +386,9 @@
         /// <summary>
         /// See 8.2.4.15 RAWTEXT end tag open state
         /// </summary>
-        HtmlToken RawtextEndTag()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        HtmlToken RawtextEndTag(Char c)
+        {
             if (c.IsUppercaseAscii())
             {
                 _stringBuffer.Clear().Append(Char.ToLower(c));
@@ -460,10 +457,9 @@
         /// <summary>
         /// See 8.2.4.68 CDATA section state
         /// </summary>
-        HtmlToken CData()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        HtmlToken CData(Char c)
+        {
             while (true)
             {
                 if (c == Symbols.EndOfFile)
@@ -619,10 +615,9 @@
         /// <summary>
         /// See 8.2.4.8 Tag open state
         /// </summary>
-        HtmlToken TagOpen()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        HtmlToken TagOpen(Char c)
+        {
             if (c == Symbols.Solidus)
             {
                 return TagEnd(GetNext());
@@ -641,7 +636,7 @@
             }
             else if (c == Symbols.ExclamationMark)
             {
-                return MarkupDeclaration();
+                return MarkupDeclaration(GetNext());
             }
             else if (c == Symbols.QuestionMark)
             {
@@ -765,24 +760,23 @@
         /// <summary>
         /// See 8.2.4.45 Markup declaration open state
         /// </summary>
-        HtmlToken MarkupDeclaration()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        HtmlToken MarkupDeclaration(Char c)
+        {
             if (ContinuesWith("--"))
             {
                 Advance();
-                return CommentStart();
+                return CommentStart(GetNext());
             }
             else if (ContinuesWith(Tags.Doctype))
             {
                 Advance(6);
-                return Doctype();
+                return Doctype(GetNext());
             }
             else if (_acceptsCharacterData && ContinuesWith("[CDATA[", ignoreCase: false))
             {
                 Advance(6);
-                return CData();
+                return CData(GetNext());
             }
             else
             {
@@ -830,15 +824,15 @@
         /// <summary>
         /// See 8.2.4.46 Comment start state
         /// </summary>
-        HtmlToken CommentStart()
-        {
-            var c = GetNext();
+        /// <param name="c">The next input character.</param>
+        HtmlToken CommentStart(Char c)
+        {
             _stringBuffer.Clear();

             switch (c)
             {
                 case Symbols.Minus:
-                    return CommentDashStart();
+                    return CommentDashStart(GetNext());
                 case Symbols.Null:
                     RaiseErrorOccurred(HtmlParseError.Null);
                     _stringBuffer.Append(Symbols.Replacement);
@@ -862,10 +856,9 @@
         /// <summary>
         /// See 8.2.4.47 Comment start dash state
         /// </summary>
-        HtmlToken CommentDashStart()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        HtmlToken CommentDashStart(Char c)
+        {
             switch (c)
             {
                 case Symbols.Minus:
@@ -902,7 +895,7 @@
                 switch (c)
                 {
                     case Symbols.Minus:
-                        var result = CommentDashEnd();
+                        var result = CommentDashEnd(GetNext());

                         if (result != null)
                             return result;
@@ -929,10 +922,9 @@
         /// <summary>
         /// See 8.2.4.49 Comment end dash state
         /// </summary>
-        HtmlToken CommentDashEnd()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        HtmlToken CommentDashEnd(Char c)
+        {
             switch (c)
             {
                 case Symbols.Minus:
@@ -971,7 +963,7 @@
                         return null;
                     case Symbols.ExclamationMark:
                         RaiseErrorOccurred(HtmlParseError.CommentEndedWithEM);
-                        return CommentBangEnd();
+                        return CommentBangEnd(GetNext());
                     case Symbols.Minus:
                         RaiseErrorOccurred(HtmlParseError.CommentEndedWithDash);
                         _stringBuffer.Append(Symbols.Minus);
@@ -993,15 +985,14 @@
         /// <summary>
         /// See 8.2.4.51 Comment end bang state
         /// </summary>
-        HtmlToken CommentBangEnd()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        HtmlToken CommentBangEnd(Char c)
+        {
             switch (c)
             {
                 case Symbols.Minus:
                     _stringBuffer.Append(Symbols.Minus).Append(Symbols.Minus).Append(Symbols.ExclamationMark);
-                    return CommentDashEnd();
+                    return CommentDashEnd(GetNext());
                 case Symbols.GreaterThan:
                     _state = HtmlParseMode.PCData;
                     break;
@@ -1028,10 +1019,9 @@
         /// <summary>
         /// See 8.2.4.52 DOCTYPE state
         /// </summary>
-        HtmlToken Doctype()
-        {
-            var c = GetNext();
-
+        /// <param name="c">The next input character.</param>
+        HtmlToken Doctype(Char c)
+        {
             if (c.IsSpaceCharacter())
             {
                 return DoctypeNameBefore(GetNext());


LogFactory - Renamed _logsEnabled to _supendLoggingCounter (#4842)

--- src/NLog/LogFactory.cs
+++ src/NLog/LogFactory.cs
@@ -73,8 +73,7 @@
         internal LogMessageFormatter SingleTargetMessageFormatter;
         private LogLevel _globalThreshold = LogLevel.MinLevel;
         private bool _configLoaded;
-        // TODO: logsEnabled property might be possible to be encapsulated into LogFactory.LogsEnabler class.
-        private int _logsEnabled;
+        private int _supendLoggingCounter;

         /// <summary>
         /// Overwrite possible file paths (including filename) for possible NLog config files.
@@ -113,7 +112,7 @@
         /// </summary>
         public LogFactory()
 #if !NETSTANDARD1_3
-            : this(new LoggingConfigurationWatchableFileLoader(DefaultAppEnvironment))  // TODO NLog 5 -Move file-watcher logic into XmlLoggingConfiguration
+            : this(new LoggingConfigurationWatchableFileLoader(DefaultAppEnvironment))  // TODO Move file-watcher logic into XmlLoggingConfiguration
 #else
             : this(new LoggingConfigurationFileLoader(DefaultAppEnvironment))
 #endif
@@ -793,8 +792,8 @@
         {
             lock (_syncRoot)
             {
-                _logsEnabled--;
-                if (_logsEnabled == -1)
+                _supendLoggingCounter++;
+                if (_supendLoggingCounter == 1)
                 {
                     ReconfigExistingLoggers();
                 }
@@ -812,8 +811,8 @@
         {
             lock (_syncRoot)
             {
-                _logsEnabled++;
-                if (_logsEnabled == 0)
+                _supendLoggingCounter--;
+                if (_supendLoggingCounter == 0)
                 {
                     ReconfigExistingLoggers();
                 }
@@ -829,7 +828,7 @@
         /// than or equal to <see cref="SuspendLogging"/> calls.</remarks>
         public bool IsLoggingEnabled()
         {
-            return _logsEnabled >= 0;
+            return _supendLoggingCounter <= 0;
         }

         /// <summary>
@@ -1291,7 +1290,6 @@

             public List<Logger> GetLoggers()
             {
-                // TODO: Test if loggerCache.Values.ToList<Logger>() can be used for the conversion instead.
                 List<Logger> values = new List<Logger>(_loggerCache.Count);

                 foreach (var item in _loggerCache)


#1041 The 'difficulty stars' are showing higher.

--- unity/Assets/Scripts/UI/Screens/QuestSelectionScreen.cs
+++ unity/Assets/Scripts/UI/Screens/QuestSelectionScreen.cs
@@ -1089,14 +1089,14 @@

                     ui = new UIElement(scrollArea.GetScrollTransform());
                     difficulty_string_width = ui.GetStringWidth(difficulty_symbol + difficulty_symbol + difficulty_symbol + difficulty_symbol + difficulty_symbol, font_size);
-                    ui.SetLocation(UIScaler.GetHCenter() + (difficulty_text_offset - 5.5f), top_text_y + 0.1f, difficulty_string_width+1, 1);
+                    ui.SetLocation(UIScaler.GetHCenter() + (difficulty_text_offset - 5.5f), top_text_y + 0.1f, difficulty_string_width, 1);
                     ui.SetText(difficulty_symbol + difficulty_symbol + difficulty_symbol + difficulty_symbol + difficulty_symbol, grey_transparent_text);
                     ui.SetTextAlignment(TextAnchor.LowerLeft);
                     ui.SetBGColor(Color.clear);
                     ui.SetFontSize(font_size);

                     UIElementCropped uic = new UIElementCropped(scrollArea.GetScrollTransform());
-                    uic.SetLocation(UIScaler.GetHCenter() + (difficulty_text_offset - 5.5f), top_text_y + 0.1f, difficulty_string_width + 1, 1);
+                    uic.SetLocation(UIScaler.GetHCenter() + (difficulty_text_offset - 5.5f), top_text_y + 0.1f, difficulty_string_width, 1);
                     uic.SetText(difficulty_symbol + difficulty_symbol + difficulty_symbol + difficulty_symbol + difficulty_symbol, Color.black);
                     uic.SetTextAlignment(TextAnchor.LowerLeft);
                     uic.SetBGColor(Color.clear);


Use nameof

Use nameof

--- src/Shience/Science.cs
+++ src/Shience/Science.cs
@@ -14,11 +14,11 @@
         {
             if (string.IsNullOrWhiteSpace(testName))
             {
-                throw new ArgumentNullException("testName");
+                throw new ArgumentNullException(nameof(testName));
             }
             if (publisher == null)
             {
-                throw new ArgumentNullException("publisher");
+                throw new ArgumentNullException(nameof(publisher));
             }

             _testName = testName;
@@ -39,7 +39,7 @@
         {
             if (control == null)
             {
-                throw new ArgumentNullException("control");
+                throw new ArgumentNullException(nameof(control));
             }

             //If candidate is null, don't do any science


Update Program.cs

Update Program.cs

--- src/SvgDemo/Program.cs
+++ src/SvgDemo/Program.cs
@@ -350,7 +350,7 @@
                 WriteLine($"Path: {path}", ConsoleColor.Black);

                 var document = SvgDocument.Open<SvgDocument>(path, null);
-                document.FlushStyles();
+                document.FlushStyles(true);
                 PrintFragment(document);
             }
         }


[WIP] remove Lighting debug infos

[WIP] remove Lighting debug infos

--- Assets/Paradigms/SearchAndFind/Trial.cs
+++ Assets/Paradigms/SearchAndFind/Trial.cs
@@ -214,17 +214,17 @@

         protected virtual void SetLightningOn(PathInMaze path, beMobileMaze maze)
         {
-            UnityEngine.Debug.Log(string.Format("Try enabling lights on Path: {0} in Maze: {1}",path.ID, maze.name));
+            // UnityEngine.Debug.Log(string.Format("Try enabling lights on Path: {0} in Maze: {1}",path.ID, maze.name));

-
-            #region stashed
-
             var currentElement = path.PathAsLinkedList.First;

             int globalRotation = 0;

             do
             {
+
+                // TODO: special case last element!
+
                 var previousElement = currentElement.Previous;

                 var nextElement = currentElement.Next;
@@ -246,7 +246,7 @@

                 globalRotation = (globalRotation + (int) turningAngle) % 360;

-                UnityEngine.Debug.Log(string.Format("From {2} to {3} ## Current Angle: {0} ## GlobalRotation {1}", turningAngle, globalRotation, currentElementsPosition, nextPathElementsPosition));
+                //UnityEngine.Debug.Log(string.Format("From {2} to {3} ## Current Angle: {0} ## GlobalRotation {1}", turningAngle, globalRotation, currentElementsPosition, nextPathElementsPosition));

                 var topLight = currentElement.Value.Unit.GetComponentInChildren<TopLighting>();

@@ -260,7 +260,6 @@
                 currentElement = currentElement.Next;

             } while (currentElement.Next != null);
-            #endregion
         }

         private void ChangeLightningOn(TopLighting light, PathElement current, int globalRotation)
@@ -292,9 +291,9 @@

             var fromDirectionPanelName = OrientationDefinition.Current.GetDirectionNameFromEuler(globalRotation + rotationOffset);

-            UnityEngine.Debug.Log(string.Format("From Direction: {0} ## To direction: {1}", fromDirectionPanelName, toDirectionPanelName));
-
-            // Enable only for open walls
+            // UnityEngine.Debug.Log(string.Format("From Direction: {0} ## To direction: {1}", fromDirectionPanelName, toDirectionPanelName));
+
+            // Enable only for open walls and the direction

             foreach (var lightPanel in lightChildren)
             {


Weapon accessor

Weapon accessor

--- Assets/Scripts/Fighters/FighterStats.cs
+++ Assets/Scripts/Fighters/FighterStats.cs
@@ -50,7 +50,7 @@
 #region Weapons
         private readonly List<Weapon> _weapons = new List<Weapon>();

-        public int WeaponCount => _weapons.Count;
+        public IReadOnlyCollection<Weapon> Weapons => _weapons;
 #endregion

 #region Specials
@@ -175,7 +175,7 @@
             builder.AppendLine($"Health: {CurrentHealth} / {DataManager.Instance.GameData.Fighter.MaxHealth} ({IsDead})");
             builder.AppendLine(Brain?.ToString());
             builder.AppendLine(Armor.ToString());
-            builder.AppendLine($"Weapons ({WeaponCount}):");
+            builder.AppendLine($"Weapons:");
             foreach(Weapon weapon in _weapons) {
                 builder.AppendLine(weapon.ToString());
             }


Remove confined cursor

Remove confined cursor

--- Assets/Scripts/Global/GameController.cs
+++ Assets/Scripts/Global/GameController.cs
@@ -45,7 +45,7 @@
 		instance = this;

 		Cursor.visible = !disableCursor;
-        Cursor.lockState = CursorLockMode.Confined;
+        //Cursor.lockState = CursorLockMode.Confined;
         Application.targetFrameRate = 60;
         AudioListener.pause = false;
         SceneManager.sceneLoaded += onSceneLoaded;


Added HasAction

Added HasAction

--- Assets/iOS4Unity/UILocalNotification.cs
+++ Assets/iOS4Unity/UILocalNotification.cs
@@ -88,6 +88,12 @@
 //			set;
 //		}

+        public bool HasAction
+        {
+            get { return ObjC.MessageSendBool(Handle, "hasAction"); }
+            set { ObjC.MessageSend(Handle, "setHasAction:", value); }
+        }
+
 		public string SoundName
         {
             get { return ObjC.MessageSendString(Handle, "soundName"); }


unity client bugix: works if component re-awakened

this happens when preserving the component between scene reloads.

--- client_unity/Assets/Code/PapikaClient.cs
+++ client_unity/Assets/Code/PapikaClient.cs
@@ -49,22 +49,23 @@
         /// Unity Awake()
         /// </summary>
         private void Awake() {
+            // this may be called multiple times if scene gets reloaded, don't reinitialize!
+
             // Process editor parameters or assume user will call initialize with them later.
-            if (string.IsNullOrEmpty(BaseUri) && string.IsNullOrEmpty(ReleaseId) && !string.IsNullOrEmpty(ReleaseKey)) {
+            if (this.config == null && !(string.IsNullOrEmpty(BaseUri) || string.IsNullOrEmpty(ReleaseId) || string.IsNullOrEmpty(ReleaseKey))) {
                 this.config = new ClientArgs(new Uri(BaseUri), new Guid(ReleaseId), ReleaseKey);
-            } else {
-                this.config = null;
-            }
-
-            this.eventsToLog = new List<object>();
-            this.sessionSequenceCounter = 1;
-            this.sessionId = null;
-            this.sessionKey = null;
-            this.isFlushEventsLocked = false;
-            this.taskIdCounter = 1;
-            this.wasStartSessionCalled = false;
-
-            this.Root = new TaskLogger(null, logEvent, getTaskId);
+            }
+
+            if (this.eventsToLog == null) {
+                this.eventsToLog = new List<object>();
+                this.sessionSequenceCounter = 1;
+                this.sessionId = null;
+                this.sessionKey = null;
+                this.isFlushEventsLocked = false;
+                this.taskIdCounter = 1;
+                this.wasStartSessionCalled = false;
+                this.Root = new TaskLogger(null, logEvent, getTaskId);
+            }
         }

         /// <summary>


优化Injection代码，提高健壮性

优化Injection代码，提高健壮性

--- Assets/ToLua/Injection/Editor/ToLuaInjectionHelper.cs
+++ Assets/ToLua/Injection/Editor/ToLuaInjectionHelper.cs
@@ -104,15 +104,7 @@
             }

             var baseTypeDef = baseType.Resolve();
-            baseMethodDef = baseTypeDef.Methods.FirstOrDefault(method =>
-            {
-                return method.Name == target.Name
-                    && target.Parameters
-                        .Select(param => param.ParameterType.FullName)
-                        .SequenceEqual(method.Parameters.Select(param => param.ParameterType.FullName))
-                    && method.ReturnType.FullName == target.ReturnType.FullName;
-            });
-
+            baseMethodDef = MetadataResolver.GetMethod(baseTypeDef.Methods, target);
             if (baseMethodDef != null && !baseMethodDef.IsAbstract)
             {
                 if (baseType.IsGenericInstance)


using of Load method for materializing

using of Load method for materializing

--- ATPTennisStat/ATPTennisStat.Repositories/EfRepository.cs
+++ ATPTennisStat/ATPTennisStat.Repositories/EfRepository.cs
@@ -33,8 +33,8 @@

         public IEnumerable<TEntity> GetAll()
         {
-            var materializingDbSet = this.dbSet.ToList();
-            //working with in memory objects
+            this.dbSet.Load();
+
             return this.dbSet.Local;

         }


Use camera,collider pairs

Use camera,collider pairs

--- Assets/MixedRealityToolkit/Utilities/CameraFOVChecker.cs
+++ Assets/MixedRealityToolkit/Utilities/CameraFOVChecker.cs
@@ -17,7 +17,7 @@
         // Help to clear caches when new frame runs
         static private int inFOVConeLastCalculatedFrame = -1;
         // Map from grabbable => is the grabbable in FOV for this frame. Cleared every frame
-        private static Dictionary<Collider, bool> inFOVConeColliderCache = new Dictionary<Collider, bool>();
+        private static Dictionary<(Collider collider, Camera camera), bool> inFOVConeColliderCache = new Dictionary<(Collider collider, Camera camera), bool>();
         // List of corners shared across all sphere pointer query instances --
         // used to store list of corners for a bounds. Shared and static
         // to avoid allocating memory each frame
@@ -36,13 +36,14 @@
             {
                 return false;
             }
+
             if (inFOVConeLastCalculatedFrame != Time.frameCount)
             {
                 inFOVConeColliderCache.Clear();
                 inFOVConeLastCalculatedFrame = Time.frameCount;
             }
-
-            if (inFOVConeColliderCache.TryGetValue(myCollider, out bool result))
+            var cameraColliderPair = (collider: myCollider, camera: cam);
+            if (inFOVConeColliderCache.TryGetValue(cameraColliderPair, out bool result))
             {
                 Debug.Log($"Cache hit! Returning {result}");
                 return result;
@@ -58,7 +59,7 @@
                 var corner = inFOVConeBoundsCornerPoints[i];
                 if (cam.IsInFOVCone(corner, 0))
                 {
-                    inFOVConeColliderCache.Add(myCollider, true);
+                    inFOVConeColliderCache.Add(cameraColliderPair, true);
                     return true;
                 }

@@ -77,7 +78,7 @@
                 && yMin <= cameraPos.y && cameraPos.y <= yMax
                 && zMin <= cameraPos.z && cameraPos.z <= zMax;

-            inFOVConeColliderCache.Add(myCollider, result);
+            inFOVConeColliderCache.Add(cameraColliderPair, result);

             return result;
         }


Show disabled build options in gray

Show disabled build options in gray

--- Assets/NativePluginBuilder/Editor/NativePluginBuilder.cs
+++ Assets/NativePluginBuilder/Editor/NativePluginBuilder.cs
@@ -33,6 +33,25 @@
 					_foldoutBold.fontStyle = FontStyle.Bold;
 				}
 				return _foldoutBold;
+			}
+		}
+		private static GUIStyle _foldoutBoldDisabled;
+
+		private static GUIStyle foldoutBoldDisabled {
+			get {
+				if (_foldoutBoldDisabled == null) {
+					_foldoutBoldDisabled = new GUIStyle (EditorStyles.foldout);
+					_foldoutBoldDisabled.fontStyle = FontStyle.Bold;
+					_foldoutBoldDisabled.normal.textColor = Color.gray;
+					_foldoutBoldDisabled.active.textColor = Color.gray;
+					_foldoutBoldDisabled.hover.textColor = Color.gray;
+					_foldoutBoldDisabled.focused.textColor = Color.gray;
+					_foldoutBoldDisabled.onActive.textColor = Color.gray;
+					_foldoutBoldDisabled.onHover.textColor = Color.gray;
+					_foldoutBoldDisabled.onNormal.textColor = Color.gray;
+					//_foldoutBoldDisabled.onFocused.textColor = Color.gray;
+				}
+				return _foldoutBoldDisabled;
 			}
 		}

@@ -358,7 +377,7 @@
 			for (int i = 0; i < buildOptions.Count; i++) {

 				buildOptions [i].foldoutAnimator.target = EditorGUILayout.Foldout (buildOptions [i].foldoutAnimator.target,
-					buildOptions [i].ShortName, true, foldoutBold);
+					buildOptions [i].ShortName, true, buildOptions [i].isEnabled ? foldoutBold : foldoutBoldDisabled);

 				if (EditorGUILayout.BeginFadeGroup (buildOptions [i].foldoutAnimator.faded)) {
 					EditorGUI.indentLevel++;


Formatting

Formatting

--- Automatron/Assets/Automatron/Editor/SystemAutomations.cs
+++ Automatron/Assets/Automatron/Editor/SystemAutomations.cs
@@ -6,7 +6,6 @@

 namespace TNRD.Automatron
 {
-
     public abstract class ConditionalAutomation : Automation {

         public ConditionalLine LineOut2 { get; set; }


Fix unable to upload blocks if the world smaller than the area

--- BotBits/Packages/Blocks/BlockAreaEnumerableExtensions.cs
+++ BotBits/Packages/Blocks/BlockAreaEnumerableExtensions.cs
@@ -39,8 +39,8 @@
             if (world.Width > area.Width || world.Height > area.Height)
                 throw new ArgumentException("The world is too big for this area.", "world");

-            for (var y = area.Top; y <= area.Bottom; y++)
-                for (var x = area.Left; x <= area.Right; x++)
+            for (var y = area.Top; y < area.Top + world.Height; y++)
+                for (var x = area.Left; x < area.Left + world.Width; x++)
                 {
                     blockArea.Blocks.Place(x, y, world.Foreground[x - area.Left, y - area.Top]);
                     blockArea.Blocks.Place(x, y, world.Background[x - area.Left, y - area.Top]);


Fixed "Home" link on AddressBar. It now stays on the same branch.

--- Bonobo.Git.Server/Views/Repository/_AddressBar.cshtml
+++ Bonobo.Git.Server/Views/Repository/_AddressBar.cshtml
@@ -2,7 +2,7 @@
     var path = ViewData["path"] as string;

-        @Html.ActionLink(Resources.Repository_AddressBar_Root, "Tree", new { id = ViewBag.ID, encodedPath = "" })
+        @Html.ActionLink(Resources.Repository_AddressBar_Root, "Tree", new { id = ViewBag.ID, encodedPath = "" , encodedName = (string)ViewData["ReferenceName"]})
         @if (path != null)
         {
             <text>/</text>


Updated 018: Switched to a bottom-up solution so that the answer perculates to the top of the triangle.

--- CSharp/CSharp/Problems_001-050/P018-MaximumPathSum.cs
+++ CSharp/CSharp/Problems_001-050/P018-MaximumPathSum.cs
@@ -10,27 +10,11 @@

         private static long MaxPathSum(params int[][] rows)
         {
-            var max = 0;
-            for (var row = 1; row < rows.Length; row++)
-            {
-                var previousRow = rows[row - 1];
-                var currentRow = rows[row];
+            for (var row = rows.Length - 2; row >= 0; row--)
+                for (var i = 0; i < rows[row].Length; i++)
+                    rows[row][i] += Maths.Max(rows[row + 1][i], rows[row + 1][i + 1]);

-                // Edge values
-                currentRow[0] += previousRow[0];
-                currentRow[row] += previousRow[row - 1];
-
-                max = Maths.Max(currentRow[0], currentRow[row]);
-
-                // Inner values
-                for (var i = 1; i < currentRow.Length - 1; i++)
-                {
-                    currentRow[i] += Maths.Max(previousRow[i - 1], previousRow[i]);
-                    max = Maths.Max(currentRow[i], max);
-                }
-            }
-
-            return max;
+            return rows[0][0];
         }

         [Fact]


Shader+VBO+FreeType显示字形成功

Shader+VBO+FreeType显示字形成功

--- CSharpGL.Winforms.Demo/ShaderVBOTextureElementDemo.cs
+++ CSharpGL.Winforms.Demo/ShaderVBOTextureElementDemo.cs
@@ -48,11 +48,16 @@
             GL.GenVertexArrays(1, vao);
             GL.BindVertexArray(vao[0]);

-            UnmanagedArray<vec4> coord = new UnmanagedArray<vec4>(4);
-            coord[0] = new vec4(0, 0, 0, height);
-            coord[1] = new vec4(0, 1, 0, 0);
-            coord[2] = new vec4(1, 1, width, 0);
-            coord[3] = new vec4(1, 0, width, height);
+            //UnmanagedArray<vec4> coord = new UnmanagedArray<vec4>(4);
+            //coord[0] = new vec4(0, 0, 0, height);
+            //coord[1] = new vec4(0, 1, 0, 0);
+            //coord[2] = new vec4(1, 1, width, 0);
+            //coord[3] = new vec4(1, 0, width, height);
+            UnmanagedArray<float> coord = new UnmanagedArray<float>(16);
+            coord[0] = 0; coord[1] = 0; coord[2] = 0; coord[3] = height;
+            coord[4] = 0; coord[5] = 1; coord[6] = 0; coord[7] = 0;
+            coord[8] = 1; coord[9] = 1; coord[10] = width; coord[11] = 0;
+            coord[12] = 1; coord[13] = 0; coord[14] = width; coord[15] = height;

             //  Create a vertex buffer for the vertex data.
             {
@@ -61,7 +66,7 @@
                 GL.BindBuffer(GL.GL_ARRAY_BUFFER, ids[0]);

                 GL.BufferData(BufferTarget.ArrayBuffer, coord, BufferUsage.StaticDraw);
-                GL.VertexAttribPointer(coordLocation, 3, GL.GL_FLOAT, false, 0, IntPtr.Zero);
+                GL.VertexAttribPointer(coordLocation, 4, GL.GL_FLOAT, false, 0, IntPtr.Zero);
                 GL.EnableVertexAttribArray(coordLocation);
             }

@@ -120,7 +125,7 @@
             //GL.TexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, width, height,
             //0, GL.GL_LUMINANCE_ALPHA, GL.GL_UNSIGNED_BYTE, expanded);
             GL.TexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, width, height,
-                0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, expanded.Header);
+                0, GL.GL_LUMINANCE_ALPHA, GL.GL_UNSIGNED_BYTE, expanded.Header);
             {
                 //  Create the bitmap.
                 System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(
@@ -272,8 +277,10 @@

             shader.Bind();

-            rotation += 0.3f;
-            mat4 transformMatrix = glm.rotate(mat4.identity(), rotation, new vec3(1, 1, 1));
+            rotation += 0.1f;
+            mat4 transformMatrix = glm.translate(mat4.identity(), new vec3(0, -2, 0));
+            transformMatrix = glm.rotate(transformMatrix, rotation, new vec3(0, 1, 0));
+            transformMatrix = glm.scale(transformMatrix, new vec3(2, 2, 1));
             shader.SetUniformMatrix4("transformMatrix", transformMatrix.to_array());

             GL.Uniform1(this.texLocation, this.texture[0]);


Delete BusinessConfigurator.cs

Delete BusinessConfigurator.cs

--- Caelan.Frameworks.BIZ/Classes/BusinessConfigurator.cs
+++ Caelan.Frameworks.BIZ/Classes/BusinessConfigurator.cs
@@ -1,18 +0,0 @@
-using System;
-using System.Linq;
-using System.Reflection;
-using AutoMapper;
-
-namespace Caelan.Frameworks.BIZ.Classes
-{
-	public static class BusinessConfigurator
-	{
-		public static void AutoMapperConfiguration()
-		{
-			var profileType = typeof(Profile);
-			var profiles = Assembly.GetExecutingAssembly().GetTypes().Where(t => profileType.IsAssignableFrom(t) && t.GetConstructor(Type.EmptyTypes) != null && !t.IsGenericType).Select(Activator.CreateInstance).Cast<Profile>().ToList();
-
-			Mapper.Initialize(a => profiles.ForEach(a.AddProfile));
-		}
-	}
-}


strech image

strech image

--- Canon.Eos.CameraCockpit/Forms/CockpitForm.Designer.cs
+++ Canon.Eos.CameraCockpit/Forms/CockpitForm.Designer.cs
@@ -53,6 +53,7 @@
             this._pictureBox.Location = new System.Drawing.Point(12, 86);
             this._pictureBox.Name = "_pictureBox";
             this._pictureBox.Size = new System.Drawing.Size(596, 430);
+            this._pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
             this._pictureBox.TabIndex = 0;
             this._pictureBox.TabStop = false;
             //


- MefHelpers updated to now do a check for a bin directory, in case the caller is a website instead of self host or unit test.

--- Code/WorldDomination.Web.Authentication/MefHelpers.cs
+++ Code/WorldDomination.Web.Authentication/MefHelpers.cs
@@ -3,6 +3,7 @@
 using System.ComponentModel.Composition.Hosting;
 using System.ComponentModel.Composition.Primitives;
 using System.ComponentModel.Composition.ReflectionModel;
+using System.IO;
 using System.Linq;

 namespace WorldDomination.Web.Authentication
@@ -12,7 +13,17 @@
         public static IList<Type> GetExportedTypes<T>()
         {
             var path = AppDomain.CurrentDomain.BaseDirectory;
-            var catalog = new AggregateCatalog(new DirectoryCatalog(path, "*"));
+            var catalog = new AggregateCatalog();
+
+            // Handle Self-host or unit tests.
+            catalog.Catalogs.Add(new DirectoryCatalog(path, "*"));
+
+            // Handle WebSites. (ie. the bin directory is a child directory off the root-website directory).
+            var pathWithBin = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin");
+            if (Directory.Exists(pathWithBin))
+            {
+                catalog.Catalogs.Add(new DirectoryCatalog(pathWithBin, "*"));
+            }

             return catalog.Parts
                           .Select(part => ComposablePartExportType<T>(part))


Strings length changes.

Strings length changes.

--- CodeIt/CodeIt.Common/Constants/ValidationConstants.cs
+++ CodeIt/CodeIt.Common/Constants/ValidationConstants.cs
@@ -4,6 +4,7 @@
     {
         // Models
         public const int ChallengeTitleMinLength = 5;
+        public const int ChallengeTitleMaxLength = 20;
         public const int ChallengeDescriptionMinLength = 50;
     }
 }


Fix wallmount interactions (#12013)

Fix wallmount interactions (#12013)

--- Content.Shared/Interaction/SharedInteractionSystem.cs
+++ Content.Shared/Interaction/SharedInteractionSystem.cs
@@ -545,9 +545,11 @@
                     range = (originPos.Position - targetPos.Position).Length;
                 }
             }
+            // No fixtures, e.g. wallmounts.
             else
             {
                 originPos = Transform(origin).MapPosition;
+                targetRot = Transform(Transform(other).ParentUid).LocalRotation + otherAngle;
             }

             // Do a raycast to check if relevant


Code Analysis CA2235 - Mark all non-serializable fields

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

--- Core/Castle.Core/Logging/Loggers/DiagnosticsLogger.cs
+++ Core/Castle.Core/Logging/Loggers/DiagnosticsLogger.cs
@@ -25,6 +25,7 @@
 	[Serializable]
 	public class DiagnosticsLogger : LevelFilteredLogger, IDisposable
 	{
+		[NonSerialized]
 		private EventLog eventLog;

 		/// <summary>


CustomBlocks: update at TcpClientNode class, try to directly parse ip address before performing host resolution

--- CustomBlocks/DataTransfer/Tcp/Client/TcpClientNode.cs
+++ CustomBlocks/DataTransfer/Tcp/Client/TcpClientNode.cs
@@ -41,7 +41,8 @@
 			if(port==0)
 				throw new Exception("failed to get remote connection port from \"remote_port\" config parameter");
 			//open tcp connection
-			var addr = Dns.GetHostEntry(host).AddressList[0];
+			if(!IPAddress.TryParse(host, out IPAddress addr))
+				addr = (await Dns.GetHostEntryAsync(host)).AddressList[0];
 			var nodelay = config.Get<bool>("tcp_nodelay");
 			var bufferSize = config.Get<int>("tcp_buffer_size");
 			var client = new Socket(addr.AddressFamily, SocketType.Stream, ProtocolType.Tcp);


fixes 0000738

fixes 0000738

--- DbShell.Driver.SqlServer/SqlServerDatabaseAnalyser.cs
+++ DbShell.Driver.SqlServer/SqlServerDatabaseAnalyser.cs
@@ -167,7 +167,15 @@
                             col.Name = reader.SafeString("column_name");
                             col.NotNull = reader.SafeString("is_nullable") != "True";
                             col.DataType = reader.SafeString("type_name");
-                            col.Length = reader.SafeString("max_length").SafeIntParse();
+                            int bytelen = reader.SafeString("max_length").SafeIntParse();
+                            if (col.DataType.ToLower().Contains("nchar") || col.DataType.ToLower().Contains("nvarchar"))
+                            {
+                                col.Length = bytelen >= 0 ? bytelen/2 : bytelen;
+                            }
+                            else if (col.DataType.ToLower().Contains("char") || col.DataType.ToLower().Contains("binary"))
+                            {
+                                col.Length = bytelen;
+                            }
                             col.Precision = reader.SafeString("precision").SafeIntParse();
                             col.Scale = reader.SafeString("scale").SafeIntParse();
                             col.DefaultValue = SimplifyExpression(reader.SafeString("default_value"));


Replace System.Cryptography functionality with BouncyCastle.

--- Digipost.Api.Client/Internal/AuthenticationHandler.cs
+++ Digipost.Api.Client/Internal/AuthenticationHandler.cs
@@ -3,13 +3,15 @@
 using System.Net.Http;
 using System.Reflection;
 using System.Runtime;
-using System.Security.Cryptography;
 using System.Security.Cryptography.X509Certificates;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
 using Digipost.Api.Client.Common;
 using Microsoft.Extensions.Logging;
+using Org.BouncyCastle.Crypto;
+using Org.BouncyCastle.Crypto.Digests;
+using Org.BouncyCastle.Security;

 namespace Digipost.Api.Client.Internal
 {
@@ -87,10 +89,13 @@

         internal static string ComputeHash(byte[] inputBytes)
         {
-            HashAlgorithm hashAlgorithm = new SHA256CryptoServiceProvider();
-            var hashedBytes = hashAlgorithm.ComputeHash(inputBytes);
+            IDigest digest = new Sha256Digest();
+            var hash = new byte[digest.GetDigestSize()];
+
+            digest.BlockUpdate(inputBytes, 0, inputBytes.Length);
+            digest.DoFinal(hash, 0);

-            return Convert.ToBase64String(hashedBytes);
+            return Convert.ToBase64String(hash);
         }

         internal static string ComputeSignature(string method, Uri uri, string date, string contentSha256Hash,
@@ -130,12 +135,16 @@
                 _logger.LogDebug("=== SIGNATURE DATA END ===");
             }

-            var rsa2 = businessCertificate.GetRSAPrivateKey();
+            byte[] messageBytes = Encoding.UTF8.GetBytes(messageHeader);

-            var sha = SHA256.Create();
-            var hash = sha.ComputeHash(Encoding.UTF8.GetBytes(messageHeader));
-            var signature = rsa2.SignHash(hash, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
-            var base64Signature = Convert.ToBase64String(signature);
+
+            var privKey = DotNetUtilities.GetRsaKeyPair(businessCertificate.GetRSAPrivateKey());
+
+            ISigner signer = SignerUtilities.GetSigner("SHA-256withRSA");
+            signer.Init(true, privKey.Private);
+            signer.BlockUpdate(messageBytes, 0, messageBytes.Length);
+
+            var base64Signature = Convert.ToBase64String(signer.GenerateSignature());

             return base64Signature;
         }


Code clean-up.

Code clean-up.

--- DotNetDataAccessPerformance/Tests/PerformanceTests.cs
+++ DotNetDataAccessPerformance/Tests/PerformanceTests.cs
@@ -37,35 +37,33 @@
 		public void DataReaderQueryTest(int total)
 		{
 			using (new TimeIt(total))
-			{
-				const string query =@"SELECT Album.Title as AlbumName, Track.Name as SongName, Artist.Name as ArtistName
-								   FROM Track LEFT JOIN Album ON Track.AlbumId = Album.AlbumId
-								   LEFT JOIN Artist ON Album.ArtistId = Artist.ArtistId
-								   WHERE Artist.Name = 'Pearl Jam'";
-
-				for (int i = 0; i < total; i++)
-				{
-					using (var connection = new SqlConnection(ConnectionString))
+			for (int i = 0; i < total; i++)
+			{
+				const string query = @"SELECT Album.Title as AlbumName, Track.Name as SongName, Artist.Name as ArtistName
+								FROM Track LEFT JOIN Album ON Track.AlbumId = Album.AlbumId
+								LEFT JOIN Artist ON Album.ArtistId = Artist.ArtistId
+								WHERE Artist.Name = 'Pearl Jam'";
+
+				using (var connection = new SqlConnection(ConnectionString))
+				{
+					connection.Open();
+					var command = new SqlCommand(query, connection);
+
+					var songs = new List<Song>();
+					using (var reader = command.ExecuteReader())
 					{
-						connection.Open();
-						var command = new SqlCommand(query, connection);
-
-						var songs = new List<Song>();
-						using (var reader = command.ExecuteReader())
+						while (reader.Read())
 						{
-							while (reader.Read())
-							{
-								songs.Add(new Song
-								          	{
-								          		AlbumName = reader[0] as string,
-								          		SongName = reader[1] as string,
-								          		ArtistName = reader[2] as string
-								          	});
-							}
+							songs.Add(new Song
+								        {
+								          	AlbumName = reader[0] as string,
+								          	SongName = reader[1] as string,
+								          	ArtistName = reader[2] as string
+								        });
 						}
-
-						Assert.True(songs.Count() > 0);
 					}
+
+					Assert.True(songs.Count() > 0);
 				}
 			}
 		}
@@ -177,38 +175,43 @@
 			}
 		}

-		private static Func<ChinookEntities, string, IQueryable<Song>> _query;
-
-		Func<ChinookEntities, string, IQueryable<Song>> Query
+		private static Func<ChinookEntities, string, IQueryable<Song>> _compiledLinqQuery;
+
+		Func<ChinookEntities, string, IQueryable<Song>> CompiledLinqCompiledLinqQuery
 		{
 			get
 			{
-				return _query ?? (_query = CompiledQuery.Compile<ChinookEntities, string, IQueryable<Song>>(
-							(context, name) => from track in context.Tracks
-												where track.Album.Artist.Name == name
-												select new Song
-					                           			{
-					                           				AlbumName = track.Album.Title,
-					                           				ArtistName = track.Album.Artist.Name,
-					                           				SongName = track.Name
-					                           			}));
-			}
-		}
-
-		[Theory]
-		[InlineData(1)]
-		[InlineData(10)]
-		[InlineData(100)]
-		[InlineData(500)]
-		[InlineData(1000)]
-		public void EntityFrameworkPreCompiledSelectTest(int total)
-		{
-			using (new TimeIt(total))
-			for (int i = 0; i < total; i++)
-			{
-				using (var context = new ChinookEntities())
-				{
-					var songs = Query.Invoke(context, "Pearl Jam");
+				if (_compiledLinqQuery == null)
+				{
+					_compiledLinqQuery = CompiledQuery.Compile<ChinookEntities, string, IQueryable<Song>>(
+						(context, name) => from track in context.Tracks
+						                   where track.Album.Artist.Name == name
+						                   select new Song
+						                          	{
+						                          		AlbumName = track.Album.Title,
+						                          		ArtistName = track.Album.Artist.Name,
+						                          		SongName = track.Name
+						                          	});
+				}
+
+				return _compiledLinqQuery;
+			}
+		}
+
+		[Theory]
+		[InlineData(1)]
+		[InlineData(10)]
+		[InlineData(100)]
+		[InlineData(500)]
+		[InlineData(1000)]
+		public void EntityFrameworkCompiledLinqQueryTest(int total)
+		{
+			using (new TimeIt(total))
+			for (int i = 0; i < total; i++)
+			{
+				using (var context = new ChinookEntities())
+				{
+					var songs = CompiledLinqCompiledLinqQuery.Invoke(context, "Pearl Jam");
 					Assert.True(songs.ToList().Count > 0);
 				}
 			}


logo way2

logo way2

--- DotNetFloripa/DotNetFloripa.Web/Modules/HomeModule.cs
+++ DotNetFloripa/DotNetFloripa.Web/Modules/HomeModule.cs
@@ -25,7 +25,7 @@
                     Description = "A Way2 desenvolve softwares e serviços para telemedição e gestão de dados de medição de energia. Sediada em Florianópolis, Santa Catarina, a empresa possui uma equipe multidisciplinar especializada no atendimento às demandas de empresas do setor elétrico, como geradoras, transmissoras, distribuidoras e comercializadoras.",
                     Site = "http://way2.com.br",
                     Address = "Rodovia SC 401, Km 04, Espaço Primavera Garden - Bloco B",
-                    Logo = "http://way2.com.br/wp-content/themes/way2/images/logo-way2.png"
+                    Logo = "http://i.imgur.com/gqaXyjL.png"
                 },
                 new Company {
                     Id = 2,


Remove tests that fail on OSX / linux due to root paths being different

--- test/FluentRest.Tests/QueryBuilderTest.cs
+++ test/FluentRest.Tests/QueryBuilderTest.cs
@@ -115,29 +115,5 @@

             Assert.Throws<FluentException>(() => request.RequestUri());
         }
-
-        [Fact]
-        public void RequestUriInvalid()
-        {
-            var request = new FluentRequest();
-            var builder = new QueryBuilder(request);
-
-            Assert.Throws<UriFormatException>(() => builder.BaseUri("/api/").AppendPath("v1"));
-        }
-
-        [Fact]
-        public void RequestUriInvalidUri()
-        {
-            var request = new FluentRequest();
-            var builder = new QueryBuilder(request);
-            var baseUri = new Uri("/api", UriKind.Relative);
-
-            Assert.Throws<UriFormatException>(() =>
-            {
-                builder.BaseUri(baseUri).AppendPath("v1");
-                var uri = request.RequestUri();
-            });
-        }
-
     }
 }


test changes

test changes

--- EFCore.BulkExtensions.Tests/EFCoreBulkTestAtypical.cs
+++ EFCore.BulkExtensions.Tests/EFCoreBulkTestAtypical.cs
@@ -493,6 +493,8 @@
         {
             using (var context = new TestContext(ContextUtil.GetOptions()))
             {
+                context.LogPersonReports.Add(new LogPersonReport { }); // used for initial add so that after RESEED it starts from 1, not 0
+                context.SaveChanges();
                 context.Truncate<LogPersonReport>();
                 context.Database.ExecuteSqlRaw($"DELETE FROM {nameof(Log)}");
                 context.Database.ExecuteSqlRaw($"DBCC CHECKIDENT('{nameof(Log)}', RESEED, 0);");
@@ -503,10 +505,10 @@
                 var entities = new List<LogPersonReport>();
                 for (int i = 1; i <= numberOfNewToInsert; i++)
                 {
-                    nextLogId++;
+                    nextLogId++; // OPTION 1.
                     var entity = new LogPersonReport
                     {
-                        LogId = nextLogId,
+                        LogId = nextLogId, // OPTION 1.
                         PersonId = (i % 22),
                         RegBy = 15,
                         CreatedDate = DateTime.Now,
@@ -519,7 +521,7 @@

                 var bulkConfigBase = new BulkConfig
                 {
-                    SqlBulkCopyOptions = Microsoft.Data.SqlClient.SqlBulkCopyOptions.KeepIdentity, // to ensure insert order is kept the same since SqlBulkCopy does not guarantee it.
+                    SqlBulkCopyOptions = Microsoft.Data.SqlClient.SqlBulkCopyOptions.KeepIdentity, // OPTION 1. - to ensure insert order is kept the same since SqlBulkCopy does not guarantee it.
                     CustomDestinationTableName = nameof(Log),
                     PropertiesToInclude = new List<string>
                     {
@@ -539,7 +541,7 @@
                 };
                 context.BulkInsert(entities, bulkConfigBase, type: typeof(Log)); // to base 'Log' table

-                //foreach(var entity in entities) { // OPTION 2. Could be set here if Id of base table Log was set by Db
+                //foreach(var entity in entities) { // OPTION 2. Could be set here if Id of base table Log was set by Db (when Op.2. used 'Option 1.' have to be commented out)
                 //    entity.LogId = ++nextLogId;
                 //}


キャプチャ：解放したウィンドウが閉じられるとアイコンが取得できない不具合を修正

キャプチャ：解放したウィンドウが閉じられるとアイコンが取得できない不具合を修正

--- ElectronicObserver/Window/Integrate/FormIntegrated.cs
+++ ElectronicObserver/Window/Integrate/FormIntegrated.cs
@@ -116,6 +116,7 @@
 			}
 			set {
 				Text = value.CurrentTitle;
+				//TabText = value.CurrentTitle.Length > 16 ? value.CurrentTitle.Substring( 0, 16 ) + "..." : value.CurrentTitle;
 				titleTextBox.Text = value.Title.Name;
 				titleComboBox.SelectedIndex = (int)value.Title.MatchControl;
 				classNameTextBox.Text = value.ClassName.Name;
@@ -324,6 +325,11 @@
 					origWindowRect.right - origWindowRect.left,
 					origWindowRect.bottom - origWindowRect.top, true );
 				attachingWindow = IntPtr.Zero;
+
+				if ( Icon != null ) {
+					Icon.Dispose();
+					Icon = null;
+				}
 			}
 		}


Update UnitTest Process Api

Update UnitTest Process Api

--- Framework.UnitTest/Application/UnitTestApplication.cs
+++ Framework.UnitTest/Application/UnitTestApplication.cs
@@ -21,13 +21,13 @@
         /// <summary>
         /// Process request.
         /// </summary>
-        private static (App App, AppJson AppJson) Process(AppJson appJson)
+        private static void Process(AppJson appJsonRequest, out App appResponse, out AppJson appJsonResponse)
         {
             // string jsonInText = appJson == null ? null : JsonConvert.Serialize(appJson, new Type[] { typeof(UtilFramework), typeof(UnitTestApplication) });
             // appJson = JsonConvert.Deserialize<AppJson>(jsonInText, new Type[] { typeof(UtilFramework), typeof(UnitTestApplication) });
             UtilFramework.UnitTest(typeof(MyApp)); // Enable InMemory database.
             MyApp app = new MyApp();
-            AppJson appJsonResponse = app.Run(appJson); // Process rquest.
+            appJsonResponse = app.Run(appJsonRequest); // Process rquest.
             //
             if (isDebugHtml)
             {
@@ -43,9 +43,8 @@
                 UtilFramework.FileWrite(fileName, html);
             }
             //
-            App appResponse = new MyApp();
+            appResponse = new MyApp();
             appResponse.Run(appJsonResponse, false); // Deserialize but do not run process.
-            return (appResponse, appJsonResponse);
         }

         private static GridCell GridCellGet(AppJson appJson, GridName gridName, string columnName, Index index)
@@ -110,7 +109,7 @@
         /// </summary>
         public void GridNotNullableFilter()
         {
-            AppJson appJson = Process(null).AppJson;
+            Process(null, out App app, out AppJson appJson);
             GridCell gridCell = GridCellGet(appJson, MyRow.GridName, "IsActive", Index.Filter);
             UtilFramework.Assert(gridCell.T == null);
             UtilFramework.Assert(gridCell.PlaceHolder == "Search");
@@ -121,16 +120,16 @@
         /// </summary>
         public void GridUserEnterRow()
         {
-            AppJson appJson = Process(null).AppJson;
+            Process(null, out App app, out AppJson appJson);
             // User enters "X" text.
             GridCellTextSet(appJson, MyRow.GridName, "Text", Index.New, "X");
-            appJson = Process(appJson).AppJson;
+            Process(appJson, out app, out appJson);
             GridCell gridCell = GridCellGet(appJson, MyRow.GridName, "Text", new Index("0"));
             UtilFramework.Assert(gridCell.T == "X"); // New record entered by user.

             // User enters "Y" text.
             GridCellTextSet(appJson, MyRow.GridName, "Text", Index.New, "Y");
-            appJson = Process(appJson).AppJson;
+            Process(appJson, out app, out appJson);
             gridCell = GridCellGet(appJson, MyRow.GridName, "Text", new Index("1"));
             UtilFramework.Assert(gridCell.T == "Y"); // New record entered by user.
         }
@@ -140,14 +139,14 @@
         /// </summary>
         public void GridUserModify()
         {
-            AppJson appJson = Process(null).AppJson;
+            Process(null, out App app, out AppJson appJson);
             Guid? sessionOne = appJson.Session;
             // User enters "X" text.
             GridCellTextSet(appJson, MyRow.GridName, "Text", Index.Row(0), "X2");
-            appJson = Process(appJson).AppJson;
+            Process(appJson, out app, out appJson);

             // Read back from new session
-            appJson = Process(null).AppJson;
+            Process(null, out app, out appJson);
             Guid? sessionTow = appJson.Session;
             UtilFramework.Assert(sessionOne != sessionTow);
             GridCell gridCell = GridCellGet(appJson, MyRow.GridName, "Text", Index.Row(0));
@@ -159,20 +158,20 @@
         /// </summary>
         public void UserGridFilter()
         {
-            var response = Process(null);
-            UtilFramework.Assert(response.App.GridData.RowInternalList(MyRow.GridName).Count == 4); // With filter and new
+            Process(null, out App app, out AppJson appJson);
+            UtilFramework.Assert(app.GridData.RowInternalList(MyRow.GridName).Count == 4); // With filter and new

             // User enters "X" text into filter.
-            GridCellTextSet(response.AppJson, MyRow.GridName, "Text", Index.Filter, "X");
-            response = Process(response.AppJson);
-            UtilFramework.Assert(response.App.GridData.RowInternalList(MyRow.GridName).Count == 3);
-            UtilFramework.Assert(GridCellGet(response.AppJson, MyRow.GridName, "Text", Index.Row(0)).T == "X2");
+            GridCellTextSet(appJson, MyRow.GridName, "Text", Index.Filter, "X");
+            Process(appJson, out app, out appJson);
+            UtilFramework.Assert(app.GridData.RowInternalList(MyRow.GridName).Count == 3);
+            UtilFramework.Assert(GridCellGet(appJson, MyRow.GridName, "Text", Index.Row(0)).T == "X2");

             // User enters "" text into filter.
-            GridCellTextSet(response.AppJson, MyRow.GridName, "Text", Index.Filter, "");
-            response = Process(response.AppJson);
-            UtilFramework.Assert(response.App.GridData.RowInternalList(MyRow.GridName).Count == 4);
-            UtilFramework.Assert(GridCellGet(response.AppJson, MyRow.GridName, "Text", Index.Row(0)).T == "X2");
+            GridCellTextSet(appJson, MyRow.GridName, "Text", Index.Filter, "");
+            Process(appJson, out app, out appJson);
+            UtilFramework.Assert(app.GridData.RowInternalList(MyRow.GridName).Count == 4);
+            UtilFramework.Assert(GridCellGet(appJson, MyRow.GridName, "Text", Index.Row(0)).T == "X2");
         }

         /// <summary>
@@ -180,18 +179,18 @@
         /// </summary>
         public void GridUserSort()
         {
-            AppJson appJson = Process(null).AppJson;
+            Process(null, out App app, out AppJson appJson);
             UtilFramework.Assert(GridColumnGet(appJson, MyRow.GridName, "Text").Text == "Text");

             // Click column
             GridColumnClick(appJson, MyRow.GridName, "Text");
-            appJson = Process(appJson).AppJson;
+            Process(appJson, out app, out appJson);
             UtilFramework.Assert(GridColumnGet(appJson, MyRow.GridName, "Text").Text.StartsWith("▲"));
             UtilFramework.Assert(GridCellGet(appJson, MyRow.GridName, "Text", Index.Row(0)).T == "X2");

             // Click column 2nd time
             GridColumnClick(appJson, MyRow.GridName, "Text");
-            appJson = Process(appJson).AppJson;
+            Process(appJson, out app, out appJson);
             UtilFramework.Assert(GridColumnGet(appJson, MyRow.GridName, "Text").Text.StartsWith("▼"));
             UtilFramework.Assert(GridCellGet(appJson, MyRow.GridName, "Text", Index.Row(0)).T == "Y");
             // UtilFramework.Assert(response.App.GridData.RowList(MyRow.GridName).Count == 4);


Fixing music volume.

Fixing music volume.

--- unity/Assets/Scripts/Audio.cs
+++ unity/Assets/Scripts/Audio.cs
@@ -13,16 +13,16 @@
     public bool fadeOut = false;
     public int musicIndex = 0;
     public float effectVolume;
+    public float musicVolume;

     void Start()
     {
         Game game = Game.Get();
         audioSource = gameObject.AddComponent<AudioSource>();
-        float mVolume;
         string vSet = game.config.data.Get("UserConfig", "music");
-        float.TryParse(vSet, out mVolume);
-        if (vSet.Length == 0) mVolume = 1;
-        audioSource.volume = mVolume;
+        float.TryParse(vSet, out musicVolume);
+        if (vSet.Length == 0) musicVolume = 1;
+        audioSource.volume = musicVolume;

         gameObject.transform.parent = game.cc.gameObject.transform;
         music = new List<AudioClip>();
@@ -49,7 +49,7 @@
         }
         if (!audioSource.isPlaying)
         {
-            audioSource.volume = 1;
+            audioSource.volume = musicVolume;
             UpdateMusic();
         }
     }


Version bump 0.9.1

Version bump 0.9.1

--- HardwareToSerialWriter.WPF/Properties/AssemblyInfo.cs
+++ HardwareToSerialWriter.WPF/Properties/AssemblyInfo.cs
@@ -49,5 +49,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.9.0.0")]
-[assembly: AssemblyFileVersion("0.9.0.0")]
+[assembly: AssemblyVersion("0.9.1.0")]
+[assembly: AssemblyFileVersion("0.9.1.0")]


コマンド入力時のテキスト表示と例外ログ書き込み処理を追加

コマンド入力時のテキスト表示と例外ログ書き込み処理を追加

--- Inferno/InfernoScripts/Citizen/CitizenCrazyDriving.cs
+++ Inferno/InfernoScripts/Citizen/CitizenCrazyDriving.cs
@@ -34,7 +34,7 @@
                 .Subscribe(_ =>
                 {
                     IsActive = !IsActive;
-                    LogWrite(IsActive.ToString());
+                    DrawText("CitizenCrazyDriving:" + IsActive, 3.0f);

                 });

@@ -67,6 +67,7 @@
                 catch
                 {
                     //nice catch!
+                    LogWrite("RunAway()nice catch!\r\n");
                 }
             }
         }


Fixed bug in Equality handling of an enum and a string.

--- IronVelocity/Binders/VelocityBinaryOperationBinder.cs
+++ IronVelocity/Binders/VelocityBinaryOperationBinder.cs
@@ -288,9 +288,9 @@
                 : VelocityExpressions.ConvertIfNeeded(rightObject);

-            if (leftType == typeof(string) && rightType == typeof(char))
+            if (leftType == typeof(string) && (rightType == typeof(char) || rightType.IsEnum))
                 rightExpression = Expression.Call(rightExpression, MethodHelpers.ToStringMethodInfo);
-            else if (rightType == typeof(string) && leftType == typeof(char))
+            else if (rightType == typeof(string) && (leftType == typeof(char) || leftType.IsEnum))
                 leftExpression = Expression.Call(leftExpression, MethodHelpers.ToStringMethodInfo);
         }


Fixes this case

Fixes this case

--- LanguageExt.Core/DataTypes/OptionAsync/OptionAsync.cs
+++ LanguageExt.Core/DataTypes/OptionAsync/OptionAsync.cs
@@ -497,6 +497,13 @@
         /// Invokes the action if Option is in the Some state, otherwise nothing happens.
         /// </summary>
         /// <param name="f">Action to invoke if Option is in the Some state</param>
+        public Task<Unit> IfSome(Func<A, Task> f) =>
+            ifSomeAsync<MOptionAsync<A>, OptionAsync<A>, A>(this, f);
+
+        /// <summary>
+        /// Invokes the action if Option is in the Some state, otherwise nothing happens.
+        /// </summary>
+        /// <param name="f">Action to invoke if Option is in the Some state</param>
         public Task<Unit> IfSome(Action<A> f) =>
             ifSomeAsync<MOptionAsync<A>, OptionAsync<A>, A>(this, f);


refactor: made ExampleFeature.BadlyFormattedSteps steps more specific

--- src/test/Xbehave.Features.Net40/ExampleFeature.cs
+++ src/test/Xbehave.Features.Net40/ExampleFeature.cs
@@ -147,14 +147,14 @@
             "When the test runner runs the feature"
                 .When(() => results = TestRunner.Run(feature).ToArray());

-            "Then the results should not be empty"
-                .Then(() => results.Should().NotBeEmpty());
-
-            "And there should be no failures"
-                .And(() => results.Should().NotContain(result => result is Fail));
-
-            "And the display name of each result should end with \"Given {{3}}, {{4}} and {{5}}\""
-                .And(() => results.Should().OnlyContain(result => result.DisplayName.EndsWith("Given {3}, {4} and {5}")));
+            "Then there should be one result"
+                .Then(() => results.Count().Should().Be(1));
+
+            "And the result should not be a pass"
+                .And(() => results.Single().Should().BeOfType<Pass>());
+
+            "And the display name of the result should end with \"Given {{3}}, {{4}} and {{5}}\""
+                .And(() => results.Single().DisplayName.Should().EndWith("Given {3}, {4} and {5}"));
         }

         [Scenario]


Made the non-manifold renderer work

Made the non-manifold renderer work

--- MatterControlLib/PartPreviewWindow/ViewStyleButton.cs
+++ MatterControlLib/PartPreviewWindow/ViewStyleButton.cs
@@ -59,7 +59,7 @@
 				[RenderTypes.Shaded] = AggContext.StaticData.LoadIcon("view_shaded.png", 16, 16, theme.InvertIcons),
 				[RenderTypes.Outlines] = AggContext.StaticData.LoadIcon("view_outlines.png", 16, 16, theme.InvertIcons),
 				[RenderTypes.Polygons] = AggContext.StaticData.LoadIcon("view_polygons.png", 16, 16, theme.InvertIcons),
-				[RenderTypes.Manifold] = AggContext.StaticData.LoadIcon("view_polygons.png", 16, 16, theme.InvertIcons),
+				[RenderTypes.NonManifold] = AggContext.StaticData.LoadIcon("view_polygons.png", 16, 16, theme.InvertIcons),
 				[RenderTypes.Materials] = AggContext.StaticData.LoadIcon("view_materials.png", 16, 16, theme.InvertIcons),
 				[RenderTypes.Overhang] = AggContext.StaticData.LoadIcon("view_overhang.png", 16, 16, theme.InvertIcons),
 			};
@@ -122,12 +122,12 @@

 #if DEBUG
 			popupMenu.CreateBoolMenuItem(
-				"Manifold".Localize(),
+				"Non-Manifold".Localize(),
 				viewIcons[RenderTypes.Polygons],
-				() => sceneContext.ViewState.RenderType == RenderTypes.Manifold,
+				() => sceneContext.ViewState.RenderType == RenderTypes.NonManifold,
 				(isChecked) =>
 				{
-					sceneContext.ViewState.RenderType = RenderTypes.Manifold;
+					sceneContext.ViewState.RenderType = RenderTypes.NonManifold;
 				},
 				useRadioStyle: true,
 				siblingRadioButtonList: siblingList);


Fix NHCH-19

Fix NHCH-19

git-svn-id: 9129ec47c71fac40e6922fb02724d7bee0333a45@840 d7b3437e-3345-0410-94a8-cbd290e69f67

--- MemCache/NHibernate.Caches.MemCache/MemCacheClient.cs
+++ MemCache/NHibernate.Caches.MemCache/MemCacheClient.cs
@@ -73,14 +73,6 @@
 						log.DebugFormat("compression_enabled set to {0}", client.EnableCompression);
 					}
 				}
-				if (properties.ContainsKey("expiration"))
-				{
-					expiry = Convert.ToInt32(properties["expiration"]);
-					if (log.IsDebugEnabled)
-					{
-						log.DebugFormat("using expiration of {0} seconds", expiry);
-					}
-				}

 				if (properties.ContainsKey("expiration"))
 				{


Modify File userAuth.cpl/UITests/Tests.cs

--- userAuth.cpl/UITests/Tests.cs
+++ userAuth.cpl/UITests/Tests.cs
@@ -1,4 +1,4 @@
-using System;
+�using System;
 using System.IO;
 using System.Linq;
 using NUnit.Framework;
@@ -55,4 +55,18 @@
 			Math.IsInstance (actions.String ());
 		}
 	}
+}
+namespace userAuth.cpl.Droid
+struct command (start)
+{
+	start = internal.interface(cmdLet)
+		path = scanner("&B", "%6");
+
+	[Builtin]
+	public class start
+	{
+		InitUI init;
+
+		(stable): from userAuth.FrameAnchor
+	}
 }


CCMacros PointsToPixels conversion cleanup:

* remove CCContentScaleFactor global
* added PixelsToPoints/PointsToPixels methods that take in a CCDirector

--- src/predefine/CCMacros.cs
+++ src/predefine/CCMacros.cs
@@ -74,107 +74,97 @@
             return angle * 57.29577951f; // PI * 180
         }

-        public static float CCContentScaleFactor()
+        #region conversions with passed scale factor
+
+        public static CCRect PixelsToPoints(this CCRect r, float scaleFactor)
         {
-            return CCApplication.SharedApplication.MainWindowDirector.ContentScaleFactor;
+            return new CCRect(r.Origin.X / scaleFactor, r.Origin.Y / scaleFactor, r.Size.Width / scaleFactor, r.Size.Height / scaleFactor);
         }

-		#region conversions with passed scale factor
-
-		public static CCRect PixelsToPoints(this CCRect r, float scaleFactor)
-		{
-			return new CCRect(r.Origin.X / scaleFactor, r.Origin.Y / scaleFactor, r.Size.Width / scaleFactor, r.Size.Height / scaleFactor);
-		}
-
-		public static CCRect PointsToPixels(this CCRect r, float scaleFactor)
-		{
-			return new CCRect(r.Origin.X * scaleFactor, r.Origin.Y * scaleFactor, r.Size.Width * scaleFactor, r.Size.Height * scaleFactor);
-		}
-
-		public static CCSize PixelsToPoints(this CCSize s, float scaleFactor)
-		{
-			return new CCSize(s.Width / scaleFactor, s.Height / scaleFactor);
-		}
-
-		public static CCSize PointsToPixels(this CCSize s, float scaleFactor)
-		{
-			return new CCSize(s.Width * scaleFactor, s.Height * scaleFactor);
-		}
-
-		public static CCPoint PixelsToPoints(this CCPoint p, float scaleFactor)
-		{
-			return new CCPoint(p.X / scaleFactor, p.Y / scaleFactor);
-		}
-
-		public static CCPoint PointsToPixels(this CCPoint p, float scaleFactor)
-		{
-			return new CCPoint(p.X * scaleFactor, p.Y * scaleFactor);
-		}
-
-		#endregion
-
-		#region scale factor from Director
-
-        public static CCRect PixelsToPoints(this CCRect r)
+        public static CCRect PointsToPixels(this CCRect r, float scaleFactor)
         {
-            var cs = CCApplication.SharedApplication.MainWindowDirector.ContentScaleFactor;
-            return new CCRect(r.Origin.X / cs, r.Origin.Y / cs, r.Size.Width / cs, r.Size.Height / cs);
+            return new CCRect(r.Origin.X * scaleFactor, r.Origin.Y * scaleFactor, r.Size.Width * scaleFactor, r.Size.Height * scaleFactor);
         }

-        public static CCRect PointsToPixels(this CCRect r)
+        public static CCSize PixelsToPoints(this CCSize s, float scaleFactor)
         {
-            var cs = CCApplication.SharedApplication.MainWindowDirector.ContentScaleFactor;
-            return new CCRect(r.Origin.X * cs, r.Origin.Y * cs, r.Size.Width * cs, r.Size.Height * cs);
+            return new CCSize(s.Width / scaleFactor, s.Height / scaleFactor);
         }

-        public static CCSize PixelsToPoints(this CCSize s)
+        public static CCSize PointsToPixels(this CCSize s, float scaleFactor)
         {
-            var cs = CCApplication.SharedApplication.MainWindowDirector.ContentScaleFactor;
-            return new CCSize(s.Width / cs, s.Height / cs);
+            return new CCSize(s.Width * scaleFactor, s.Height * scaleFactor);
         }

-        public static CCSize PointsToPixels(this CCSize s)
+        public static CCPoint PixelsToPoints(this CCPoint p, float scaleFactor)
         {
-            var cs = CCApplication.SharedApplication.MainWindowDirector.ContentScaleFactor;
-            return new CCSize(s.Width * cs, s.Height * cs);
+            return new CCPoint(p.X / scaleFactor, p.Y / scaleFactor);
         }

-        public static CCPoint PixelsToPoints(this CCPoint p)
+        public static CCPoint PointsToPixels(this CCPoint p, float scaleFactor)
         {
-            var cs = CCApplication.SharedApplication.MainWindowDirector.ContentScaleFactor;
-            return new CCPoint(p.X / cs, p.Y / cs);
+            return new CCPoint(p.X * scaleFactor, p.Y * scaleFactor);
         }

-        public static CCPoint PointsToPixels(this CCPoint p)
+        #endregion
+
+        #region scale factor from Director
+
+        public static CCRect PixelsToPoints(this CCRect r, CCDirector director)
         {
-            var cs = CCApplication.SharedApplication.MainWindowDirector.ContentScaleFactor;
-            return new CCPoint(p.X * cs, p.Y * cs);
+            return PixelsToPoints(r, director.ContentScaleFactor);
         }

-		#endregion
-		internal static Microsoft.Xna.Framework.Color ToColor (this CCColor4B color)
-		{
-			return new Microsoft.Xna.Framework.Color (color.R, color.G, color.B, color.A);
-		}
-		internal static Microsoft.Xna.Framework.Color ToColor (this CCColor4F color)
-		{
-			return new Microsoft.Xna.Framework.Color (color.R, color.G, color.B, color.A);
-		}
+        public static CCRect PointsToPixels(this CCRect r, CCDirector director)
+        {
+            return PointsToPixels(r, director.ContentScaleFactor);
+        }

-		internal static Microsoft.Xna.Framework.Vector3 ToVector3 (this CCPoint point)
-		{
-			return new Microsoft.Xna.Framework.Vector3(point.X, point.Y, 0);
-		}
+        public static CCSize PixelsToPoints(this CCSize s, CCDirector director)
+        {
+            return PixelsToPoints(s, director.ContentScaleFactor);
+        }

-		internal static Microsoft.Xna.Framework.Vector2 ToVector2 (this CCVector2 point)
-		{
-			return new Microsoft.Xna.Framework.Vector2(point.X, point.Y);
-		}
+        public static CCSize PointsToPixels(this CCSize s, CCDirector director)
+        {
+            return PointsToPixels(s, director.ContentScaleFactor);
+        }

-		internal static CCVector2 ToCCVector2 (this Microsoft.Xna.Framework.Vector2 point)
-		{
-			return new CCVector2(point.X, point.Y);
-		}
+        public static CCPoint PixelsToPoints(this CCPoint p, CCDirector director)
+        {
+            return PixelsToPoints(p, director.ContentScaleFactor);
+        }
+
+        public static CCPoint PointsToPixels(this CCPoint p, CCDirector director)
+        {
+            return PointsToPixels(p, director.ContentScaleFactor);
+        }
+
+        #endregion
+
+        internal static Microsoft.Xna.Framework.Color ToColor (this CCColor4B color)
+        {
+            return new Microsoft.Xna.Framework.Color (color.R, color.G, color.B, color.A);
+        }
+        internal static Microsoft.Xna.Framework.Color ToColor (this CCColor4F color)
+        {
+            return new Microsoft.Xna.Framework.Color (color.R, color.G, color.B, color.A);
+        }
+
+        internal static Microsoft.Xna.Framework.Vector3 ToVector3 (this CCPoint point)
+        {
+            return new Microsoft.Xna.Framework.Vector3(point.X, point.Y, 0);
+        }
+
+        internal static Microsoft.Xna.Framework.Vector2 ToVector2 (this CCVector2 point)
+        {
+            return new Microsoft.Xna.Framework.Vector2(point.X, point.Y);
+        }
+
+        internal static CCVector2 ToCCVector2 (this Microsoft.Xna.Framework.Vector2 point)
+        {
+            return new CCVector2(point.X, point.Y);
+        }