Added proper comments to public EveCrest.

--- EveLib.EveCrest/EveCrest.cs
+++ EveLib.EveCrest/EveCrest.cs
@@ -6,92 +6,205 @@
 namespace eZet.EveLib.Modules {
     public class EveCrest {

+        /// <summary>
+        /// The default URI used to access the CREST API.
+        /// </summary>
         public const string DefaultUri = "http://public-crest.eveonline.com/";

+        /// <summary>
+        /// Creates a new EveCrest object with a default request handler
+        /// </summary>
         public EveCrest() {
             RequestHandler = new RequestHandler(new HttpRequester(), new DynamicJsonSerializer());
             BaseUri = new Uri(DefaultUri);
         }

+        /// <summary>
+        /// Gets or sets the request handler used by this instance
+        /// </summary>
         public IRequestHandler RequestHandler { get; set; }

-        public ISerializer Serializer { get; set; }
-
+        /// <summary>
+        /// Gets or sets the URI used to access the CREST API by this instance.
+        /// </summary>
         public Uri BaseUri { get; set; }

+        /// <summary>
+        /// Returns data on the specified killmail.
+        /// Path: /killmails/$warId/$hash/
+        /// </summary>
+        /// <param name="id">Killmail ID</param>
+        /// <param name="hash">Killmail hash</param>
+        /// <returns>Returns data for the specified killmail.</returns>
         public Killmail GetKillmail(long id, string hash) {
             return GetKillmailAsync(id, hash).Result;
         }

+        /// <summary>
+        /// Returns data on the specified killmail.
+        /// Path: /killmails/$warId/$hash/
+        /// </summary>
+        /// <param name="id">Killmail ID</param>
+        /// <param name="hash">Killmail hash</param>
+        /// <returns>Returns data for the specified killmail.</returns>
         public Task<Killmail> GetKillmailAsync(long id, string hash) {
             string relPath = "killmails/" + id + "/" + hash + "/";
             return requestAsync<Killmail>(relPath);
         }

+        /// <summary>
+        /// Returns a list of all active incursions.
+        /// Path: /incursions/
+        /// </summary>
+        /// <returns>A list of all active incursions.</returns>
         public IncursionCollection GetIncursions() {
             return GetIncursionsAsync().Result;
         }

+        /// <summary>
+        /// Returns a list of all active incursions.
+        /// Path: /incursions/
+        /// </summary>
+        /// <returns>A list of all active incursions.</returns>
         public Task<IncursionCollection> GetIncursionsAsync() {
             const string relPath = "incursions/";
             return requestAsync<IncursionCollection>(relPath);
         }

+        /// <summary>
+        /// Returns a list of all alliances.
+        /// Path: /alliances/
+        /// </summary>
+        /// <param name="page">The 1-indexed page to return. Number of total pages is available in the repsonse.</param>
+        /// <returns>A list of all alliances.</returns>
         public AllianceCollection GetAlliances(int page = 1) {
             return GetAlliancesAsync(page).Result;
         }

+        /// <summary>
+        /// Returns a list of all alliances.
+        /// Path: /alliances/
+        /// </summary>
+        /// <param name="page">The 1-indexed page to return. Number of total pages is available in the repsonse.</param>
+        /// <returns>A list of all alliances.</returns>
         public Task<AllianceCollection> GetAlliancesAsync(int page = 1) {
             string relPath = "alliances/?page=" + page;
             return requestAsync<AllianceCollection>(relPath);
         }

+        /// <summary>
+        /// Returns data about a specific alliance.
+        /// Path: /alliances/$allianceId/
+        /// </summary>
+        /// <param name="allianceId">A valid alliance ID</param>
+        /// <returns>Data for specified alliance</returns>
         public Alliance GetAlliance(long allianceId) {
             return GetAllianceAsync(allianceId).Result;
         }

+        /// <summary>
+        /// Returns data about a specific alliance.
+        /// Path: /alliances/$allianceId/
+        /// </summary>
+        /// <param name="allianceId">A valid alliance ID</param>
+        /// <returns>Data for specified alliance</returns>
         public Task<Alliance> GetAllianceAsync(long allianceId) {
             string relPath = "alliances/" + allianceId + "/";
             return requestAsync<Alliance>(relPath);
         }

+        /// <summary>
+        /// Returns daily price and volume history for a specific region and item type.
+        /// Path: /market/$regionId/types/$typeId/history/
+        /// </summary>
+        /// <param name="regionId">Region ID</param>
+        /// <param name="typeId">Type ID</param>
+        /// <returns>Market history for the specified region and type.</returns>
         public MarketHistoryCollection GetMarketHistory(int regionId, int typeId) {
             return GetMarketHistoryAsync(regionId, typeId).Result;
         }

-
+        /// <summary>
+        /// Returns daily price and volume history for a specific region and item type.
+        /// Path: /market/$regionId/types/$typeId/history/
+        /// </summary>
+        /// <param name="regionId">Region ID</param>
+        /// <param name="typeId">Type ID</param>
+        /// <returns>Market history for the specified region and type.</returns>
         public Task<MarketHistoryCollection> GetMarketHistoryAsync(int regionId, int typeId) {
             string relPath = "market/" + regionId + "/types/" + typeId + "/history/";
             return requestAsync<MarketHistoryCollection>(relPath);
         }

+        /// <summary>
+        /// Returns a list of all wars.
+        /// Path: /wars/
+        /// </summary>
+        /// <param name="page">The 1-indexed page to return. Number of total pages is available in the repsonse.</param>
+        /// <returns>A list of all wars.</returns>
         public WarCollection GetWars(int page = 1) {
             return GetWarsAsync().Result;
         }

+        /// <summary>
+        /// Returns a list of all wars.
+        /// Path: /wars/
+        /// </summary>
+        /// <param name="page">The 1-indexed page to return. Number of total pages is available in the repsonse.</param>
+        /// <returns>A list of all wars.</returns>
         public Task<WarCollection> GetWarsAsync(int page = 1) {
             string relPath = "/wars/?page=" + page;
             return requestAsync<WarCollection>(relPath);
         }

-        public War GetWar(int id) {
-            return GetWarAsync(id).Result;
-        }
-
-        public Task<War> GetWarAsync(int id) {
-            string relPath = "/wars/" + id + "/";
+        /// <summary>
+        /// Returns data for a specific war.
+        /// Path: /wars/$warId
+        /// </summary>
+        /// <param name="warId">War ID</param>
+        /// <returns>Data for the specified war.</returns>
+        public War GetWar(int warId) {
+            return GetWarAsync(warId).Result;
+        }
+
+        /// <summary>
+        /// Returns data for a specific war.
+        /// Path: /wars/$warId
+        /// </summary>
+        /// <param name="warId">War ID</param>
+        /// <returns>Data for the specified war.</returns>
+        public Task<War> GetWarAsync(int warId) {
+            string relPath = "/wars/" + warId + "/";
             return requestAsync<War>(relPath);
         }

-        public KillmailCollection GetWarKillmails(int id) {
-            return GetWarKillmailsAsync(id).Result;
-        }
-
-        public Task<KillmailCollection> GetWarKillmailsAsync(int id) {
-            string relPath = "/wars/" + id + "/killmails/all/";
+        /// <summary>
+        /// Returns a list of all killmails related to a specified war.
+        /// Path: /wars/$warId/killmails/all
+        /// </summary>
+        /// <param name="warId">War ID</param>
+        /// <returns>A list of all killmails related to the specified war.</returns>
+        public KillmailCollection GetWarKillmails(int warId) {
+            return GetWarKillmailsAsync(warId).Result;
+        }
+
+        /// <summary>
+        /// Returns a list of all killmails related to a specified war.
+        /// Path: /wars/$warId/killmails/all
+        /// </summary>
+        /// <param name="warId">War ID</param>
+        /// <returns>A list of all killmails related to the specified war.</returns>
+        public Task<KillmailCollection> GetWarKillmailsAsync(int warId) {
+            string relPath = "/wars/" + warId + "/killmails/all/";
             return requestAsync<KillmailCollection>(relPath);
         }

+        /// <summary>
+        /// Performs a request using the request handler.
+        /// </summary>
+        /// <typeparam name="T">Response type</typeparam>
+        /// <param name="relPath">Relative path</param>
+        /// <returns></returns>
         private Task<T> requestAsync<T>(string relPath) {
             return RequestHandler.RequestAsync<T>(new Uri(BaseUri, relPath));
         }


Fixed memory leak that would occur if the EventSource was used as a "long-lived" object, which may be a valid use case.

The leak was caused because EventSource's observation would hold a strong reference to each AR that originates from it.
So the AR's could never be GC'd whilst the EventSource that created them still existed.

--- EventStreams/EventSource.cs
+++ EventStreams/EventSource.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Runtime.CompilerServices;

 namespace EventStreams {
     using Core;
@@ -8,8 +9,8 @@
     using Projection;

     public class EventSource {
-        private readonly IDictionary<Guid, AggregateRootObserver> _objects =
-            new Dictionary<Guid, AggregateRootObserver>();
+        private readonly ConditionalWeakTable<IAggregateRoot, AggregateRootObserver> _objects =
+            new ConditionalWeakTable<IAggregateRoot, AggregateRootObserver>();

         private readonly IProjector _projector;
         private readonly IPersistenceStrategy _persistenceStrategy;
@@ -48,12 +49,12 @@
         }

         private void Close(IAggregateRoot aggregateRoot) {
-            _objects.Remove(aggregateRoot.Identity);
+            _objects.Remove(aggregateRoot);
         }

         private void Commit(IAggregateRoot aggregateRoot, IEnumerable<IStreamedEvent> uncommittedEvents) {
             AggregateRootObserver observer;
-            if (!_objects.TryGetValue(aggregateRoot.Identity, out observer))
+            if (!_objects.TryGetValue(aggregateRoot, out observer))
                 throw new InvalidOperationException("Commit cannot be performed because the aggregate root did not originate from this event source.");

             _persistenceStrategy.Store(aggregateRoot, uncommittedEvents);
@@ -61,7 +62,7 @@

         private TAggregateRoot Observe<TAggregateRoot>(TAggregateRoot aggregateRoot) where TAggregateRoot : class, IAggregateRoot, new() {
             var observer = new AggregateRootObserver(this, aggregateRoot);
-            _objects.Add(aggregateRoot.Identity, observer);
+            _objects.Add(aggregateRoot, observer);
             aggregateRoot.Subscribe(observer);
             return aggregateRoot;
         }


HETS-1283 Add Mailing Label button

HETS-1283 Add Mailing Label button

--- Common/src/HetsReport/MailingLabel.cs
+++ Common/src/HetsReport/MailingLabel.cs
@@ -38,7 +38,7 @@
                         }

                         labelDoc.CompressionOption = CompressionOption.Maximum;
-                        //SecurityHelper.PasswordProtect(labelDoc);
+                        SecurityHelper.PasswordProtect(labelDoc);

                         byteArray = GetByteArray(labelDoc);
                     }


Fixed typo

Fixed typo

--- ComposerBuilder/UI/ContentFunction.cs
+++ ComposerBuilder/UI/ContentFunction.cs
@@ -19,7 +19,7 @@
         }

         // Properties
-        public T CurrentFuction
+        public T CurrentFunction
         {
             get
             {


Fixes 26621: nodeInstance.NodeTypeAlias always returns null

[TFS Changeset #65138]

--- umbraco/presentation/umbraco/nodeFactory/Page.cs
+++ umbraco/presentation/umbraco/nodeFactory/Page.cs
@@ -458,8 +458,16 @@
                     if (_pageXmlNode.Attributes.GetNamedItem("writerID") != null)
                         _writerID = int.Parse(_pageXmlNode.Attributes.GetNamedItem("writerID").Value);

-                    if (_pageXmlNode.Attributes.GetNamedItem("nodeTypeAlias") != null)
-                        _nodeTypeAlias = _pageXmlNode.Attributes.GetNamedItem("nodeTypeAlias").Value;
+                    if (UmbracoSettings.UseLegacyXmlSchema)
+                    {
+                        if (_pageXmlNode.Attributes.GetNamedItem("nodeTypeAlias") != null)
+                            _nodeTypeAlias = _pageXmlNode.Attributes.GetNamedItem("nodeTypeAlias").Value;
+                    }
+                    else
+                    {
+                        _nodeTypeAlias = _pageXmlNode.Name;
+                    }
+
                     if (_pageXmlNode.Attributes.GetNamedItem("path") != null)
                         _path = _pageXmlNode.Attributes.GetNamedItem("path").Value;
                     if (_pageXmlNode.Attributes.GetNamedItem("version") != null)


Four4Sample - more square root tests

Four4Sample - more square root tests

--- projects/Four4Sample/Four4.Test/CalculationTest.cs
+++ projects/Four4Sample/Four4.Test/CalculationTest.cs
@@ -118,6 +118,8 @@

         [Theory]
         [InlineData("4 R", "2")]
+        [InlineData("4 4 * R", "4")]
+        [InlineData("4 ! 4 ! * R", "24")]
         public void SquareRoot(string input, string result)
         {
             Calc(input, result);


Preserves the primary sign-in cookie on a partial sign-in

Preserves the primary sign-in cookie on a partial sign-in because
 - A new "complete" sign-in was not performed so the last one should remain active
 - The access to the current sign-in is useful to enable the following scenario
   1. User is already signed-in on IdSrv
   2. User forces a new authentication flow (e.g by using "prompt=login")
   3. User uses a new external IdP
   4. On the callback, the UserManager service detects that the external id is not connected to any account and redirect to a "connect" resource
   5. The "connect" resource uses the current (preserved) primary id and the external id to ask the user if she wants to connect the external id to her account.

#1554

--- source/Core/Endpoints/AuthenticationController.cs
+++ source/Core/Endpoints/AuthenticationController.cs
@@ -668,7 +668,7 @@

         private IHttpActionResult SignInAndRedirect(SignInMessage signInMessage, string signInMessageId, AuthenticateResult authResult, bool? rememberMe = null)
         {
-            ClearAuthenticationCookies();
+            ClearAuthenticationCookiesForNewSignIn(authResult);
             IssueAuthenticationCookie(signInMessageId, authResult, rememberMe);

             var redirectUrl = GetRedirectUrl(signInMessage, authResult);
@@ -758,6 +758,18 @@
             {
                 return new Uri(signInMessage.ReturnUrl);
             }
+        }
+
+        private void ClearAuthenticationCookiesForNewSignIn(AuthenticateResult authResult)
+        {
+            // on a partial sign-in, preserve the existing primary sign-in
+            if (!authResult.IsPartialSignIn)
+            {
+                context.Authentication.SignOut(Constants.PrimaryAuthenticationType);
+            }
+            context.Authentication.SignOut(
+                Constants.ExternalAuthenticationType,
+                Constants.PartialSignInAuthenticationType);
         }

         private void ClearAuthenticationCookies()


add disabling the stalk log ( issue #16 )

--- EyeInTheSky/ComplexStalk.cs
+++ EyeInTheSky/ComplexStalk.cs
@@ -98,7 +98,7 @@
             {
                 this.LastTriggerTime = DateTime.Now;

-                if (this.mail)
+                if (this.mail && bool.Parse(EyeInTheSkyBot.config["logstalks"]))
                     EyeInTheSkyBot.config.LogStalkTrigger(flag, rc);

                 return true;


Add convinience constructor which allow pass strings instead of Uri

--- src/NCrawler/CrawlStep.cs
+++ src/NCrawler/CrawlStep.cs
@@ -14,13 +14,18 @@
             this.Depth = depth;
             this.IsAllowed = true;
             this.IsExternalUrl = false;
-		}
+        }

-		#endregion
+        public CrawlStep(string uriString, int depth)
+            : this(new Uri(uriString), depth)
+        {
+        }

-		#region Instance Properties
+        #endregion

-		public int Depth { get; private set; }
+        #region Instance Properties
+
+        public int Depth { get; private set; }

 		public bool IsAllowed { get; set; }


[packages,Python,3.5.1] Expose the Python platform independent lib directory so it can be collated by other packages

--- packages/Python-3.5.1/bam/Scripts/Python.cs
+++ packages/Python-3.5.1/bam/Scripts/Python.cs
@@ -376,6 +376,15 @@
     sealed class PythonLibrary :
         C.DynamicLibrary
     {
+        public Bam.Core.TokenizedString
+        LibraryDirectory
+        {
+            get
+            {
+                return this.Macros["PythonLibDirectory"];
+            }
+        }
+
         protected override void
         Init(
             Bam.Core.Module parent)
@@ -393,6 +402,8 @@
             this.Macros["MajorVersion"] = Bam.Core.TokenizedString.CreateVerbatim("3");
             this.Macros["MinorVersion"] = Bam.Core.TokenizedString.CreateVerbatim("5");
             this.Macros["PatchVersion"] = Bam.Core.TokenizedString.CreateVerbatim("1");
+
+            this.Macros["PythonLibDirectory"] = this.CreateTokenizedString("$(packagedir)/Lib");

             this.PublicPatch((settings, appliedTo) =>
                 {
@@ -1243,16 +1254,17 @@
             base.Init(parent);

             var app = this.Include<PythonInterpreter>(C.ConsoleApplication.Key, EPublishingType.ConsoleApplication);
-            this.Include<PythonLibrary>(C.DynamicLibrary.Key, ".", app);
+            var pyLibCopy = this.Include<PythonLibrary>(C.DynamicLibrary.Key, ".", app);
+            var pyLibDir = (pyLibCopy.SourceModule as Python.PythonLibrary).LibraryDirectory;

             if (this.BuildEnvironment.Platform.Includes(Bam.Core.EPlatform.Windows))
             {
-                var platIndependentModules = this.IncludeDirectory(this.CreateTokenizedString("$(packagedir)/Lib"), ".", app);
+                var platIndependentModules = this.IncludeDirectory(pyLibDir, ".", app);
                 platIndependentModules.CopiedFilename = "lib";
             }
             else
             {
-                var platIndependentModules = this.IncludeDirectory(this.CreateTokenizedString("$(packagedir)/Lib"), "lib", app);
+                var platIndependentModules = this.IncludeDirectory(pyLibDir, "lib", app);
                 platIndependentModules.CopiedFilename = "python3.5";

                 this.Include<SysConfigDataPythonFile>(SysConfigDataPythonFile.Key, "lib/python3.5", app);


Change: InstanceFromRawAddress prepeared for use

--- src/reni2/TokenClasses/InstanceFromRawAddress.cs
+++ src/reni2/TokenClasses/InstanceFromRawAddress.cs
@@ -2,9 +2,13 @@
 using System.Collections.Generic;
 using System;
 using hw.Debug;
+using Reni.Feature;

 namespace Reni.TokenClasses
 {
     sealed class InstanceFromRawAddress : Definable
-    {}
+    {
+        [DisableDump]
+        internal override IEnumerable<IGenericProviderForDefinable> Genericize => this.GenericListFromDefinable(base.Genericize);
+    }
 }


Implemented IUserAuthenticatorKeyStore and IUserTwoFactorRecoveryCodeStore

--- src/AspNetCore.Identity.MongoDB/MongoUserStore.cs
+++ src/AspNetCore.Identity.MongoDB/MongoUserStore.cs
@@ -21,7 +21,9 @@
         IUserTwoFactorStore<TUser>,
         IUserEmailStore<TUser>,
         IUserLockoutStore<TUser>,
-        IUserPhoneNumberStore<TUser>
+        IUserPhoneNumberStore<TUser>,
+        IUserAuthenticatorKeyStore<TUser>,
+        IUserTwoFactorRecoveryCodeStore<TUser>
         where TUser : MongoIdentityUser
     {
         [SuppressMessage("ReSharper", "StaticMemberInGenericType")]
@@ -790,5 +792,95 @@

             await Task.WhenAll(tasks).ConfigureAwait(false);
         }
+
+          private const string AuthenticatorStoreLoginProvider = "[AspNetAuthenticatorStore]";
+        private const string AuthenticatorKeyTokenName = "AuthenticatorKey";
+        private const string RecoveryCodeTokenName = "RecoveryCodes";
+        public Task SetAuthenticatorKeyAsync(TUser user, string key, CancellationToken cancellationToken)
+        {
+            return SetTokenAsync(user, AuthenticatorStoreLoginProvider, AuthenticatorKeyTokenName, key, cancellationToken);
+        }
+
+        public Task<string> GetAuthenticatorKeyAsync(TUser user, CancellationToken cancellationToken)
+        {
+            return GetTokenAsync(user, AuthenticatorStoreLoginProvider, AuthenticatorKeyTokenName, cancellationToken);
+        }
+
+        public Task ReplaceCodesAsync(TUser user, IEnumerable<string> recoveryCodes, CancellationToken cancellationToken)
+        {
+            var mergedCodes = string.Join(";", recoveryCodes);
+            return SetTokenAsync(user, AuthenticatorStoreLoginProvider, RecoveryCodeTokenName, mergedCodes, cancellationToken);
+        }
+
+        public Task<bool> RedeemCodeAsync(TUser user, string code, CancellationToken cancellationToken)
+        {
+            var mergedCodes =  GetTokenAsync(user, AuthenticatorStoreLoginProvider, RecoveryCodeTokenName, cancellationToken).Result;
+            var splitCodes = (mergedCodes??"").Split(';');
+            if (splitCodes.Contains(code))
+            {
+                var updatedCodes = new List<string>(splitCodes.Where(s => s != code));
+                ReplaceCodesAsync(user, updatedCodes, cancellationToken);
+                return Task.FromResult(true);
+            }
+            return Task.FromResult(false);
+        }
+
+        public Task<int> CountCodesAsync(TUser user, CancellationToken cancellationToken)
+        {
+            var mergedCodes =  GetTokenAsync(user, AuthenticatorStoreLoginProvider, RecoveryCodeTokenName, cancellationToken).Result??"";
+            if (mergedCodes.Length > 0)
+            {
+                return Task.FromResult(mergedCodes.Split(';').Length);
+            }
+            return Task.FromResult(0);
+        }
+
+
+
+        public Task SetTokenAsync(TUser user, string loginProvider, string name, string value, CancellationToken cancellationToken)
+        {
+            var tokenEntity =
+                user.Tokens.SingleOrDefault(
+                    l =>
+                        l.TokenName == name && l.LoginProvider == loginProvider);
+            if (tokenEntity != null)
+            {
+                tokenEntity.TokenValue = value;
+            }
+            else
+            {
+                user.AddToken(new MongoUserToken
+                {
+
+                    LoginProvider = loginProvider,
+                    TokenName = name,
+                    TokenValue = value
+                });
+            }
+            return Task.FromResult(0);
+        }
+
+        public Task RemoveTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
+        {
+             var tokenEntity =
+                user.Tokens.SingleOrDefault(
+                    l =>
+                        l.TokenName == name && l.LoginProvider == loginProvider);
+            if (tokenEntity != null)
+            {
+                user.RemoveToken(tokenEntity);
+            }
+            return Task.FromResult(0);
+        }
+
+        public Task<string> GetTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
+        {
+             var tokenEntity =
+                user.Tokens.SingleOrDefault(
+                    l =>
+                        l.TokenName == name && l.LoginProvider == loginProvider);
+            return Task.FromResult(tokenEntity?.TokenValue);
+        }
+
     }
 }


Fix cursor while selecting

Fix cursor while selecting

--- src/AvaloniaEdit/Editing/SelectionMouseHandler.cs
+++ src/AvaloniaEdit/Editing/SelectionMouseHandler.cs
@@ -392,6 +392,8 @@

         private void TextArea_MouseLeftButtonDown(object sender, PointerPressedEventArgs e)
         {
+            TextArea.Cursor = Cursor.Parse("IBeam");
+
             _mode = SelectionMode.None;
             if (!e.Handled)
             {


current context null checks

current context null checks

--- src/Core/Services/Implementations/EventService.cs
+++ src/Core/Services/Implementations/EventService.cs
@@ -103,7 +103,7 @@
                 OrganizationId = collection.OrganizationId,
                 CollectionId = collection.Id,
                 Type = type,
-                ActingUserId = _currentContext.UserId.Value,
+                ActingUserId = _currentContext?.UserId,
                 Date = DateTime.UtcNow
             };
             await _eventWriteService.CreateAsync(e);
@@ -116,7 +116,7 @@
                 OrganizationId = group.OrganizationId,
                 GroupId = group.Id,
                 Type = type,
-                ActingUserId = _currentContext.UserId.Value,
+                ActingUserId = _currentContext?.UserId,
                 Date = DateTime.UtcNow
             };
             await _eventWriteService.CreateAsync(e);
@@ -130,7 +130,7 @@
                 UserId = organizationUser.UserId,
                 OrganizationUserId = organizationUser.Id,
                 Type = type,
-                ActingUserId = _currentContext.UserId.Value,
+                ActingUserId = _currentContext?.UserId,
                 Date = DateTime.UtcNow
             };
             await _eventWriteService.CreateAsync(e);
@@ -142,7 +142,7 @@
             {
                 OrganizationId = organization.Id,
                 Type = type,
-                ActingUserId = _currentContext.UserId.Value,
+                ActingUserId = _currentContext?.UserId,
                 Date = DateTime.UtcNow
             };
             await _eventWriteService.CreateAsync(e);


Sorting the delivery items within the delivery excel export

--- src/FLS.Server.Service/Exporting/ExcelExporter.cs
+++ src/FLS.Server.Service/Exporting/ExcelExporter.cs
@@ -78,7 +78,7 @@

                                 int flightBeginRowNumber = rowNumber;

-                                foreach (var flightInvoiceLineItem in ruleBasedDelivery.DeliveryItems)
+                                foreach (var flightInvoiceLineItem in ruleBasedDelivery.DeliveryItems.OrderBy(o => o.Position))
                                 {
                                     worksheet.Cells[rowNumber, 1].Value = flightNr;
                                     worksheet.Cells[rowNumber, 2].Value =


Updated to new project ctor

Updated to new project ctor

--- src/FeatureDeploy.Test.Integration/ProjectTest.cs
+++ src/FeatureDeploy.Test.Integration/ProjectTest.cs
@@ -11,7 +11,13 @@

         public ProjectTest()
         {
-            this.project = new Project("WebIntegrador", Helper.BuildServer.First(), Helper.VCSSource.First(), Helper.Deploy.First());
+            this.project = new Project
+            {
+                Name = "WebIntegrador",
+                BuildServer = Helper.BuildServer.First(),
+                VCS = Helper.VCSSource.First(),
+                DeployMethod = Helper.Deploy.First()
+            };
         }

         [TestMethod]


Drop unused TestProcessExitException.

Drop unused TestProcessExitException.

--- src/Fixie.TestAdapter/TestProcessExitException.cs
+++ src/Fixie.TestAdapter/TestProcessExitException.cs
@@ -1,30 +0,0 @@
-namespace Fixie.TestAdapter
-{
-    using System;
-
-    public class TestProcessExitException : Exception
-    {
-        const int StackOverflowExitCode = -1073741571;
-
-        public TestProcessExitException(int? exitCode)
-            : base(GetMessage(exitCode))
-        {
-        }
-
-        static string GetMessage(int? exitCode)
-        {
-            const string exitedUnexpectedly = "The test assembly process exited unexpectedly";
-
-            if (exitCode != null)
-            {
-                var withExitCode = $"with exit code {exitCode}";
-
-                return exitCode == StackOverflowExitCode
-                    ? $"{exitedUnexpectedly} {withExitCode}, indicating the test threw a StackOverflowException."
-                    : $"{exitedUnexpectedly} {withExitCode}.";
-            }
-
-            return $"{exitedUnexpectedly}.";
-        }
-    }
-}


Propagate handlers in CallSettings extension methods

I've validated manually that these are the last calls which misuse
the shorter constructor. Thoughts about how to avoid similar
problems in the future would be welcome.

--- src/Google.Api.Gax.Grpc/CallSettingsExtensions.cs
+++ src/Google.Api.Gax.Grpc/CallSettingsExtensions.cs
@@ -62,7 +62,8 @@
                 ? CallSettings.FromCallCredentials(credentials)
                 : new CallSettings(settings.CancellationToken, credentials,
                     settings.Timing, settings.HeaderMutation,
-                    settings.WriteOptions, settings.PropagationToken);
+                    settings.WriteOptions, settings.PropagationToken,
+                    settings.ResponseMetadataHandler, settings.TrailingMetadataHandler);

         /// <summary>
         /// Returns a new <see cref="CallSettings"/> with the specified call timing,
@@ -82,7 +83,8 @@
                 ? CallSettings.FromCallTiming(timing)
                 : new CallSettings(settings.CancellationToken, settings.Credentials,
                     timing, settings.HeaderMutation,
-                    settings.WriteOptions, settings.PropagationToken);
+                    settings.WriteOptions, settings.PropagationToken,
+                    settings.ResponseMetadataHandler, settings.TrailingMetadataHandler);

         /// <summary>
         /// Returns a new <see cref="CallSettings"/> with the specified header,


fix a bug with ignoring explicitly set api version

--- src/IronSharp.Core/Config/IronDotConfigManager.cs
+++ src/IronSharp.Core/Config/IronDotConfigManager.cs
@@ -102,6 +102,7 @@
             targetConfig.ProjectId = string.IsNullOrEmpty(overrideConfig.ProjectId) ? targetConfig.ProjectId : overrideConfig.ProjectId;
             targetConfig.Token = string.IsNullOrEmpty(overrideConfig.Token) ? targetConfig.Token : overrideConfig.Token;
             targetConfig.Host = string.IsNullOrEmpty(overrideConfig.Host) ? targetConfig.Host : overrideConfig.Host;
+            targetConfig.ApiVersion = overrideConfig.ApiVersion == default(int) ? targetConfig.ApiVersion : overrideConfig.ApiVersion;
         }

         private static string _appDirectory;


fix(document-builder): dasherize type names for included entities

--- src/JsonApiDotNetCore/Builders/DocumentBuilder.cs
+++ src/JsonApiDotNetCore/Builders/DocumentBuilder.cs
@@ -95,12 +95,10 @@
                         .GetRelationship(entity, r.RelationshipName);

                     if(navigationEntity is IEnumerable)
-                        relationshipData.ManyData = GetRelationships((IEnumerable<object>)navigationEntity, r.RelationshipName);
+                        relationshipData.ManyData = _getRelationships((IEnumerable<object>)navigationEntity, r.RelationshipName);
                     else
-                        relationshipData.SingleData = GetRelationship(navigationEntity, r.RelationshipName);
+                        relationshipData.SingleData = _getRelationship(navigationEntity, r.RelationshipName);
                 }
-
-

                 data.Relationships.Add(r.RelationshipName.Dasherize(), relationshipData);
             });
@@ -112,7 +110,7 @@
                 _jsonApiContext.IncludedRelationships.Contains(relationshipName.ToProperCase());
         }

-        private List<Dictionary<string, string>> GetRelationships(IEnumerable<object> entities, string relationshipName)
+        private List<Dictionary<string, string>> _getRelationships(IEnumerable<object> entities, string relationshipName)
         {
             var objType = entities.GetType().GenericTypeArguments[0];

@@ -122,20 +120,20 @@
             foreach(var entity in entities)
             {
                 relationships.Add(new Dictionary<string, string> {
-                    {"type", typeName.EntityName },
+                    {"type", typeName.EntityName.Dasherize() },
                     {"id", ((IIdentifiable)entity).Id.ToString() }
                 });
             }
             return relationships;
         }
-        private Dictionary<string, string> GetRelationship(object entity, string relationshipName)
+        private Dictionary<string, string> _getRelationship(object entity, string relationshipName)
         {
             var objType = entity.GetType();

             var typeName = _jsonApiContext.ContextGraph.GetContextEntity(objType);

             return new Dictionary<string, string> {
-                    {"type", typeName.EntityName },
+                    {"type", typeName.EntityName.Dasherize() },
                     {"id", ((IIdentifiable)entity).Id.ToString() }
                 };
         }


Providing Path to application

Providing Path to application

--- src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs
+++ src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs
@@ -552,6 +552,7 @@
                 RequestUri = requestUri;
                 QueryString = queryString;
                 HttpVersion = httpVersion;
+                Path = RequestUri;
                 return true;
             }
             finally


Now keeping track of the total number of hashfails in a torrent

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

--- src/MonoTorrent.Client/Managers/TorrentManager.cs
+++ src/MonoTorrent.Client/Managers/TorrentManager.cs
@@ -192,6 +192,16 @@
             internal set { this.hashChecked = value; }
         }
         private bool hashChecked;
