ParupunteScriptからテキスト表示できるようにする

ParupunteScriptからテキスト表示できるようにする

--- Inferno/InfernoScripts/Parupunte/ParupunteCore.cs
+++ Inferno/InfernoScripts/Parupunte/ParupunteCore.cs
@@ -7,6 +7,7 @@
 using System.Reactive.Linq;
 using System.Reflection;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using GTA;
@@ -93,10 +94,13 @@

             //抽選
             var scriptType = ChooseParupounteScript();
-            //インスタンス化
-            var scriptInstance = Activator.CreateInstance(scriptType, this) as ParupunteScript;
-            //コルーチン開始
-            StartCoroutine(ParupunteCoreCoroutine(scriptInstance));
+
+            Observable.Start(() => Activator.CreateInstance(scriptType, this) as ParupunteScript)
+                .Subscribe(x =>
+                {
+                    //コルーチン開始
+                    StartCoroutine(ParupunteCoreCoroutine(x));
+                });

         }

@@ -127,6 +131,8 @@
         /// <returns></returns>
         private IEnumerable<object> ParupunteCoreCoroutine(ParupunteScript script)
         {
+            yield return null;
+
             if (script == null)
             {
                 IsActive = false;
@@ -197,7 +203,22 @@
             yield return WaitForSeconds(2);
             //消す
             _mContainer.Items.Clear();
-
+        }
+
+        /// <summary>
+        /// テキストを表示する(ParupunteScript用)
+        /// </summary>
+        public void DrawParupunteText(string text,float duration)
+        {
+            StartCoroutine(DrawTextCoroutine(text, duration));
+        }
+
+        //ParupunteScriptから呼び出す用
+        private IEnumerable<object> DrawTextCoroutine(string text, float duration )
+        {
+            _mContainer.Items.Add(CreateUIText(text));
+            yield return WaitForSeconds(duration);
+            _mContainer.Items.Clear();
         }

         private UIText CreateUIText(string text)


--- BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
+++ BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
@@ -35,7 +35,7 @@
 // 2014-04-14 2015.0.109.0 migrated to Revit 2015
 // 2014-05-14 2015.0.110.0 CmdViewsShowingElements
 // 2014-07-21 2015.0.110.1 AddFaceBasedFamilyToLinks
-// 2014-08-19 2015.0.110.2 remove obsolete API usage: reduced warning count from 71 to 67
+// 2014-08-19 2015.0.110.2 removed obsolete API usage: reduced warning count from 71 to 67
 //
 [assembly: AssemblyVersion( "2015.0.110.2" )]
 [assembly: AssemblyFileVersion( "2015.0.110.2" )]


对比了LINQ使用、匿名对象、具名对象拼装下是否需要Evict的情况

对比了LINQ使用、匿名对象、具名对象拼装下是否需要Evict的情况

--- src/Jusfr.Persistent.Demo/Program.cs
+++ src/Jusfr.Persistent.Demo/Program.cs
@@ -1,6 +1,7 @@
 using Jusfr.Persistent.Mongo;
 using Jusfr.Persistent.NH;
 using NHibernate;
+using NHibernate.Linq;
 using System;
 using System.Collections.Generic;
 using System.Configuration;
@@ -17,7 +18,94 @@
             //NHibernateBasicCrud();
             //Null_could_evict();
             //Dupliate_entity_update_need_evict();
-            Dupliate_entity_mock_web_cache();
+            //Dupliate_entity_mock_web_cache();
+
+            ISessionFactory sessionFactory = PubsContext.DbFactory;
+            using (var session = sessionFactory.OpenSession()) {
+                var j1 = session.Get<Job>(1);
+                var j2 = new Job {
+                    Guid = j1.Guid,
+                    Id = j1.Id,
+                    Salary = j1.Salary,
+                    Title = j1.Title
+                };
+
+                //update j2 失败，先Evict j1
+                session.Evict(j1);
+                session.Update(j2);
+            }
+
+            using (var session = sessionFactory.OpenSession()) {
+                IQueryable<Job> query = new NhQueryable<Job>(session.GetSessionImplementation());
+                var j1 = query
+                    .Where(r => r.Id == 1)
+                    .First();
+                var j2 = new Job {
+                    Id = j1.Id,
+                    Salary = 100,
+                    Title = j1.Title,
+                };
+
+                //update j2 失败，先Evict j1
+                session.Evict(j1);
+                session.Update(j2);
+            }
+
+            using (var session = sessionFactory.OpenSession()) {
+                IQueryable<Job> query = new NhQueryable<Job>(session.GetSessionImplementation());
+                var jobj = query
+                    .Where(r => r.Id == 1)
+                    .Select(r => new { r.Id, r.Title })
+                    .First();
+                var j2 = new Job {
+                    Id = jobj.Id,
+                    Salary = 100,
+                    Title = jobj.Title,
+                };
+
+                //不需要 Evict jentry
+                session.Update(j2);
+            }
+
+            using (var session = sessionFactory.OpenSession()) {
+                IQueryable<Job> query = new NhQueryable<Job>(session.GetSessionImplementation());
+                var jobj = query
+                    .Where(r => r.Id == 1)
+                    .Select(r => new {
+                        Id = r.Id,
+                        Salary = r.Salary,
+                        Title = r.Title,
+                    })
+                    .First();
+                var j2 = new Job {
+                    Id = jobj.Id,
+                    Salary = jobj.Salary,
+                    Title = jobj.Title,
+                };
+
+                //不需要 Evict jentry
+                session.Update(j2);
+            }
+
+            using (var session = sessionFactory.OpenSession()) {
+                IQueryable<Job> query = new NhQueryable<Job>(session.GetSessionImplementation());
+                var jentry = query
+                    .Where(r => r.Id == 1)
+                    .Select(r => new Job {
+                        Id = r.Id,
+                        Salary = r.Salary,
+                        Title = r.Title,
+                    })
+                    .First();
+                var j2 = new Job {
+                    Id = jentry.Id,
+                    Salary = jentry.Salary,
+                    Title = jentry.Title,
+                };
+
+                //不需要 Evict jentry
+                session.Update(j2);
+            }
         }

         private static void Dupliate_entity_mock_web_cache() {
@@ -60,7 +148,7 @@
                 }

                 //Evict cache 没有用
-                session.Evict(cache);
+                session.Evict(cache);
                 try {
                     session.Update(cache);
                     Debug.Fail("Should failed for NHibernate.NonUniqueObjectException");


text change: overstress -> material fatigue

--- src/Kerbalism/Modules/Reliability.cs
+++ src/Kerbalism/Modules/Reliability.cs
@@ -394,9 +394,9 @@
 					enforce_breakdown = true;
 					explode = Lib.RandomDouble() < 0.35;
 #if DEBUG_RELIABILITY
-					Lib.Log("Reliability: " + part.partInfo.title + " fails because of overstress");
-#endif
-					FlightLogger.fetch?.LogEvent(part.partInfo.title + " failed because of overstress");
+					Lib.Log("Reliability: " + part.partInfo.title + " fails because of material fatigue");
+#endif
+					FlightLogger.fetch?.LogEvent(part.partInfo.title + " failed because of material fatigue");
 				}
 			}


Improved JsonSchemaVisitor

Improved JsonSchemaVisitor

--- src/NJsonSchema/JsonSchemaVisitor.cs
+++ src/NJsonSchema/JsonSchemaVisitor.cs
@@ -11,7 +11,9 @@
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Linq;
+using System.Reflection;
 using System.Threading.Tasks;
+using Newtonsoft.Json.Linq;
 using NJsonSchema.Infrastructure;
 using NJsonSchema.References;

@@ -20,6 +22,8 @@
     /// Visitor to transform an object with <see cref="JsonSchema4"/> objects.
     public abstract class JsonSchemaVisitor
     {
+        private readonly string[] _jsonSchemaProperties = typeof(JsonSchema4).GetRuntimeProperties().Select(p => p.Name).ToArray();
+
         /// Processes an object.
         /// <param name="obj">The object to process.</param>
         /// <returns>The task.</returns>
@@ -50,13 +54,6 @@
                     schema = newSchema;
                 }

-                var newReference = await VisitJsonReferenceAsync(schema, path, typeNameHint);
-                if (newReference != schema)
-                {
-                    replacer(newReference);
-                    schema = (JsonSchema4)newReference;
-                }
-
                 if (schema == null)
                     return;

@@ -113,62 +110,65 @@
                 foreach (var p in schema.PatternProperties.ToArray())
                     await VisitAsync(p.Value, path + "/patternProperties/" + p.Key, null, checkedObjects, o => schema.PatternProperties[p.Key] = (JsonProperty)o);
             }
