git-svn-id: 21cdf44b51306c1f0753fc51e774ecf5fc1851ba@404 a61f9e97-bd4c-0410-8c65-85b29eaa70ff

--- Dorian/Gorgon/Plugin/PlugInFactory.cs
+++ Dorian/Gorgon/Plugin/PlugInFactory.cs
@@ -1,273 +0,0 @@
-#region MIT.
-//
-// Gorgon.
-// Copyright (C) 2011 Michael Winsor
-//
-// 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
-// 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.
-//
-// Created: Tuesday, June 14, 2011 9:09:35 PM
-//
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Reflection;
-using System.IO;
-using System.ComponentModel;
-using GorgonLibrary.Diagnostics;
-
-namespace GorgonLibrary.PlugIns
-{
-	/// <summary>
-	/// Object to repesent a list of plugins.
-	/// </summary>
-	public static class PlugInFactory
-	{
-		#region Variables.
-		private static PlugInModuleList _modules = null;		// List of modules.
-		private static PlugInList _plugIns = null;				// List of plug-ins.
-		private static byte[] _compareKey = null;				// The public key to use for comparison.
-		#endregion
-
-		#region Properties.
-		/// <summary>
-		/// Property to return the list of previously loaded plug-ins.
-		/// </summary>
-		public static PlugInList PlugIns
-		{
-			get
-			{
-				return _plugIns;
-			}
-		}
-		#endregion
-
-		#region Methods.
-		/// <summary>
-		/// Function to set the key to use for comparison with the assembly public key.
-		/// </summary>
-		/// <param name="publicKey">An array of bytes containing the data for the public key to use in a comparison or NULL.</param>
-		/// <remarks>This function allows us to compare the public key for a specific plug-in against what we have stored here.  With this we can filter plug-ins that are not signed by the owner of the public key.  This adds a small measure of security.
-		/// <para>Passing NULL as the key will allow any signed assembly plug-in to load.</para>
-		/// </remarks>
-		public static void SetComparisonKey(byte[] publicKey)
-		{
-			_compareKey = publicKey;
-		}
-
-		/// <summary>
-		/// Function to load a plug-in.
-		/// </summary>
-		/// <param name="pluginModule">Module containing the plug-in.</param>
-		/// <param name="pluginName">Name of the plug-in to create.</param>
-        /// <param name="parameters">Constructor parameters.</param>
-		/// <param name="mustBeSigned">TRUE to require that the plug-in be signed, FALSE to load any plug-in.</param>
-        /// <returns>The plug-in interface.</returns>
-		public static PlugInEntryPoint Load(Assembly pluginModule, string pluginName, object[] parameters, bool mustBeSigned)
-		{
-			PlugInEntryPoint entry = null;					// Entry point to the plug-in.
-			AssemblyName name = null;						// Assembly name.
-			object[] typeAttributes = null;					// List of type attributes.
-			byte[] publicKey = null;						// Public key for the assembly.
-
-			if (pluginName == null)
-				pluginName = string.Empty;
-
-			// If we pass NULL, try to retrieve the plug-in from the entry assembly.
-			if (pluginModule == null)
-				pluginModule = Assembly.GetEntryAssembly();
-
-			// Get the assembly name.
-			name = pluginModule.GetName();
-
-			if (mustBeSigned)
-			{
-				publicKey = name.GetPublicKey();
-
-				if (publicKey.Length < 1)
-					throw new GorgonException(GorgonResult.AccessDenied, "Incorrect key for the plug-in '" + pluginName + "'.");
-
-				if (_compareKey != null)
-				{
-					// Compare the key.
-					if (publicKey.Length != _compareKey.Length)
-						throw new GorgonException(GorgonResult.AccessDenied, "Incorrect key for the plug-in '" + pluginName + "'.");
-
-					// Do a byte-by-byte comparison of the key.
-					for (int i = 0; i < publicKey.Length; i++)
-					{
-						if (publicKey[i] != _compareKey[i])
-							throw new GorgonException(GorgonResult.AccessDenied, "Incorrect key for the plug-in '" + pluginName + "'.");
-					}
-				}
-			}
-
-			// Don't duplicate.
-			if ((pluginName != string.Empty) && (_plugIns.Contains(pluginName)))
-				return _plugIns[pluginName];
-
-			// Get attributes for this module.
-			typeAttributes = pluginModule.GetCustomAttributes(typeof(PlugInAttribute), false);
-
-			if (typeAttributes.Length == 0)
-				throw new GorgonException(GorgonResult.CannotCreate, "Unable to find the PlugInAttribute for plug-in '" + name.Name + "'.");
-
-			// Get the public types.
-			foreach (Type type in pluginModule.ManifestModule.FindTypes(
-				delegate(Type plugInType, object filter)
-				{
-					object[] attributes;		// Get attributes for the type.
-
-					attributes = plugInType.GetCustomAttributes(typeof(PlugInAttribute), true);
-
-					if ((attributes == null) || (attributes.Length == 0))
-						return false;
-
-					return true;
-				}, null))
-			{
-				// Create the plug-in entry class.
-				entry = type.Assembly.CreateInstance(type.Namespace + "." + type.Name, false, BindingFlags.CreateInstance, null, new object[] { pluginModule.Location }, null, null) as PlugInEntryPoint;
-
-				if (entry == null)
-					throw new GorgonException(GorgonResult.CannotCreate, "Error trying to create the plug-in entry point interface.");
-
-				Gorgon_OLDE_MUST_BE_REMOVED_FOR_THE_GOOD_OF_MANKIND.Log.Print("Plug-in type: {0}, Module: {1}.", GorgonLoggingLevel.Intermediate, entry.PlugInType.ToString(), entry.GetType().ToString());
-
-				// Match name or load all plug-ins from the assembly.
-				if ((pluginName == string.Empty) || (string.Compare(pluginName,entry.Name, true) == 0))
-				{
-					Gorgon_OLDE_MUST_BE_REMOVED_FOR_THE_GOOD_OF_MANKIND.Log.Print("Loading plug-in \"{0}\".", GorgonLoggingLevel.Simple, entry.Name);
-
-					if (!_plugIns.Contains(entry.Name))
-						_plugIns.Add(entry);
-
-					Gorgon_OLDE_MUST_BE_REMOVED_FOR_THE_GOOD_OF_MANKIND.Log.Print("Plug-in \"{0}\" was loaded successfully.", GorgonLoggingLevel.Simple, entry.Name);
-
-					if (pluginName != string.Empty)
-						return entry;
-				}
-			}
-
-			if (pluginName != string.Empty)
-				throw new GorgonException(GorgonResult.CannotCreate, "No plug-in named '" + pluginName + "' was found in the plug-in module.");
-
-			return null;
-		}
-
-		/// <summary>
-		/// Function to load a plug-in.
-		/// </summary>
-		/// <param name="pluginModule">Module containing the plug-in.</param>
-		/// <param name="pluginName">Name of the plug-in to create.</param>
-		/// <param name="mustBeSigned">TRUE to indicate that the plug-in must be signed, FALSE to load any plug-in.</param>
-		/// <returns>The plug-in interface.</returns>
-        public static PlugInEntryPoint Load(Assembly pluginModule, string pluginName, bool mustBeSigned)
-        {
-            return Load(pluginModule, pluginName, null, mustBeSigned);
-        }
-
-		/// <summary>
-		/// Function to load a plug-in.
-		/// </summary>
-		/// <param name="pluginModule">Module containing the plug-in.</param>
-		/// <param name="mustBeSigned">TRUE to indicate that the plug-in must be signed, FALSE to load any plug-in.</param>
-		/// <returns>The plug-in interface.</returns>
-		public static void Load(Assembly pluginModule, bool mustBeSigned)
-		{
-			Load(pluginModule, null, null, mustBeSigned);
-		}
-
-		/// <summary>
-		/// Function to load a plug-in.
-		/// </summary>
-		/// <param name="pluginDLL">Path to the DLL containing the plug-in.</param>
-		/// <param name="pluginName">Name of the plug-in to create.</param>
-        /// <param name="parameters">Parameters for construction.</param>
-		/// <param name="mustBeSigned">TRUE to indicate that the plug-in must be signed, FALSE to load any plug-in.</param>
-		/// <returns>The plug-in interface.</returns>
-		public static PlugInEntryPoint Load(string pluginDLL, string pluginName, object[] parameters, bool mustBeSigned)
-		{
-			Assembly pluginModule = null;		// Module containing the plug-in.
-
-			if (!string.IsNullOrEmpty(pluginDLL))
-			{
-				if (pluginDLL.IndexOf(", Version=") > -1)
-					pluginModule = _modules.LoadModule(pluginDLL);
-				else
-					pluginModule = _modules.LoadModule(Path.GetFullPath(pluginDLL));
-			}
-
-			// Load the module.
-			return Load(pluginModule, pluginName, parameters, mustBeSigned);
-		}
-
-		/// <summary>
-		/// Function to load a plug-in.
-		/// </summary>
-		/// <param name="pluginDLL">Path to the DLL containing the plug-in.</param>
-		/// <param name="pluginName">Name of the plug-in to create.</param>
-		/// <param name="mustBeSigned">TRUE to indicate that the plug-in must be signed, FALSE to load any plug-in.</param>
-		/// <returns>Object wrapped in the plug-in.</returns>
-        public static PlugInEntryPoint Load(string pluginDLL, string pluginName, bool mustBeSigned)
-        {
-            return Load(pluginDLL, pluginName, null, mustBeSigned);
-        }
-
-		/// <summary>
-		/// Function to load multiple plug-ins from a plug-in DLL.
-		/// </summary>
-		/// <param name="pluginDLL">Path to the DLL containing the plug-ins.</param>
-		/// <param name="mustBeSigned">TRUE to indicate that the plug-in must be signed, FALSE to load any plug-in.</param>
-		/// <returns>The loaded plug-in.</returns>
-        public static void Load(string pluginDLL, bool mustBeSigned)
-        {
-            Load(pluginDLL, null, null, mustBeSigned);
-        }
-
-		/// <summary>
-		/// Function to destroy a plug-in.
-		/// </summary>
-		/// <param name="plugInName">Name of the plug-in to unload.</param>
-		public static void Unload(string plugInName)
-		{
-			_plugIns.Remove(plugInName);
-		}
-
-		/// <summary>
-		/// Function to remove all plug-ins.
-		/// </summary>
-		public static void DestroyAll()
-		{
-			_plugIns.Clear();
-		}
-		#endregion
-
-		#region Constructor/Destructor.
-		/// <summary>
-		/// Constructor.
-		/// </summary>
-		static PlugInFactory()
-		{
-			_modules = new PlugInModuleList();
-			_plugIns = new PlugInList();
-		}
-		#endregion
-	}
-}


test for full quality

test for full quality

--- King.Azure.Imaging.Unit.Test/PreprocessorTests.cs
+++ King.Azure.Imaging.Unit.Test/PreprocessorTests.cs
@@ -86,7 +86,7 @@
             var contentType = Guid.NewGuid().ToString();
             var fileName = string.Format("{0}.png", Guid.NewGuid());
             var store = Substitute.For<IDataStore>();
-            store.Save("file.jpg", bytes, Naming.Original, contentType, Arg.Any<Guid>(), true, "png");
+            store.Save("file.jpg", bytes, Naming.Original, contentType, Arg.Any<Guid>(), true, "png", 100);
             var naming = Substitute.For<INaming>();
             naming.Extension(fileName).Returns("png");
             naming.FileName(Arg.Any<Guid>(), Naming.Original, "png").Returns("file.png");