+
+
+        /// <summary>
+        /// The number of times we recieved a piece that failed the hashcheck
+        /// </summary>
+        public int HashFails
+        {
+            get { return this.hashFails; }
+        }
+        private int hashFails;

         /// <summary>
@@ -663,6 +673,9 @@
         /// <param name="pieceHashedEventArgs">The event args for the event</param>
         internal void HashedPiece(PieceHashedEventArgs pieceHashedEventArgs)
         {
+            if (!pieceHashedEventArgs.HashPassed)
+                Interlocked.Increment(ref this.hashFails);
+
             if (this.OnPieceHashed != null)
                 this.OnPieceHashed(this, pieceHashedEventArgs);
         }


Code improvement

Code improvement

--- src/NJsonSchema/Generation/JsonSchemaGenerator.cs
+++ src/NJsonSchema/Generation/JsonSchemaGenerator.cs
@@ -361,7 +361,7 @@
                     var property = new Newtonsoft.Json.Serialization.JsonProperty
                     {
                         AttributeProvider = new ReflectionAttributeProvider(info),
-                        PropertyType = (info as PropertyInfo)?.PropertyType ?? ((FieldInfo)info).FieldType,
+                        PropertyType = propertyType,
                         Ignored = IsPropertyIgnored(propertyType, type, info.GetCustomAttributes(true).OfType<Attribute>().ToArray())
                     };