-            else
+
+            if (!(obj is string) && !(obj is JToken))
             {
-                if (obj is IJsonReference reference)
-                {
-                    var newReference = await VisitJsonReferenceAsync(reference, path, typeNameHint);
-                    if (newReference != reference)
-                    {
-                        replacer(newReference);
-                        obj = newReference;
+                // Reflection fallback
+                if (obj is IDictionary dictionary)
+                {
+                    foreach (var key in dictionary.Keys.OfType<object>().ToArray())
+                    {
+                        await VisitAsync(dictionary[key], path + "/" + key, key.ToString(), checkedObjects, o =>
+                        {
+                            if (o != null)
+                                dictionary[key] = (JsonSchema4)o;
+                            else
+                                dictionary.Remove(key);
+                        });
                     }
-
-                    if (obj == null)
-                        return;
-                }
-
-                if (!(obj is string))
-                {
-                    // Reflection fallback
-                    if (obj is IDictionary dictionary)
-                    {
-                        foreach (var key in dictionary.Keys.OfType<object>().ToArray())
-                        {
-                            await VisitAsync(dictionary[key], path + "/" + key, key.ToString(), checkedObjects, o =>
-                            {
-                                if (o != null)
-                                    dictionary[key] = (JsonSchema4)o;
-                                else
-                                    dictionary.Remove(key);
-                            });
-                        }
+                }
+                else if (obj is IList list)
+                {
+                    var items = list.OfType<object>().ToArray();
+                    for (var i = 0; i < items.Length; i++)
+                    {
+                        var index = i;
+                        await VisitAsync(items[i], path + "[" + i + "]", null, checkedObjects, o => ReplaceOrDelete(list, index, o));
                     }
-                    else if (obj is IList list)
-                    {
-                        var items = list.OfType<object>().ToArray();
-                        for (var i = 0; i < items.Length; i++)
-                        {
-                            var index = i;
-                            await VisitAsync(items[i], path + "[" + i + "]", null, checkedObjects, o => ReplaceOrDelete(list, index, o));
-                        }
+                }
+                else if (obj is IEnumerable enumerable)
+                {
+                    var items = enumerable.OfType<object>().ToArray();
+                    for (var i = 0; i < items.Length; i++)
+                        await VisitAsync(items[i], path + "[" + i + "]", null, checkedObjects, o => throw new NotSupportedException("Cannot replace enumerable item."));
+                }
+                else
+                {
+                    foreach (var member in ReflectionCache.GetPropertiesAndFields(obj.GetType()).Where(p =>
+                        p.MemberInfo is PropertyInfo &&
+                        (!(obj is JsonSchema4) || !_jsonSchemaProperties.Contains(p.MemberInfo.Name)) &&
+                        p.CanRead &&
+                        p.IsIndexer == false &&
+                        p.CustomAttributes.JsonIgnoreAttribute == null))
+                    {
+                        var value = member.GetValue(obj);
+                        if (value != null)
+                            await VisitAsync(value, path + "/" + member.GetName(), member.GetName(), checkedObjects, o => member.SetValue(obj, o));
                     }
-                    else if (obj is IEnumerable enumerable)
-                    {
-                        var items = enumerable.OfType<object>().ToArray();
-                        for (var i = 0; i < items.Length; i++)
-                            await VisitAsync(items[i], path + "[" + i + "]", null, checkedObjects, o => throw new NotSupportedException("Cannot replace enumerable item."));
-                    }
-                    else
-                    {
-                        foreach (var member in ReflectionCache.GetPropertiesAndFields(obj.GetType()))
-                        {
-                            var value = member.GetValue(obj);
-                            if (value != null)
-                                await VisitAsync(value, path + "/" + member.GetName(), member.GetName(), checkedObjects, o => member.SetValue(obj, o));
-                        }
-                    }
-                }
+                }
+            }
+
+            if (obj is IJsonReference reference)
+            {
+                var newReference = await VisitJsonReferenceAsync(reference, path, typeNameHint);
+                if (newReference != reference)
+                {
+                    replacer(newReference);
+                    obj = newReference;
+                }
+
+                if (obj == null)
+                    return;
             }
         }


CI Build Number Updated

CI Build Number Updated

--- Source/Properties/AssemblyInfo.cs
+++ Source/Properties/AssemblyInfo.cs
@@ -7,7 +7,7 @@
 [assembly: AssemblyProduct("Moq")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("3.0.925.5")]
+[assembly: AssemblyVersion("3.0.925.6")]
 [assembly: AssemblyFileVersion("3.0.0.0")]

 [assembly: InternalsVisibleTo("Moq.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001009f7a95086500f8f66d892174803850fed9c22225c2ccfff21f39c8af8abfa5415b1664efd0d8e0a6f7f2513b1c11659bd84723dc7900c3d481b833a73a2bcf1ed94c16c4be64d54352c86956c89930444e9ac15124d3693e3f029818e8410f167399d6b995324b635e95353ba97bfab856abbaeb9b40c9b160070c6325e22ddc")]


Added tinymce to website configuration

Added tinymce to website configuration

--- CmsEngine.Ui/Areas/Cms/Views/Website/CreateEdit.cshtml
+++ CmsEngine.Ui/Areas/Cms/Views/Website/CreateEdit.cshtml
@@ -1,7 +1,8 @@
 @model CmsEngine.Data.EditModels.WebsiteEditModel
-@*@section styles{

-    }*@
+@section PageHead{
+    <script src="~/js/vendors/tinymce/tinymce.min.js"></script>
+}

 @section Breadcrumb {
     <ol class="breadcrumb">
@@ -148,4 +149,10 @@

 @section scripts{
     @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
+
+    <script>
+        $(function () {
+            tinymce.init({ selector: 'textarea', height: 150 });
+        });
+    </script>
 }


Trying to get build to work when Carbon is both signed and unsigned.

--- Source/Properties/AssemblyInfo.cs
+++ Source/Properties/AssemblyInfo.cs
@@ -33,8 +33,5 @@
 // The following GUID is for the ID of the typelib if this project is exposed to COM
 [assembly: Guid("93195104-8447-4c5f-91cb-8255a9a76b01")]

-#if DEBUG
 [assembly: InternalsVisibleTo("Carbon.Test")]
-#else
 [assembly: InternalsVisibleTo("Carbon.Test,PublicKey=0024000004800000940000000602000000240000525341310004000001000100a3d2a6d2d3764691c47ee02daeb68fed39fe5a5bdb07b72568d4febe8a37cc3468bb3fc0a2dae7ccd305d436c1ab8a00d063268332d6bb179303003ee8d8c01d96a3acf3a0ee61a146ae96f55ecc0f0b18f732c920ba0143ece0b403e9b92b41f58bd69ec12277507835fb4788a8f37652c5184b2757d81b0ad3b50457ae5b90")]
-#endif


CI: updated AssemblyInfo version to 2.6.106.4

--- Source/Properties/AssemblyInfo.cs
+++ Source/Properties/AssemblyInfo.cs
@@ -7,7 +7,7 @@
 [assembly: AssemblyProduct("Moq")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("2.6.106.3")]
+[assembly: AssemblyVersion("2.6.106.4")]
 [assembly: AssemblyFileVersion("2.6.0.0")]

 [assembly: InternalsVisibleTo("Moq.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001009f7a95086500f8f66d892174803850fed9c22225c2ccfff21f39c8af8abfa5415b1664efd0d8e0a6f7f2513b1c11659bd84723dc7900c3d481b833a73a2bcf1ed94c16c4be64d54352c86956c89930444e9ac15124d3693e3f029818e8410f167399d6b995324b635e95353ba97bfab856abbaeb9b40c9b160070c6325e22ddc")]


Improve Error message when use Asset name.

--- MediaButler.BaseProcess/Base/SelectAssetByStep.cs
+++ MediaButler.BaseProcess/Base/SelectAssetByStep.cs
@@ -34,8 +34,18 @@
                 default:
                     var _MediaServicesContext = new CloudMediaContext(myRequest.MediaAccountName, myRequest.MediaAccountKey);
                     string AssetName = dotControlData.Read(DotControlConfigKeys.SelectAssetByValue);
-                    IAsset asset = (from m in _MediaServicesContext.Assets select m).Where(m => m.Name == AssetName).FirstOrDefault();
-                    myRequest.AssetId = asset.Id;
+                    try
+                    {
+
+                        IAsset asset = (from m in _MediaServicesContext.Assets select m).Where(m => m.Name == AssetName).FirstOrDefault();
+                        myRequest.AssetId = asset.Id;
+                    }
+                    catch (Exception X)
+                    {
+
+                        throw new Exception("Error Loading Asset by name " + AssetName);
+                    }
+
                     break;
             }
         }


Update FileSearch.cs

Update FileSearch.cs

The correction of typos: MaxVersion, MaxDate

--- Source/src/WixSharp/FileSearch.cs
+++ Source/src/WixSharp/FileSearch.cs
@@ -44,7 +44,7 @@
         /// minute and ss is second.
         /// </summary>
         [Xml]
-        public string DateTime;
+        public string MaxDate;

         /// <summary>
         /// The maximum size of the file.
@@ -53,7 +53,7 @@
         public int? MaxSize;

         /// <summary>
-        /// The minimum version of the file
+        /// The maximum version of the file
         /// </summary>
         [Xml]
         public string MaxVersion;
@@ -111,4 +111,4 @@
             base.Process(context, "FileSearch");
         }
     }
-}+}


Fixes #1917

Fixes #1917

--- NadekoBot.Core/Services/Impl/BotConfigProvider.cs
+++ NadekoBot.Core/Services/Impl/BotConfigProvider.cs
@@ -118,7 +118,7 @@
                             return false;
                         break;
                     case BotConfigEditType.BetflipMultiplier:
-                        if (int.TryParse(newValue, out var bf) && bf > 0)
+                        if (float.TryParse(newValue, out var bf) && bf > 0)
                             bc.BetflipMultiplier = bf;
                         else
                             return false;


Also resize month calendar partial view

Also resize month calendar partial view

--- Oogstplanner.Web/Views/Home/_MonthCalendar.cshtml
+++ Oogstplanner.Web/Views/Home/_MonthCalendar.cshtml
@@ -6,7 +6,7 @@

-

+

@Model.DisplayMonth

@@ -17,7 +17,7 @@

-

+

                 ZAAIEN

@@ -26,7 +26,7 @@

-

+

                 OOGSTEN


playerVsBot now can start a game right away if the dll-path is passed as command-line-argument

--- OpenQuoridorFramework/OQF.PlayerVsBot/App.xaml.cs
+++ OpenQuoridorFramework/OQF.PlayerVsBot/App.xaml.cs
@@ -39,6 +39,15 @@
 															  gameService,
 															  applicationSettingsRepository);

+			if (e.Args.Length == 1)
+			{
+				var dllPath = e.Args[0];
+				mainWindowViewModel.DllPathInput = dllPath;
+
+				if (mainWindowViewModel.Start.CanExecute(null))
+					mainWindowViewModel.Start.Execute(null);
+			}
+
 			var mainWindow = new MainWindow
 			{
 				DataContext = mainWindowViewModel


Change the help message to point to copying OpenSimDefaults.ini.example. Provide a mostly empty OpenSim.ini.example

--- OpenSim/Region/Application/ConfigurationLoader.cs
+++ OpenSim/Region/Application/ConfigurationLoader.cs
@@ -172,7 +172,7 @@
             if (sources.Count == 0)
             {
                 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
-                m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?");
+                m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?");
                 Environment.Exit(1);
             }


* Tweak to above

* Tweak to above

--- OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs
+++ OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs
@@ -110,7 +110,7 @@
                 {
                     IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>();
                     if (dialogModule != null)
-                        dialogModule.SendNotificationToUsersInEstate(UUID.Random(), user, message);
+                        dialogModule.SendNotificationToUsersInRegion(UUID.Random(), user, message);
                 }

             responseData["accepted"] = true;


Remove the non-active button from the jumbotron.

--- mvcWebApp/Views/Home/_Jumbotron.cshtml
+++ mvcWebApp/Views/Home/_Jumbotron.cshtml
@@ -3,8 +3,7 @@

Welcome!

-
We are Sweet Water Revolver. This is our website. Please look around and check out our...

-
... showtimes.

+
We are Sweet Water Revolver. This is our website. Please look around.


Modified about page

Modified about page

--- GitTestApp/Views/Home/About.cshtml
+++ GitTestApp/Views/Home/About.cshtml
@@ -4,4 +4,4 @@

@ViewBag.Title.

@ViewBag.Message

-
Use this area to provide additional information.

+
Þetta er verkefni í HR á annarri önn


Revert "Newline at end of file missing, added."

This reverts commit 4a444ccadc24dc37a2255a33f0dc1f762f13079b.
Undo newline.

--- Google.PowerShell/Dns/GcdCmdlet.cs
+++ Google.PowerShell/Dns/GcdCmdlet.cs
@@ -24,4 +24,4 @@
             Service = service ?? new DnsService(GetBaseClientServiceInitializer());
         }
     }
-}
+}


Examples Updated

Examples Updated

--- Examples/GroupDocs.Annotation.Examples.CSharp/GroupDocs.AnnotationExamples/CommonUtilities.cs
+++ Examples/GroupDocs.Annotation.Examples.CSharp/GroupDocs.AnnotationExamples/CommonUtilities.cs
@@ -126,6 +126,18 @@
         }
         //ExEnd:ApplyLicense

+        /// <summary>
+        /// Set Metered License
+        /// </summary>
+        public static void SetMeteredLicense(Stream licenseStream)
+        {
+            string PublicKey = ""; // Your public license key
+            string PrivateKey = ""; // Your private license key
+            GroupDocs.Annotation.Common.License.Metered metered = new GroupDocs.Annotation.Common.License.Metered();
+            metered.SetMeteredKey(PublicKey, PrivateKey);
+        }
+        //ExEnd:SetMeteredLicense
+
         //ExStart:GetConfiguration
         /// <summary>
         /// Sets annotation configuration


Invalid comment of cooling strategy fixed.

--- Localwire.Graphinder.Core/Algorithms/SimulatedAnnealing/CoolingStrategies/AllRandomCooling.cs
+++ Localwire.Graphinder.Core/Algorithms/SimulatedAnnealing/CoolingStrategies/AllRandomCooling.cs
@@ -39,7 +39,7 @@
                     proposedSolution.Add(algorithm.Graph.GetRandomNode());
                 }

-                //Rollback if solution has not been accepted
+                //Accept the answer if algorithm allows
                 if (algorithm.CanAcceptAnswer(proposedSolution))
                     algorithm.Problem.SetNewSolution(proposedSolution);


Check for null before using searchPaths parameter.

--- Python/Product/PythonTools/PythonTools/LanguageServerClient/PythonLanguageServerDotNetCore.cs
+++ Python/Product/PythonTools/PythonTools/LanguageServerClient/PythonLanguageServerDotNetCore.cs
@@ -72,8 +72,6 @@
             var serverFolderPath = GetServerLocation();

             return new PythonInitializationOptions {
-                // we need to read from the workspace settings in order to populate this correctly
-                // (or from the project)
                 interpreter = new PythonInitializationOptions.Interpreter {
                     properties = new PythonInitializationOptions.Interpreter.InterpreterProperties {
                         InterpreterPath = interpreterPath,
@@ -81,7 +79,7 @@
                         DatabasePath = serverFolderPath,
                     }
                 },
-                searchPaths = searchPaths.ToArray(),
+                searchPaths = searchPaths?.ToArray() ?? new string[0],
                 typeStubSearchPaths = new[] {
                         Path.Combine(serverFolderPath, "Typeshed")
                     },


Added paramter attributes

Added paramter attributes

--- PInvoke/Shell32/ShObjIdl.INamespaceTreeControl.cs
+++ PInvoke/Shell32/ShObjIdl.INamespaceTreeControl.cs
@@ -615,7 +615,7 @@
 			// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-inamespacetreecontrol-insertroot HRESULT
 			// InsertRoot( int iIndex, IShellItem *psiRoot, SHCONTF grfEnumFlags, NSTCROOTSTYLE grfRootStyle, IShellItemFilter *pif );
 			[PreserveSig]
-			HRESULT InsertRoot(int iIndex, IShellItem psiRoot, SHCONTF grfEnumFlags, NSTCROOTSTYLE grfRootStyle, [In] IShellItemFilter pif);
+			HRESULT InsertRoot(int iIndex, IShellItem psiRoot, SHCONTF grfEnumFlags, NSTCROOTSTYLE grfRootStyle, [In, Optional] IShellItemFilter pif);

 			/// <summary>Removes a root and its children from a tree.</summary>
 			/// <param name="psiRoot">


update

update

--- Demos/RaycastVolumeRendering/RaycastNode.Initialize.cs
+++ Demos/RaycastVolumeRendering/RaycastNode.Initialize.cs
@@ -44,7 +44,7 @@
             // TransferFunc
             // ExitPoints i.e. the backface, the backface hold the ExitPoints of ray casting
             // VolumeTex the texture that hold the volume data i.e. head256.raw
-            RenderUnit unit = this.RenderUnits[0];
+            RenderUnit unit = this.RenderUnits[1];
             ShaderProgram program = unit.Program;
             program.SetUniform("ScreenSize", new vec2(width, height));
             program.SetUniform("StepSize", g_stepSize);


Fix build error in VS2015

Fix build error in VS2015

--- Plugins/Drift/Source/RapidJson/RapidJson.Build.cs
+++ Plugins/Drift/Source/RapidJson/RapidJson.Build.cs
@@ -32,14 +32,18 @@
                 "HTTP",
             }
             );