@@ -96,7 +96,7 @@

             naming.Received().Extension(fileName);
             naming.Received().FileName(Arg.Any<Guid>(), Naming.Original, "png");
-            store.Received().Save("file.png", bytes, Naming.Original, contentType, Arg.Any<Guid>(), true, "png");
+            store.Received().Save("file.png", bytes, Naming.Original, contentType, Arg.Any<Guid>(), true, "png", 100);
         }

         [Test]
@@ -106,7 +106,7 @@
             var contentType = Guid.NewGuid().ToString();
             var fileName = Guid.NewGuid().ToString();
             var store = Substitute.For<IDataStore>();
-            store.Save("file.jpg", bytes, Naming.Original, contentType, Arg.Any<Guid>(), true, "jpg");
+            store.Save("file.jpg", bytes, Naming.Original, contentType, Arg.Any<Guid>(), true, "jpg", 100);
             var naming = Substitute.For<INaming>();
             naming.Extension(fileName).Returns("jpg");
             naming.FileName(Arg.Any<Guid>(), Naming.Original, "jpg").Returns("file.jpg");
@@ -116,7 +116,7 @@

             naming.Received().Extension(fileName);
             naming.Received().FileName(Arg.Any<Guid>(), Naming.Original, "jpg");
-            store.Received().Save("file.jpg", bytes, Naming.Original, contentType, Arg.Any<Guid>(), true, "jpg");
+            store.Received().Save("file.jpg", bytes, Naming.Original, contentType, Arg.Any<Guid>(), true, "jpg", 100);
         }
     }
 }


WebAPI: Remove ResourceController constructor's 2nd argument

--- LCIAToolAPI/LCIAToolAPI/API/ResourceController.cs
+++ LCIAToolAPI/LCIAToolAPI/API/ResourceController.cs
@@ -49,15 +49,14 @@
         [Inject]
         private readonly IScenarioGroupService _ScenarioGroupService;

-        public ResourceController(ResourceServiceFacade resourceService,
-            ScenarioGroupService scenarioGroupService)
+        public ResourceController(ResourceServiceFacade resourceService)
         {
             if (resourceService == null)
             {
                 throw new ArgumentNullException("resourceService");
             }
             _ResourceService = resourceService;
-            _ScenarioGroupService = scenarioGroupService;
+            //_ScenarioGroupService = scenarioGroupService;
         }

         /// <summary>


Move setting Text to constructor

Move setting Text to constructor

--- ElectronicObserver/Window/FormMain.cs
+++ ElectronicObserver/Window/FormMain.cs
@@ -69,6 +69,8 @@

 		public FormMain() {
 			InitializeComponent();
+
+			this.Text = SoftwareInformation.VersionJapanese;
 		}

 		private async void FormMain_Load( object sender, EventArgs e ) {
@@ -94,8 +96,6 @@

 			Utility.Logger.Add( 2, SoftwareInformation.SoftwareNameJapanese + " を起動しています…" );

-
-			this.Text = SoftwareInformation.VersionJapanese;

 			ResourceManager.Instance.Load();
 			RecordManager.Instance.Load();


right way to restore windows.

right way to restore windows.

--- ElectronicObserver/Window/FormMain.cs
+++ ElectronicObserver/Window/FormMain.cs
@@ -322,7 +322,7 @@

 					MainDockPanel.LoadFromXml( stream, new DeserializeDockContent( GetDockContentFromPersistString ) );

-					//一度全ウィンドウを読み込むことでフォームを初期化する
+					/* 一度全ウィンドウを読み込むことでフォームを初期化する
 					foreach ( var x in MainDockPanel.Contents ) {
 						if ( x.DockHandler.DockState == DockState.Hidden ) {
 							x.DockHandler.Show( MainDockPanel );
@@ -331,6 +331,7 @@
 							x.DockHandler.Activate();
 						}
 					}
+					//*/

 					// checkme: このコードの存在意義
 					/*/


Added in a helper function to remove invalid XML characters using Regex.

--- Medidata.RWS.NET/Core/Responses/RWSXMLResponse.cs
+++ Medidata.RWS.NET/Core/Responses/RWSXMLResponse.cs
@@ -96,7 +96,7 @@
             string attributeValue)
         {

-            return XElement.Parse(RawXMLString())
+            return XElement.Parse(RWSHelpers.Xml.RemoveInvalidXmlChars(RawXMLString()))
                 .Descendants(XNamespace.Get(Constants.ODM_NS) + elementName)
                 .FirstOrDefault(el =>
                 {
@@ -118,7 +118,7 @@
         public IEnumerable<XElement> GetAllElementsWithAttributeValue(string elementName, string attributeName,
             string attributeValue)
         {
-            return XElement.Parse(RawXMLString())
+            return XElement.Parse(RWSHelpers.Xml.RemoveInvalidXmlChars(RawXMLString()))
                 .Descendants(XNamespace.Get(Constants.ODM_NS) + elementName)
                 .Where(el =>
                 {


Fixed copyright

Fixed copyright

--- MimeKit/Cryptography/SqliteCertificateDatabase.cs
+++ MimeKit/Cryptography/SqliteCertificateDatabase.cs
@@ -3,7 +3,7 @@
 //
 // Author: Jeffrey Stedfast <jeff@xamarin.com>
 //
-// Copyright (c) 2014 Jeffrey Stedfast
+// Copyright (c) 2013-2014 Xamarin Inc. (www.xamarin.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to deal


Playing around with some tests.

Playing around with some tests.

--- MongoDB.Driver.GridFS.Tests/GridFileStreamTest.cs
+++ MongoDB.Driver.GridFS.Tests/GridFileStreamTest.cs
@@ -45,7 +45,7 @@
         }

         [Test]
-        public void TestLargeWrite(){
+        public void TestWriteTo3Chunks(){
             GridFileStream gfs = fs.Create("largewrite.txt");

             Object id = gfs.GridFileInfo.Id;
@@ -110,6 +110,31 @@
             //TODO Assert some content checks.
         }

+        #region File API compatibility
+
+        [Test]
+        public void TestSeekingBeyondEOF(){
+            int buffsize = 256;
+            FileStream gfs = File.Create("seektest.txt",buffsize);//,FileOptions.DeleteOnClose);
+            int chunks = 3;
+            //int buffsize = 256 * 1024;
+            for(int c = 0; c < chunks; c++){
+                Byte[] buff = new byte[buffsize];
+                for(int i = 0; i < buff.Length; i++){
+                    buff[i] = (byte)(c);
+                }
+                if(c == 2) gfs.Seek(0, SeekOrigin.Begin); //On last chunk seek to start.
+                gfs.Write(buff,0,buff.Length);
+                gfs.Seek(5,SeekOrigin.Current);
+            }
+            gfs.Seek(50,SeekOrigin.End);
+            gfs.Write(new byte[]{5},0,1);
+
+
+        }
+
+        #endregion
+

         [TestFixtureSetUp]
         public void Init(){


Aligned with client id

Aligned with client id

--- MultipleKinectsPlatform/Networks/SkeletonAgent.cs
+++ MultipleKinectsPlatform/Networks/SkeletonAgent.cs
@@ -27,7 +27,7 @@
                 {
                     retry = false;

-                    httpForSensorData = (HttpWebRequest)WebRequest.Create(this.endPoint+"/web/api/sensors/data.json");
+                    httpForSensorData = (HttpWebRequest)WebRequest.Create(this.endPoint + "/web/api/sensors/data.json");

                     httpForSensorData.Accept = "application/json";
                     httpForSensorData.ContentType = "application/json";


Fixed a null reference bug

Fixed a null reference bug

C# initializes arrays of custom objects to null. There is no need for
this method call here since ParticleMovement[1] is already null. Should
there be alternative error checking? At this point, ParticleMovement[1]
is only ever used and initialized is there is indeed a second particle.
Otherwise, it is never used.


added data validation on post

added data validation on post

--- Pollerino/Pollerino/Controllers/HomeController.cs
+++ Pollerino/Pollerino/Controllers/HomeController.cs
@@ -21,23 +21,37 @@
         [ValidateAntiForgeryToken]
         public ActionResult Index(Poll poll)
         {
-            //TODO check if options not empty angrytoken
+
+            //TODO enhancement check if some options arent same
+
+            if (String.IsNullOrWhiteSpace(poll.QuestionText) || poll.QuestionText == "enter your poll question here...")
+            {
+                ModelState.AddModelError("", "Please enter you poll question.");
+                return View(poll);
+            }

             if (ModelState.IsValid)
             {
+                List<Option> filtredOptions = new List<Option>();
+                foreach (var option in poll.Options)
+                {
+                    if (!String.IsNullOrWhiteSpace(option.OptionText) && option.OptionText != "enter option here...")
+                    {
+                        option.WasChecked = false;
+                        option.PollId = poll.PollId;
+                        filtredOptions.Add(option);
+                    }
+                }
+                if (filtredOptions.Count < 2)
+                {
+                    ModelState.AddModelError("", "Poll must contain atleast two options to chose.");
+                    return View(poll);
+                }
+
+                poll.Options = filtredOptions;
                 db.Polls.Add(poll);
                 db.SaveChanges();

-                /*  foreach (var option in poll.Options) {
-                      if (!String.IsNullOrWhiteSpace(option.OptionText))
-                      {
-                          option.WasChecked = false;
-                          option.PollId = poll.PollId;
-                          db.Options.Add(option);
-                      }
-                  }
-                  db.SaveChanges();
-   */
                 return RedirectToAction("Vote", new { id = poll.PollId });

             }
@@ -62,12 +76,17 @@
         [ValidateAntiForgeryToken]
         public ActionResult Vote(Poll poll)
         {
+
+            //TODO
+
             /*
             if (db.Votes.Where(x => x.PollId == poll.PollId && x.VoterIp == System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]).Count() > 0)
-            {
-                //TODO - person already voted angrytoken
+            {
+                    ModelState.AddModelError("", "You have already voted.");
+                    return View(poll);
             }
             */
+
             if (poll.MultipleChoices)
             {
                 foreach (var option in poll.Options)
@@ -81,9 +100,8 @@
                         vote.OptionId = option.OptionId;
                         db.Votes.Add(vote);

-                        //pripocitat vote Options.numVotes

-
+                        //TODO lock for counting
                         Option optionToUdt = db.Options.Find(vote.OptionId);
                         optionToUdt.NumVotes += 1;
                         db.SaveChanges();
@@ -101,7 +119,7 @@
                 vote.OptionId = (int)poll.SelectedItem;
                 db.Votes.Add(vote);

-                //pripocitat vote Options.numVotes
+                //TODO lock for counting
                 Option optionToUdt = db.Options.Find(vote.OptionId);
                 optionToUdt.NumVotes += 1;
                 db.SaveChanges();


Insert invisible button to suppress sound when clicking Enter in search field

--- EasyTermViewer/MainForm.Designer.cs
+++ EasyTermViewer/MainForm.Designer.cs
@@ -42,13 +42,14 @@
             this.cmdTermBases = new System.Windows.Forms.ToolStripButton();
             this.timerFilter = new System.Windows.Forms.Timer(this.components);
             this.splitContainer1 = new System.Windows.Forms.SplitContainer();
-            this.lstTerminology = new EasyTermViewer.TerminologyListBox();
-            this.lstTerms = new EasyTermViewer.TermListBox();
-            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.termInfoControl = new EasyTermCore.TermInfoControl();
             this.toolTip = new System.Windows.Forms.ToolTip(this.components);
             this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
             this.panel1 = new System.Windows.Forms.Panel();
+            this.btnOK = new System.Windows.Forms.Button();
+            this.lstTerminology = new EasyTermViewer.TerminologyListBox();
+            this.lstTerms = new EasyTermViewer.TermListBox();
+            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.toolStrip1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
             this.splitContainer1.Panel1.SuspendLayout();
@@ -68,7 +69,7 @@
             this.cmdTermBases});
             this.toolStrip1.Location = new System.Drawing.Point(0, 0);
             this.toolStrip1.Name = "toolStrip1";