change test app to have a lower minimum value for the spinner

--- ext/WindowsForms/WindowsForms/DataEntryForm.Designer.cs
+++ ext/WindowsForms/WindowsForms/DataEntryForm.Designer.cs
@@ -155,6 +155,11 @@
             // numericUpDown1
             //
             this.numericUpDown1.Location = new System.Drawing.Point(574, 38);
+            this.numericUpDown1.Minimum = new decimal(new int[] {
+            100,
+            0,
+            0,
+            -2147483648});
             this.numericUpDown1.Name = "numericUpDown1";
             this.numericUpDown1.Size = new System.Drawing.Size(120, 20);
             this.numericUpDown1.TabIndex = 15;


Added option to get cert from base63 string

--- ConDep.Remote/CertificateInstaller.cs
+++ ConDep.Remote/CertificateInstaller.cs
@@ -18,10 +18,15 @@
             RemoveCertFileFromDisk(filePath);
         }

+        public static X509Certificate2 GetCertFromBase64(string base64Cert)
+        {
+            var cert = Convert.FromBase64String(base64Cert);
+            return new X509Certificate2(cert);
+        }
+
         public static void InstallCertFromBase64(string base64Cert)
         {
-            var cert = Convert.FromBase64String(base64Cert);
-            var certificate = new X509Certificate2(cert);
+            var certificate = GetCertFromBase64(base64Cert);
             AddCertToStore(certificate);
         }