-
-
+
+
         PrivateDependencyModuleNames.AddRange(
             new string[]
             {
                 // ... add private dependencies that you statically link with here ...
             }
             );
-
+
+        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.PS4))
+        {
+            Definitions.Add("RAPIDJSON_HAS_CXX11_RVALUE_REFS=1");
+        }
     }
 }


Review changes

Review changes

--- Presentation.Web/Controllers/SSO/SSOController.cs
+++ Presentation.Web/Controllers/SSO/SSOController.cs
@@ -1,10 +1,5 @@
 using System;
-using System.Linq;
-using System.Net.Http;
-using System.Net.Http.Headers;
 using System.Web.Http;
-using System.Web.Http.Controllers;
-using System.Web.Http.Filters;
 using System.Web.Http.Results;
 using Core.ApplicationServices.SSO;
 using Core.ApplicationServices.SSO.Model;
@@ -24,7 +19,6 @@
         }

         [InternalApi]
-        //[RemoveSamlCookieFilter]
         [HttpGet]
         [Route("")]
         public IHttpActionResult SSO()
@@ -64,30 +58,4 @@
             return Redirect(uriBuilder.Uri);
         }
     }
-
-    public class RemoveSamlCookieFilter : ActionFilterAttribute
-    {
-        public override void OnActionExecuting(HttpActionContext actionContext)
-        {
-            var request = actionContext.Request;
-            var response = actionContext.Request.CreateResponse();
-
-            var currentCookie = request.Headers.GetCookies("oiosamlSession").FirstOrDefault();
-            if (currentCookie != null)
-            {
-                var cookie = new CookieHeaderValue("oiosamlSession", "")
-                {
-                    Expires = DateTimeOffset.Now.AddDays(-1),
-                    Domain = currentCookie.Domain,
-                    Path = currentCookie.Path,
-                    HttpOnly = currentCookie.HttpOnly,
-                    Secure = currentCookie.Secure
-                };
-
-                response.Headers.AddCookies(new[] { cookie });
-            }
-
-            base.OnActionExecuting(actionContext);
-        }
-    }
 }


PerfEffect working well

PerfEffect working well

--- Project-Aurora/Scripts/VoronScripts/PerfEffect.cs
+++ Project-Aurora/Scripts/VoronScripts/PerfEffect.cs
@@ -8,10 +8,12 @@
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.ComponentModel;
 using System.Data;
 using System.Diagnostics;
 using System.Drawing;
+using System.Drawing.Drawing2D;
 using System.Globalization;
 using System.IO;
 using System.Linq;
@@ -32,6 +34,10 @@
 using Aurora.Scripts.VoronScripts.OpenHardwareMonitor.Hardware.Nvidia;
 using Aurora.Settings;
 using Aurora.Utils;