-            this.toolStrip1.Size = new System.Drawing.Size(814, 25);
+            this.toolStrip1.Size = new System.Drawing.Size(864, 25);
             this.toolStrip1.TabIndex = 0;
             this.toolStrip1.Text = "toolStrip1";
             //
@@ -165,6 +166,7 @@
             //
             // splitContainer1.Panel1
             //
+            this.splitContainer1.Panel1.Controls.Add(this.btnOK);
             this.splitContainer1.Panel1.Controls.Add(this.lstTerminology);
             this.splitContainer1.Panel1.Controls.Add(this.lstTerms);
             this.splitContainer1.Panel1MinSize = 100;
@@ -172,10 +174,36 @@
             // splitContainer1.Panel2
             //
             this.splitContainer1.Panel2.Controls.Add(this.termInfoControl);
-            this.splitContainer1.Size = new System.Drawing.Size(814, 477);
-            this.splitContainer1.SplitterDistance = 210;
+            this.splitContainer1.Size = new System.Drawing.Size(864, 477);
+            this.splitContainer1.SplitterDistance = 222;
             this.splitContainer1.SplitterWidth = 8;
             this.splitContainer1.TabIndex = 4;
+            //
+            // termInfoControl
+            //
+            this.termInfoControl.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.termInfoControl.Location = new System.Drawing.Point(0, 0);
+            this.termInfoControl.Name = "termInfoControl";
+            this.termInfoControl.Size = new System.Drawing.Size(634, 477);
+            this.termInfoControl.TabIndex = 0;
+            //
+            // panel1
+            //
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panel1.Location = new System.Drawing.Point(0, 25);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(864, 8);
+            this.panel1.TabIndex = 5;
+            //
+            // btnOK
+            //
+            this.btnOK.Location = new System.Drawing.Point(3, 451);
+            this.btnOK.Name = "btnOK";
+            this.btnOK.Size = new System.Drawing.Size(75, 23);
+            this.btnOK.TabIndex = 1;
+            this.btnOK.Text = "OK";
+            this.btnOK.UseVisualStyleBackColor = true;
+            this.btnOK.Visible = false;
             //
             // lstTerminology
             //
@@ -184,7 +212,7 @@
             this.lstTerminology.Location = new System.Drawing.Point(0, 240);
             this.lstTerminology.Name = "lstTerminology";
             this.lstTerminology.OwnerDraw = true;
-            this.lstTerminology.Size = new System.Drawing.Size(205, 245);
+            this.lstTerminology.Size = new System.Drawing.Size(205, 194);
             this.lstTerminology.TabIndex = 4;
             this.lstTerminology.UseCompatibleStateImageBehavior = false;
             this.lstTerminology.View = System.Windows.Forms.View.Details;
@@ -215,27 +243,12 @@
             //
             this.columnHeader1.Width = 96;
             //
-            // termInfoControl
-            //
-            this.termInfoControl.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.termInfoControl.Location = new System.Drawing.Point(0, 0);
-            this.termInfoControl.Name = "termInfoControl";
-            this.termInfoControl.Size = new System.Drawing.Size(596, 477);
-            this.termInfoControl.TabIndex = 0;
-            //
-            // panel1
-            //
-            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
-            this.panel1.Location = new System.Drawing.Point(0, 25);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(814, 8);
-            this.panel1.TabIndex = 5;
-            //
             // MainForm
             //
+            this.AcceptButton = this.btnOK;
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(814, 510);
+            this.ClientSize = new System.Drawing.Size(864, 510);
             this.Controls.Add(this.splitContainer1);
             this.Controls.Add(this.panel1);
             this.Controls.Add(this.toolStrip1);
@@ -276,6 +289,7 @@
         private System.Windows.Forms.ToolTip toolTip1;
         private TerminologyListBox lstTerminology;
         private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Button btnOK;
     }
 }


Made `Evbpc.Framework.Drawing.SizeByte` immutable.

--- Evbpc.Framework/Drawing/SizeByte.cs
+++ Evbpc.Framework/Drawing/SizeByte.cs
@@ -9,38 +9,115 @@
     [Serializable]
     public struct SizeByte
     {
-        private byte _width;
-        private byte _height;
+        private readonly byte _width;
+        private readonly byte _height;

-        public SizeByte(Point pt) { _width = (byte)(pt.X); _height = (byte)(pt.Y); }
-        public SizeByte(byte width, byte height) { _width = width; _height = height; }
+        public SizeByte(Point pt)
+        {
+            _width = (byte)(pt.X);
+            _height = (byte)(pt.Y);
+        }

-        public byte Height { get { return _height; } set { _height = value; } }
+        public SizeByte(byte width, byte height)
+        {
+            _width = width; _height = height;
+        }
+
+        public byte Height { get { return _height; } set { this = new SizeByte(_width, value); } }

         [BrowsableAttribute(false)]
         public bool IsEmpty { get { return this == Empty; } }

-        public byte Width { get { return _width; } set { _width = value; } }
+        public byte Width { get { return _width; } set { this = new SizeByte(value, _height); } }

-        public static SizeByte Add(SizeByte sz1, SizeByte sz2) { return sz1 + sz2; }
-        public static SizeByte Ceiling(SizeF value) { return new SizeByte((byte)Math.Ceiling(value.Width), (byte)Math.Ceiling(value.Height)); }
-        public override bool Equals(Object obj) { if (obj.GetType() == typeof(SizeByte)) { return (SizeByte)obj == this; } else { return false; } }
-        public override int GetHashCode() { return base.GetHashCode(); }
-        public static SizeByte Round(SizeF value) { return new SizeByte((byte)Math.Round(value.Width), (byte)Math.Round(value.Height)); }
-        public static SizeByte Subtract(SizeByte sz1, SizeByte sz2) { return sz1 - sz2; }
-        public override string ToString() { return "(" + _width + "," + _height + ")"; }
-        public static SizeByte Truncate(SizeF value) { return new SizeByte((byte)(value.Width), (byte)(value.Height)); }
+        public static SizeByte Add(SizeByte sz1, SizeByte sz2)
+        {
+            return sz1 + sz2;
+        }

-        public static SizeByte operator +(SizeByte sz1, SizeByte sz2) { return new SizeByte((byte)(sz1.Width + sz2.Width), (byte)(sz1.Height + sz2.Height)); }
-        public static bool operator ==(SizeByte sz1, SizeByte sz2) { return sz1.Width == sz2.Width && sz1.Height == sz2.Height; }
-        public static explicit operator Point(SizeByte size) { return new Point(size.Width, size.Height); }
-        public static explicit operator PointShort(SizeByte size) { return new PointShort(size.Width, size.Height); }
-        public static implicit operator SizeF(SizeByte p) { return new SizeF(p.Width, p.Height); }
-        public static implicit operator Size(SizeByte p) { return new Size(p.Width, p.Height); }
-        public static implicit operator SizeShort(SizeByte p) { return new SizeShort(p.Width, p.Height); }
-        public static bool operator !=(SizeByte sz1, SizeByte sz2) { return sz1.Width != sz2.Width || sz1.Height != sz2.Height; }
-        public static SizeByte operator -(SizeByte sz1, SizeByte sz2) { return new SizeByte((byte)(sz1.Width - sz2.Width), (byte)(sz1.Height - sz2.Height)); }
+        public static SizeByte Ceiling(SizeF value)
+        {
+            return new SizeByte((byte)Math.Ceiling(value.Width), (byte)Math.Ceiling(value.Height));
+        }

+        public override bool Equals(Object obj)
+        {
+            if (obj is SizeByte)
+                return (SizeByte)obj == this;
+
+            return false;
+        }
+
+        public override int GetHashCode()
+        {
+            return base.GetHashCode();
+        }
+
+        public static SizeByte Round(SizeF value)
+        {
+            return new SizeByte((byte)Math.Round(value.Width), (byte)Math.Round(value.Height));
+        }
+
+        public static SizeByte Subtract(SizeByte sz1, SizeByte sz2)
+        {
+            return sz1 - sz2;
+        }
+
+        public override string ToString()
+        {
+            return $"({_width},{_height})";
+        }
+
+        public static SizeByte Truncate(SizeF value)
+        {
+            return new SizeByte((byte)(value.Width), (byte)(value.Height));
+        }
+
+        public static SizeByte operator +(SizeByte sz1, SizeByte sz2)
+        {
+            return new SizeByte((byte)(sz1.Width + sz2.Width), (byte)(sz1.Height + sz2.Height));
+        }
+
+        public static bool operator ==(SizeByte sz1, SizeByte sz2)
+        {
+            return sz1.Width == sz2.Width && sz1.Height == sz2.Height;
+        }
+
+        public static explicit operator Point(SizeByte size)
+        {
+            return new Point(size.Width, size.Height);
+        }
+
+        public static explicit operator PointShort(SizeByte size)
+        {
+            return new PointShort(size.Width, size.Height);
+        }
+
+        public static implicit operator SizeF(SizeByte p)
+        {
+            return new SizeF(p.Width, p.Height);
+        }
+
+        public static implicit operator Size(SizeByte p)
+        {
+            return new Size(p.Width, p.Height);
+        }
+
+        public static implicit operator SizeShort(SizeByte p)
+        {
+            return new SizeShort(p.Width, p.Height);
+        }
+
+        public static bool operator !=(SizeByte sz1, SizeByte sz2)
+        {
+            return sz1.Width != sz2.Width || sz1.Height != sz2.Height;
+        }
+
+        public static SizeByte operator -(SizeByte sz1, SizeByte sz2)
+        {
+            return new SizeByte((byte)(sz1.Width - sz2.Width), (byte)(sz1.Height - sz2.Height));
+        }
+
         public static readonly SizeByte Empty = new SizeByte(0, 0);
     }
 }


Changed About info

Changed About info

--- Favor/Favor/Views/Home/Index.cshtml
+++ Favor/Favor/Views/Home/Index.cshtml
@@ -13,15 +13,16 @@
     }
     else
     {
Welcome to Favor

-
Enjoy your stay here. We hope you will enjoy your stay here and find what you are looking for.

+
We hope you will enjoy your stay here and find what you are looking for.

     }

-
About

+
The Idea

-            Favor is a great offer-trading website created to ease your life by finding people who are willing to do a certain job for you and much more epic interactions.
+            We all know how hard is to find exacly what you are looking for despite all those web sites with advertisements. So we from Favor want to give you the fastest way to find the person for the job or for you to make some cash.
+

Learn more »


build fix.

build fix.


Fixes AddReaderAccess for older tenants

Fixes AddReaderAccess for older tenants