Fixing the: 'SdkLookup_Must_Look_For_Available_Versions_Before_Looking_Into_Another_Folder' test to be deterministic. Adding semantical version tests.

--- test/HostActivationTests/GivenThatICareAboutMultilevelSDKLookup.cs
+++ test/HostActivationTests/GivenThatICareAboutMultilevelSDKLookup.cs
@@ -22,6 +22,8 @@
         private string _exeSelectedMessage;
         private string _sdkDir;

+        private const string _dotnetSdkDllMessageTerminator = "dotnet.dll]";
+
         public GivenThatICareAboutMultilevelSDKLookup()
         {
             // From the artifacts dir, it's possible to find where the sharedFrameworkPublish folder is. We need
@@ -191,7 +193,7 @@
                 .Should()
                 .Pass()
                 .And
-                .HaveStdErrContaining(Path.Combine(_userSelectedMessage, "9999.0.0"));
+                .HaveStdErrContaining(Path.Combine(_userSelectedMessage, "9999.0.0", _dotnetSdkDllMessageTerminator));

             // Add some dummy versions
             AddAvailableSdkVersions(_cwdSdkBaseDir, "9999.0.0");
@@ -211,7 +213,7 @@
                 .Should()
                 .Pass()
                 .And
-                .HaveStdErrContaining(Path.Combine(_cwdSelectedMessage, "9999.0.0"));
+                .HaveStdErrContaining(Path.Combine(_cwdSelectedMessage, "9999.0.0", _dotnetSdkDllMessageTerminator));

             // Add a prerelease dummy version in the cwd
             AddAvailableSdkVersions(_cwdSdkBaseDir, "9999.0.0-global-dummy");
@@ -230,10 +232,115 @@
                 .Should()
                 .Pass()
                 .And
-                .HaveStdErrContaining(Path.Combine(_cwdSelectedMessage, "9999.0.0-global-dummy"));
+                .HaveStdErrContaining(Path.Combine(_cwdSelectedMessage, "9999.0.0-global-dummy", _dotnetSdkDllMessageTerminator));

             // Remove dummy folders from user dir
             DeleteAvailableSdkVersions(_userSdkBaseDir, "9999.0.0", "9999.0.0-dummy");
+        }
+
+        [Fact]
+        public void SdkLookup_Must_Pick_The_Latest_Semantical_Version()
+        {
+            var fixture = PreviouslyBuiltAndRestoredPortableTestProjectFixture
+                .Copy();
+
+            var dotnet = fixture.BuiltDotnet;
+
+            // Add a dummy version in the exe dir
+            AddAvailableSdkVersions(_exeSdkBaseDir, "9999.0.0");
+
+            // Specified CLI version: none
+            // CWD: empty
+            // User: empty
+            // Exe: 9999.0.0
+            // Expected: 9999.0.0 from exe dir
+            dotnet.Exec("help")
+                .WorkingDirectory(_currentWorkingDir)
+                .EnvironmentVariable("COREHOST_TRACE", "1")
+                .CaptureStdOut()
+                .CaptureStdErr()
+                .Execute()
+                .Should()
+                .Pass()
+                .And
+                .HaveStdErrContaining(Path.Combine(_cwdSelectedMessage, "9999.0.0", _dotnetSdkDllMessageTerminator));
+
+            // Add a dummy version in the exe dir
+            AddAvailableSdkVersions(_exeSdkBaseDir, "9999.0.1");
+
+            // Specified CLI version: none
+            // CWD: empty
+            // User: empty
+            // Exe: 9999.0.0, 9999.0.1
+            // Expected: 9999.0.1 from exe dir
+            dotnet.Exec("help")
+                .WorkingDirectory(_currentWorkingDir)
+                .EnvironmentVariable("COREHOST_TRACE", "1")
+                .CaptureStdOut()
+                .CaptureStdErr()
+                .Execute()
+                .Should()
+                .Pass()
+                .And
+                .HaveStdErrContaining(Path.Combine(_cwdSelectedMessage, "9999.0.1", _dotnetSdkDllMessageTerminator));
+
+            // Add a dummy version in the exe dir
+            AddAvailableSdkVersions(_exeSdkBaseDir, "9999.0.0-dummy");
+
+            // Specified CLI version: none
+            // CWD: empty
+            // User: empty
+            // Exe: 9999.0.0, 9999.0.1, 9999.0.0-dummy
+            // Expected: 9999.0.1 from exe dir
+            dotnet.Exec("help")
+                .WorkingDirectory(_currentWorkingDir)
+                .EnvironmentVariable("COREHOST_TRACE", "1")
+                .CaptureStdOut()
+                .CaptureStdErr()
+                .Execute()
+                .Should()
+                .Pass()
+                .And
+                .HaveStdErrContaining(Path.Combine(_cwdSelectedMessage, "9999.0.1", _dotnetSdkDllMessageTerminator));
+
+            // Add a dummy version in the exe dir
+            AddAvailableSdkVersions(_exeSdkBaseDir, "10000.0.0-dummy");
+
+            // Specified CLI version: none
+            // CWD: empty
+            // User: empty
+            // Exe: 9999.0.0, 9999.0.1, 9999.0.0-dummy, 10000.0.0-dummy
+            // Expected: 10000.0.0-dummy from exe dir
+            dotnet.Exec("help")
+                .WorkingDirectory(_currentWorkingDir)
+                .EnvironmentVariable("COREHOST_TRACE", "1")
+                .CaptureStdOut()
+                .CaptureStdErr()
+                .Execute()
+                .Should()
+                .Pass()
+                .And
+                .HaveStdErrContaining(Path.Combine(_cwdSelectedMessage, "10000.0.0-dummy", _dotnetSdkDllMessageTerminator));
+
+            // Add a dummy version in the exe dir
+            AddAvailableSdkVersions(_exeSdkBaseDir, "10000.0.0");
+
+            // Specified CLI version: none
+            // CWD: empty
+            // User: empty
+            // Exe: 9999.0.0, 9999.0.1, 9999.0.0-dummy, 10000.0.0-dummy, 10000.0.0
+            // Expected: 10000.0.0 from exe dir
+            dotnet.Exec("help")
+                .WorkingDirectory(_currentWorkingDir)
+                .EnvironmentVariable("COREHOST_TRACE", "1")
+                .CaptureStdOut()
+                .CaptureStdErr()
+                .Execute()
+                .Should()
+                .Pass()
+                .And
+                .HaveStdErrContaining(Path.Combine(_cwdSelectedMessage, "10000.0.0", _dotnetSdkDllMessageTerminator));
+
         }

         // This method adds a list of new sdk version folders in the specified


added note about Roslyn update

added note about Roslyn update

--- tests/OmniSharp.Roslyn.CSharp.Tests/CodeActionsWithOptionsFacts.cs
+++ tests/OmniSharp.Roslyn.CSharp.Tests/CodeActionsWithOptionsFacts.cs
@@ -36,6 +36,10 @@
                 public class Class1 : NewBaseType
                 {
                 }";
+
+            // TODO: this refactoring was renamed to 'Extract base class...' in latest Roslyn
+            // it needs to be updated accordingly when we pull in new Roslyn build
+            // https://github.com/dotnet/roslyn/commit/2d98f81de3908f39cd582d3de0c51c738c558700
             var response = await RunRefactoringAsync(code, "Pull member(s) up to new base class...");
             AssertUtils.AssertIgnoringIndent(expected, ((ModifiedFileResponse)response.Changes.First()).Buffer);
         }
@@ -60,6 +64,10 @@
                 {
                     public void Method() { }
                 }";
+
+            // TODO: this refactoring was renamed to 'Extract base class...' in latest Roslyn
+            // it needs to be updated accordingly when we pull in new Roslyn build
+            // https://github.com/dotnet/roslyn/commit/2d98f81de3908f39cd582d3de0c51c738c558700
             var response = await RunRefactoringAsync(code, "Pull member(s) up to new base class...");
             AssertUtils.AssertIgnoringIndent(expected, ((ModifiedFileResponse)response.Changes.First()).Buffer);
         }


Document CupCake.Messages.BlockUtils

Document CupCake.Messages.BlockUtils

--- CupCake.Messages/Blocks/BlockUtils.cs
+++ CupCake.Messages/Blocks/BlockUtils.cs
@@ -15,11 +15,21 @@
             return layer;
         }