+using CircleGradientStateKey =
+	System.Tuple<Aurora.EffectsEngine.ColorSpectrum, Aurora.Scripts.VoronScripts.PerformanceCounterManager.IntervalPerformanceCounter, float, float>;
+using CircleGradientState = System.Collections.Generic.KeyValuePair<float, long>;
+using Aurora.Scripts.VoronScripts.Mathos.Parser;

 namespace Aurora.Scripts.VoronScripts
 {
@@ -78,19 +84,20 @@
 			AuroraInternal.Disk.Register();
 			AuroraInternal.Memory.Register();
 			AuroraInternal.Network.Register();
+			AuroraInternal.Gpu.Register();

 			Properties = new VariableRegistry();

 			Properties.RegProp("Keys or Freestyle",
 				new KeySequence(new[] { DeviceKeys.G6, DeviceKeys.G7, DeviceKeys.G8, DeviceKeys.G9 }));

-			Properties.RegProp("Effect type", (int)default(EffectTypes),
+			Properties.RegProp("Effect type", (long)EffectTypes.ProgressiveGradual,
 				String.Join(Environment.NewLine,
 				Enum.GetValues(typeof(EffectTypes)).Cast<EffectTypes>().Select(x => string.Format("{0} - {1}", (int)x, x))),
 				(int)Enum.GetValues(typeof(EffectTypes)).Cast<EffectTypes>().Min(),
 				(int)Enum.GetValues(typeof(EffectTypes)).Cast<EffectTypes>().Max());

-			Properties.RegProp("Value source", "Aurora Internal | Memory | % PhysicalMemoryUsed",
+			Properties.RegProp("Value source", "Processor | % Processor Time | _Total",
 				String.Join(Environment.NewLine, new[]
 				{
 					"Enter any valid Aurora Internal or Windows performance counter for your system in format \"Category | Name | Instance\".",
@@ -99,38 +106,41 @@
 				}.Concat(PerformanceCounterManager.InternalRegisteredCounters
 				.Select(x => string.Format("{0} | {1} | {2}", x.Item1, x.Item2, x.Item3)).OrderBy(x => x)))
 			);
-			//new PerformanceCounter().
-			//a = (int) new DataTable().Compute("1 + 2 * 7", null);
-
-			Properties.RegProp("Value expression", "X",
-				"Math expression that is used to normalize raw value. X is the raw value. Normalized value should be in 0-100 range.");
-
-			Properties.RegProp("Gradient", ScriptHelper.SpectrumToString(new ColorSpectrum(
-					Color.Lime,
-					Color.Orange,
-					Color.Red)
-				),
+
+			Properties.RegProp("Value expression", "x",
+				"Math expression that is used to normalize raw value. \"x\" is the raw value. Normalized value should be in 0-100 range.");
+
+			Properties.RegProp("Gradient", "#FF00FF00 | #FFFFA500 | #FFFF0000",
 				String.Join(Environment.NewLine,
 				"Gradient that is used for effect. Separate color points with \"|\".",
 				"Optionally set point position with \"@\" symbol."));

 			Properties.RegProp("Enable Overload Blinking", true, "Last gradient color will blink when value reaches overload threshold level");

-			Properties.RegProp("Overload Start Threshold", 95, "Blinking start be visible when value reaches this level", 0, 100);
-
-			Properties.RegProp("Overload Full Threshold", 100, "Blinking will be fully visible when value reaches this level", 0, 100);
-
-			Properties.RegProp("Overload Blinking Speed", 1000, "Speed of CoreOverload blinking in ms", 10, 10000);
+			Properties.RegProp("Overload Start Threshold", 95L, "Blinking start be visible when value reaches this level", 0, 100);
+
+			Properties.RegProp("Overload Full Threshold", 100L, "Blinking will be fully visible when value reaches this level", 0, 100);
+
+			Properties.RegProp("Overload Blinking Speed", 1000L, "Speed of CoreOverload blinking in ms", 10, 10000);

 			Properties.RegProp("Overload Blinking Color", new RealColor(Color.Black));

-		}
+			Properties.RegProp("Cycled Gradient Shift Base Speed", 0L, "Cycled gradient shifting speed at 0%", -1000, 1000);
+
+			Properties.RegProp("Cycled Gradient Shift Full Speed", 100L, "Cycled gradient shifting speed at 100%", -1000, 1000);
+
+		}
+
+		private static readonly MathParser MathParser = new MathParser();

 		private static readonly ConcurrentDictionary<string, PerformanceCounterManager.IntervalPerformanceCounter> valueSources
 			= new ConcurrentDictionary<string, PerformanceCounterManager.IntervalPerformanceCounter>();

 		private static readonly ConcurrentDictionary<string, ColorSpectrum> gradients
 			= new ConcurrentDictionary<string, ColorSpectrum>();
+
+		private static readonly ConcurrentDictionary<CircleGradientStateKey, CircleGradientState>
+			circleShidtStates = new ConcurrentDictionary<CircleGradientStateKey, CircleGradientState>();

 		private KeySequence Keys { get; set; }
 		private EffectTypes EffectType { get; set; }
@@ -143,11 +153,13 @@
 		private float OverloadFullThreshold { get; set; }
 		private int OverloadBlinkingSpeed { get; set; }
 		private Color OverloadBlinkingColor { get; set; }
+		private float CycledGradientShiftBaseSpeed { get; set; }
+		private float CycledGradientShiftFullSpeed { get; set; }

 		private void ReadProperties(VariableRegistry properties)
 		{
 			Keys = properties.GetVariable<KeySequence>("Keys or Freestyle");
-			EffectType = (EffectTypes)properties.GetVariable<int>("Effect type");
+			EffectType = (EffectTypes)properties.GetVariable<long>("Effect type");

 			ValueSource = valueSources.GetOrAdd(properties.GetVariable<string>("Value source"), key =>
 			{
@@ -159,11 +171,14 @@
 			Gradient = gradients.GetOrAdd(properties.GetVariable<string>("Gradient"), ScriptHelper.StringToSpectrum);

 			EnableOverloadBlinking = properties.GetVariable<bool>("Enable Overload Blinking");
-			OverloadStartThreshold = properties.GetVariable<int>("Overload Start Threshold");
-			OverloadFullThreshold = properties.GetVariable<int>("Overload Full Threshold");
-			OverloadBlinkingSpeed = properties.GetVariable<int>("Overload Blinking Speed");
+			OverloadStartThreshold = properties.GetVariable<long>("Overload Start Threshold") / 100f;
+			OverloadFullThreshold = properties.GetVariable<long>("Overload Full Threshold") / 100f;
+			OverloadBlinkingSpeed = (int)properties.GetVariable<long>("Overload Blinking Speed");
 			OverloadBlinkingColor = properties.GetVariable<RealColor>("Overload Blinking Color")
 				.GetDrawingColor();
+
+			CycledGradientShiftBaseSpeed = properties.GetVariable<long>("Cycled Gradient Shift Base Speed") / 100f;
+			CycledGradientShiftFullSpeed = properties.GetVariable<long>("Cycled Gradient Shift Full Speed") / 100f;
 		}

 		public object UpdateLights(VariableRegistry properties, IGameState state = null)
@@ -171,17 +186,66 @@
 			ReadProperties(properties);

 			var layer = new EffectLayer(ID);
-
 			var value = ValueSource.GetValue() / 100f;
+			if (ValueExpression != "x")
+			{
+				MathParser.LocalVariables["x"] = (decimal)value;
+				value = (float)MathParser.Parse(ValueExpression);
+			}
 			value = Math.Max(0, Math.Min(1, value));
-			//(Utils.Time.GetMillisecondsSinceEpoch() % 3000) / 30.0f / 100f;
-
-			//var blinkingLevel = (value - OverloadBlinkingSpeed) / (1 - OverloadBlinkingSpeed);
-			//blinkingLevel = Math.Max(0, Math.Min(1, blinkingLevel))
-			//				* Math.Abs(1f - (Time.GetMillisecondsSinceEpoch() % OverloadBlinkingSpeed) / (OverloadBlinkingSpeed / 2f));
-
-
-			layer.PercentEffect(Gradient, Keys, value, 1, PercentEffectType.Progressive_Gradual);
+
+			var time = Time.GetMillisecondsSinceEpoch();
+
+			var gradient = new ColorSpectrum();
+			foreach (var keyValuePair in Gradient.GetSpectrumColors())
+			{
+				gradient.SetColorAt(keyValuePair.Key, keyValuePair.Value);
+			}
+
+			if (EnableOverloadBlinking)
+			{
+				var blinkingLevel = (value - OverloadStartThreshold) / (OverloadFullThreshold - OverloadStartThreshold);
+				blinkingLevel = Math.Max(0f, Math.Min(1f, blinkingLevel))
+								* Math.Abs(1f - (time % OverloadBlinkingSpeed) / (OverloadBlinkingSpeed / 2f));
+
+				gradient.SetColorAt(1, (Color)EffectColor.BlendColors(
+					new EffectColor(gradient.GetColorAt(1f)),
+					new EffectColor(OverloadBlinkingColor), blinkingLevel));
+			}
+
+			if (EffectType == EffectTypes.CycledGradientShift)
+			{
+				var currSpeed = value * Math.Abs(CycledGradientShiftBaseSpeed - CycledGradientShiftFullSpeed) +
+								CycledGradientShiftBaseSpeed;
+
+				var gradState = circleShidtStates.AddOrUpdate(
+					new CircleGradientStateKey(
+						Gradient, ValueSource, CycledGradientShiftBaseSpeed, CycledGradientShiftFullSpeed), (key) =>
+					new CircleGradientState(0, time), (keys, prevState) =>
+					new CircleGradientState((prevState.Key + (time - prevState.Value) * currSpeed / 1000f) % 1f, time));
+
+				layer.PercentEffect(gradient.Shift(gradState.Key), Keys, 1, 1, PercentEffectType.Progressive_Gradual);
+			}
+			else
+			{
+				PercentEffectType effectType;
+				switch (EffectType)
+				{
+					case EffectTypes.AllAtOnce:
+						effectType = PercentEffectType.AllAtOnce;
+						break;
+					case EffectTypes.Progressive:
+						effectType = PercentEffectType.Progressive;
+						break;
+					case EffectTypes.ProgressiveGradual:
+						effectType = PercentEffectType.Progressive_Gradual;
+						break;
+					default:
+						throw new ArgumentOutOfRangeException();
+				}
+				layer.PercentEffect(gradient, Keys, value, 1, effectType);
+			}
+

 			//var cpuLoad = Cpu.GetValue();
@@ -630,6 +694,10 @@
 				stringWriter.Close();
 				InitLog = log.ToString();
 #endif
+			}
+
+			public static void Register()
+			{
 				bool registerGeneral = true;

 				for (var i = 0; i < NvidiaGpus.Length; i++)
@@ -1067,6 +1135,561 @@
 				return ngpus.ToArray();
 			}

+		}
+	}
+
+	#endregion
+
+	#region Mathos-Parser-Portable
+
+	/*
+ * Copyright (C) 2012-2014 Artem Los,
+ * All rights reserved.
+ *
+ * Please see the license file in the project folder,
+ * or, goto https://mathosparser.codeplex.com/license.
+ *
+ * Please feel free to ask me directly at my email!
+ *  artem@artemlos.net
+ */
+
+	namespace Mathos.Parser
+	{
+		/// <summary>
+		/// This is a mathematical expression parser that allows you to parser a string value,
+		/// perform the required calculations, and return a value in form of a decimal.
+		/// </summary>
+		internal class MathParser
+		{
+			/// <summary>
+			/// This constructor will add some basic operators, functions, and variables
+			/// to the parser. Please note that you are able to change that using
+			/// boolean flags
+			/// </summary>
+			/// <param name="loadPreDefinedFunctions">This will load "abs", "cos", "cosh", "arccos", "sin", "sinh", "arcsin", "tan", "tanh", "arctan", "sqrt", "rem", "round"</param>
+			/// <param name="loadPreDefinedOperators">This will load "%", "*", ":", "/", "+", "-", ">", "<", "="</param>
+			/// <param name="loadPreDefinedVariables">This will load "pi" and "e"</param>
+			public MathParser(bool loadPreDefinedFunctions = true, bool loadPreDefinedOperators = true, bool loadPreDefinedVariables = true)
+			{
+				if (loadPreDefinedOperators)
+				{
+					// by default, we will load basic arithmetic operators.
+					// please note, its possible to do it either inside the constructor,
+					// or outside the class. the lowest value will be executed first!
+					OperatorList.Add("%"); // modulo
+					OperatorList.Add("^"); // to the power of
+					OperatorList.Add(":"); // division 1
+					OperatorList.Add("/"); // division 2
+					OperatorList.Add("*"); // multiplication
+					OperatorList.Add("-"); // subtraction
+					OperatorList.Add("+"); // addition
+
+					OperatorList.Add(">"); // greater than
+					OperatorList.Add("<"); // less than
+					OperatorList.Add("="); // are equal
+
+
+					// when an operator is executed, the parser needs to know how.
+					// this is how you can add your own operators. note, the order
+					// in this list does not matter.
+					_operatorAction.Add("%", (numberA, numberB) => numberA % numberB);
+					_operatorAction.Add("^", (numberA, numberB) => (decimal)Math.Pow((double)numberA, (double)numberB));
+					_operatorAction.Add(":", (numberA, numberB) => numberA / numberB);
+					_operatorAction.Add("/", (numberA, numberB) => numberA / numberB);
+					_operatorAction.Add("*", (numberA, numberB) => numberA * numberB);
+					_operatorAction.Add("+", (numberA, numberB) => numberA + numberB);
+					_operatorAction.Add("-", (numberA, numberB) => numberA - numberB);
+
+					_operatorAction.Add(">", (numberA, numberB) => numberA > numberB ? 1 : 0);
+					_operatorAction.Add("<", (numberA, numberB) => numberA < numberB ? 1 : 0);
+					_operatorAction.Add("=", (numberA, numberB) => numberA == numberB ? 1 : 0);
+				}
+
+
+				if (loadPreDefinedFunctions)
+				{
+					// these are the basic functions you might be able to use.
+					// as with operators, localFunctions might be adjusted, i.e.
+					// you can add or remove a function.
+					// please open the "MathosTest" project, and find MathParser.cs
+					// in "CustomFunction" you will see three ways of adding
+					// a new function to this variable!
+					// EACH FUNCTION MAY ONLY TAKE ONE PARAMETER, AND RETURN ONE
+					// VALUE. THESE VALUES SHOULD BE IN "DECIMAL FORMAT"!
+					LocalFunctions.Add("abs", x => (decimal)Math.Abs((double)x[0]));
+
+					LocalFunctions.Add("cos", x => (decimal)Math.Cos((double)x[0]));
+					LocalFunctions.Add("cosh", x => (decimal)Math.Cosh((double)x[0]));
+					LocalFunctions.Add("arccos", x => (decimal)Math.Acos((double)x[0]));
+
+					LocalFunctions.Add("sin", x => (decimal)Math.Sin((double)x[0]));
+					LocalFunctions.Add("sinh", x => (decimal)Math.Sinh((double)x[0]));
+					LocalFunctions.Add("arcsin", x => (decimal)Math.Asin((double)x[0]));
+
+					LocalFunctions.Add("tan", x => (decimal)Math.Tan((double)x[0]));
+					LocalFunctions.Add("tanh", x => (decimal)Math.Tanh((double)x[0]));
+					LocalFunctions.Add("arctan", x => (decimal)Math.Atan((double)x[0]));
+					//LocalFunctions.Add("arctan2", x => (decimal)Math.Atan2((double)x[0], (double)x[1]));
+
+					LocalFunctions.Add("sqrt", x => (decimal)Math.Sqrt((double)x[0]));
+					LocalFunctions.Add("rem", x => (decimal)Math.IEEERemainder((double)x[0], (double)x[1]));
+					LocalFunctions.Add("root", x => (decimal)Math.Pow((double)x[0], 1.0 / (double)x[1]));
+
+					LocalFunctions.Add("pow", x => (decimal)Math.Pow((double)x[0], (double)x[1]));
+
+					LocalFunctions.Add("exp", x => (decimal)Math.Exp((double)x[0]));
+					//LocalFunctions.Add("log", x => (decimal)Math.Log((double)x[0]));
+					//LocalFunctions.Add("log10", x => (decimal)Math.Log10((double)x[0]));
+					LocalFunctions.Add("log", delegate (decimal[] input)
+					{
+						// input[0] is the number
+						// input[1] is the base
+
+						switch (input.Length)
+						{
+							case 1:
+								return (decimal)Math.Log((double)input[0]);
+							case 2:
+								return (decimal)Math.Log((double)input[0], (double)input[1]);
+							default:
+								return 0; // false
+						}
+					});
+
+					LocalFunctions.Add("round", x => (decimal)Math.Round((double)x[0]));
+					LocalFunctions.Add("truncate", x => (decimal)(x[0] < 0.0m ? -Math.Floor(-(double)x[0]) : Math.Floor((double)x[0])));
+					LocalFunctions.Add("floor", x => (decimal)Math.Floor((double)x[0]));
+					LocalFunctions.Add("ceiling", x => (decimal)Math.Ceiling((double)x[0]));
+					LocalFunctions.Add("sign", x => (decimal)Math.Sign((double)x[0]));
+
+				}
+
+				if (loadPreDefinedVariables)
+				{
+					// local variables such as pi can also be added into the parser.
+					LocalVariables.Add("pi", (decimal)3.14159265358979323846264338327950288); // the simplest variable!
+					LocalVariables.Add("pi2", (decimal)6.28318530717958647692528676655900576);
+					LocalVariables.Add("pi05", (decimal)1.57079632679489661923132169163975144);
+					LocalVariables.Add("pi025", (decimal)0.78539816339744830961566084581987572);
+					LocalVariables.Add("pi0125", (decimal)0.39269908169872415480783042290993786);
+					LocalVariables.Add("pitograd", (decimal)57.2957795130823208767981548141051704);
+					LocalVariables.Add("piofgrad", (decimal)0.01745329251994329576923690768488612);
+
+					LocalVariables.Add("e", (decimal)2.71828182845904523536028747135266249);
+					LocalVariables.Add("phi", (decimal)1.61803398874989484820458683436563811);
+					LocalVariables.Add("major", (decimal)0.61803398874989484820458683436563811);
+					LocalVariables.Add("minor", (decimal)0.38196601125010515179541316563436189);
+				}
+			}
+
+
+			/* THE LOCAL VARIABLES */
+			private List<string> _operatorList = new List<string>();
+			/// <summary>
+			/// All operators should be inside this property.
+			/// The first operator is executed first, et cetera.
+			/// An operator may only be ONE character.
+			/// </summary>
+			public List<string> OperatorList
+			{
+				get { return _operatorList; }
+				set { _operatorList = value; }
+			}
+			private Dictionary<string, Func<decimal, decimal, decimal>> _operatorAction = new Dictionary<string, Func<decimal, decimal, decimal>>();
+			/// <summary>
+			/// When adding a variable in the OperatorList property, you need to assign how that operator should work.
+			/// </summary>
+			public Dictionary<string, Func<decimal, decimal, decimal>> OperatorAction
+			{
+				get { return _operatorAction; }
+				set { _operatorAction = value; }
+			}
+			private Dictionary<string, Func<decimal[], decimal>> _localFunctions = new Dictionary<string, Func<decimal[], decimal>>();
+			/// <summary>
+			/// All functions that you want to define should be inside this property.
+			/// </summary>
+			public Dictionary<string, Func<decimal[], decimal>> LocalFunctions
+			{
+				get { return _localFunctions; }
+				set { _localFunctions = value; }
+			}
+			private Dictionary<string, decimal> _localVariables = new Dictionary<string, decimal>();
+			/// <summary>
+			/// All variables that you want to define should be inside this property.
+			/// </summary>
+			public Dictionary<string, decimal> LocalVariables
+			{
+				get { return _localVariables; }
+				set { _localVariables = value; }
+			}
+
+			private readonly CultureInfo _cultureInfo = CultureInfo.InvariantCulture;
+			/// <summary>
+			/// When converting the result from the Parse method or ProgrammaticallyParse method ToString(),
+			/// please use this cultur info.
+			/// </summary>
+			public CultureInfo CultureInfo
+			{
+				get { return _cultureInfo; }
+			}
+
+
+			/* PARSER FUNCTIONS, PUBLIC */
+			/// <summary>
+			/// Enter the math expression in form of a string.
+			/// </summary>
+			/// <param name="mathExpression"></param>
+			/// <returns></returns>
+			public decimal Parse(string mathExpression)
+			{
+				return MathParserLogic(Scanner(mathExpression));
+			}
+
+			/// <summary>
+			/// Enter the math expression in form of a list of tokens.
+			/// </summary>
+			/// <param name="mathExpression"></param>
+			/// <returns></returns>
+			public decimal Parse(ReadOnlyCollection<string> mathExpression)
+			{
+				return MathParserLogic(new List<string>(mathExpression));
+			}
+
+			/// <summary>
+			/// Enter the math expression in form of a string. You might also add/edit variables using "let" keyword.
+			/// For example, "let sampleVariable = 2+2".
+			///
+			/// Another way of adding/editing a variable is to type "varName := 20"
+			///
+			/// Last way of adding/editing a variable is to type "let varName be 20"
+			/// </summary>
+			/// <param name="mathExpression"></param>
+			/// <param name="correctExpression"></param>
+			/// <param name="identifyComments"></param>
+			/// <returns></returns>
+			public decimal ProgrammaticallyParse(string mathExpression, bool correctExpression = true, bool identifyComments = true)
+			{
+				if (identifyComments)
+				{
+					mathExpression = System.Text.RegularExpressions.Regex.Replace(mathExpression, "#\\{.*?\\}#", ""); // Delete Comments #{Comment}#
+					mathExpression = System.Text.RegularExpressions.Regex.Replace(mathExpression, "#.*$", ""); // Delete Comments #Comment
+				}
+
+				if (correctExpression)
+					mathExpression = Correction(mathExpression);
+				// this refers to the Correction function which will correct stuff like artn to arctan, etc.
+
+				string varName;
+				decimal varValue;
+				if (mathExpression.Contains("let"))
+				{
+					if (mathExpression.Contains("be"))
+					{
+						varName = mathExpression.Substring(mathExpression.IndexOf("let", StringComparison.Ordinal) + 3, mathExpression.IndexOf("be", StringComparison.Ordinal) - mathExpression.IndexOf("let", StringComparison.Ordinal) - 3);
+						mathExpression = mathExpression.Replace(varName + "be", "");
+					}
+					else
+					{
+						varName = mathExpression.Substring(mathExpression.IndexOf("let", StringComparison.Ordinal) + 3, mathExpression.IndexOf("=", StringComparison.Ordinal) - mathExpression.IndexOf("let", StringComparison.Ordinal) - 3);
+						mathExpression = mathExpression.Replace(varName + "=", "");
+					}
+
+					varName = varName.Replace(" ", "");
+					mathExpression = mathExpression.Replace("let", "");
+
+					varValue = Parse(mathExpression);
+
+					if (LocalVariables.ContainsKey(varName))
+						LocalVariables[varName] = varValue;
+					else
+						LocalVariables.Add(varName, varValue);
+
+					return varValue;
+				}
+
+				if (!mathExpression.Contains(":=")) return Parse(mathExpression);
+
+				//mathExpression = mathExpression.Replace(" ", ""); // remove white space
+				varName = mathExpression.Substring(0, mathExpression.IndexOf(":=", StringComparison.Ordinal));
+				mathExpression = mathExpression.Replace(varName + ":=", "");
+
+				varValue = Parse(mathExpression);
+				varName = varName.Replace(" ", "");
+
+				if (LocalVariables.ContainsKey(varName))
+				{
+					LocalVariables[varName] = varValue;
+				}
+				else
+				{
+					LocalVariables.Add(varName, varValue);
+				}
+
+				return varValue;
+			}
+
+			/// <summary>
+			/// This will convert a string expression into a list of tokens that can be later executed by Parse or ProgrammaticallyParse methods.
+			/// </summary>
+			/// <param name="mathExpression"></param>
+			/// <returns>A ReadOnlyCollection</returns>
+			public ReadOnlyCollection<string> GetTokens(string mathExpression)
+			{
+				return new ReadOnlyCollection<string>(Scanner(mathExpression));
+			}
+
+			/// <summary>
+			/// This will correct sqrt() and arctan() written in different ways only.
+			/// </summary>
+			/// <param name="input"></param>
+			/// <returns></returns>
+			private string Correction(string input)
+			{
+				// Word corrections
+
+				input = System.Text.RegularExpressions.Regex.Replace(input, "\\b(sqr|sqrt)\\b", "sqrt", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
+				input = System.Text.RegularExpressions.Regex.Replace(input, "\\b(atan2|arctan2)\\b", "arctan2", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
+				//... and more
+
+				return input;
+			}
+
+
+			/* UNDER THE HOOD - THE CORE OF THE PARSER */
+			private List<string> Scanner(string expr)
+			{
+				// SCANNING THE INPUT STRING AND CONVERT IT INTO TOKENS
+
+				var tokens = new List<string>();
+				var vector = "";
+
+				//_expr = _expr.Replace(" ", ""); // remove white space
+				expr = expr.Replace("+-", "-"); // some basic arithmetical rules
+				expr = expr.Replace("-+", "-");
+				expr = expr.Replace("--", "+");
+
+				/* foreach (var item in LocalVariables)
+				 {
+					 // replace the current variables with their value
+					 _expr = _expr.Replace(item.Key, "(" + item.Value.ToString(CULTURE_INFO) + ")");
+				 }*/
+
+				for (var i = 0; i < expr.Length; i++)
+				{
+					var ch = expr[i];
+
+					if (char.IsWhiteSpace(ch)) { } // could also be used to remove white spaces.
+					else if (Char.IsLetter(ch))
+					{
+						if (i != 0 && (Char.IsDigit(expr[i - 1]) || Char.IsDigit(expr[i - 1]) || expr[i - 1] == ')'))
+						{
+							tokens.Add("*");
+						}
+
+						vector = vector + ch;
+
+						while ((i + 1) < expr.Length && Char.IsLetterOrDigit(expr[i + 1])) // here is it is possible to choose whether you want variables that only contain letters with or without digits.
+						{
+							i++;
+							vector = vector + expr[i];
+						}
+
+						tokens.Add(vector);
+						vector = "";
+					}
+					else if (Char.IsDigit(ch))
+					{
+						vector = vector + ch;
+
+						while ((i + 1) < expr.Length && (Char.IsDigit(expr[i + 1]) || expr[i + 1] == '.')) // removed || _expr[i + 1] == ','
+						{
+							i++;
+							vector = vector + expr[i];
+						}
+
+						tokens.Add(vector);
+						vector = "";
+					}
+					else if ((i + 1) < expr.Length && (ch == '-' || ch == '+') && Char.IsDigit(expr[i + 1]) && (i == 0 || OperatorList.IndexOf(expr[i - 1].ToString()) != -1 || ((i - 1) > 0 && expr[i - 1] == '('))) // removed CultureInfo.InvariantCulture from expr[i-1].ToString(...)
+					{
+						// if the above is true, then, the token for that negative number will be "-1", not "-","1".
+						// to sum up, the above will be true if the minus sign is in front of the number, but
+						// at the beginning, for example, -1+2, or, when it is inside the brakets (-1).
+						// NOTE: this works for + sign as well!
+						vector = vector + ch;
+
+						while ((i + 1) < expr.Length && (Char.IsDigit(expr[i + 1]) || expr[i + 1] == '.')) // removed || _expr[i + 1] == ','
+						{
+							i++;
+							vector = vector + expr[i];
+						}
+
+						tokens.Add(vector);
+						vector = "";
+					}
+					else if (ch == '(')
+					{
+						if (i != 0 && (Char.IsDigit(expr[i - 1]) || Char.IsDigit(expr[i - 1]) || expr[i - 1] == ')'))
+						{
+							tokens.Add("*");
+							// if we remove this line(above), we would be able to have numbers in function names. however, then we can't parser 3(2+2)
+							tokens.Add("(");
+						}
+						else
+							tokens.Add("(");
+					}
+					else
+					{
+						tokens.Add(ch.ToString());
+					}
+				}
+
+				return tokens;
+				//return MathParserLogic(_tokens);
+			}
+
+			private decimal MathParserLogic(List<string> tokens)
+			{
+				// CALCULATING THE EXPRESSIONS INSIDE THE BRACKETS
+				// IF NEEDED, EXECUTE A FUNCTION
+
+				// Variables replacement
+				for (var i = 0; i < tokens.Count; i++)
+				{
+					if (LocalVariables.Keys.Contains(tokens[i]))
+					{
+						tokens[i] = LocalVariables[tokens[i]].ToString(CultureInfo);
+					}
+				}
+				while (tokens.IndexOf("(") != -1)
+				{
+					// getting data between "(", ")"
+					var open = tokens.LastIndexOf("(");
+					var close = tokens.IndexOf(")", open); // in case open is -1, i.e. no "(" // , open == 0 ? 0 : open - 1
+
+					if (open >= close)
+					{
+						// if there is no closing bracket, throw a new exception
+						throw new ArithmeticException("No closing bracket/parenthesis! tkn: " + open.ToString(CultureInfo.InvariantCulture));
+					}
+
+					var roughExpr = new List<string>();
+
+					for (var i = open + 1; i < close; i++)
+					{
+						roughExpr.Add(tokens[i]);
+					}
+
+					decimal result; // the temporary result is stored here
+
+					var functioName = tokens[open == 0 ? 0 : open - 1];
+					var args = new decimal[0];
+
+					if (LocalFunctions.Keys.Contains(functioName))
+					{
+						if (roughExpr.Contains(","))
+						{
+							// converting all arguments into a decimal array
+							for (var i = 0; i < roughExpr.Count; i++)
+							{
+								var firstCommaOrEndOfExpression = roughExpr.IndexOf(",", i) != -1 ? roughExpr.IndexOf(",", i) : roughExpr.Count;
+								var defaultExpr = new List<string>();
+
+								while (i < firstCommaOrEndOfExpression)
+								{
+									defaultExpr.Add(roughExpr[i]);
+									i++;
+								}
+
+								// changing the size of the array of arguments
+								Array.Resize(ref args, args.Length + 1);
+
+								if (defaultExpr.Count == 0)
+								{
+									args[args.Length - 1] = 0;
+								}
+								else
+								{
+									args[args.Length - 1] = BasicArithmeticalExpression(defaultExpr);
+								}
+							}
+
+							// finnaly, passing the arguments to the given function
+							result = decimal.Parse(LocalFunctions[functioName](args).ToString(CultureInfo), CultureInfo);
+						}
+						else
+						{
+							// but if we only have one argument, then we pass it directly to the function
+							result = decimal.Parse(LocalFunctions[functioName](new[] { BasicArithmeticalExpression(roughExpr) }).ToString(CultureInfo), CultureInfo);
+						}
+					}
+					else
+					{
+						// if no function is need to execute following expression, pass it
+						// to the "BasicArithmeticalExpression" method.
+						result = BasicArithmeticalExpression(roughExpr);
+					}
+
+					// when all the calculations have been done
+					// we replace the "opening bracket with the result"
+					// and removing the rest.
+					tokens[open] = result.ToString(CultureInfo);
+					tokens.RemoveRange(open + 1, close - open);
+					if (LocalFunctions.Keys.Contains(functioName))
+					{
+						// if we also executed a function, removing
+						// the function name as well.
+						tokens.RemoveAt(open - 1);
+					}
+				}
+
+				// at this point, we should have replaced all brackets
+				// with the appropriate values, so we can simply
+				// calculate the expression. it's not so complex
+				// any more!
+				return BasicArithmeticalExpression(tokens);
+			}
+
+			private decimal BasicArithmeticalExpression(List<string> tokens)
+			{
+				// PERFORMING A BASIC ARITHMETICAL EXPRESSION CALCULATION
+				// THIS METHOD CAN ONLY OPERATE WITH NUMBERS AND OPERATORS
+				// AND WILL NOT UNDERSTAND ANYTHING BEYOND THAT.
+
+				switch (tokens.Count)
+				{
+					case 1:
+						return decimal.Parse(tokens[0], CultureInfo);
+					case 2:
+						{
+							var op = tokens[0];
+
+							if (op == "-" || op == "+")
+								return decimal.Parse((op == "+" ? "" : (tokens[1].Substring(0, 1) == "-" ? "" : "-")) + tokens[1], CultureInfo);
+
+							return OperatorAction[op](0, decimal.Parse(tokens[1], CultureInfo));
+						}
+					case 0:
+						return 0;
+				}
+
+				foreach (var op in OperatorList)
+				{
+					while (tokens.IndexOf(op) != -1)
+					{
+						var opPlace = tokens.IndexOf(op);
+
+						var numberA = Convert.ToDecimal(tokens[opPlace - 1], CultureInfo);
+						var numberB = Convert.ToDecimal(tokens[opPlace + 1], CultureInfo);
+
+						var result = OperatorAction[op](numberA, numberB);
+
+						tokens[opPlace - 1] = result.ToString(CultureInfo);
+						tokens.RemoveRange(opPlace, 2);
+					}
+				}
+				return Convert.ToDecimal(tokens[0], CultureInfo);
+			}
 		}
 	}


Added checks for Administrative workgroups - Requesters

--- Purchasing.Web/Controllers/WorkgroupController.cs
+++ Purchasing.Web/Controllers/WorkgroupController.cs
@@ -209,6 +209,15 @@
                 workgroupToEdit.Organizations.Add(workgroupToEdit.PrimaryOrganization);
             }

+            if(workgroupToEdit.Administrative)
+            {
+                if(_workgroupPermissionRepository.Queryable.Any(a => a.Workgroup.Id == workgroupToEdit.Id && a.Role.Id == Role.Codes.Requester))
+                {
+                    ModelState.AddModelError("Workgroup.Administrative", "A workgroup can't be made administrative if there are any requestors.");
+                }
+
+            }
+
             //TODO: Test this.
             if(!ModelState.IsValid)
             {
@@ -1205,6 +1214,12 @@
                 return this.RedirectToAction(a => a.Index());
             }

+            if(workgroup.Administrative && roleFilter == Role.Codes.Requester)
+            {
+                ErrorMessage = "Requester may not be added to an administrative workgroup.";
+                return this.RedirectToAction(a => a.Details(workgroup.Id));
+            }
+
             var viewModel = WorgroupPeopleCreateModel.Create(_roleRepository, workgroup);
             if(!string.IsNullOrWhiteSpace(roleFilter))
             {
@@ -1242,6 +1257,10 @@
                     ModelState.AddModelError("Role", "Invalid Role Selected");
                 }

+            }
+            if(workgroup.Administrative && workgroupPeoplePostModel.Role.Id == Role.Codes.Requester)
+            {
+                ModelState.AddModelError("Role", "Administrative workgroups may not have Requesters");
             }

             if (!ModelState.IsValid)


Fixed spacing and grammar

Fixed spacing and grammar

--- RelhaxModpack/RelhaxModpack/Utils/Translations.cs
+++ RelhaxModpack/RelhaxModpack/Utils/Translations.cs
@@ -3204,8 +3204,8 @@

             //Component: moveAppOutOfDownloads
             // Many users download the application right from the website and run it in the downloads folder. This is not reccomended
-            English.Add("moveAppOutOfDownloads", "The application detected that it is launched from the 'Downloads' folder. This is not reccommended because the application creates several folders and files" +
-                "that may be difficult to find in a large 'Downloads' folder. You should move the application and 'Relhax' files to a new folder.");
+            English.Add("moveAppOutOfDownloads", "The application detected that it is launched from the 'Downloads' folder. This is not reccommended because the application creates several folders and files " +
+                "that may be difficult to find in a large 'Downloads' folder. You should move the application and all 'Relhax' files and folders to a new folder.");
             German.Add("moveAppOutOfDownloads", TranslationNeeded);
             Polish.Add("moveAppOutOfDownloads", TranslationNeeded);
             French.Add("moveAppOutOfDownloads", TranslationNeeded);
@@ -5661,4 +5661,4 @@
         #endregion

     }