--- OfficeDevPnP.Core/OfficeDevPnP.Core/AppModelExtensions/SecurityExtensions.cs
+++ OfficeDevPnP.Core/OfficeDevPnP.Core/AppModelExtensions/SecurityExtensions.cs
@@ -173,11 +173,165 @@
                     }
                 case BuiltInIdentity.EveryoneButExternalUsers:
                     {
-                        string userIdentity = string.Format("c:0-.f|rolemanager|spo-grid-all-users/{0}", web.GetAuthenticationRealm());
-                        var spReader = web.EnsureUser(userIdentity);
-                        web.Context.Load(spReader);
-                        web.Context.ExecuteQuery();
-
+                        User spReader = null;
+                        try
+                        {
+                            // New tenant
+                            string userIdentity = string.Format("c:0-.f|rolemanager|spo-grid-all-users/{0}", web.GetAuthenticationRealm());
+                            spReader = web.EnsureUser(userIdentity);
+                            web.Context.Load(spReader);
+                            web.Context.ExecuteQuery();
+                        }
+                        catch (ServerException)
+                        {
+                            // old tenant?
+                            string userIdentity = string.Empty;
+                            switch (web.Language)
+                            {
+                                case 1025: // Arabic
+                                    userIdentity = "الجميع باستثناء المستخدمين الخارجيين";
+                                    break;
+                                case 1069: // Basque
+                                    userIdentity = "Guztiak kanpoko erabiltzaileak izan ezik";
+                                    break;
+                                case 1026: // Bulgarian
+                                    userIdentity = "Всички освен външни потребители";
+                                    break;
+                                case 1027: // Catalan
+                                    userIdentity = "Tothom excepte els usuaris externs";
+                                    break;
+                                case 2052: // Chinese (Simplified)
+                                    userIdentity = "除外部用户外的任何人";
+                                    break;
+                                case 1028: // Chinese (Traditional)
+                                    userIdentity = "外部使用者以外的所有人";
+                                    break;
+                                case 1050: // Croatian
+                                    userIdentity = "Svi osim vanjskih korisnika";
+                                    break;
+                                case 1029: // Czech
+                                    userIdentity = "Všichni kromě externích uživatelů";
+                                    break;
+                                case 1030: // Danish
+                                    userIdentity = "Alle undtagen eksterne brugere";
+                                    break;
+                                case 1043: // Dutch
+                                    userIdentity = "Iedereen behalve externe gebruikers";
+                                    break;
+                                case 1033: // English
+                                    userIdentity = "Everyone except external users";
+                                    break;
+                                case 1061: // Estonian
+                                    userIdentity = "Kõik peale väliskasutajate";
+                                    break;
+                                case 1035: // Finnish
+                                    userIdentity = "Kaikki paitsi ulkoiset käyttäjät";
+                                    break;
+                                case 1036: // French
+                                    userIdentity = "Tout le monde sauf les utilisateurs externes";
+                                    break;
+                                case 1110: // Galician
+                                    userIdentity = "Todo o mundo excepto os usuarios externos";
+                                    break;
+                                case 1031: // German
+                                    userIdentity = "Jeder, außer externen Benutzern";
+                                    break;
+                                case 1032: // Greek
+                                    userIdentity = "Όλοι εκτός από εξωτερικούς χρήστες";
+                                    break;
+                                case 1037: // Hebrew
+                                    userIdentity = "כולם פרט למשתמשים חיצוניים";
+                                    break;
+                                case 1081: // Hindi
+                                    userIdentity = "बाह्य उपयोगकर्ताओं को छोड़कर सभी";
+                                    break;
+                                case 1038: // Hungarian
+                                    userIdentity = "Mindenki, kivéve külső felhasználók";
+                                    break;
+                                case 1057: // Indonesian
+                                    userIdentity = "Semua orang kecuali pengguna eksternal";
+                                    break;
+                                case 1040: // Italian
+                                    userIdentity = "Tutti tranne gli utenti esterni";
+                                    break;
+                                case 1041: // Japanese
+                                    userIdentity = "外部ユーザー以外のすべてのユーザー";
+                                    break;
+                                case 1087: // Kazakh
+                                    userIdentity = "Сыртқы пайдаланушылардан басқасының барлығы";
+                                    break;
+                                case 1042: // Korean
+                                    userIdentity = "외부 사용자를 제외한 모든 사람";
+                                    break;
+                                case 1062: // Latvian
+                                    userIdentity = "Visi, izņemot ārējos lietotājus";
+                                    break;
+                                case 1063: // Lithuanian
+                                    userIdentity = "Visi, išskyrus išorinius vartotojus";
+                                    break;
+                                case 1086: // Malay
+                                    userIdentity = "Semua orang kecuali pengguna luaran";
+                                    break;
+                                case 1044: // Norwegian (Bokmål)
+                                    userIdentity = "Alle bortsett fra eksterne brukere";
+                                    break;
+                                case 1045: // Polish
+                                    userIdentity = "Wszyscy oprócz użytkowników zewnętrznych";
+                                    break;
+                                case 1046: // Portuguese (Brazil)
+                                    userIdentity = "Todos exceto os usuários externos";
+                                    break;
+                                case 2070: // Portuguese (Portugal)
+                                    userIdentity = "Todos exceto os utilizadores externos";
+                                    break;
+                                case 1048: // Romanian
+                                    userIdentity = "Toată lumea, cu excepția utilizatorilor externi";
+                                    break;
+                                case 1049: // Russian
+                                    userIdentity = "Все, кроме внешних пользователей";
+                                    break;
+                                case 10266: // Serbian (Cyrillic, Serbia)
+                                    userIdentity = "Сви осим спољних корисника";
+                                    break;
+                                case 2074:// Serbian (Latin)
+                                    userIdentity = "Svi osim spoljnih korisnika";
+                                    break;
+                                case 1051:// Slovak
+                                    userIdentity = "Všetci okrem externých používateľov";
+                                    break;
+                                case 1060: // Slovenian
+                                    userIdentity = "Vsi razen zunanji uporabniki";
+                                    break;
+                                case 3082: // Spanish
+                                    userIdentity = "Todos excepto los usuarios externos";
+                                    break;
+                                case 1053: // Swedish
+                                    userIdentity = "Alla utom externa användare";
+                                    break;
+                                case 1054: // Thai
+                                    userIdentity = "ทุกคนยกเว้นผู้ใช้ภายนอก";
+                                    break;
+                                case 1055: // Turkish
+                                    userIdentity = "Dış kullanıcılar hariç herkes";
+                                    break;
+                                case 1058: // Ukranian
+                                    userIdentity = "Усі, крім зовнішніх користувачів";
+                                    break;
+                                case 1066: // Vietnamese
+                                    userIdentity = "Tất cả mọi người trừ người dùng bên ngoài";
+                                    break;
+                            }
+                            if (string.IsNullOrEmpty(userIdentity))
+                            {
+                                spReader = web.EnsureUser(userIdentity);
+                                web.Context.Load(spReader);
+                                web.Context.ExecuteQuery();
+                            }
+                            else
+                            {
+                                throw new Exception("Language currently not supported");
+                            }
+                        }
                         web.AssociatedVisitorGroup.Users.AddUser(spReader);
                         web.AssociatedVisitorGroup.Update();
                         web.Context.ExecuteQuery();
@@ -823,7 +977,7 @@

         public static Guid GetAuthenticationRealm(this Web web)
         {
-
+
             Guid returnGuid = Guid.Empty;
             if (!web.IsPropertyAvailable("Url"))
             {


Continue tests on RDFQueryEngine

Continue tests on RDFQueryEngine

--- RDFSharp.Test/Query/Mirella/RDFQueryEngineTest.cs
+++ RDFSharp.Test/Query/Mirella/RDFQueryEngineTest.cs
@@ -193,6 +193,70 @@
             Assert.IsTrue(result.SelectResultsCount == 1);
             Assert.IsTrue(string.Equals(result.SelectResults.Rows[0]["?Y"].ToString(), "ex:pluto"));
             Assert.IsTrue(string.Equals(result.SelectResults.Rows[0]["?N"].ToString(), "Pluto@IT"));
+        }
+
+        [TestMethod]
+        public void ShouldEvaluateSelectQueryOnGraph_UnionsThenOptional()
+        {
+            RDFGraph graph = new RDFGraph(new List<RDFTriple>()
+            {
+                new RDFTriple(new RDFResource("ex:pluto"),new RDFResource("ex:dogOf"),new RDFResource("ex:topolino")),
+                new RDFTriple(new RDFResource("ex:topolino"),new RDFResource("ex:hasName"),new RDFPlainLiteral("Mickey Mouse", "en-US")),
+                new RDFTriple(new RDFResource("ex:fido"),new RDFResource("ex:dogOf"),new RDFResource("ex:paperino")),
+                new RDFTriple(new RDFResource("ex:paperino"),new RDFResource("ex:hasName"),new RDFPlainLiteral("Donald Duck", "en-US")),
+                new RDFTriple(new RDFResource("ex:balto"),new RDFResource("ex:dogOf"),new RDFResource("ex:whoever"))
+            });
+
+            RDFSelectQuery query = new RDFSelectQuery()
+                .AddPatternGroup(new RDFPatternGroup()
+                    .AddPattern(new RDFPattern(new RDFResource("ex:pluto"), new RDFResource("ex:dogOf"), new RDFVariable("?X")).UnionWithNext())
+                    .AddPattern(new RDFPattern(new RDFResource("ex:fido"), new RDFResource("ex:dogOf"), new RDFVariable("?X")).UnionWithNext())
+                    .AddPattern(new RDFPattern(new RDFResource("ex:balto"), new RDFResource("ex:dogOf"), new RDFVariable("?X")))
+                    .AddPattern(new RDFPattern(new RDFVariable("?X"), new RDFResource("ex:hasName"), new RDFVariable("?N")).Optional()))
+                .AddModifier(new RDFOrderByModifier(new RDFVariable("?X"), RDFQueryEnums.RDFOrderByFlavors.ASC));
+            RDFSelectQueryResult result = new RDFQueryEngine().EvaluateSelectQuery(query, graph);
+
+            Assert.IsNotNull(result);
+            Assert.IsNotNull(result.SelectResults);
+            Assert.IsTrue(result.SelectResults.Columns.Count == 2);
+            Assert.IsTrue(result.SelectResultsCount == 3);
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[0]["?X"].ToString(), "ex:paperino"));
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[0]["?N"].ToString(), "Donald Duck@EN-US"));
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[1]["?X"].ToString(), "ex:topolino"));
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[1]["?N"].ToString(), "Mickey Mouse@EN-US"));
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[2]["?X"].ToString(), "ex:whoever"));
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[2]["?N"].ToString(), DBNull.Value.ToString()));
+        }
+
+        [TestMethod]
+        public void ShouldEvaluateSelectQueryOnGraph_UnionsThenInner()
+        {
+            RDFGraph graph = new RDFGraph(new List<RDFTriple>()
+            {
+                new RDFTriple(new RDFResource("ex:pluto"),new RDFResource("ex:dogOf"),new RDFResource("ex:topolino")),
+                new RDFTriple(new RDFResource("ex:topolino"),new RDFResource("ex:hasName"),new RDFPlainLiteral("Mickey Mouse", "en-US")),
+                new RDFTriple(new RDFResource("ex:fido"),new RDFResource("ex:dogOf"),new RDFResource("ex:paperino")),
+                new RDFTriple(new RDFResource("ex:paperino"),new RDFResource("ex:hasName"),new RDFPlainLiteral("Donald Duck", "en-US")),
+                new RDFTriple(new RDFResource("ex:balto"),new RDFResource("ex:dogOf"),new RDFResource("ex:whoever"))
+            });
+
+            RDFSelectQuery query = new RDFSelectQuery()
+                .AddPatternGroup(new RDFPatternGroup()
+                    .AddPattern(new RDFPattern(new RDFResource("ex:pluto"), new RDFResource("ex:dogOf"), new RDFVariable("?X")).UnionWithNext())
+                    .AddPattern(new RDFPattern(new RDFResource("ex:fido"), new RDFResource("ex:dogOf"), new RDFVariable("?X")).UnionWithNext())
+                    .AddPattern(new RDFPattern(new RDFResource("ex:balto"), new RDFResource("ex:dogOf"), new RDFVariable("?X")))
+                    .AddPattern(new RDFPattern(new RDFVariable("?X"), new RDFResource("ex:hasName"), new RDFVariable("?N"))))
+                .AddModifier(new RDFOrderByModifier(new RDFVariable("?X"), RDFQueryEnums.RDFOrderByFlavors.ASC));
+            RDFSelectQueryResult result = new RDFQueryEngine().EvaluateSelectQuery(query, graph);
+
+            Assert.IsNotNull(result);
+            Assert.IsNotNull(result.SelectResults);
+            Assert.IsTrue(result.SelectResults.Columns.Count == 2);
+            Assert.IsTrue(result.SelectResultsCount == 2);
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[0]["?X"].ToString(), "ex:paperino"));
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[0]["?N"].ToString(), "Donald Duck@EN-US"));
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[1]["?X"].ToString(), "ex:topolino"));
+            Assert.IsTrue(string.Equals(result.SelectResults.Rows[1]["?N"].ToString(), "Mickey Mouse@EN-US"));
         }

         [TestMethod]