+        /// <summary>
+        /// Checks if the specified block is a coin door or coin gate.
+        /// </summary>
+        /// <param name="id">The block to check.</param>
+        /// <returns><c>true</c> if the specified block is a coin door or coin gate; otherwise, <c>false</c>.</returns>
         public static bool IsCoinDoor(Block id)
         {
             return id == Block.CoinDoor || id == Block.CoinGate;
         }

+        /// <summary>
+        /// Checks if the specified block is a rotatable block.
+        /// </summary>
+        /// <param name="id">The block to check.</param>
+        /// <returns><c>true</c> if the specified block is a rotatable block; otherwise, <c>false</c>.</returns>
         public static bool IsRotatable(Block id)
         {
             return id == Block.HazardSpike || id == Block.DecorSciFi2013BlueSlope ||
@@ -27,19 +37,34 @@
                    id == Block.DecorSciFi2013YellowStraight || id == Block.DecorSciFi2013GreenSlope ||
                    id == Block.DecorSciFi2013GreenStraight;
         }
-
+
+        /// <summary>
+        /// Checks if the specified block is a spike block.
+        /// </summary>
+        /// <param name="id">The block to check.</param>
+        /// <returns><c>true</c> if the specified block is a spike block; otherwise, <c>false</c>.</returns>
         public static bool IsSpike(Block id)
         {
             return id == Block.HazardSpike;
         }
-
+
+        /// <summary>
+        /// Checks if the specified block is a SciFi sloped block.
+        /// </summary>
+        /// <param name="id">The block to check.</param>
+        /// <returns><c>true</c> if the specified block is a SciFi sloped block; otherwise, <c>false</c>.</returns>
         public static bool IsSciFiSlope(Block id)
         {
             return id == Block.DecorSciFi2013BlueSlope ||
                    id == Block.DecorSciFi2013YellowSlope ||
                    id == Block.DecorSciFi2013GreenSlope;
         }
-
+
+        /// <summary>
+        /// Checks if the specified block is a SciFi straight block.
+        /// </summary>
+        /// <param name="id">The block to check.</param>
+        /// <returns><c>true</c> if the specified block is a SciFi straight block; otherwise, <c>false</c>.</returns>
         public static bool IsSciFiStraight(Block id)
         {
             return id == Block.DecorSciFi2013BlueStraight ||
@@ -47,31 +72,61 @@
                    id == Block.DecorSciFi2013GreenStraight;
         }

+        /// <summary>
+        /// Determines whether the specified block is a piano block.
+        /// </summary>
+        /// <param name="id">The block.</param>
+        /// <returns><c>true</c> if the specified block is a piano block; otherwise, <c>false</c>.</returns>
         public static bool IsPiano(Block id)
         {
             return id == Block.MusicPiano;
         }

+        /// <summary>
+        /// Determines whether the specified block is a drum block.
+        /// </summary>
+        /// <param name="id">The block.</param>
+        /// <returns><c>true</c> if the specified block is a drum block; otherwise, <c>false</c>.</returns>
         public static bool IsDrum(Block id)
         {
             return id == Block.MusicDrum;
         }

+        /// <summary>
+        /// Checks if the specified block is a music block.
+        /// </summary>
+        /// <param name="id">The block to check.</param>
+        /// <returns><c>true</c> if the specified block is a music block; otherwise, <c>false</c>.</returns>
         public static bool IsSound(Block id)
         {
             return id == Block.MusicPiano || id == Block.MusicDrum;
         }

+        /// <summary>
+        /// Checks if the specified block is a portal.
+        /// </summary>
+        /// <param name="id">The block to check.</param>
+        /// <returns><c>true</c> if the specified block is a portal; otherwise, <c>false</c>.</returns>
         public static bool IsPortal(Block id)
         {
             return id == Block.Portal || id == Block.InvisiblePortal;
         }

+        /// <summary>
+        /// Checks if the specified block is a world portal.
+        /// </summary>
+        /// <param name="id">The block to check.</param>
+        /// <returns><c>true</c> if the specified block is a world portal; otherwise, <c>false</c>.</returns>
         public static bool IsWorldPortal(Block id)
         {
             return id == Block.WorldPortal;
         }

+        /// <summary>
+        /// Checks if the specified block is a sign or a label.
+        /// </summary>
+        /// <param name="id">The block to check.</param>
+        /// <returns><c>true</c> if the specified block is a sign or a label; otherwise, <c>false</c>.</returns>
         public static bool IsLabel(Block id)
         {
             return id == Block.DecorSign || id == Block.DecorLabel;


Remove single use overload, callers must specify CancellationToken

--- DataConverters3D/Object3D/Object3D.cs
+++ DataConverters3D/Object3D/Object3D.cs
@@ -235,11 +235,6 @@
 		public virtual bool CanBake => false;
 		public virtual bool CanRemove => false;

-		public static IObject3D Load(string meshPath)
-		{
-			return Load(meshPath, CancellationToken.None);
-		}
-
 		public static IObject3D Load(string meshPath, CancellationToken cancellationToken, Dictionary<string, IObject3D> itemCache = null, Action<double, string> progress = null)
 		{
 			if (string.IsNullOrEmpty(meshPath) || !File.Exists(meshPath))


It is a mesh change and needs to broadcast that for things like curve to

work correctly

--- DataConverters3D/Object3D/Object3D.cs
+++ DataConverters3D/Object3D/Object3D.cs
@@ -253,7 +253,7 @@
 							UiThread.RunOnIdle(() =>
 							{
 								rebuildLock.Dispose();
-								this.Invalidate(new InvalidateArgs(this, InvalidateType.Redraw, null));
+								this.Invalidate(new InvalidateArgs(this, InvalidateType.Mesh, null));
 							});
 						}
 						else // we still need to resume the building


反射获取类型时支持设置可空型

反射获取类型时支持设置可空型

--- DotMaysWind.Data/Orm/DatabaseTable.cs
+++ DotMaysWind.Data/Orm/DatabaseTable.cs
@@ -63,7 +63,16 @@
                 if (this._columns.TryGetValue(prop.Name, out attr) && attr != null)
                 {
                     DbType dbType = (attr.DbType.HasValue ? attr.DbType.Value : DbTypeHelper.InternalGetDbType(prop.PropertyType));
-                    Object value = this.LoadValue(row, columns, attr.ColumnName, dbType);
+                    Object value;
+
+                    if (this.IsNullableType(prop.PropertyType))
+                    {
+                        value = this.LoadNullableValue(row, columns, attr.ColumnName, dbType);
+                    }
+                    else
+                    {
+                        value = this.LoadValue(row, columns, attr.ColumnName, dbType);
+                    }

                     prop.SetValue(entity, value, null);
                 }
@@ -114,6 +123,16 @@

             return dict;
         }
+
+        private Boolean IsNullableType(Type type)
+        {
+            if (!type.IsGenericType)
+            {
+                return false;
+            }
+
+            return (type.GetGenericTypeDefinition() == typeof(Nullable<>));
+        }
         #endregion
     }
 }


Fix unlocated systems appearing at Null Island

--- EDDiscovery/DB/VisitedSystemsClass.cs
+++ EDDiscovery/DB/VisitedSystemsClass.cs
@@ -209,6 +209,9 @@

                         //sp.Nr = int.Parse(match.Groups["Body"].Value);
                         sp.Name = match.Groups["SystemName"].Value;