-}+}


AssetBundle Loading bug introduced in Unity 5.5 is fixed as of Unity 5.6.2 so ifdef that

--- UMAProject/Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts/DownloadingAssetsList.cs
+++ UMAProject/Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts/DownloadingAssetsList.cs
@@ -208,6 +208,8 @@
 						//the required asset from them in some cases, notably it seems when the required asset is set in the field of a Prefab (like our DNAAssets are)
 						//To fix this generally we could 'LoadAllAssets' from any dependent bundles, but this could incur significant memory overhead
 						//So for now we will just fix this for UMA and hope a patch is forthcoming in a subsequent version of Unity
+						//FIXED as of Unity5.6.2f1
+#if UNITY_5_5 || UNITY_5_6_0 || UNITY_5_6_1
 						if (AssetBundleManager.AssetBundleIndexObject.GetAllDependencies(item.containingBundle).Length > 0)
 						{
 							var allDeps = AssetBundleManager.AssetBundleIndexObject.GetAllDependencies(item.containingBundle);
@@ -221,6 +223,7 @@
 								}
 							}
 						}
+#endif
 						RaceData actualRace = loadedBundleAB.LoadAsset<RaceData>(itemFilename);
 						UMAContext.Instance.raceLibrary.AddRace(actualRace);
 						UMAContext.Instance.raceLibrary.UpdateDictionary();