Complete the first authenticator method

Complete the first authenticator method

--- OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs
+++ OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs
@@ -95,7 +95,13 @@
                     m_ServerURI + "/auth/plain",
                     ServerUtils.BuildQueryString(sendData));

-            return String.Empty;
+            Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
+                    reply);
+
+            if (replyData["Result"].ToString() != "Success")
+                return String.Empty;
+
+            return replyData["Token"].ToString();
         }

         public bool Verify(UUID principalID, string token, int lifetime)


Force ApplicationService decoration attributes to be the same as in master

--- PS.Mothership.Core/PS.Mothership.Core.Common/Contracts/ApplicationService.cs
+++ PS.Mothership.Core/PS.Mothership.Core.Common/Contracts/ApplicationService.cs
@@ -2,7 +2,7 @@

 namespace PS.Mothership.Core.Common.Contracts
 {
-    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]
+    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
     public abstract class ApplicationService : IApplicationService
     {


Formatting.

Formatting.

--- Sensus.Shared.Tests/Sensus.Shared/Probes/User/Scripts/ScheduleWindowTests.cs
+++ Sensus.Shared.Tests/Sensus.Shared/Probes/User/Scripts/ScheduleWindowTests.cs
@@ -62,8 +62,8 @@
         {
             var t = TriggerWindow.Parse("10:22-12:22");

-            var reference  = new DateTime(1986,4,18, 10, 22, 0);
-            var after = new DateTime(1986,4,25, 10, 22, 0);
+            var reference = new DateTime(1986, 4, 18, 10, 22, 0);
+            var after = new DateTime(1986, 4, 25, 10, 22, 0);

             for (var i = 0; i < 100; i++)
             {
@@ -128,17 +128,17 @@
         {
             var t = TriggerWindow.Parse("10:22-12:22");

-            var reference  = new DateTime(1986, 4, 18, 10, 22, 0);
-            var after = new DateTime(1986, 4, 25, 10, 22, 0);
-            var expir = TimeSpan.FromMinutes(10);
-
-            for (var i = 0; i < 100; i++)
-            {
-                var nextTriggerTime = t.GetNextTriggerTime(reference, after, false, expir);
-
-                Assert.GreaterOrEqual(nextTriggerTime.ReferenceTillTrigger, TimeSpan.FromDays(8));
-                Assert.LessOrEqual(nextTriggerTime.ReferenceTillTrigger, TimeSpan.FromDays(8).Add(TimeSpan.FromHours(2)));
-                Assert.AreEqual(reference + nextTriggerTime.ReferenceTillTrigger + expir, nextTriggerTime.Expiration);
+            var reference = new DateTime(1986, 4, 18, 10, 22, 0);
+            var after = new DateTime(1986, 4, 25, 10, 22, 0);
+            var expire = TimeSpan.FromMinutes(10);
+
+            for (var i = 0; i < 100; i++)
+            {
+                var nextTriggerTime = t.GetNextTriggerTime(reference, after, false, expire);
+
+                Assert.GreaterOrEqual(nextTriggerTime.ReferenceTillTrigger, TimeSpan.FromDays(8));
+                Assert.LessOrEqual(nextTriggerTime.ReferenceTillTrigger, TimeSpan.FromDays(8).Add(TimeSpan.FromHours(2)));
+                Assert.AreEqual(reference + nextTriggerTime.ReferenceTillTrigger + expire, nextTriggerTime.Expiration);
             }
         }

@@ -147,7 +147,7 @@
         {
             var t = TriggerWindow.Parse("10:22-12:22");

-            var reference  = new DateTime(1986, 4, 18, 10, 22, 0);
+            var reference = new DateTime(1986, 4, 18, 10, 22, 0);
             var after = new DateTime(1986, 4, 25, 10, 22, 0);

             for (var i = 0; i < 100; i++)
@@ -165,12 +165,12 @@
         {
             var t = TriggerWindow.Parse("10:22-12:22");

-            var reference  = new DateTime(1986, 4, 18, 10, 22, 0);
+            var reference = new DateTime(1986, 4, 18, 10, 22, 0);
             var after = new DateTime(1986, 4, 25, 10, 22, 0);
             var expire = TimeSpan.FromMinutes(1);

             for (var i = 0; i < 100; i++)
-            {
+            {
                 var nextTriggerTime = t.GetNextTriggerTime(reference, after, false, expire);

                 Assert.GreaterOrEqual(nextTriggerTime.ReferenceTillTrigger, TimeSpan.FromDays(8));


TVA.Core
- Updated TVA.Identity.UserInfo to add new GetUserPropertyValue() and GetUserPropertyValueAsString() methods that replace current GetUserProperty() method.
- Updated TVA.Identity.UserInfo.LastLogon property to revert using lastLogon ActiveDirectory property and correctly parse the return value.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS05]$/tvacodelibrary/Main;C85497

--- Source/OldCode/TVACodeLibrary/Source/Libraries/TVA.Core/Identity/UserInfo.cs
+++ Source/OldCode/TVACodeLibrary/Source/Libraries/TVA.Core/Identity/UserInfo.cs
@@ -79,10 +79,15 @@
 //  11/23/2011 - J. Ritchie Carroll
 //       Modified to support new life cycle interface requirements (i.e., Diposed event).
 //  03/05/2013 - Joe France
-//      Prefer the lastlogontimestamp property over .lastLogon property
+//      Prefer the lastlogontimestamp property over lastLogon property.
+//  03/06/2013 - Pinal C. Patel
+//       Added new GetUserPropertyValue() and GetUserPropertyValueAsString() methods to replace old
+//       GetUserProperty() method and marked GetUserPropertyValue() as obsolete.
+//       Updated LastLogon to revert using lastLogon property instead of lastLogonTimestamp since it is
+//       updated less frequestly and fixed the parsing logic for it since the return value is a large
+//       integer.
 //
 //*******************************************************************************************************
-

 #region [ TVA Open Source Agreement ]
 /*
@@ -705,11 +710,9 @@
                     try
                     {
                         if (m_isWinNT)
-                            return DateTime.Parse(GetUserProperty("lastLogin"));
-                        else if (m_userEntry.Properties.Contains("lastlogontimestamp"))
-                            return DateTime.FromFileTime(ConvertToLong(m_userEntry.Properties["lastlogontimestamp"].Value));
-                        else
-                            return DateTime.MinValue;
+                            return DateTime.Parse(GetUserPropertyValueAsString("lastLogin"));
+
+                        return DateTime.FromFileTime(ConvertToLong(GetUserPropertyValue("lastLogon").Value));
                     }
                     catch
                     {
@@ -734,7 +737,7 @@
                     {
                         if (m_isWinNT)
                         {
-                            string profilePath = GetUserProperty("profile");
+                            string profilePath = GetUserPropertyValueAsString("profile");

                             if (string.IsNullOrEmpty(profilePath) || !Directory.Exists(profilePath))
                             {
@@ -753,7 +756,7 @@
                             return Directory.GetCreationTime(profilePath);
                         }
                         else
-                            return Convert.ToDateTime(GetUserProperty("whenCreated"));
+                            return Convert.ToDateTime(GetUserPropertyValueAsString("whenCreated"));
                     }
                     catch
                     {
@@ -786,10 +789,10 @@
                             if (maxPasswordTicksAge >= 0)
                             {
                                 // WinNT properties are in seconds, not ticks
-                                long passwordAge = long.Parse(GetUserProperty("passwordAge"));
+                                long passwordAge = long.Parse(GetUserPropertyValueAsString("passwordAge"));
                                 long maxPasswordAge = (long)maxPasswordTicksAge.ToSeconds();

-                                if (passwordAge > maxPasswordAge || GetUserProperty("passwordExpired").ParseBoolean())
+                                if (passwordAge > maxPasswordAge || GetUserPropertyValueAsString("passwordExpired").ParseBoolean())
                                 {
                                     // User must change password on next logon.
                                     passwordChangeDate = DateTime.UtcNow;
@@ -803,7 +806,7 @@
                         }
                         else
                         {
-                            long passwordSetOn = ConvertToLong(m_userEntry.Properties["pwdLastSet"].Value);
+                            long passwordSetOn = ConvertToLong(GetUserPropertyValue("pwdLastSet").Value);

                             if (passwordSetOn == 0)
                             {
@@ -841,9 +844,9 @@
                 if (m_enabled && m_userAccountControl == -1)
                 {
                     if (m_isWinNT)
-                        m_userAccountControl = int.Parse(GetUserProperty("userFlags"));
+                        m_userAccountControl = int.Parse(GetUserPropertyValueAsString("userFlags"));
                     else
-                        m_userAccountControl = int.Parse(GetUserProperty("userAccountControl"));
+                        m_userAccountControl = int.Parse(GetUserPropertyValueAsString("userAccountControl"));
                 }

                 return m_userAccountControl;
@@ -907,7 +910,7 @@

                     if (m_isWinNT)
                     {
-                        maxAgePropertyValue = GetUserProperty("maxPasswordAge");
+                        maxAgePropertyValue = GetUserPropertyValueAsString("maxPasswordAge");
                     }
                     else
                     {
@@ -1004,7 +1007,7 @@
                 if (m_isWinNT)
                     return GetNameElements(DisplayName)[0];

-                return GetUserProperty("givenName");
+                return GetUserPropertyValueAsString("givenName");
             }
         }

@@ -1019,7 +1022,7 @@
                 if (m_isWinNT)
                     return GetNameElements(DisplayName)[1];

-                return GetUserProperty("sn");
+                return GetUserPropertyValueAsString("sn");
             }
         }

@@ -1033,15 +1036,15 @@
             {
                 if (m_isWinNT)
                 {
-                    string name = GetUserProperty("fullName");
+                    string name = GetUserPropertyValueAsString("fullName");

                     if (string.IsNullOrEmpty(name))
-                        name = GetUserProperty("Name");
+                        name = GetUserPropertyValueAsString("Name");

                     return name;
                 }

-                return GetUserProperty("displayName");
+                return GetUserPropertyValueAsString("displayName");
             }
         }

@@ -1053,7 +1056,7 @@
         {
             get
             {
-                return GetUserProperty("initials");
+                return GetUserPropertyValueAsString("initials");
             }
         }

@@ -1094,7 +1097,7 @@
         {
             get
             {
-                return GetUserProperty("mail");
+                return GetUserPropertyValueAsString("mail");
             }
         }

@@ -1106,7 +1109,7 @@
         {
             get
             {
-                return GetUserProperty("wWWHomePage");
+                return GetUserPropertyValueAsString("wWWHomePage");
             }
         }

@@ -1118,7 +1121,7 @@
         {
             get
             {
-                return GetUserProperty("description");
+                return GetUserPropertyValueAsString("description");
             }
         }

@@ -1130,7 +1133,7 @@
         {
             get
             {
-                return GetUserProperty("telephoneNumber");
+                return GetUserPropertyValueAsString("telephoneNumber");
             }
         }

@@ -1142,7 +1145,7 @@
         {
             get
             {
-                return GetUserProperty("title");
+                return GetUserPropertyValueAsString("title");
             }
         }

@@ -1154,7 +1157,7 @@
         {
             get
             {
-                return GetUserProperty("company");
+                return GetUserPropertyValueAsString("company");
             }
         }

@@ -1166,7 +1169,7 @@
         {
             get
             {
-                return GetUserProperty("physicalDeliveryOfficeName");
+                return GetUserPropertyValueAsString("physicalDeliveryOfficeName");
             }
         }

@@ -1178,7 +1181,7 @@
         {
             get
             {
-                return GetUserProperty("department");
+                return GetUserPropertyValueAsString("department");
             }
         }

@@ -1190,7 +1193,7 @@
         {
             get
             {
-                return GetUserProperty("l");
+                return GetUserPropertyValueAsString("l");
             }
         }

@@ -1202,7 +1205,7 @@
         {
             get
             {
-                return GetUserProperty("streetAddress");
+                return GetUserPropertyValueAsString("streetAddress");
             }
         }

@@ -1539,8 +1542,8 @@
         /// Returns the value for specified active directory property.
         /// </summary>
         /// <param name="propertyName">Name of the active directory property whose value is to be retrieved.</param>
-        /// <returns>Value for the specified active directory property.</returns>
-        public string GetUserProperty(string propertyName)
+        /// <returns><see cref="PropertyValueCollection"/> for the specified active directory property.</returns>
+        public PropertyValueCollection GetUserPropertyValue(string propertyName)
         {
             WindowsImpersonationContext currentContext = null;

@@ -1551,7 +1554,7 @@

                 // Quit if disabled
                 if (!m_enabled)
-                    return string.Empty;
+                    return null;

                 if ((object)m_userEntry != null)
                 {
@@ -1559,22 +1562,36 @@
                     currentContext = ImpersonatePrivilegedAccount();

                     // Return requested Active Directory property value
-                    return m_userEntry.Properties[propertyName][0].ToString().Replace("  ", " ").Trim();
+                    return m_userEntry.Properties[propertyName];
                 }
                 else
                 {
-                    return string.Empty;
+                    return null;
                 }
             }
             catch
             {
-                return string.Empty;
+                return null;
             }
             finally
             {
                 // Undo impersonation if it was performed
                 EndImpersonation(currentContext);
             }
+        }
+
+        /// <summary>
+        /// Returns the value for specified active directory property.
+        /// </summary>
+        /// <param name="propertyName">Name of the active directory property whose value is to be retrieved.</param>
+        /// <returns><see cref="String"/> value for the specified active directory property.</returns>
+        public string GetUserPropertyValueAsString(string propertyName)
+        {
+            PropertyValueCollection value = GetUserPropertyValue(propertyName);
+            if (value != null && value.Count > 0)
+                return value[0].ToString().Replace("  ", " ").Trim();
+            else
+                return string.Empty;
         }

         private DirectorySearcher CreateDirectorySearcher()
@@ -1959,5 +1976,20 @@
         }

         #endregion
+
+        #region [ Obsolete ]
+
+        /// <summary>
+        /// Returns the value for specified active directory property.
+        /// </summary>
+        /// <param name="propertyName">Name of the active directory property whose value is to be retrieved.</param>
+        /// <returns><see cref="String"/> value for the specified active directory property.</returns>
+        [Obsolete("GetUserPropertyValueAsString replaces GetUserProperty", true)]
+        public string GetUserProperty(string propertyName)
+        {
+            return GetUserPropertyValueAsString(propertyName);
+        }
+
+        #endregion
     }
 }


small refactoring

small refactoring

--- Untech.SharePoint.Common.Test/Data/Translators/CamlQueryTreeProcessorTest.cs
+++ Untech.SharePoint.Common.Test/Data/Translators/CamlQueryTreeProcessorTest.cs
@@ -86,7 +86,8 @@
 					"<Query><RowLimit>10</RowLimit>" +
 					"<Where><And><And><Eq><FieldRef Name='Bool1' /><Value>True</Value></Eq><Gt><FieldRef Name='Int1' /><Value>10</Value></Gt></And>" +
 					"<BeginsWith><FieldRef Name='String1' /><Value>TEST</Value></BeginsWith></And></Where>" +
-					"</Query>").ExprectedQueryTree(source => source.Where(n => n.String1 == "SOME"));
+					"</Query>")
+				.ExprectedQueryTree(source => source.Where(n => n.String1 == "SOME"));
 		}

 		[TestMethod]
@@ -280,33 +281,30 @@
 				return this;
 			}

-
 			public TestScenario ExprectedQueryTree(Func<IQueryable<Entity>, IQueryable<Entity>> expectedQuery)
 			{
-				var actualTree = new SpQueryRemover().Visit(_given);
 				var expectedQueryTree = expectedQuery(new FakeQueryable<Entity>()).Expression;
-
-				expectedQueryTree = new SpQueryRemover().Visit(expectedQueryTree);
-
-				Assert.AreEqual(expectedQueryTree.ToString(), actualTree.ToString());
-
+				ExpectedExpression(expectedQueryTree);
 				return this;
 			}

 			public TestScenario ExprectedQueryTree(Func<IQueryable<Entity>, object> expectedQuery)
 			{
-				var actualTree = new SpQueryRemover().Visit(_given);
 				Expression expectedQueryTree = null;
 				expectedQuery(new FakeQueryable<Entity>
 				{
 					ExpressionExecutor = node => { expectedQueryTree = node; }
 				});
-
-				expectedQueryTree = new SpQueryRemover().Visit(expectedQueryTree);
-
-				Assert.AreEqual(expectedQueryTree.ToString(), actualTree.ToString());
-
+				ExpectedExpression(expectedQueryTree);
 				return this;
+			}
+
+			private void ExpectedExpression(Expression expectedExpression)
+			{
+				var givenExpression = new SpQueryRemover().Visit(_given);
+				expectedExpression = new SpQueryRemover().Visit(expectedExpression);
+
+				Assert.AreEqual(expectedExpression.ToString(), givenExpression.ToString());
 			}
 		}


Return failures when re-registering

Return failures when re-registering

Return the correct failure when attempting to register with an existing
email, rather than a generic 500.
Not handled on front-end, however.

--- VotingApplication/VotingApplication.Web/Api/Controllers/AccountController.cs
+++ VotingApplication/VotingApplication.Web/Api/Controllers/AccountController.cs
@@ -430,16 +430,16 @@

             IdentityResult identityResult = await UserManager.CreateAsync(user, model.Password);

+            var createResult = GetErrorResult(identityResult);
+
+            if (createResult != null)
+            {
+                return createResult;
+            }
+
             string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id);

             _correspondenceService.SendConfirmation(user.Email, code);
-
-            var createResult = GetErrorResult(identityResult);
-
-            if (createResult != null)
-            {
-                return createResult;
-            }

             _metricHandler.HandleRegisterEvent(user.UserName);


fixed whitespaces

fixed whitespaces

--- XPlat/YouTube.Player/ios/samples/YouTubePlayerSample/Models/YouTubeApiKey.cs
+++ XPlat/YouTube.Player/ios/samples/YouTubePlayerSample/Models/YouTubeApiKey.cs
@@ -4,7 +4,7 @@
 {
 	public static class YouTubeApiKey
 	{
-        // https://www.thewissen.io/embedding-youtube-feed-xamarin-forms/
+		// https://www.thewissen.io/embedding-youtube-feed-xamarin-forms/

 		// This is not related with YouTube.Player for iOS
 		// This is an extra functionality to show a better sample of the component


Fix ThumbnailViewer (BL-2901)

Fix ThumbnailViewer (BL-2901)

* reflection was referencing the old namespace system

--- SIL.Windows.Forms/ImageGallery/ThumbnailViewer.cs
+++ SIL.Windows.Forms/ImageGallery/ThumbnailViewer.cs
@@ -41,13 +41,13 @@
 			if (UseWebViewer)
 			{
 				var path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath),
-					"PalasoUIWindowsForms.GeckoBrowserAdapter.dll");
+					"SIL.Windows.Forms.GeckoBrowserAdapter.dll");
 				if (File.Exists(path))
 				{
 					var assembly = Assembly.LoadFile(path);
 					if (assembly != null)
 					{
-						var browser = assembly.GetType("Palaso.UI.WindowsForms.ImageGallery.WebThumbnailViewer");
+						var browser = assembly.GetType("SIL.Windows.Forms.GeckoBrowserAdapter.WebThumbnailViewer");
 						if (browser != null)
 						{
 							try


[Samples] Fix issue #360

[Samples] Fix issue #360

--- Samples/XAudio2/AudioPlayerApp/MainWindow.xaml.cs
+++ Samples/XAudio2/AudioPlayerApp/MainWindow.xaml.cs
@@ -25,6 +25,8 @@
 using System.Windows.Input;
 using System.Windows.Threading;
 using Microsoft.Win32;
+
+using SharpDX;
 using SharpDX.IO;
 using SharpDX.MediaFoundation;
 using SharpDX.XAudio2;
@@ -58,6 +60,14 @@
             timer.Start();
         }

+
+        protected override void OnClosed(EventArgs e)
+        {
+            Utilities.Dispose(ref masteringVoice);
+            Utilities.Dispose(ref xaudio2);
+            base.OnClosed(e);
+        }
+
         private void EjectButton_Click(object sender, RoutedEventArgs e)
         {
             var dialog = new OpenFileDialog { Title = "Select an audio file (wma, mp3, ...etc.) or video file..." };


Fixed relations

Fixed relations

relations no longer consider share mode (except can control)

--- Scripts/Utility/Extensions/ExtensionsRelations.cs
+++ Scripts/Utility/Extensions/ExtensionsRelations.cs
@@ -97,19 +97,11 @@

 		public static Relations getRelationsTo(this IMyPlayer player, long playerID)
 		{
-			if (player == null)
-				throw new ArgumentNullException("player");
-
 			return GetRelations(player.GetRelationTo(playerID));
 		}

 		public static Relations getRelationsTo(this IMyPlayer player, IMyCubeGrid target, Relations breakOn = Relations.None)
 		{
-			if (player == null)
-				throw new ArgumentNullException("player");
-			if (target == null)
-				throw new ArgumentNullException("grid");
-
 			if (target.BigOwners.Count == 0 && target.SmallOwners.Count == 0) // grid has no owner
 				return Relations.Enemy;

@@ -133,16 +125,27 @@

 		private static Relations getRelationsTo(this IMyCubeBlock block, long playerID)
 		{
-			VRage.Exceptions.ThrowIf<ArgumentNullException>(block == null, "block");
-
-			return GetRelations( block.GetUserRelationToOwner(playerID));
+			if (block.OwnerId == playerID)
+				return Relations.Owner;
+
+			IMyFaction fact1 = MyAPIGateway.Session.Factions.TryGetPlayerFaction(block.OwnerId);
+			if (fact1 == null)
+				return Relations.Enemy;
+			IMyFaction fact2 = MyAPIGateway.Session.Factions.TryGetPlayerFaction(playerID);
+			if (fact2 == null)
+				return Relations.Enemy;
+
+			if (fact1  == fact2)
+				return Relations.Faction;
+
+			if (MyAPIGateway.Session.Factions.GetRelationBetweenFactions(fact1.FactionId, fact2.FactionId) == MyRelationsBetweenFactions.Neutral)
+				return Relations.Neutral;
+
+			return Relations.Enemy;
 		}

 		public static Relations getRelationsTo(this IMyCubeBlock block, IMyCubeBlock target)
 		{
-			VRage.Exceptions.ThrowIf<ArgumentNullException>(block == null, "block");
-			VRage.Exceptions.ThrowIf<ArgumentNullException>(target == null, "target");
-
 			if (block.OwnerId == 0 || target.OwnerId == 0)
 				return Relations.None;
 			return block.getRelationsTo(target.OwnerId);
@@ -150,9 +153,6 @@

 		public static Relations getRelationsTo(this IMyCubeBlock block, IMyCubeGrid target, Relations breakOn = Relations.None)
 		{
-			VRage.Exceptions.ThrowIf<ArgumentNullException>(block == null, "block");
-			VRage.Exceptions.ThrowIf<ArgumentNullException>(target == null, "target");
-
 			if (target.BigOwners.Count == 0 && target.SmallOwners.Count == 0) // grid has no owner
 				return Relations.Enemy;

@@ -226,17 +226,22 @@
 		{ return toIsHostile(block.getRelationsTo(target, Relations.Enemy)); }

+		/// <summary>
+		/// Different from the others because share mode matters.
+		/// </summary>
 		public static bool canControlBlock(this IMyCubeBlock block, IMyCubeBlock target)
 		{
-			switch (target.getRelationsTo(block))
-			{
-				case Relations.Faction:
-				case Relations.Owner:
+			switch (target.GetUserRelationToOwner(block.OwnerId))
+			{
+				case MyRelationsBetweenPlayerAndBlock.Enemies:
+				case MyRelationsBetweenPlayerAndBlock.Neutral:
+					return false;
+				case MyRelationsBetweenPlayerAndBlock.FactionShare:
+				case MyRelationsBetweenPlayerAndBlock.Owner:
 					return true;
-				case Relations.None:
+				case MyRelationsBetweenPlayerAndBlock.NoOwnership:
+				default:
 					return target.OwnerId == 0;
-				default:
-					return false;
 			}
 		}
 	}


GenericCrossSection constructor signatures

Implemented Izz property in GenericCrossSection.  Refactored the
constructors to accommodate this variable.

--- SharpFE.Core/CrossSections/GenericCrossSection.cs
+++ SharpFE.Core/CrossSections/GenericCrossSection.cs
@@ -4,13 +4,11 @@
  * Date: 28/06/2013
  *
  */
-using System;

 namespace SharpFE
 {
-    /// <summary>
-    /// Description of GenericCrossSection.
-    /// </summary>
+    using System;
+
     public class GenericCrossSection : ICrossSection
     {
         /// <summary>
@@ -19,15 +17,15 @@
         /// <param name="height"></param>
         /// <param name="width"></param>
         public GenericCrossSection(double sectionArea)
+            : this(sectionArea, 0, 0, true)
         {
             Guard.AgainstBadArgument(() => {return sectionArea <= 0;},
                                      "sectionArea has to be a positive, non-zero number",
                                      "sectionArea");
-
-            this.Area = sectionArea;
         }

         public GenericCrossSection(double sectionArea, double sectionSecondMomentOfAreaAroundYY)
+            : this(sectionArea, sectionSecondMomentOfAreaAroundYY, 0, true)
         {
             Guard.AgainstBadArgument(() => {return sectionArea <= 0;},
                                      "sectionArea has to be a positive, non-zero number",
@@ -36,8 +34,34 @@
                                      "sectionSecondMomentOfAreaAroundYY has to be a positive, non-zero number",
                                      "sectionSecondMomentOfAreaAroundYY");

+        }
+
+        public GenericCrossSection(double sectionArea, double sectionSecondMomentOfAreaAroundYY, double sectionSecondMomentOfAreaAroundZZ)
+            :this(sectionArea, sectionSecondMomentOfAreaAroundYY, sectionSecondMomentOfAreaAroundZZ, true)
+        {
+            Guard.AgainstBadArgument(() => {return sectionArea <= 0;},
+                                     "sectionArea has to be a positive, non-zero number",
+                                     "sectionArea");
+            Guard.AgainstBadArgument(() => {return sectionSecondMomentOfAreaAroundYY <= 0;},
+                                     "sectionSecondMomentOfAreaAroundYY has to be a positive, non-zero number",
+                                     "sectionSecondMomentOfAreaAroundYY");
+            Guard.AgainstBadArgument(() => {return sectionSecondMomentOfAreaAroundZZ <= 0;},
+                                     "sectionSecondMomentOfAreaAroundZZ has to be a positive, non-zero number",
+                                     "sectionSecondMomentOfAreaAroundZZ");
+        }
+
+        /// <summary>
+        /// All public constructors should delegate to this constructor.
+        /// </summary>
+        /// <param name="sectionArea"></param>
+        /// <param name="sectionSecondMomentOfAreaAroundYY"></param>
+        /// <param name="sectionSecondMomentOfAreaAroundZZ"></param>
+        /// <param name="flag">Not used. The flag is only here to make this constructor signature unique and prevent compilation errors.</param>
+        protected GenericCrossSection (double sectionArea, double sectionSecondMomentOfAreaAroundYY, double sectionSecondMomentOfAreaAroundZZ, bool flag)
+        {
             this.Area = sectionArea;
             this.SecondMomentOfAreaAroundYY = sectionSecondMomentOfAreaAroundYY;
+            this.SecondMomentOfAreaAroundZZ = sectionSecondMomentOfAreaAroundZZ;
         }

         /// <summary>
@@ -47,7 +71,7 @@
         {
             get
             {
-                throw new NotImplementedException();
+                throw new NotImplementedException("GenericCrossSection.MaximumDepth");
             }
         }

@@ -58,7 +82,7 @@
         {
             get
             {
-                throw new NotImplementedException();
+                throw new NotImplementedException("GenericCrossSection.MaximumWidth");
             }
         }

@@ -85,10 +109,8 @@
         /// </summary>
         public double SecondMomentOfAreaAroundZZ
         {
-            get
-            {
-                throw new NotImplementedException();
-            }
+            get;
+            private set;
         }

         /// <summary>
@@ -98,7 +120,7 @@
         {
             get
             {
-                throw new NotImplementedException();
+                throw new NotImplementedException("GenericCrossSection.ExternalPerimeterLength");
             }
         }

@@ -109,7 +131,7 @@
         {
             get
             {
-                throw new NotImplementedException();
+                throw new NotImplementedException("GenericCrossSection.MomentOfInertiaInTorsion");
             }
         }


Continue renaming on exception

Continue renaming on exception

--- Shuhari.WinTools.Gui/Views/BookManageView.xaml.cs
+++ Shuhari.WinTools.Gui/Views/BookManageView.xaml.cs
@@ -165,7 +165,14 @@
                     if (newName != file.Name)
                     {
                         var newPath = Path.Combine(file.DirectoryName, newName);
-                        file.MoveTo(newPath);
+                        try
+                        {
+                            file.MoveTo(newPath);
+                        }
+                        catch(Exception exp)
+                        {
+                            ((App)Application.Current).LogException(exp);
+                        }
                     }
                 }


fix callback async await bug

fix callback async await bug

--- SignalGo.Server/ServiceManager/ServerExtension.cs
+++ SignalGo.Server/ServiceManager/ServerExtension.cs
@@ -136,8 +136,8 @@
             bytes.AddRange(jsonBytes);

             await client.StreamHelper.WriteToStreamAsync(client.ClientStream, bytes.ToArray());
-            object result = taskCompletionSource.GetType().GetProperty("Task").GetValue(taskCompletionSource, null);
-            return (T)result;
+            Task<T> result = (Task<T>)taskCompletionSource.GetType().GetProperty("Task").GetValue(taskCompletionSource, null);
+            return await result;
 #endif
         }


fix compiling

fix compiling

--- Signum.React.Extensions/Rest/RestLogController.cs
+++ Signum.React.Extensions/Rest/RestLogController.cs
@@ -33,7 +33,7 @@
             }
             else
             {
-                result.Current = restClient.GetStringAsync(oldRequest.Url).Result
+                result.Current = restClient.GetStringAsync(oldRequest.Url).Result;
             }


Suppress logo when testing and packing

Suppress logo when testing and packing

--- tools/FakeItEasy.Build/Program.cs
+++ tools/FakeItEasy.Build/Program.cs
@@ -57,14 +57,14 @@
                     testSuite.Key,
                     DependsOn("build"),
                     forEach: testSuite.Value,
-                    action: testDirectory => Run("dotnet", "test --configuration Release --no-build -- RunConfiguration.NoAutoReporters=true", testDirectory));
+                    action: testDirectory => Run("dotnet", "test --configuration Release --no-build --nologo -- RunConfiguration.NoAutoReporters=true", testDirectory));
             }

             Target(
                 "pack",
                 DependsOn("build"),
                 forEach: ProjectsToPack,
-                action: project => Run("dotnet", $"pack {project.Path} --configuration Release --no-build --output {Path.GetFullPath("artifacts/output")}"));
+                action: project => Run("dotnet", $"pack {project.Path} --configuration Release --no-build --nologo --output {Path.GetFullPath("artifacts/output")}"));

             Target(
                 "force-approve",


Support specifying the HTTP method for HttpRequest

--- Source/MSBuild.Community.Tasks/Net/HttpRequest.cs
+++ Source/MSBuild.Community.Tasks/Net/HttpRequest.cs
@@ -45,6 +45,11 @@
         /// Default is true.  When true, if the web server returns a status code less than 200 or greater than 299 then the task fails.
         /// </summary>
         public bool FailOnNon2xxResponse { get; set; }
+
+        /// <summary>
+        /// Optional, default is GET. The HTTP method to use for the request.
+        /// </summary>
+        public string Method{ get; set; }

         /// <summary>
         /// Optional. The username to use with basic authentication.
@@ -100,6 +105,11 @@
                 return false;
             }

+	    if (!string.IsNullOrEmpty(Method))
+	    {
+ 		request.Method = Method;
+	    }
+
 	    if (!string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password))
 	    {
 		request.Credentials = new NetworkCredential(Username, Password);


Prerelease tag removed.

Prerelease tag removed.

--- Source/Monitoring.Owin/Properties/AssemblyInfo.cs
+++ Source/Monitoring.Owin/Properties/AssemblyInfo.cs
@@ -12,4 +12,4 @@
 [assembly: AssemblyFileVersion("1.0.0.0")]

 // This version is used by NuGet:
-[assembly: AssemblyInformationalVersion("1.0.0-prerelease04")]
+[assembly: AssemblyInformationalVersion("1.0.0")]


Typo correction

Typo correction


Hashcode obtained using RuntimeHelpers.GetHashCode()

--- Src/Graphology/Traversal/DefaultGetObjectGraph.cs
+++ Src/Graphology/Traversal/DefaultGetObjectGraph.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Runtime.CompilerServices;

 namespace TeaDriven.Graphology.Traversal
 {
@@ -45,7 +46,7 @@
                                  ReferenceType = referenceType,
                                  ObjectType = currentObject.GetType(),
                                  ReferenceName = referenceName,
-                                 ObjectHashCode = currentObject.GetHashCode()
+                                 ObjectHashCode = RuntimeHelpers.GetHashCode(currentObject)
                              };

             if (graphPath.Contains(currentObject))


add job project test object

add job project test object

--- Test.Integration/TestHelpers/TestObjectCreator.cs
+++ Test.Integration/TestHelpers/TestObjectCreator.cs
@@ -1,4 +1,5 @@
 using Web.Models.JobModels;
+using Web.Models.JobProjectModels;
 using Web.Models.SchoolModels;

 namespace Test.Integration.TestHelpers
@@ -41,5 +42,20 @@
         {
             return GetAddUpdateSchoolViewModel("Kent State University");
         }
+
+        public static AddUpdateJobProjectViewModel GetAddUpdateJobProjectViewModel(int jobId, string name)
+        {
+            return new AddUpdateJobProjectViewModel()
+            {
+                JobId = jobId,
+                Name = name,
+                Description = "Some project description"
+            };
+        }
+
+        public static AddUpdateJobProjectViewModel GetAddUpdateJobProjectViewModel(int jobId)
+        {
+            return GetAddUpdateJobProjectViewModel(jobId, "Some project name");
+        }
     }
 }