+                        sp.X = Double.NaN;
+                        sp.Y = Double.NaN;
+                        sp.Z = Double.NaN;
                     }
                     else
                     {


Break line

Break line

--- Editor/AnimationPathAnimatorEditor.cs
+++ Editor/AnimationPathAnimatorEditor.cs
@@ -257,7 +257,8 @@
             if (Script.PathData == null) return;

             // Disable interaction with background scene elements.
-            HandleUtility.AddDefaultControl(GUIUtility.GetControlID(FocusType.Passive));
+            HandleUtility.AddDefaultControl(GUIUtility.GetControlID(
+                FocusType.Passive));

             UpdateModifierKey();
             HandleShortcuts();


Remove unnecessary subscriptions in FineFundamental universe selection

--- Engine/DataFeeds/UniverseSelection.cs
+++ Engine/DataFeeds/UniverseSelection.cs
@@ -23,6 +23,7 @@
 using QuantConnect.Orders;
 using QuantConnect.Packets;
 using QuantConnect.Securities;
+using QuantConnect.Securities.Equity;
 using QuantConnect.Util;

 namespace QuantConnect.Lean.Engine.DataFeeds
@@ -78,18 +79,19 @@
                     var factory = new FineFundamentalSubscriptionEnumeratorFactory(_algorithm.LiveMode, x => new[] { dateTimeUtc });
                     var config = FineFundamentalUniverse.CreateConfiguration(symbol);

-                    Security security;
-                    if (!_algorithm.Securities.TryGetValue(symbol, out security))
-                    {
-                        security = universe.CreateSecurity(symbol, _algorithm, _marketHoursDatabase, _symbolPropertiesDatabase);
-                        _algorithm.Securities.Add(security);
-                    }
+                    var exchangeHours = _marketHoursDatabase.GetEntry(symbol.ID.Market, symbol, symbol.ID.SecurityType).ExchangeHours;
+                    var symbolProperties = _symbolPropertiesDatabase.GetSymbolProperties(symbol.ID.Market, symbol, symbol.ID.SecurityType, CashBook.AccountCurrency);
+                    var quoteCash = _algorithm.Portfolio.CashBook[symbolProperties.QuoteCurrency];
+
+                    var security = new Equity(symbol, exchangeHours, quoteCash, symbolProperties);

                     var request = new SubscriptionRequest(true, universe, security, config, dateTimeUtc, dateTimeUtc);
-                    var enumerator = factory.CreateEnumerator(request, dataProvider);
-                    if (enumerator.MoveNext())
-                    {
-                        fineCollection.Data.Add(enumerator.Current);
+                    using (var enumerator = factory.CreateEnumerator(request, dataProvider))
+                    {
+                        if (enumerator.MoveNext())
+                        {
+                            fineCollection.Data.Add(enumerator.Current);
+                        }
                     }
                 }


Renderer helpers.

Renderer helpers.

--- Engine/GameObject/GameObjectHelper.cs
+++ Engine/GameObject/GameObjectHelper.cs
@@ -123,8 +123,10 @@
         // Enable rendering:
         foreach (Renderer component in rendererComponents) {
             if (component.enabled) {
-                if(inst.renderer.isVisible) {
-                    return true;
+                if(inst.renderer != null) {
+                    if(inst.renderer.isVisible) {
+                        return true;
+                    }
                 }
             }
         }
@@ -154,9 +156,11 @@
         // Enable rendering:
         foreach (Renderer component in rendererComponents) {
             if (component.enabled) {
-                if(inst.renderer.isVisible
-                    && inst.renderer.IsVisibleFrom(cam)) {
-                    return true;
+                if(inst.renderer != null) {
+                    if(inst.renderer.isVisible
+                        && inst.renderer.IsVisibleFrom(cam)) {
+                        return true;
+                    }
                 }
             }
         }


Fixed SpriteRenderer visibility

Fixed SpriteRenderer visibility

--- Entities/Components/SpriteRenderer.cs
+++ Entities/Components/SpriteRenderer.cs
@@ -7,7 +7,7 @@

 namespace VorliasEngine2D.Entities.Components
 {
-    class SpriteRenderer : Drawable, IComponent
+    public class SpriteRenderer : Drawable, IComponent
     {
         public string Name
         {


Better without the Preprocessor conditions

--- Espera/Espera.View/AppBootstrapper.cs
+++ Espera/Espera.View/AppBootstrapper.cs
@@ -6,14 +6,10 @@
 using Ninject;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.IO;
 using System.Windows;
-
-#if !DEBUG
-
 using System.Windows.Threading;
-
-#endif

 namespace Espera.View
 {
@@ -78,10 +74,11 @@
             base.OnStartup(sender, e);
         }

-#if !DEBUG
-
         protected override void OnUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
         {
+            if (Debugger.IsAttached)
+                return;
+
             this.Application.MainWindow.Hide();

             this.windowManager.ShowDialog(new CrashViewModel(e.Exception));
@@ -90,7 +87,5 @@

             Application.Current.Shutdown();
         }
-
-#endif
     }
 }


OH COME ON

OH COME ON

--- Espera/Espera.View/AppBootstrapper.cs
+++ Espera/Espera.View/AppBootstrapper.cs
@@ -144,6 +144,7 @@
             var settings = this.kernel.Get<ViewSettings>();
 #if DEBUG
             string updateUrl = Path.Combine(Directory.GetCurrentDirectory(), @"..\..\..", "Releases");
+            updateUrl = Path.GetFullPath(updateUrl);
 #else
             string updateUrl = null;

@@ -158,8 +159,6 @@
                     break;
             }
 #endif
-
-            updateUrl = Path.GetFullPath(updateUrl);

             using (var updateManager = new UpdateManager(updateUrl, "Espera", FrameworkVersion.Net45))
             {


use exact material names in AlembicMaterial component GetMaterial function (AssetDatabase.FindAssets returns all material with name matching and is case insensitive)

--- AlembicImporter/Assets/AlembicImporter/Scripts/AlembicMaterial.cs
+++ AlembicImporter/Assets/AlembicImporter/Scripts/AlembicMaterial.cs
@@ -305,16 +305,22 @@

     static Material GetMaterial(string name, string matfolder)
     {
+        // FindAssets will return all shaders that contains name in a case insensitive way
         string[] guids = AssetDatabase.FindAssets(name + " t:material", new string[1] { matfolder });

-        if (guids.Length == 1)
-        {
-            return AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(guids[0]), typeof(Material)) as Material;
-        }
-        else
-        {
-            return null;
-        }
+        foreach (string guid in guids)
+        {
+            string path = AssetDatabase.GUIDToAssetPath(guid);
+
+            Material mat = AssetDatabase.LoadAssetAtPath(path, typeof(Material)) as Material;
+
+            if (mat.name == name)
+            {
+                return mat;
+            }
+        }
+
+        return null;
     }

     public static void Import(string xmlPath, GameObject root, string materialFolder)


Correcting vue example

Correcting vue example

--- ApplicationExamples/Example.ChromiumFX.Vue.Collection/App.xaml.cs
+++ ApplicationExamples/Example.ChromiumFX.Vue.Collection/App.xaml.cs
@@ -1,4 +1,4 @@
-namespace Example.ChromiumFX.Collection.UI
+namespace Example.ChromiumFX.Vue.Collection.App
 {
     /// <summary>
     /// Interaction logic for CefGlueApp.xaml


去掉无用的内容

去掉无用的内容

--- Brume.Common.Office/Brume.PreviewOnline/Views/Home/Preview.cshtml
+++ Brume.Common.Office/Brume.PreviewOnline/Views/Home/Preview.cshtml
@@ -8,6 +8,22 @@

     <meta name="viewport" content="width=device-width" />
     <title>预览文档</title>
+

@@ -22,7 +38,7 @@

-            </object>
+            </object>


clean comment.

clean comment.

--- CSharpGL/GLObjects/GLBuffers/DrawCommands/MultiDrawElementsCmd.cs
+++ CSharpGL/GLObjects/GLBuffers/DrawCommands/MultiDrawElementsCmd.cs
@@ -92,8 +92,6 @@
         }

         /// <summary>
-        /// 执行此VBO的渲染操作。
-        /// <para>Render using this VBO.</para>
         /// </summary>
         /// <param name="controlMode">index buffer is accessable randomly or only by frame.</param>
         public void Draw(ControlMode controlMode)


Use basic HTTP authentication.

Use basic HTTP authentication.

--- Desktop/UpdateControls.Correspondence.POXClient/POXHttpRequest.cs
+++ Desktop/UpdateControls.Correspondence.POXClient/POXHttpRequest.cs
@@ -25,6 +25,7 @@
                 Action<TResponse> success,
                 Action<Exception> failure)
             {
+                string endpoint = configuration.Endpoint;
                 _request = request;
                 _success = success;
                 _failure = failure;
@@ -32,9 +33,11 @@
                 _webRequest = WebRequest.Create(new Uri(configuration.Endpoint, UriKind.Absolute));
                 _webRequest.Method = "POST";
                 _webRequest.ContentType = "text/xml";
+                HttpWebRequest httpWebRequest = (HttpWebRequest)_webRequest;
+                httpWebRequest.Credentials = new NetworkCredential(configuration.Username, configuration.Password);
             }

-            private void Begin()
+            public void Begin()
             {
                 _webRequest.BeginGetRequestStream(GetRequestStream, null);
             }
@@ -80,7 +83,7 @@
             Action<TResponse> success,
             Action<Exception> failure)
         {
-            var handler = new POXHttpRequestHandler<TRequest, TResponse>(configuration, request, success, failure);
+            new POXHttpRequestHandler<TRequest, TResponse>(configuration, request, success, failure).Begin();
         }

         private static XmlSerializerNamespaces DefineNamespaces()


State Data tab is now preferred displayer for StateSaveCategory

--- FRBDK/Glue/OfficialPlugins/StateDataPlugin/MainStateDataPlugin.cs
+++ FRBDK/Glue/OfficialPlugins/StateDataPlugin/MainStateDataPlugin.cs
@@ -99,6 +99,7 @@
                 // to have columns set from the element's variables

                 tab = this.CreateTab(control, "State Data");
+                tab.IsPreferredDisplayerForType = (type) => type == nameof(StateSaveCategory);
             }
             tab.Show();


split test method in ServantCardRecordUnitTest.cs

--- HearthStone/HearthStone.Library.Test/ServantCardRecordUnitTest.cs
+++ HearthStone/HearthStone.Library.Test/ServantCardRecordUnitTest.cs
@@ -9,6 +9,7 @@
         [TestMethod]
         public void ServantCardRecordConstructorTestMethod1()
         {
+            //test default constructor
             ServantCardRecord oCardRecord = new ServantCardRecord();
             Assert.IsNotNull(oCardRecord);
         }