Added a few methods to StudentsController.

--- WebServicesAndCloud/02.ASP.NETWebAPI/StudentSystem.Services/Controllers/StudentsController.cs
+++ WebServicesAndCloud/02.ASP.NETWebAPI/StudentSystem.Services/Controllers/StudentsController.cs
@@ -35,6 +35,28 @@
             return this.Ok(students);
         }

+        public IHttpActionResult Get(int id)
+        {
+            var student = this.students
+                .All()
+                .Select(s => new StudentResponseModel
+                {
+                    Id = s.Id,
+                    Name = s.Name,
+                    FacultyNumber = s.FacultyNumber,
+                    Courses = s.Courses,
+                    Homeworks = s.Homeworks
+                })
+                .FirstOrDefault(s => s.Id == id);
+
+            if(student == null)
+            {
+                return this.NotFound();
+            }
+
+            return this.Ok(student);
+        }
+
         public IHttpActionResult Post(StudentRequestModel model)
         {
             if (!this.ModelState.IsValid)
@@ -54,5 +76,28 @@

             return this.Ok();
         }
+
+        public IHttpActionResult Delete(int id)
+        {
+            var studentExists = this.students
+                .All()
+                .Any(s => s.Id == id);
+
+            if (!studentExists)
+            {
+                return this.NotFound();
+            }
+
+            this.students.Delete(id);
+            this.students.SaveChanges();
+
+            return this.Ok("The student was successfully deleted");
+        }
+
+        // TODO: Implement the update option
+        public IHttpActionResult Put(int id)
+        {
+            return this.Ok();
+        }
     }
 }


Add extension method for working out if an entry is deleted or not.

--- HaveIBeenPwned/PwEntryExtension.cs
+++ HaveIBeenPwned/PwEntryExtension.cs
@@ -1,4 +1,5 @@
-using KeePassLib;
+using KeePass.Plugins;
+using KeePassLib;
 using System;
 using System.Linq;

@@ -23,5 +24,10 @@

             return entry.LastModificationTime;
         }
+
+        public static bool IsDeleted(this PwEntry entry, IPluginHost pluginHost)
+        {
+            return entry.ParentGroup.Uuid.CompareTo(pluginHost.Database.RecycleBinUuid) == 0;
+        }
     }
 }


made internal command queue bounded by default

--- src/Skutt/Skutt/RabbitMq/SkuttBus.cs
+++ src/Skutt/Skutt/RabbitMq/SkuttBus.cs
@@ -13,7 +13,7 @@
     public class SkuttBus : IBus, IDisposable
     {
         private readonly IDictionary<string, QueueSubscriber> queueSubscribers = new Dictionary<string, QueueSubscriber>();
-        private readonly BlockingCollection<object> commandQueue = new BlockingCollection<object>();
+        private readonly BlockingCollection<object> commandQueue = new BlockingCollection<object>(50);
         private readonly IDictionary<Type, Action<object>> commandHandlers = new Dictionary<Type, Action<object>>();
         private readonly MessageTypeRegistry registry = new MessageTypeRegistry();

@@ -56,6 +56,7 @@
                          };

             this.connection = cf.CreateConnection();
+
             this.connection.ConnectionShutdown += (c, ea) =>
             {
                 Console.WriteLine("Connection interrupted");


Fix script location via AppDomain base dir for web applications

--- src/SqlPersistence/ScriptLocation.cs
+++ src/SqlPersistence/ScriptLocation.cs
@@ -6,10 +6,12 @@

 static class ScriptLocation
 {
+    const string ScriptFolder = "NServiceBus.Persistence.Sql";
+
     public static string FindScriptDirectory(ReadOnlySettings settings)
     {
         var currentDirectory = GetCurrentDirectory(settings);
-        return Path.Combine(currentDirectory, "NServiceBus.Persistence.Sql", settings.GetSqlDialect().Name);
+        return Path.Combine(currentDirectory, ScriptFolder, settings.GetSqlDialect().Name);
     }

     static string GetCurrentDirectory(ReadOnlySettings settings)
@@ -21,7 +23,14 @@
         var entryAssembly = Assembly.GetEntryAssembly();
         if (entryAssembly == null)
         {
-            return AppDomain.CurrentDomain.BaseDirectory;
+            var baseDir = AppDomain.CurrentDomain.BaseDirectory;
+            var scriptDir = Path.Combine(baseDir, ScriptFolder);
+            //if the app domain base dir contains the scripts folder, return it. Otherwise add "bin" to the base dir so that web apps work correctly
+            if (Directory.Exists(scriptDir))
+            {
+                return baseDir;
+            }
+            return Path.Combine(baseDir, "bin");
         }
         var codeBase = entryAssembly.CodeBase;
         return Directory.GetParent(new Uri(codeBase).LocalPath).FullName;


Minor fix for previous commit

Minor fix for previous commit

--- IceBuilder/DocumentEventHandler.cs
+++ IceBuilder/DocumentEventHandler.cs
@@ -192,7 +192,6 @@
                 for (int i = 0; i < projectsLength; ++i)
                 {
                     EnvDTE.Project project = DTEUtil.GetProject(projects[i] as IVsHierarchy);
-                    EnvDTE.Project project = DTEUtil.GetProject(projects[i] as IVsHierarchy);
                     if (DTEUtil.IsIceBuilderEnabled(project))
                     {
                         int j = indices[i];
@@ -202,7 +201,9 @@
                         {
                             if(ProjectUtil.IsSliceFileName(paths[j]))
                             {
+                                List<String> generated = ProjectUtil.GetGeneratedFiles(project, paths[j]);
                                 ProjectUtil.AddItems(project, ProjectUtil.GetGeneratedFiles(project, paths[j]));
+                                Package.Instance.FileTracker.Add(project, paths[j], generated);
                             }
                         }
                     }
@@ -242,6 +243,7 @@
                                 ProjectUtil.DeleteItems(project, ProjectUtil.GetGeneratedFiles(project, names[i]));
                             }
                         }
+                        Package.Instance.FileTracker.Reap(project);
                     }
                 }
             }
@@ -277,9 +279,12 @@
                             ProjectUtil.DeleteItems(project, ProjectUtil.GetGeneratedFiles(project, oldNames[j]));
                             if (ProjectUtil.IsSliceFileName(newNames[j]))
                             {
-                                ProjectUtil.AddItems(project, ProjectUtil.GetGeneratedFiles(project, newNames[j]));
+                                List<String> generated = ProjectUtil.GetGeneratedFiles(project, newNames[j]);
+                                ProjectUtil.AddItems(project, generated);
+                                Package.Instance.FileTracker.Add(project, newNames[j], generated);
                             }
                         }
+                        Package.Instance.FileTracker.Reap(project);
                     }
                 }
             }


Change the tests to reference kernel32 instead of apisets

Fixes #14728

--- src/System.IO.Pipes/tests/Interop.cs
+++ src/System.IO.Pipes/tests/Interop.cs
@@ -16,7 +16,7 @@
     {
         #region Windows

-        [DllImport("api-ms-win-core-io-l1-1-0.dll", SetLastError = true)]
+        [DllImport("kernel32.dll", SetLastError = true)]
         private static extern unsafe bool CancelIoEx(SafeHandle handle, NativeOverlapped* lpOverlapped);

         internal static unsafe bool CancelIoEx(SafeHandle handle)
@@ -24,7 +24,7 @@
             return CancelIoEx(handle, null);
         }