Change input handler methods

Change input handler methods

--- Tron/Application/Application/GameData.cs
+++ Tron/Application/Application/GameData.cs
@@ -53,7 +53,7 @@
                     return;
                 }

-                player = OnlinePlayerId;
+                // Run online direction change
             }
             else
             {
@@ -62,9 +62,9 @@
                 {
                     return;
                 }
+
+                Tron.Cars[player].ChangeDirection(direction);
             }
-
-            Tron.Cars[player].ChangeDirection(direction);
         }

         /// <summary>
@@ -82,7 +82,7 @@
                     return;
                 }

-                player = OnlinePlayerId;
+                // Run online boost
             }
             else
             {
@@ -91,9 +91,9 @@
                 {
                     return;
                 }
+
+                Tron.Cars[player].Boost();
             }
-
-            Tron.Cars[player].Boost();
         }

         /// <summary>


clone new tests to .NetCore solution

clone new tests to .NetCore solution

--- UnitTests/SecurityVulnerabilitiesTest.cs
+++ UnitTests/SecurityVulnerabilitiesTest.cs
@@ -4,6 +4,7 @@
 using Jose;
 using Jose.keys;
 using Xunit;
+using Xunit.Abstractions;

 namespace UnitTests
 {
@@ -19,6 +20,28 @@
     /// </summary>
     public class SecurityVulnerabilitiesTest
     {
+        private readonly TestConsole Console;
+
+        public SecurityVulnerabilitiesTest(ITestOutputHelper output)
+        {
+            this.Console = new TestConsole(output);
+        }
+
+        [Fact]
+        public void UnboundedPBKDF2Attack()
+        {
+            try
+            {
+                //forged token with 10mlns hash iterations
+                string token = "eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJpdiI6Inh1MWlHLXpMVERWaWU3b3YiLCJ0YWciOiJacExHZWVtaElFeUZDdS1iUk9jZlhnIiwiZW5jIjoiQTEyOEdDTSIsInAyYyI6MTAwMDAwMDAsInAycyI6Ik5rWGppMTk0N2ZSc0tUbEIifQ.-E0s5d6yAV0jRoT21YKURA.NOzw8pTGuxfe8kvC.NZAFt1_Kv1hglGgbGg.ev7SjmNduQgEWvPGh9SUmg";
+                var payload = Jose.JWT.Decode(token, "whatever");
+            }
+            catch (ArgumentException e)
+            {
+                Console.Out.WriteLine(e.ToString());
+            }
+        }
+
         [SkippableFact]
         public void InvalidCurveAttack()
         {
@@ -49,7 +72,7 @@
             }
             catch (CryptographicException e)
             {
-                Console.WriteLine(e);
+                Console.Out.WriteLine(e.ToString());
             }

             try
@@ -59,7 +82,7 @@
             }
             catch (CryptographicException e)
             {
-                Console.WriteLine(e);
+                Console.Out.WriteLine(e.ToString());
             }
         }