@@ -16,6 +17,7 @@
         [TestMethod]
         public void ServantCardRecordConstructorTestMethod2()
         {
+            //test legal ServantCardRecord constructor with legal cardID
             ServantCardRecord oCardRecord = new ServantCardRecord(1, 2);
             Assert.IsNotNull(oCardRecord);
             Assert.AreEqual(oCardRecord.CardRecordID, 1);
@@ -25,6 +27,7 @@
         [TestMethod]
         public void ServantCardRecordConstructorTestMethod3()
         {
+            //test legal ServantCardRecord constructor with illegal cardID
             ServantCardRecord oCardRecord = new ServantCardRecord(1, 12);
             Assert.IsNotNull(oCardRecord);
             Assert.AreEqual(oCardRecord.CardRecordID, -1);
@@ -94,6 +97,8 @@
         {
             ServantCardRecord oCardRecord = new ServantCardRecord(1, 2);
             //attack count in this turn
+            oCardRecord.AttackCountInThisTurn = 7;
+            Assert.AreEqual(oCardRecord.AttackCountInThisTurn, 7);
             oCardRecord.OnAttackCountInThisTurnChanged += (eventAttackCountInThisTurnChanged) =>
             {
                 //do nothing


bug fix: Krile crashes when changing accont with receiving lists.

--- Inscribe/Communication/CruiseControl/Lists/ListReceiverManager.cs
+++ Inscribe/Communication/CruiseControl/Lists/ListReceiverManager.cs
@@ -34,6 +34,7 @@
             {
                 receivers.Select(l => l.Value)
                     .Where(l => AutoCruiseSchedulerManager.GetScheduler(l.AccountInfo) == null)
+                    .ToArray()
                     .ForEach(l =>
                     {
                         RemoveReceive(l.ListUserScreenName, l.ListName);


Added tests for multidimensional indexer

--- unit-tests/Tests.cs
+++ unit-tests/Tests.cs
@@ -17,7 +17,7 @@
     {
         #region Test Members

-        IOperationInvoker _lateBindingFacade;
+        IObjectInvoker _lateBindingFacade;

         #endregion

@@ -142,18 +142,29 @@
             Assert.That(_lateBindingFacade.Index(5).Get<string>(), Is.EqualTo(("[myValue]")));
         }

-        [Test,Ignore]
+        [Test]
+        public void TestDoubleIndexerAccess()
+        {
+            Assert.That(_lateBindingFacade.Index(2, 2).Get<int>(), Is.EqualTo(0));
+
+            _lateBindingFacade.Index(2, 2).Set(1);
+
+            Assert.That(_lateBindingFacade.Index(2, 2).Get<int>(), Is.EqualTo(1));
+
+        }
+
+        [Test]
         public void WordAutomationTest_NotReallyATestUnit()
         {
-            IOperationInvoker wordApp = BindingFactory.CreateAutomationBinding("Word.Application");
+            IObjectInvoker wordApp = BindingFactory.CreateAutomationBinding("Word.Application");

             //Get Word objects to interop operations
-            IOperationInvoker document = wordApp.Property("Documents").Get();
+            IObjectInvoker document = wordApp.Property("Documents").Get();

             document
                 .Method("Add")
                 .Invoke();
-            IOperationInvoker selection = wordApp.Property("Selection").Get();
+            IObjectInvoker selection = wordApp.Property("Selection").Get();

             string str = "Hello World!";

@@ -169,7 +180,7 @@
             foreach (char c in str)
             {
                 selection.Method("TypeText").AddParameter(c.ToString()).Invoke();
-                System.Threading.Thread.Sleep(200);
+                System.Threading.Thread.Sleep(100);
             }

             //We need to get the type of the enumeration, that breaks the Late Binding approach as we need


Update MainPage.xaml.cs

Update MainPage.xaml.cs

--- L2PAccess-Windows/L2PAccess-Windows.WindowsPhone/MainPage.xaml.cs
+++ L2PAccess-Windows/L2PAccess-Windows.WindowsPhone/MainPage.xaml.cs
@@ -54,7 +54,7 @@

         private async void Button_Click(object sender, RoutedEventArgs e)
         {
-            var config = RwthConfig.Create("yJV0yVoAPZ3ykvnhZImWg61TBbMUBv7ZYI3zSo7XCaPlJKsMVOHBqBbbx7Ko5SXi.apps.rwth-aachen.de");
+            var config = RwthConfig.Create("YOUR CLIENT ID");

             l2PClient = new L2PClient(config);
             var viewAllCourseInfo = await l2PClient.ViewAllCourseInfo();


refactor: remove duplicated codes

refactor: remove duplicated codes

--- MMLibrarySystem/MMLibrarySystem/Controllers/BookListController.cs
+++ MMLibrarySystem/MMLibrarySystem/Controllers/BookListController.cs
@@ -1,8 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web.Mvc;
-using System.Xml.Linq;
+using System;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Web.Mvc;
 using MMLibrarySystem.Models;
 using MMLibrarySystem.Bll;
 using MMLibrarySystem.Utilities;
@@ -26,47 +25,13 @@
             using (var db = new BookLibraryContext())
             {
                 _bb = new BookBorrowing(db);
-                var tempBooks = db.Books.Include("BookType");
-
-                if (showInLibrary)
-                {
-                    if (string.IsNullOrEmpty(searchTerm))
-                    {
-                        bookList =
-                            tempBooks.OrderByDescending(b => b.BookId)
-                                     .Select(CreateBookListItem)
-                                     .Where(book => book.State == StateInLib)
-                                     .ToPagedList(page, pageSize);
-                    }
-                    else
-                    {
-                        var searchResult =
-                            tempBooks.Where(
-                                b =>
-                                b.BookType.Title.Contains(searchTerm) || b.BookType.Description.Contains(searchTerm));
-                        bookList = searchResult.Select(CreateBookListItem)
-                            .Where(book => book.State == StateInLib)
+                var tempBooks = db.Books.Include("BookType");
+
+                var searchResult =
+                            tempBooks.Where(DoesBookMeetSearchTermPredicate(searchTerm));
+                bookList = searchResult.Select(CreateBookListItem)
+                            .Where(DoesBookExistInLibraryPredicate(showInLibrary))
                             .ToPagedList(page, pageSize);
-                    }
-                }
-                else
-                {
-                    if (string.IsNullOrEmpty(searchTerm))
-                    {
-                        bookList =
-                            tempBooks.OrderByDescending(b => b.BookId)
-                                     .Select(CreateBookListItem)
-                                     .ToPagedList(page, pageSize);
-                    }
-                    else
-                    {
-                        var searchResult =
-                            tempBooks.Where(
-                                b =>
-                                b.BookType.Title.Contains(searchTerm) || b.BookType.Description.Contains(searchTerm));
-                        bookList = searchResult.Select(CreateBookListItem).ToPagedList(page, pageSize);
-                    }
-                }

                 _bb = null;
             }
@@ -77,8 +42,8 @@
             }

             return View(bookList);
-        }
-
+        }
+
         public ActionResult BookDetail(string bookNumber)
         {
             Book book;
@@ -194,6 +159,27 @@
             };

             return item;
+        }
+
+        private static Func<BookListItem, bool> DoesBookExistInLibraryPredicate(bool showInLibrary)
+        {
+            if (showInLibrary)
+            {
+                return book => book.State == StateInLib;
+            }
+
+            return book => !string.IsNullOrEmpty(book.State);
+        }
+
+        private static Expression<Func<Book, bool>> DoesBookMeetSearchTermPredicate(string searchTerm)
+        {
+            if (string.IsNullOrEmpty(searchTerm) || string.IsNullOrWhiteSpace(searchTerm))
+            {
+                return b => !string.IsNullOrEmpty(b.BookNumber);
+            }
+
+            return b =>
+                b.BookType.Title.Contains(searchTerm) || b.BookType.Description.Contains(searchTerm);
         }
     }
 }


Added test for missing Initializer

Added test for missing Initializer

--- MetaCompilation/MetaCompilation/MetaCompilation.Test/UnitTests.cs
+++ MetaCompilation/MetaCompilation/MetaCompilation.Test/UnitTests.cs
@@ -234,6 +234,143 @@
             VerifyCSharpFix(test, fixtest);
         }

+        // test for missing Initialize method
+        public void TestMethod4()
+        {
+            var test = @"using System;
+using System.Collections.Generic;
+            using System.Collections.Immutable;
+            using System.Linq;
+            using System.Threading;
+            using Microsoft.CodeAnalysis;
+            using Microsoft.CodeAnalysis.CSharp;
+            using Microsoft.CodeAnalysis.CSharp.Syntax;
+            using Microsoft.CodeAnalysis.Diagnostics;
+            using Microsoft.CodeAnalysis.Text;
+
+namespace SyntaxNodeAnalyzer
+    {
+        [DiagnosticAnalyzer(LanguageNames.CSharp)]
+        public class SyntaxNodeAnalyzerAnalyzer : DiagnosticAnalyzer
+        {
+            public const string spacingRuleId = ""IfSpacing"";
+
+            internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(
+                id: spacingRuleId, //make the id specific
+                title: ""If statement must have a space between 'if' and the boolean expression"", //allow any title
+                messageFormat: ""If statements must contain a space between the 'if' keyword and the boolean expression"", //allow any message
+                category: ""Syntax"", //make the category specific
+                defaultSeverity: DiagnosticSeverity.Warning, //possible options
+                isEnabledByDefault: true);
+
+            public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
+            {
+                get
+                {
+                    return ImmutableArray.Create(Rule);
+                }
+            }
+
+            private void AnalyzeIfStatement(SyntaxNodeAnalysisContext context)
+            {
+                var ifStatement = (IfStatementSyntax)context.Node;
+                var ifKeyword = ifStatement.IfKeyword;
+                var openParen = ifStatement.OpenParenToken;
+                var diagnosticLocation = Location.Create(ifStatement.SyntaxTree, TextSpan.FromBounds(ifKeyword.Span.Start, openParen.Span.Start));
+
+                if (ifKeyword.HasTrailingTrivia)
+                {
+                    var trailingTrivia = ifKeyword.TrailingTrivia.Last();
+                    if (trailingTrivia.Kind() == SyntaxKind.WhitespaceTrivia)
+                    {
+                        if (trailingTrivia.ToString() == "" "")
+                        {
+                            return;
+                        }
+                    }
+                }
+
+                var diagnostic = Diagnostic.Create(Rule, diagnosticLocation, Rule.MessageFormat);
+                obj.ReportDiagnostic(diagnostic);
+            }
+        }
+    }";
+            var expected = new DiagnosticResult
+            {
+                Id = MetaCompilationAnalyzer.MissingInit,
+                Message = "You are missing the required Initialize method",
+                Severity = DiagnosticSeverity.Error,
+                Locations = new[] { new DiagnosticResultLocation("Test1.cs", 15, 22) }
+            };
+
+            VerifyCSharpDiagnostic(test, expected);
+
+            var fixTest = @"using System;
+using System.Collections.Generic;
+            using System.Collections.Immutable;
+            using System.Linq;
+            using System.Threading;
+            using Microsoft.CodeAnalysis;
+            using Microsoft.CodeAnalysis.CSharp;
+            using Microsoft.CodeAnalysis.CSharp.Syntax;
+            using Microsoft.CodeAnalysis.Diagnostics;
+            using Microsoft.CodeAnalysis.Text;
+
+namespace SyntaxNodeAnalyzer
+    {
+        [DiagnosticAnalyzer(LanguageNames.CSharp)]
+        public class SyntaxNodeAnalyzerAnalyzer : DiagnosticAnalyzer
+        {
+            public const string spacingRuleId = ""IfSpacing"";
+
+            internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(
+                id: spacingRuleId, //make the id specific
+                title: ""If statement must have a space between 'if' and the boolean expression"", //allow any title
+                messageFormat: ""If statements must contain a space between the 'if' keyword and the boolean expression"", //allow any message
+                category: ""Syntax"", //make the category specific
+                defaultSeverity: DiagnosticSeverity.Warning, //possible options
+                isEnabledByDefault: true);
+
+            public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
+            {
+                get
+                {
+                    return ImmutableArray.Create(Rule);
+                }
+            }
+
+            private void AnalyzeIfStatement(SyntaxNodeAnalysisContext context)
+            {
+                var ifStatement = (IfStatementSyntax)context.Node;
+                var ifKeyword = ifStatement.IfKeyword;
+                var openParen = ifStatement.OpenParenToken;
+                var diagnosticLocation = Location.Create(ifStatement.SyntaxTree, TextSpan.FromBounds(ifKeyword.Span.Start, openParen.Span.Start));
+
+                if (ifKeyword.HasTrailingTrivia)
+                {
+                    var trailingTrivia = ifKeyword.TrailingTrivia.Last();
+                    if (trailingTrivia.Kind() == SyntaxKind.WhitespaceTrivia)
+                    {
+                        if (trailingTrivia.ToString() == "" "")
+                        {
+                            return;
+                        }
+                    }
+                }
+
+                var diagnostic = Diagnostic.Create(Rule, diagnosticLocation, Rule.MessageFormat);
+                obj.ReportDiagnostic(diagnostic);
+            }
+
+            public override void Initialize(AnalysisContext context)
+            {
+                throw new NotImplementedException();
+            }
+        }
+    }";
+            VerifyCSharpFix(test, fixTest);
+        }
+
         protected override CodeFixProvider GetCSharpCodeFixProvider()
         {
             return new MetaCompilationCodeFixProvider();


minor: Eliminate one of the duplicate 'have's in the HG message telling the user if no GroupsServerURI has been given in user data by the home grid

--- OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
+++ OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
@@ -404,7 +404,7 @@
                         url = m_UserManagement.GetUserServerURL(uid, "GroupsServerURI");
                         if (url == string.Empty)
                         {
-                            reason = "You don't have have an accessible groups server in your home world. You membership to this group in only within this grid.";
+                            reason = "You don't have an accessible groups server in your home world. You membership to this group in only within this grid.";
                             return true;
                         }


Increased the rate of the PollServiceRequestManager to 0.5 secs (it was 1sec). Group chat is going over the EQ... Hopefully this won't increase CPU when there's nothing going on, but we need to watch for that.

--- OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -133,7 +133,7 @@
             // directly back in the "ready-to-serve" queue by the worker thread.
             while (m_running)
             {
-                Thread.Sleep(1000);
+                Thread.Sleep(500);
                 Watchdog.UpdateThread();

                 List<PollServiceHttpRequest> not_ready = new List<PollServiceHttpRequest>();


Fixed the UpdateAgentInformation CAP: the viewer expects the simulator to echo back the maturity that it sent

Without this change, attempts to change the maturity rating in the viewer's Preferences don't work.

--- OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -923,13 +923,14 @@
                 string param, IOSHttpRequest httpRequest,
                 IOSHttpResponse httpResponse)
         {
-//            OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
+            OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
+            OSDMap accessPrefs = (OSDMap)req["access_prefs"];
+            string desiredMaturity = accessPrefs["max"];
+
             OSDMap resp = new OSDMap();
-
-            OSDMap accessPrefs = new OSDMap();
-            accessPrefs["max"] = "A";
-
-            resp["access_prefs"] = accessPrefs;
+            OSDMap respAccessPrefs = new OSDMap();
+            respAccessPrefs["max"] = desiredMaturity;   // echoing the maturity back means success
+            resp["access_prefs"] = respAccessPrefs;

             string response = OSDParser.SerializeLLSDXmlString(resp);
             return response;


minor: Use more compact libomv primitive constructors in osNpcGetPos() and osNpcGetRot()

--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2513,13 +2513,10 @@
                 ScenePresence sp = World.GetScenePresence(npcId);

                 if (sp != null)
-                {
-                    Vector3 pos = sp.AbsolutePosition;
-                    return new LSL_Vector(pos.X, pos.Y, pos.Z);
-                }
-            }
-
-            return new LSL_Vector(0, 0, 0);
+                    return new LSL_Vector(sp.AbsolutePosition);
+            }
+
+            return Vector3.Zero;
         }

         public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos)