-        [DllImport("api-ms-win-core-namedpipe-l1-2-1.dll", CharSet = CharSet.Unicode, SetLastError = true, BestFitMapping = false, EntryPoint = "GetNamedPipeHandleStateW")]
+        [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true, BestFitMapping = false, EntryPoint = "GetNamedPipeHandleStateW")]
         [return: MarshalAs(UnmanagedType.Bool)]
         private static extern bool GetNamedPipeHandleState(
             SafePipeHandle hNamedPipe,


Remove EOLN check from MarkupTestFile

Remove EOLN check from MarkupTestFile

--- src/Test/Utilities/MarkupTestFile.cs
+++ src/Test/Utilities/MarkupTestFile.cs
@@ -45,11 +45,6 @@

         private static void Parse(string input, out string output, out int? position, out IDictionary<string, IList<TextSpan>> spans)
         {
-            if (input.Contains("\n") && !input.Contains("\r\n"))
-            {
-                throw new ArgumentException("Shouldn't pass stuff with bad line endings!");
-            }
-
             position = null;
             spans = new Dictionary<string, IList<TextSpan>>();


Unit test for #14

Unit test for #14

--- src/Translate/ExpTranslator.Tests.cs
+++ src/Translate/ExpTranslator.Tests.cs
@@ -575,6 +575,14 @@
             var sExp = "128";
             Assert.AreEqual(sExp, Xlat(pySrc));
         }
+
+        [Test]
+        public void Ex_Github_Issue_14()
+        {
+            var pySrc = "len(x + y + z)";
+            var sExp = "(x + y + z).Count";
+            Assert.AreEqual(sExp, Xlat(pySrc));
+        }
     }
 }
 #endif


fix: release bug.

fix: release bug.

--- Jasily/Diagnostics/JasilyLogger.cs
+++ Jasily/Diagnostics/JasilyLogger.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.Runtime.CompilerServices;
 using System.Threading;
@@ -88,7 +89,7 @@
 #if DEBUG
             Debug.WriteLine(msg);
 #else
-            Debug.WriteLine(Concat(data.DateTime.ToString("HH:mm:ss"), " ", msg));
+            Debug.WriteLine(string.Concat(data.DateTime.ToString("HH:mm:ss"), " ", msg));
 #endif

             if (HasFlag(mode, JasilyLoggerMode.RealTimeTrack))


Revert the addition of `+` which was a leftover from debugging

--- src/Umbraco.Core/StringExtensions.cs
+++ src/Umbraco.Core/StringExtensions.cs
@@ -53,7 +53,7 @@
                 .Reverse()
                 .ToArray();
             return nodeIds;
-        }
+        }

         /// <summary>
         /// Removes new lines and tabs
@@ -190,7 +190,7 @@
             return new string(outputArray);
         }

-        private static readonly char[] CleanForXssChars = "*?(){}[];:%<>/\\|&'+\"".ToCharArray();
+        private static readonly char[] CleanForXssChars = "*?(){}[];:%<>/\\|&'\"".ToCharArray();

         /// <summary>
         /// Cleans string to aid in preventing xss attacks.


DoThis finished

DoThis finished

--- src/Unit-3/DoThis/RepoResultsForm.cs
+++ src/Unit-3/DoThis/RepoResultsForm.cs
@@ -24,7 +24,7 @@
                     Props.Create(() => new RepoResultsActor(dgUsers, tsStatus, tsProgress))
                         .WithDispatcher("akka.actor.synchronized-dispatcher")); //run on the UI thread

-            Text = string.Format("Starrers for Repo {0} / {1}", _repo.Owner, _repo.Repo);
+            Text = string.Format("Repos Similar to {0} / {1}", _repo.Owner, _repo.Repo);

             //start subscribing to updates
             _githubCoordinator.Tell(new GithubCoordinatorActor.SubscribeToProgressUpdates(_formActor));


SDA-2388 Added shortcuts to desktop and program menu

--- installer/win/Symphony.cs
+++ installer/win/Symphony.cs
@@ -18,7 +18,11 @@
 		// desired contents of installation, and then we can simplify this bit.
         var project = new ManagedProject(productName,
             new Dir(@"%ProgramFiles%\" + productName,
-                new File(@"..\..\dist\win-unpacked\Symphony.exe"),
+                new File(@"..\..\dist\win-unpacked\Symphony.exe",
+					// Create two shortcuts to the main Symphony.exe file, one on the desktop and one in the program menu
+                    new FileShortcut(productName, @"%Desktop%") { IconFile = @"..\..\images\icon.ico" },
+                    new FileShortcut(productName, @"%ProgramMenu%") { IconFile = @"..\..\images\icon.ico" }
+                ),
                 new File(@"..\..\dist\win-unpacked\chrome_100_percent.pak"),
                 new File(@"..\..\dist\win-unpacked\chrome_200_percent.pak"),
                 new File(@"..\..\dist\win-unpacked\d3dcompiler_47.dll"),


Disabled sprites now overflow/collide correctly, even though they're not drawn.

--- Sega/Hardware/VideoDisplayProcessor/Rasteriser.cs
+++ Sega/Hardware/VideoDisplayProcessor/Rasteriser.cs
@@ -823,20 +823,17 @@

 					if (!this.backgroundLayerEnabled) for (int i = 0; i < 256; ++i) this.PixelBuffer[startPixel + i] = this.lastBackdropColour;

-					if (this.spriteLayerEnabled) {
-
-						switch (this.CurrentMode) {
-							case Mode.Mode4:
-							case Mode.Mode4Resolution224:
-							case Mode.Mode4Resolution240:
-								this.RenderMode4Sprites(startPixel, amZoomed, ForegroundBackground);
-								break;
-							case Mode.Graphic1:
-							case Mode.Graphic2:
-							case Mode.Multicolor:
-								this.RenderTms9918Sprites(startPixel, FixedPalette);
-								break;
-						}
+					switch (this.CurrentMode) {
+						case Mode.Mode4:
+						case Mode.Mode4Resolution224:
+						case Mode.Mode4Resolution240:
+							this.RenderMode4Sprites(startPixel, amZoomed, ForegroundBackground);
+							break;
+						case Mode.Graphic1:
+						case Mode.Graphic2:
+						case Mode.Multicolor:
+							this.RenderTms9918Sprites(startPixel, FixedPalette);
+							break;
 					}
 					if (UsingMode4 && this.MaskColumn0) {
 						for (int i = 0; i < 8; i++) PixelBuffer[startPixel + i] = lastBackdropColour;
@@ -1027,7 +1024,7 @@
 					if (PixelOffset >= 0 && PixelOffset < 256 && !DrawnPixel[PixelOffset]) {
 						bool PixelSet = (SpritePixelRow & 0x80) != 0;
 						if (PixelSet && (SpriteFlags & 0x0F) != 0) {
-							PixelBuffer[startPixel + PixelOffset] = fixedPalette[SpriteFlags & 0x0F];
+							if (this.spriteLayerEnabled) PixelBuffer[startPixel + PixelOffset] = fixedPalette[SpriteFlags & 0x0F];
 							DrawnPixel[PixelOffset] = true;
 						}
 					}
@@ -1101,7 +1098,7 @@
 							} else {
 								if (!foregroundBackground[pixelX]) {
 									spriteCollisionBuffer[pixelX] = true;
-									PixelBuffer[startPixel + pixelX] = this.colourRam[colours[p / 2] + 16];
+									if (this.spriteLayerEnabled) PixelBuffer[startPixel + pixelX] = this.colourRam[colours[p / 2] + 16];
 								}
 							}
 						}
@@ -1117,7 +1114,7 @@
 							} else {
 								spriteCollisionBuffer[pixelX] = true;
 								if (!foregroundBackground[pixelX]) {
-									PixelBuffer[startPixel + pixelX] = this.colourRam[colours[p] + 16];
+									if (this.spriteLayerEnabled) PixelBuffer[startPixel + pixelX] = this.colourRam[colours[p] + 16];
 								}
 							}
 						}


include databaseName in ConnectionStringInfo