@@ -120,7 +143,7 @@
             }
             catch (Jose.IntegrityException e)
             {
-                Console.WriteLine(e);
+                Console.Out.WriteLine(e.ToString());
             }
         }
     }


Pass 2 - improvements

Pass 2 - improvements

--- Voxalia/ServerGame/WorldSystem/Region.cs
+++ Voxalia/ServerGame/WorldSystem/Region.cs
@@ -1141,7 +1141,7 @@
             if (cmat.ShouldSpread())
             {
                 int remainingperc;
-                switch (c.BlockLocalData)
+                switch (c.BlockData)
                 {
                     case 0:
                         remainingperc = 100;
@@ -1214,21 +1214,18 @@
                             PhysicsSetBlock(lxp, cmat, 5);
                             PhysicsSetBlock(lxm, cmat, 5);
                             PhysicsSetBlock(lyp, cmat, 5);
-                            PhysicsSetBlock(lym, cmat, 5);
-                            PhysicsSetBlock(block, Material.AIR);
+                            PhysicsSetBlock(block, cmat, 5);
                         }
                         else if (remainingperc == 50)
                         {
                             PhysicsSetBlock(lxp, cmat, 5);
                             PhysicsSetBlock(lxm, cmat, 5);
-                            PhysicsSetBlock(lyp, cmat, 5);
-                            PhysicsSetBlock(block, Material.AIR);
+                            PhysicsSetBlock(block, cmat, 5);
                         }
                         else if (remainingperc == 34)
                         {
                             PhysicsSetBlock(lxp, cmat, 5);
-                            PhysicsSetBlock(lxm, cmat, 5);
-                            PhysicsSetBlock(block, Material.AIR);
+                            PhysicsSetBlock(block, cmat, 5);
                         }
                         // 13 doesn't move!
                     }