@@ -2587,7 +2584,7 @@
                     return new LSL_Rotation(sp.GetWorldRotation());
             }

-            return new LSL_Rotation(Quaternion.Identity.X, Quaternion.Identity.Y, Quaternion.Identity.Z, Quaternion.Identity.W);
+            return Quaternion.Identity;
         }

         public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation)


CCTransitionScene: Use correct content size dimensions in container layer

--- src/Nodes/Scenes/Transitions/CCTransitionScene.cs
+++ src/Nodes/Scenes/Transitions/CCTransitionScene.cs
@@ -50,9 +50,9 @@
         }

         public CCTransitionSceneContainerLayer(CCScene inScene, CCScene outScene)
-            : base(new CCCamera(CCCameraProjection.Projection3D, outScene.VisibleBoundsScreenspace.Size))
-        {
-            CCSize contentSize = outScene.VisibleBoundsScreenspace.Size;
+            : base(new CCCamera(CCCameraProjection.Projection3D, outScene.GameView.DesignResolution))
+        {
+            CCSize contentSize = outScene.GameView.DesignResolution;

             AnchorPoint = new CCPoint(0.5f, 0.5f);


Make EntitiesContext respect connection strings given to it in the context of "PS> Update-Database -ConnectionString blarg"

--- src/NuGetGallery.Core/Entities/EntitiesContext.cs
+++ src/NuGetGallery.Core/Entities/EntitiesContext.cs
@@ -8,17 +8,22 @@
     public class EntitiesContext : DbContext, IEntitiesContext
     {
         /// <summary>
-        /// This constructor is provided only for purposes of running migrations from Package Manager console.
+        /// The NuGet Gallery code should usually use this constructor, in order to respect read only mode.
         /// </summary>
-        public EntitiesContext()
-            : base(GetDefaultConnectionString())
-        {
-        }
-
         public EntitiesContext(string connectionString, bool readOnly)
             : base(connectionString)
         {
             ReadOnly = readOnly;
+        }
+
+        /// <summary>
+        /// This constructor is provided mainly for purposes of running migrations from Package Manager console,
+        /// or any other scenario where a connection string will be set after the EntitiesContext is created
+        /// (and read only mode is don't care).
+        /// </summary>
+        public EntitiesContext()
+            : base()
+        {
         }

         public bool ReadOnly { get; private set; }


Fixing unit tests

Fixing unit tests

--HG--
branch : 1.x

--- src/Orchard/Mvc/Extensions/UrlHelperExtensions.cs
+++ src/Orchard/Mvc/Extensions/UrlHelperExtensions.cs
@@ -25,7 +25,7 @@
         }

         public static string MakeAbsolute(this UrlHelper urlHelper, string url, string baseUrl = null) {
-            if(url.StartsWith("http", StringComparison.OrdinalIgnoreCase)) {
+            if(url != null && url.StartsWith("http", StringComparison.OrdinalIgnoreCase)) {
                 return url;
             }


dynamic cast to a reference type

dynamic cast to a reference type

--- src/Peachpie.Runtime/Dynamic/ConvertExpression.cs
+++ src/Peachpie.Runtime/Dynamic/ConvertExpression.cs
@@ -71,7 +71,11 @@
             var target_type = target.GetTypeInfo();

             if (target_type.IsEnum) return Expression.Convert(BindToLong(arg), target);
-            if (target_type.IsValueType == false) { } // TODO
+            if (target_type.IsValueType == false)
+            {
+                // TODO: handle type conversion and throw PHP TypeException
+                return Expression.Convert(BindAsObject(arg), target);
+            }

             //
             throw new NotImplementedException(target.ToString());


Add file header

Add file header

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

 // General Information about an assembly is controlled through the following


When we get order from quik set correct operation type from flags.

--- src/QuikSharp/DataStructures/Transaction/Order.cs
+++ src/QuikSharp/DataStructures/Transaction/Order.cs
@@ -17,11 +17,6 @@
         [JsonProperty("order_num")]
         public long OrderNum { get; set; }
         /// <summary>
-        /// Набор битовых флагов
-        /// </summary>
-        [JsonProperty("flags")]
-        public OrderTradeFlags Flags { get; set; }
-        /// <summary>
         /// Поручение/комментарий, обычно: код клиента/номер поручения
         /// </summary>
         [JsonProperty("brokerref")]
@@ -222,21 +217,33 @@
         /// Состояние заявки.
         /// </summary>
         [JsonIgnore]
-        public State State
+        public State State { get; private set; }
+
+        private OrderTradeFlags _flags;
+        /// <summary>
+        /// Набор битовых флагов
+        /// http://help.qlua.org/ch9_1.htm
+        /// </summary>
+        [JsonProperty("flags")]
+        public OrderTradeFlags Flags
         {
-            get
+            get { return _flags; }
+            set
             {
-                if (Flags.HasFlag(OrderTradeFlags.Active))
-                {
-                    return State.Active;
-                }
-                else
-                {
-                    return Flags.HasFlag(OrderTradeFlags.Canceled)
-                        ? State.Canceled
-                        : State.Completed;
-                }
+                _flags = value;
+                ParseFlags();
             }
+        }
+
+        private void ParseFlags()
+        {
+            Operation = Flags.HasFlag(OrderTradeFlags.IsSell) ? Operation.Sell : Operation.Buy;
+
+            State = Flags.HasFlag(OrderTradeFlags.Active)
+                ? State.Active
+                : (Flags.HasFlag(OrderTradeFlags.Canceled)
+                    ? State.Canceled
+                    : State.Completed);
         }
     }
 }


Expose actor enricher

Expose actor enricher

--- src/ServiceFabric.Actors.Serilog/ActorEnricher.cs
+++ src/ServiceFabric.Actors.Serilog/ActorEnricher.cs
@@ -9,7 +9,7 @@

 namespace ServiceFabric.Actors.Serilog
 {
-    internal class ActorEnricher : StatefulServiceEnricher
+    public class ActorEnricher : StatefulServiceEnricher
     {
         private readonly Actor _actor;


test5

--- site/index.cshtml
+++ site/index.cshtml
@@ -48,6 +48,9 @@
 }
 </style>

+
Instructions:

+
+
Build tree by clicking on vertices to add leafs to it. Once the desired tree is built, click on 'Generate labels' button to find all graceful labels. The labels shown are unique with respect to adjacency matrix.


#338 #342 #339

#338 #342 #339

--- src/SolrExpress/Search/Result/BaseFacetsResult.cs
+++ src/SolrExpress/Search/Result/BaseFacetsResult.cs
@@ -7,8 +7,12 @@
 {
     public abstract class BaseFacetsResult
     {
-        protected static Type[] DateTypes = new[] { typeof(DateTime), typeof(DateTime?) };
-        protected static Type[] NotIntTypes = new[] { typeof(decimal), typeof(float), typeof(double), typeof(decimal?), typeof(float?), typeof(double?) };
+        private static Type[] _dateTypes = new[] { typeof(DateTime), typeof(DateTime?) };
+        private static Type[] _notIntTypes = new[] { typeof(decimal), typeof(float), typeof(double), typeof(decimal?), typeof(float?), typeof(double?) };
+
+        protected BaseFacetsResult()
+        {
+        }

         /// <summary>
         /// Get prepared facet gap to use in DateMath library
@@ -43,7 +47,7 @@

             var appliedFacetGap = facetGap;

-            if (DateTypes.Contains(fieldType))
+            if (_dateTypes.Contains(fieldType))
             {
                 appliedFacetGap = GetDateTimeFacetGap(appliedFacetGap);

@@ -51,7 +55,7 @@
                 return DateMath.Apply(minimumValue ?? DateTime.MinValue, appliedFacetGap);
             }

-            if (NotIntTypes.Contains(fieldType))
+            if (_notIntTypes.Contains(fieldType))
             {
                 var minimumValueDecimal = ((FacetItemRangeValue<decimal>)item).MinimumValue;
                 return (minimumValueDecimal ?? decimal.MinValue) + decimal.Parse(appliedFacetGap, CultureInfo.InvariantCulture);


re-introduce prior ctor signature as pass-thru to new ctor to maintain backward-compat

--- src/Spring/Spring.Core/Pool/Support/SimplePool.cs
+++ src/Spring/Spring.Core/Pool/Support/SimplePool.cs
@@ -61,13 +61,32 @@
 		/// <param name="factory">
 		/// The factory used to instantiate and manage the lifecycle of pooled objects.
 		/// </param>
+		/// <param name="initialSize">The initial size of the pool.</param>
+		/// <exception cref="System.ArgumentNullException">
+		/// If the supplied <paramref name="factory"/> is <see langword="null"/>.
+		/// </exception>
+		/// <exception cref="System.ArgumentException">
+		/// If the supplied <paramref name="initialSize"/> is less than or equal to zero.
+		/// </exception>
+		public SimplePool(IPoolableObjectFactory factory, int initialSize)
+            : this(factory, initialSize, initialSize)
+		{
+		}
+
+        /// <summary>
+		/// Creates a new instance of the <see cref="Spring.Pool.Support.SimplePool"/>
+		/// class.
+		/// </summary>
+		/// <param name="factory">
+		/// The factory used to instantiate and manage the lifecycle of pooled objects.
+		/// </param>
 		/// <param name="maxSize">The maximum size of the pool.</param>
 		/// <param name="initialSize">The initial size of the pool.</param>
 		/// <exception cref="System.ArgumentNullException">
 		/// If the supplied <paramref name="factory"/> is <see langword="null"/>.
 		/// </exception>
 		/// <exception cref="System.ArgumentException">
-		/// If the supplied <paramref name="size"/> is less than or equal to zero.
+		/// If the supplied <paramref name="maxSize"/> is less than or equal to zero.
 		/// </exception>
 		public SimplePool(IPoolableObjectFactory factory, int maxSize, int initialSize)
 		{