--- Serenity.Data/Connections/ConnectionStringInfo.cs
+++ Serenity.Data/Connections/ConnectionStringInfo.cs
@@ -5,11 +5,28 @@
 {
     public class ConnectionStringInfo
     {
+        private string databaseName;
+
         public ConnectionStringInfo(string connectionString, string providerName, DbProviderFactory providerFactory)
         {
             this.ConnectionString = connectionString;
             this.ProviderName = providerName;
             this.ProviderFactory = providerFactory;
+        }
+
+        public string DatabaseName
+        {
+            get
+            {
+                if (databaseName == null)
+                {
+                    var csb = new DbConnectionStringBuilder();
+                    csb.ConnectionString = ConnectionString;
+                    databaseName = csb["Initial Catalog"] as string ?? csb["Database"] as string ?? "";
+                }
+
+                return databaseName == "" ? null : databaseName;
+            }
         }

         public string ConnectionString { get; private set; }


HETS-1039 fix time entry owner dropdown filtering

--- Server/src/HetsApi/Controllers/OwnerController.cs
+++ Server/src/HetsApi/Controllers/OwnerController.cs
@@ -155,14 +155,13 @@
                 .Where(x => x.Equipment.LocalArea.ServiceArea.DistrictId == districtId &&
                             x.Equipment.Owner.OwnerStatusTypeId == statusId &&
                             x.Project.AppCreateTimestamp > fiscalYearStart)
-                .OrderBy(x => x.Equipment.Owner.OwnerCode)
-                .Select(x => new OwnerLiteList
-                {
-                    OwnerCode = x.Equipment.Owner.OwnerCode,
-                    OrganizationName = x.Equipment.Owner.OrganizationName,
-                    Id = x.Equipment.Owner.OwnerId,
-                    LocalAreaId = x.Equipment.LocalAreaId,
-                    ProjectIds = new List<int?>() { x.ProjectId }
+                .GroupBy(x => x.Equipment.Owner, (o, agreements) => new OwnerLiteList
+                {
+                    OwnerCode = o.OwnerCode,
+                    OrganizationName = o.OrganizationName,
+                    Id = o.OwnerId,
+                    LocalAreaId = o.LocalAreaId,
+                    ProjectIds = agreements.Select(y => y.ProjectId).ToList()
                 });

             return new ObjectResult(new HetsResponse(owners));


Don't raise OnError for IOExceptions in the .net client.

--- SignalR.Client/Transports/LongPollingTransport.cs
+++ SignalR.Client/Transports/LongPollingTransport.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.IO;
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
@@ -50,14 +51,19 @@
                         // Get the underlying exception
                         Exception exception = task.Exception.GetBaseException();

-                        // Raise on error
-                        connection.OnError(exception);
+                        // Sometimes a connection might have been closed by the server before we get to write anything
+                        // so just try again and don't raise OnError.
+                        if (!(exception is IOException))
+                        {
+                            // Raise on error
+                            connection.OnError(exception);

-                        // If the connection is still active after raising the error event wait for 2 seconds
-                        // before polling again so we aren't hammering the server
-                        if (connection.IsActive)
-                        {
-                            Thread.Sleep(2000);
+                            // If the connection is still active after raising the error event wait for 2 seconds
+                            // before polling again so we aren't hammering the server
+                            if (connection.IsActive)
+                            {
+                                Thread.Sleep(2000);
+                            }
                         }
                     }


remove methods for ValueChangedEventArgs


fix DynamicQueryManager

fix DynamicQueryManager

--- Signum.Engine/DynamicQuery/DynamicQueryManager.cs
+++ Signum.Engine/DynamicQuery/DynamicQueryManager.cs
@@ -142,10 +142,13 @@

         public bool QueryAllowed(object queryName)
         {
-            if (AllowQuery == null)
-                return true;
-
-            return AllowQuery(queryName);
+            foreach (var f in AllowQuery.GetInvocationListTyped())
+            {
+                if (!f(queryName))
+                    return false;
+            }
+
+            return true;
         }

         public bool QueryDefined(object queryName)


Changed ration in FB crawlers to be 2:1 (#135)

--- Source/Client/Showcase.Client.App/crawlers.cshtml
+++ Source/Client/Showcase.Client.App/crawlers.cshtml
@@ -20,7 +20,7 @@
     <meta property="og:image:url" content="http://@Model.HostUrl/Images/@(Model.MainImageUrl)_high.jpg" />
     <meta property="og:image:type" content="image/jpeg" />
     <meta property="og:image:width" content="1360" />
-    <meta property="og:image:height" content="780" />
+    <meta property="og:image:height" content="680" />
 </head>
 <body>
 </body>


Fixed bug in ModelController causing permission issue on Add

--- Source/Libraries/GSF.Web/Model/ModelController.cs
+++ Source/Libraries/GSF.Web/Model/ModelController.cs
@@ -93,7 +93,7 @@
             SearchSettings = typeof(T).GetCustomAttribute<AdditionalFieldSearchAttribute>();

             // Custom View Models are ViewOnly.
-            ViewOnly = ViewOnly || CustomView == String.Empty;
+            ViewOnly = ViewOnly || CustomView != String.Empty;

         }


Implement extracting the property name

Implement extracting the property name

--- Sources/Rhaeo.Mvvm/Rhaeo.Mvvm/ObservableObject.cs
+++ Sources/Rhaeo.Mvvm/Rhaeo.Mvvm/ObservableObject.cs
@@ -1,11 +1,58 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ObservableObject.cs" company="Rhaeo">
+//   Licenced under the MIT licence.
+// </copyright>
+// <summary>
+//   Defines the ObservableObject type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+using System;
+using System.ComponentModel;
+using System.Linq.Expressions;

 namespace Rhaeo.Mvvm
 {
-    public class ObservableObject
+  /// <summary>
+  /// Serves as a back class for object instances obserable through the <see cref="INotifyPropertyChanged"/> interface.
+  /// </summary>
+  public class ObservableObject
+    : INotifyPropertyChanged
+  {
+    #region Events
+
+    /// <summary>
+    /// Occurs when a property value changes.
+    /// </summary>
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Raises the <see cref="PropertyChanged"/> event with a property name extracted from the property expression.
+    /// </summary>
+    /// <typeparam name="TViewModel">
+    /// The view model type.
+    /// </typeparam>
+    /// <typeparam name="TValue">
+    /// The property value type.
+    /// </typeparam>
+    /// <param name="propertyExpression">
+    /// The property expression.
+    /// </param>
+    protected void RaisePropertyChanged<TViewModel, TValue>(Expression<Func<TViewModel, TValue>> propertyExpression) where TViewModel : ObservableObject
     {
+      var propertyName = (propertyExpression.Body as MemberExpression).Member.Name;
+
+      var propertyChangedHandler = this.PropertyChanged;
+      if (propertyChangedHandler != null)
+      {
+        propertyChangedHandler(this, new PropertyChangedEventArgs(propertyName));
+      }
     }
+
+    #endregion
+  }
 }


Update BaseClientService class comment

Update BaseClientService class comment

--- Src/GoogleApis/Apis/Services/BaseClientService.cs
+++ Src/GoogleApis/Apis/Services/BaseClientService.cs
@@ -37,9 +37,8 @@
 {
     /// <summary>
     /// A base class for a client service which provides common mechanism for all services, like
-    /// serialization and GZip support.  Although this class isn't thread-safe (it contains a reference to
-    /// <see cref="HttpClient"/> which isn't thread-safe itself), it's recommended to create a single service for
-    /// several server calls.
+    /// serialization and GZip support.  It should be safe to use a single service instance to make server requests
+    /// concurrently from multiple threads.
     /// This class adds a special <see cref="Google.Apis.Http.IHttpExecuteInterceptor"/> to the
     /// <see cref="Google.Apis.Http.ConfigurableMessageHandler"/> execute interceptor list, which uses the given
     /// Authenticator. It calls to its applying authentication method, and injects the "Authorization" header in the


Make the SVG output functionality work for slave cells too.

--- MagicTile/Puzzle/PuzzleRenderer.cs
+++ MagicTile/Puzzle/PuzzleRenderer.cs
@@ -60,10 +60,16 @@
 			var transform = GrabModelTransform();

 			List<Polygon> polygons = new List<Polygon>();
+			Cell template = m_puzzle.MasterCells.First();
 			foreach( Cell cell in m_puzzle.AllCells )
 			{
-				foreach( Sticker s in cell.Stickers )
-					polygons.Add( s.Poly );
+				Cell master = cell.MasterOrSelf;
+				foreach( Sticker s in template.Stickers )
+				{
+					Polygon clone = s.Poly.Clone();
+					clone.Transform( cell.Isometry.Inverse() );
+					polygons.Add( clone );
+				}
 			}

 			SVG.WritePolygons( "output.svg", polygons );


- Minor bug

- Minor bug

--- StandardAssets/Archaeology/scripts/Menu_Script.cs
+++ StandardAssets/Archaeology/scripts/Menu_Script.cs
@@ -28,7 +28,8 @@
 		// End oculus

 		#if UNITY_WEBGL
-           GameObject.Find ("bt_exit").SetActive (false);
+		    if (GameObject.Find ("bt_exit"))
+                GameObject.Find ("bt_exit").SetActive (false);
 		#endif

 	}


Hopefully fix an occasional host crash on second day+. (#25)

--- StardewValleyMP/Packets/ClientFarmerDataPacket.cs
+++ StardewValleyMP/Packets/ClientFarmerDataPacket.cs
@@ -76,6 +76,7 @@
             client.farmer.uniqueMultiplayerID += 1 + client.id;

             NewSaveGame.loadDataToFarmer(client.farmer, client.farmer);
+            client.farmer.FarmerSprite.setOwner(client.farmer);

             //if(!server.playing)
             //if (server.playing) client.farmer = old;


Cleanup usings.

Cleanup usings.

--- TeamCityBuildChanges/Output/NuGetPackageChange.cs
+++ TeamCityBuildChanges/Output/NuGetPackageChange.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace TeamCityBuildChanges.Output
+namespace TeamCityBuildChanges.Output
 {
     public class NuGetPackageChange
     {


Fix commit 205887274798e3a643defce88765377e527c8813

--- Messages/InMemoryMessageChannel.cs
+++ Messages/InMemoryMessageChannel.cs
@@ -59,7 +59,7 @@
 			_queue = queue ?? throw new ArgumentNullException(nameof(queue));
 			_errorHandler = errorHandler ?? throw new ArgumentNullException(nameof(errorHandler));

-			Close();
+			_queue.Close();
 		}

 		/// <summary>
@@ -118,8 +118,21 @@
 			}
 		}

-		/// <inheritdoc />
-		public ChannelStates State { get; private set; } = ChannelStates.Stopped;
+		private ChannelStates _state = ChannelStates.Stopped;
+
+		/// <inheritdoc />
+		public ChannelStates State
+		{
+			get => _state;
+			set
+			{
+				if (_state == value)
+					return;
+
+				_state = value;
+				StateChanged?.Invoke();
+			}
+		}

 		/// <inheritdoc />
 		public event Action StateChanged;
@@ -127,8 +140,8 @@
 		/// <inheritdoc />
 		public void Open()
 		{
+			State = ChannelStates.Started;
 			_queue.Open();
-			StateChanged?.Invoke();

 			var version = Interlocked.Increment(ref _version);

@@ -162,8 +175,7 @@
 						}
 					}

-					//Closed?.Invoke();
-					StateChanged?.Invoke();
+					State = ChannelStates.Stopped;
 				}))
 				.Name($"{Name} channel thread.")
 				//.Culture(CultureInfo.InvariantCulture)
@@ -173,7 +185,7 @@
 		/// <inheritdoc />
 		public void Close()
 		{
-			State = ChannelStates.Stopped;
+			State = ChannelStates.Stopping;

 			_queue.Close();
 			_queue.Clear();


Added license header to AssemblyInfo.cs

Added license header to AssemblyInfo.cs

--- MimeKit/Properties/AssemblyInfo.cs
+++ MimeKit/Properties/AssemblyInfo.cs
@@ -1,4 +1,29 @@
-using System.Reflection;
+//
+// AssemblyInfo.cs
+//
+// Author: Jeffrey Stedfast <jeff@xamarin.com>
+//
+// Copyright (c) 2013 Jeffrey Stedfast
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;


Delete AssemblyInfo.cs

Delete AssemblyInfo.cs

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


added tostring unit tests

added tostring unit tests

--- UnitTesting/Workshop/Academy.Tests/CourseTests.cs
+++ UnitTesting/Workshop/Academy.Tests/CourseTests.cs
@@ -6,6 +6,7 @@
     using NUnit.Framework;
     using Academy.Models;
     using Academy.Models.Contracts;
+    using Moq;

     [TestFixture]
     public class CourseTests
@@ -92,6 +93,8 @@

             //Act/Assert
             Assert.IsInstanceOf<IList<ILecture>>(course.Lectures);
+            //Assert.AreEqual(0, course.Lectures.Count);
+            //Assert.IsNotNull(course.Lectures);
         }

         [Test]
@@ -268,7 +271,37 @@
             course.EndingDate = validDate;

             //Assert
-            Assert.AreEqual(validDate, course.EndingDate);
-        }
+            Assert.AreEqual(validDate, course.EndingDate);
+        }
+
+        [Test]
+        public void ToString_ListOfLectures_ShouldReturnPassedData()
+        {
+            //Arrange
+            var course = new Course("testName", 7, new DateTime(), new DateTime());
+
+            var lectureMock = new Mock<ILecture>();
+            lectureMock.Setup(x => x.ToString());
+
+            course.Lectures.Add(lectureMock.Object);
+
+            //Act
+            course.ToString();
+
+            //Assert
+            lectureMock.Verify(x => x.ToString(), Times.Once);
+        }
+
+        [Test]
+        public void ToString_ListOfLecturesIsEmpty_ShouldReturnPassedDataAndCorrectMessage()
+        {
+            //Arrange
+            var course = new Course("testName", 5, new DateTime(), new DateTime());
+            string message = "There are no lectures";
+
+            //Act/Assert
+            StringAssert.Contains(message, course.ToString());
+        }
+
     }
 }


Inlined CreateObjectArrayDelegateRefEmit

--- Framework.Core/System/Dynamic/Utils/DelegateHelpers.cs
+++ Framework.Core/System/Dynamic/Utils/DelegateHelpers.cs
@@ -22,29 +22,19 @@

         internal static Delegate CreateObjectArrayDelegate(Type delegateType, Func<object[], object?> handler)
         {
-            return CreateObjectArrayDelegateRefEmit(delegateType, handler);
-        }
-
-        private static Type ConvertToBoxableType(Type t)
-        {
-            return t.IsPointer ? typeof(IntPtr) : t;
-        }
-
-        // We will generate the following code:
-        //
-        // object ret;
-        // object[] args = new object[parameterCount];
-        // args[0] = param0;
-        // args[1] = param1;
-        //  ...
-        // try {
-        //      ret = handler.Invoke(args);
-        // } finally {
-        //      param0 = (T0)args[0];   // only generated for each byref argument
-        // }
-        // return (TRet)ret;
-        private static Delegate CreateObjectArrayDelegateRefEmit(Type delegateType, Func<object[], object?> handler)
-        {
+            // We will generate the following code:
+            //
+            // object ret;
+            // object[] args = new object[parameterCount];
+            // args[0] = param0;
+            // args[1] = param1;
+            //  ...
+            // try {
+            //      ret = handler.Invoke(args);
+            // } finally {
+            //      param0 = (T0)args[0];   // only generated for each byref argument
+            // }
+            // return (TRet)ret;
             if (_thunks.TryGetValue(delegateType, out var thunkMethod))
             {
                 return thunkMethod.CreateDelegate(delegateType, handler);
@@ -163,6 +153,11 @@

             return thunkMethod.CreateDelegate(delegateType, handler);
         }
+
+        private static Type ConvertToBoxableType(Type t)
+        {
+            return t.IsPointer ? typeof(IntPtr) : t;
+        }
     }
 }


asd

asd

git-tfs-id: [http://tfs2010.sones:8080/tfs/sones]$/Experimental/IGraphFSReDesign;C2975

--- GraphDB/IGraphDB/Request/AlterType/RequestAlterType.cs
+++ GraphDB/IGraphDB/Request/AlterType/RequestAlterType.cs
@@ -15,7 +15,7 @@
         #region constructor

         /// <summary>
-        /// Creates a new alter type request
+        /// Creates a new alter type request
         /// </summary>
         public RequestAlterType()
         {


[assembly:NUnit.Framework.LevelOfParallelism(1)]

--- Gu.Wpf.NumericInput.UITests/Properties/AssemblyInfo.cs
+++ Gu.Wpf.NumericInput.UITests/Properties/AssemblyInfo.cs
@@ -12,3 +12,4 @@
 [assembly: Guid("03820c66-202b-4b6d-b9d5-e4f3267362c1")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: NUnit.Framework.LevelOfParallelism(1)]