@@ -1295,49 +1292,47 @@

         void LiquidSpread1(Location block, Material cmat, Location one, float remainingperc)
         {
-            SysConsole.Output(OutputType.INFO, "Spread1");
             if (remainingperc == 100)
             {
-                PhysicsSetBlock(one, cmat, 3);
+                PhysicsSetBlock(one, cmat, 5);
+                PhysicsSetBlock(block, cmat, 1);
+            }
+            else if (remainingperc == 84)
+            {
+                PhysicsSetBlock(one, cmat, 5);
+                PhysicsSetBlock(block, cmat, 2);
+            }
+            else if (remainingperc == 68)
+            {
+                PhysicsSetBlock(one, cmat, 5);
                 PhysicsSetBlock(block, cmat, 3);
             }
+            else if (remainingperc == 50)
+            {
+                PhysicsSetBlock(one, cmat, 5);
+                PhysicsSetBlock(block, cmat, 4);
+            }
+            else if (remainingperc == 34)
+            {
+                PhysicsSetBlock(one, cmat, 5);
+                PhysicsSetBlock(block, cmat, 5);
+            }
+            // 13 doesn't move!
+        }
+
+        void LiquidSpread2(Location block, Material cmat, Location one, Location two, float remainingperc)
+        {
+            if (remainingperc == 100)
+            {
+                PhysicsSetBlock(one, cmat, 5);
+                PhysicsSetBlock(two, cmat, 5);
+                PhysicsSetBlock(block, cmat, 2);
+            }
             else if (remainingperc == 84)
             {
-                PhysicsSetBlock(one, cmat, 4);
+                PhysicsSetBlock(one, cmat, 5);
+                PhysicsSetBlock(two, cmat, 5);
                 PhysicsSetBlock(block, cmat, 3);
-            }
-            else if (remainingperc == 68)
-            {
-                PhysicsSetBlock(one, cmat, 4);
-                PhysicsSetBlock(block, cmat, 4);
-            }
-            else if (remainingperc == 50)
-            {
-                PhysicsSetBlock(one, cmat, 5);
-                PhysicsSetBlock(block, cmat, 4);
-            }
-            else if (remainingperc == 34)
-            {
-                PhysicsSetBlock(one, cmat, 5);
-                PhysicsSetBlock(block, cmat, 5);
-            }
-            // 13 doesn't move!
-        }
-
-        void LiquidSpread2(Location block, Material cmat, Location one, Location two, float remainingperc)
-        {
-            SysConsole.Output(OutputType.INFO, "Spread2");
-            if (remainingperc == 100)
-            {
-                PhysicsSetBlock(one, cmat, 4);
-                PhysicsSetBlock(two, cmat, 4);
-                PhysicsSetBlock(block, cmat, 4);
-            }
-            else if (remainingperc == 84)
-            {
-                PhysicsSetBlock(one, cmat, 4);
-                PhysicsSetBlock(two, cmat, 4);
-                PhysicsSetBlock(block, cmat, 5);
             }
             else if (remainingperc == 68)
             {
@@ -1354,15 +1349,13 @@
             else if (remainingperc == 34)
             {
                 PhysicsSetBlock(one, cmat, 5);
-                PhysicsSetBlock(two, cmat, 5);
-                PhysicsSetBlock(block, Material.AIR);
+                PhysicsSetBlock(block, cmat, 5);
             }
             // 13 doesn't move!
         }

         void LiquidSpread3(Location block, Material cmat, Location one, Location two, Location three, float remainingperc)
         {
-            SysConsole.Output(OutputType.INFO, "Spread3");
             if (remainingperc == 100)
             {
                 PhysicsSetBlock(one, cmat, 5);
@@ -1388,14 +1381,12 @@
             {
                 PhysicsSetBlock(one, cmat, 5);
                 PhysicsSetBlock(two, cmat, 5);
-                PhysicsSetBlock(three, cmat, 5);
-                PhysicsSetBlock(block, Material.AIR);
+                PhysicsSetBlock(block, cmat, 5);
             }
             else if (remainingperc == 34)
             {
                 PhysicsSetBlock(one, cmat, 5);
-                PhysicsSetBlock(two, cmat, 5);
-                PhysicsSetBlock(block, Material.AIR);
+                PhysicsSetBlock(block, cmat, 5);
             }
             // 13 doesn't move!
         }


Added Comments on IChunk interface

Added Comments on IChunk interface

--- src/NStore.Core/Persistence/IChunk.cs
+++ src/NStore.Core/Persistence/IChunk.cs
@@ -1,11 +1,34 @@
 namespace NStore.Core.Persistence
-{
+{
+    /// <summary>
+    /// Chunk is the atomic element of the store.
+    /// The eventstore is a global ordered sequence of chunks
+    /// </summary>
     public interface IChunk
-    {
-        long Position { get; }
-        string PartitionId { get; }
-        long Index { get; }
-        object Payload { get; }
+    {
+        /// <summary>
+        /// Global position
+        /// </summary>
+        long Position { get; }
+
+        /// <summary>
+        /// Partion / stream / aggregate id
+        /// </summary>
+        string PartitionId { get; }
+
+        /// <summary>
+        /// Chunk index for a given partition
+        /// </summary>
+        long Index { get; }
+
+        /// <summary>
+        /// Data
+        /// </summary>
+        object Payload { get; }
+
+        /// <summary>
+        /// Idempotency Key, unique for a given partition / stream / aggregate
+        /// </summary>
         string OperationId { get; }
     }
 }