needed to check role level in the or part of the if

--- Purchasing.Web/Services/NotificationService.cs
+++ Purchasing.Web/Services/NotificationService.cs
@@ -210,7 +210,7 @@
             if (wrkgrp)
             {

-                var peeps = order.Workgroup.Permissions.Where(a => a.Role.Level == level && !a.IsAdmin || (a.IsAdmin && a.IsFullFeatured)).Select(a => a.User);
+                var peeps = order.Workgroup.Permissions.Where(a => a.Role.Level == level && !a.IsAdmin || (a.IsAdmin && a.IsFullFeatured && a.Role.Level == level)).Select(a => a.User);

                 var apf = future.First(a => a.User == null);


fix syntax error

fix syntax error

--- RaLibrary/Filters/RaAuthenticationAttribute.cs
+++ RaLibrary/Filters/RaAuthenticationAttribute.cs
@@ -74,7 +74,9 @@
             var tokenValidationEndpoint = ConfigurationManager.AppSettings.Get("TokenValidationEndpoint");
             var response = await httpClient.PostAsync(tokenValidationEndpoint, content);

-            string strEmail = null, strName = null;
+            string email = string.Empty;
+            string name = string.Empty;
+
             if (response.StatusCode == HttpStatusCode.NoContent) // succeeded
             {
                 Jwt jwtInfo = Jwt.GetJwtFromRequestHeader(request);
@@ -84,13 +86,13 @@

                     if (jwtPayload != null)
                     {
-                        strEmail = jwtPayload.Email;
-                        strName = jwtPayload.Name;
+                        email = jwtPayload.Email;
+                        name = jwtPayload.Name;
                     }
                 }
             }

-            if (string.IsNullOrWhiteSpace(strEmail))
+            if (string.IsNullOrWhiteSpace(email))
             {
                 // Authentication was attempted but failed. Set ErrorResult to indicate an error.
                 context.ErrorResult = new AuthenticationFailureResult(request);
@@ -99,12 +101,11 @@

             IList<Claim> claimCollection = new List<Claim>
             {
-                new Claim(ClaimTypes.Name, strName),
-                new Claim(ClaimTypes.Email, strEmail)
+                new Claim(ClaimTypes.Name, name),
+                new Claim(ClaimTypes.Email, email)
             };

-            var isAdmin = db.Administrators.Count(
-                    admin => string.Equals(admin.Email, strEmail, StringComparison.OrdinalIgnoreCase)) > 0;
+            var isAdmin = db.Administrators.Count(admin => admin.Email == email) > 0;
             if (isAdmin)
             {
                 claimCollection.Add(new Claim(ClaimTypes.Role, RoleTypes.Administrators));


Rescale multipliers (values unaffected)

Rescale multipliers (values unaffected)

--- osu.Game.Rulesets.Taiko/Difficulty/Skills/CombinedStrain.cs
+++ osu.Game.Rulesets.Taiko/Difficulty/Skills/CombinedStrain.cs
@@ -9,10 +9,10 @@
 {
     public class CombinedStrain : Skill
     {
-        private const double final_multiplier = 0.00925;
-        private const double rhythm_skill_multiplier = 1.6 * final_multiplier;
-        private const double colour_skill_multiplier = 1.85 * final_multiplier;
-        private const double stamina_skill_multiplier = 1.85 * final_multiplier;
+        private const double final_multiplier = 0.04625;
+        private const double rhythm_skill_multiplier = 0.32 * final_multiplier;
+        private const double colour_skill_multiplier = 0.37 * final_multiplier;
+        private const double stamina_skill_multiplier = 0.37 * final_multiplier;

         private Rhythm rhythm;
         private Colour colour;


Add failing test for "ghost timeline blueprint"

--- osu.Game.Tests/Visual/Editing/TestSceneBlueprintOrdering.cs
+++ osu.Game.Tests/Visual/Editing/TestSceneBlueprintOrdering.cs
@@ -15,6 +15,7 @@
 using osu.Game.Rulesets.Osu.UI;
 using osu.Game.Rulesets.UI;
 using osu.Game.Screens.Edit.Compose.Components;
+using osu.Game.Screens.Edit.Compose.Components.Timeline;
 using osu.Game.Tests.Beatmaps;
 using osuTK;
 using osuTK.Input;
@@ -96,6 +97,32 @@
             });
         }

+        [Test]
+        public void TestPlacementOfConcurrentObjectWithDuration()
+        {
+            AddStep("seek to timing point", () => EditorClock.Seek(2170));
+            AddStep("add hit circle", () => EditorBeatmap.Add(createHitCircle(2170, Vector2.Zero)));
+
+            AddStep("choose spinner placement tool", () =>
+            {
+                InputManager.Key(Key.Number4);
+                var hitObjectContainer = Editor.ChildrenOfType<HitObjectContainer>().Single();
+                InputManager.MoveMouseTo(hitObjectContainer.ScreenSpaceDrawQuad.Centre);
+            });
+
+            AddStep("begin placing spinner", () =>
+            {
+                InputManager.Click(MouseButton.Left);
+            });
+            AddStep("end placing spinner", () =>
+            {
+                EditorClock.Seek(2500);
+                InputManager.Click(MouseButton.Right);
+            });
+
+            AddAssert("two timeline blueprints present", () => Editor.ChildrenOfType<TimelineHitObjectBlueprint>().Count() == 2);
+        }
+
         private HitCircle createHitCircle(double startTime, Vector2 position) => new HitCircle
         {
             StartTime = startTime,


If a contributor has already accepted the CLA before a pull request, send an acknowledge on his first pull request.

--- SharpCLABot/Controllers/LicensingController.cs
+++ SharpCLABot/Controllers/LicensingController.cs
@@ -88,8 +88,9 @@
             var dbCLA = new DbCLABot(AdminConfig.Instance.ConnectionStringDb);
             var contributor = dbCLA.GetOrCreateContributor(loginName);

-            // If the contributor has already accepted the CLA, then we can return immediately
-            if (!contributor.Accepted)
+            // If the contributor has not already accepted the CLA
+            // or he already accepted before making a pull request, we will send a message back to the pull request
+            if (!contributor.Accepted || contributor.PullRequestNumber == 0)
             {
                 // Create a new auto-response comment on the original pull-request asking for signing the CLA
                 contributor.PullRequestRepositoryOwner = pullRequest.RepoOwner;
@@ -101,7 +102,10 @@
                 {
                     // Render the comment
                     var homeSignCLA = Request.RequestUri.GetLeftPart(UriPartial.Authority);
-                    var commentBody = Templatizer.RenderReplyNotSigned(pullRequest.UserName, homeSignCLA);
+
+                    var commentBody = contributor.Accepted
+                        ? Templatizer.RenderReplySignedDone(pullRequest.UserName)
+                        : Templatizer.RenderReplyNotSigned(pullRequest.UserName, homeSignCLA);

                     // Send back a comment to github pull request
                     var token = AdminConfig.Instance.GitHubAdminApplicationToken;


commented up TypeParser

commented up TypeParser

--- SharpSwift/SharpSwift/Converters/TypeParser.cs
+++ SharpSwift/SharpSwift/Converters/TypeParser.cs
@@ -8,6 +8,7 @@
         /// Returns the Swift equivilant for a C# type
         /// </summary>
         /// <param name="typeName">The C# type's identifier as a string</param>
+        /// <param name="implyUnwrapped">If true, unwraps the type with an ! at the end</param>
         /// <returns>The Swift equivilant type as a string</returns>
         private static string Type(string typeName, bool implyUnwrapped = true)
         {
@@ -27,16 +28,26 @@
             return typeName + (implyUnwrapped ? "!" : "");
         }

+        /// <summary>
+        /// Converts an array type to Swift
+        /// </summary>
+        /// <param name="array">The array type to convert</param>
+        /// <returns>The converted Swift type</returns>
         [ParsesType(typeof (ArrayTypeSyntax))]
-        public static string ArrayType(ArrayTypeSyntax node)
+        public static string ArrayType(ArrayTypeSyntax array)
         {
-            return "[" + SyntaxNode(node.ElementType) + "]"; //TODO: rankspecifiers
+            return "[" + SyntaxNode(array.ElementType) + "]"; //TODO: rankspecifiers
         }

+        /// <summary>
+        /// Converts a PredefinedType to Swift
+        /// </summary>
+        /// <param name="type">The type to convert</param>
+        /// <returns>The converted Swift type</returns>
         [ParsesType(typeof (PredefinedTypeSyntax))]
-        public static string PredefinedType(PredefinedTypeSyntax node)
+        public static string PredefinedType(PredefinedTypeSyntax type)
         {
-            return Type(node.Keyword.Text);
+            return Type(type.Keyword.Text);
         }
     }
 }


Change how indexes are built to fix field selection errors.

--- Silk.Data.SQL.ORM/Schema/SchemaIndexBuilder.cs
+++ Silk.Data.SQL.ORM/Schema/SchemaIndexBuilder.cs
@@ -16,7 +16,7 @@
 	{
 		private readonly TypeModel<T> _entityTypeModel = TypeModel.GetModelOf<T>();

-		private readonly List<IPropertyField> _indexFields = new List<IPropertyField>();
+		private readonly List<string[]> _indexFields = new List<string[]>();

 		public string IndexName { get; }
 		public bool HasUniqueConstraint { get; set; }
@@ -29,7 +29,7 @@
 		public SchemaIndex Build(Table table, ISchemaField[] entityFields)
 		{
 			return new SchemaIndex(IndexName, HasUniqueConstraint,
-				entityFields.Where(q => _indexFields.Any(q2 => q.FieldName == q2.FieldName)).ToArray(),
+				entityFields.Where(q => _indexFields.Any(q2 => q2.SequenceEqual(q.ModelPath))).ToArray(),
 				table);
 		}

@@ -63,8 +63,8 @@
 				if (field == null)
 					throw new ArgumentException("Field selector expression doesn't specify a valid member.", nameof(indexField));

-				if (!_indexFields.Contains(field))
-					_indexFields.Add(field);
+				if (!_indexFields.Any(q => q.SequenceEqual(path)))
+					_indexFields.Add(path.ToArray());
 			}
 		}


update client with logouturi, etc. for 2.2

--- Source/Core.EntityFramework/Entities/Client.cs
+++ Source/Core.EntityFramework/Entities/Client.cs
@@ -51,6 +51,9 @@
         public virtual ICollection<ClientRedirectUri> RedirectUris { get; set; }
         public virtual ICollection<ClientPostLogoutRedirectUri> PostLogoutRedirectUris { get; set; }

+        public virtual string LogoutUri { get; set; }
+        public virtual bool LogoutSessionRequired { get; set; }
+
         public virtual bool AllowAccessToAllScopes { get; set; }
         public virtual ICollection<ClientScope> AllowedScopes { get; set; }


Added inital load implementation

Added inital load implementation

--- Stubble.Extensions.Loaders/FileSystemLoader.cs
+++ Stubble.Extensions.Loaders/FileSystemLoader.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -11,22 +12,29 @@
     {
         internal const string DefaultFileType = "mustache";
         private readonly string _path;
-        private readonly string _fileType;
+        private readonly string _extension;
         internal IDictionary<string, string> TemplateCache = new Dictionary<string, string>(10);

         public FileSystemLoader(string path) : this(path, DefaultFileType)
         {
         }

-        public FileSystemLoader(string path, string fileType)
+        public FileSystemLoader(string path, string extension)
         {
-            _path = path;
-            _fileType = fileType;
+            _path = path.TrimEnd('/');
+            _extension = extension;
         }

         public string Load(string name)
         {
-            throw new NotImplementedException();
+            if (TemplateCache.ContainsKey(name)) return TemplateCache[name];
+
+            var fileName = _path + "/name." + _extension;
+            if (!File.Exists(fileName)) return null;
+
+            var contents = File.ReadAllText(fileName);
+            TemplateCache.Add(name, contents);
+            return contents;
         }
     }
 }


Bit of tidying around data processing

Bit of tidying around data processing

--- SurveyMonkey/SurveyMonkeyApi.DataProcessing.cs
+++ SurveyMonkey/SurveyMonkeyApi.DataProcessing.cs
@@ -69,7 +69,7 @@

         private void FillMissingResponseDetails(Survey survey)
         {
-            List<Response> responses = GetAllSurveyResponses(survey);
+            IEnumerable<Response> responses = GetAllSurveyResponses(survey);

             //Need to initialise responses before adding to them
             foreach (var collector in survey.Collectors)
@@ -86,7 +86,7 @@
             survey.Collectors = collectorLookup.Values.ToList();
         }

-        private List<Response> GetAllSurveyResponses(Survey survey)
+        private IEnumerable<Response> GetAllSurveyResponses(Survey survey)
         {
             const int maxRespondentsPerPage = 100;
             List<Respondent> respondents = GetRespondentList(survey.SurveyId);
@@ -200,7 +200,7 @@
             }
         }

-        private object MatchResponseQuestionToSurveyStructure(Question question, List<ResponseAnswer> responseAnswers)
+        private object MatchResponseQuestionToSurveyStructure(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             switch (question.Type.Family)
             {
@@ -248,7 +248,7 @@
             return null;
         }

-        private SingleChoiceAnswer MatchSingleChoiceAnswer(Question question, List<ResponseAnswer> responseAnswers)
+        private SingleChoiceAnswer MatchSingleChoiceAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new SingleChoiceAnswer();

@@ -270,7 +270,7 @@
             return reply;
         }

-        private MultipleChoiceAnswer MatchMultipleChoiceAnswer(Question question, List<ResponseAnswer> responseAnswers)
+        private MultipleChoiceAnswer MatchMultipleChoiceAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new MultipleChoiceAnswer
             {
@@ -292,16 +292,17 @@
             return reply;
         }

-        private OpenEndedSingleAnswer MatchOpenEndedSingleAnswer(Question question, List<ResponseAnswer> responseAnswers)
-        {
-            var reply = new OpenEndedSingleAnswer();
-
-            reply.Text = responseAnswers.First().Text;
-
-            return reply;
-        }
-
-        private OpenEndedMultipleAnswer MatchOpenEndedMultipleAnswer(Question question, List<ResponseAnswer> responseAnswers)
+        private OpenEndedSingleAnswer MatchOpenEndedSingleAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
+        {
+            var reply = new OpenEndedSingleAnswer
+            {
+                Text = responseAnswers.First().Text
+            };
+
+            return reply;
+        }
+
+        private OpenEndedMultipleAnswer MatchOpenEndedMultipleAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new OpenEndedMultipleAnswer
             {
@@ -310,16 +311,17 @@

             foreach (var responseAnswer in responseAnswers)
             {
-                var openEndedMultipleAnswerReply = new OpenEndedMultipleAnswerRow();
-                openEndedMultipleAnswerReply.RowName = question.AnswersLookup[responseAnswer.Row].Text;
-                openEndedMultipleAnswerReply.Text = responseAnswer.Text;
-                reply.Rows.Add(openEndedMultipleAnswerReply);
-            }
-
-            return reply;
-        }
-
-        private DemographicAnswer MatchDemographicAnswer(Question question, List<ResponseAnswer> responseAnswers)
+                reply.Rows.Add(new OpenEndedMultipleAnswerRow
+                {
+                    RowName = question.AnswersLookup[responseAnswer.Row].Text,
+                    Text = responseAnswer.Text
+                });
+            }
+
+            return reply;
+        }
+
+        private DemographicAnswer MatchDemographicAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new DemographicAnswer();

@@ -331,7 +333,7 @@
             return reply;
         }

-        private DateTimeAnswer MatchDateTimeAnswer(Question question, List<ResponseAnswer> responseAnswers)
+        private DateTimeAnswer MatchDateTimeAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new DateTimeAnswer
             {
@@ -340,9 +342,11 @@

             foreach (var responseAnswer in responseAnswers)
             {
-                var dateTimeAnswerReply = new DateTimeAnswerRow();
-                dateTimeAnswerReply.RowName = question.AnswersLookup[responseAnswer.Row].Text;
-                dateTimeAnswerReply.TimeStamp = DateTime.MinValue;
+                var dateTimeAnswerReply = new DateTimeAnswerRow
+                {
+                    RowName = question.AnswersLookup[responseAnswer.Row].Text,
+                    TimeStamp = DateTime.MinValue
+                };

                 DateTime timeStamp = DateTime.Parse(responseAnswer.Text, CultureInfo.CreateSpecificCulture("en-US"));
                 if (question.Type.Subtype == QuestionSubtype.TimeOnly) //Where only a time is given, use date component from DateTime.MinValue
@@ -357,10 +361,11 @@

                 reply.Rows.Add(dateTimeAnswerReply);
             }
-            return reply;
-        }
-
-        private MatrixMenuAnswer MatchMatrixMenuAnswer(Question question, List<ResponseAnswer> responseAnswers)
+
+            return reply;
+        }
+
+        private MatrixMenuAnswer MatchMatrixMenuAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new MatrixMenuAnswer
             {
@@ -398,7 +403,7 @@
             return reply;
         }

-        private MatrixRankingAnswer MatchMatrixRankingAnswer(Question question, List<ResponseAnswer> responseAnswers)
+        private MatrixRankingAnswer MatchMatrixRankingAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new MatrixRankingAnswer
             {
@@ -417,10 +422,11 @@
                     reply.Ranking.Add(question.AnswersLookup[responseAnswer.Col].Weight, question.AnswersLookup[responseAnswer.Row].Text);
                 }
             }
-            return reply;
-        }
-
-        private MatrixRatingAnswer MatchMatrixRatingAnswer(Question question, List<ResponseAnswer> responseAnswers)
+
+            return reply;
+        }
+
+        private MatrixRatingAnswer MatchMatrixRatingAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new MatrixRatingAnswer
             {
@@ -435,8 +441,10 @@
                 }
                 else
                 {
-                    var row = new MatrixRatingAnswerRow();
-                    row.RowName = question.AnswersLookup[responseAnswer.Row].Text;
+                    var row = new MatrixRatingAnswerRow
+                    {
+                        RowName = question.AnswersLookup[responseAnswer.Row].Text
+                    };

                     if (responseAnswer.Col != 0)
                     {
@@ -454,7 +462,7 @@
             return reply;
         }

-        private MatrixSingleAnswer MatchMatrixSingleAnswer(Question question, List<ResponseAnswer> responseAnswers)
+        private MatrixSingleAnswer MatchMatrixSingleAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new MatrixSingleAnswer
             {
@@ -480,7 +488,7 @@
             return reply;
         }

-        private MatrixMultiAnswer MatchMatrixMultiAnswer(Question question, List<ResponseAnswer> responseAnswers)
+        private MatrixMultiAnswer MatchMatrixMultiAnswer(Question question, IEnumerable<ResponseAnswer> responseAnswers)
         {
             var reply = new MatrixMultiAnswer();


Allow overriding the default access url

Allow overriding the default access url

--- SurveyMonkey/SurveyMonkeyApi.Infrastructure.cs
+++ SurveyMonkey/SurveyMonkeyApi.Infrastructure.cs
@@ -19,6 +19,7 @@
         private DateTime _lastRequestTime = DateTime.MinValue;
         private readonly int _rateLimitDelay = 500;
         private readonly int[] _retrySequence = { 5, 30, 300, 900 };
+        private readonly string _baseAccessUrl = "https://api.surveymonkey.com";
         private int _requestsMade;

         /// <summary>
@@ -34,21 +35,21 @@

         /// <param name="accessToken">The Access Token, representing either a private app's access token, or the long-lived token granted by an OAuth 2.0 flow.</param>
         public SurveyMonkeyApi(string accessToken)
-            : this(accessToken, null, null, null)
+            : this(accessToken, null, null, null, null)
         {
         }

         /// <param name="accessToken">The Access Token, representing either a private app's access token, or the long-lived token granted by an OAuth 2.0 flow.</param>
         /// <param name="rateLimitDelay">The number of milliseconds to wait between each api request. 500ms by default to accomodate SurveyMonkey's default 120/s limit. Set to a lower number if you have been granted a higher rate limit.</param>
         public SurveyMonkeyApi(string accessToken, int rateLimitDelay)
-            : this(accessToken, rateLimitDelay, null, null)
+            : this(accessToken, rateLimitDelay, null, null, null)
         {
         }

         /// <param name="accessToken">The Access Token, representing either a private app's access token, or the long-lived token granted by an OAuth 2.0 flow.</param>
         /// <param name="retrySequence">A sequence of the number of seconds to wait between retries if connectivity issues are encountered. Defaults to 5, 30, 300, then 900 seconds.</param>
         public SurveyMonkeyApi(string accessToken, int[] retrySequence)
-            : this(accessToken, null, retrySequence, null)
+            : this(accessToken, null, retrySequence, null, null)
         {
         }

@@ -56,26 +57,58 @@
         /// <param name="rateLimitDelay">The number of milliseconds to wait between each api request. 500ms by default to accomodate SurveyMonkey's default 120/s limit. Set to a lower number if you have been granted a higher rate limit.</param>
         /// <param name="retrySequence">A sequence of the number of seconds to wait between retries if connectivity issues are encountered. Defaults to 5, 30, 300, then 900 seconds.</param>
         public SurveyMonkeyApi(string accessToken, int rateLimitDelay, int[] retrySequence)
-            : this(accessToken, rateLimitDelay, retrySequence, null)
+            : this(accessToken, rateLimitDelay, retrySequence, null, null)
+        {
+        }
+
+        /// <param name="accessToken">The Access Token, representing either a private app's access token, or the long-lived token granted by an OAuth 2.0 flow.</param>
+        /// <param name="accessUrl">Use to connect to an api access url other than the default https://api.surveymonkey.com.</param>
+        public SurveyMonkeyApi(string accessToken, string accessUrl)
+            : this(accessToken, null, null, accessUrl, null)
+        {
+        }
+
+        /// <param name="accessToken">The Access Token, representing either a private app's access token, or the long-lived token granted by an OAuth 2.0 flow.</param>
+        /// <param name="rateLimitDelay">The number of milliseconds to wait between each api request. 500ms by default to accomodate SurveyMonkey's default 120/s limit. Set to a lower number if you have been granted a higher rate limit.</param>
+        /// <param name="accessUrl">Use to connect to an api access url other than the default https://api.surveymonkey.com.</param>
+        public SurveyMonkeyApi(string accessToken, int rateLimitDelay, string accessUrl)
+            : this(accessToken, rateLimitDelay, null, accessUrl, null)
+        {
+        }
+
+        /// <param name="accessToken">The Access Token, representing either a private app's access token, or the long-lived token granted by an OAuth 2.0 flow.</param>
+        /// <param name="retrySequence">A sequence of the number of seconds to wait between retries if connectivity issues are encountered. Defaults to 5, 30, 300, then 900 seconds.</param>
+        /// <param name="accessUrl">Use to connect to an api access url other than the default https://api.surveymonkey.com.</param>
+        public SurveyMonkeyApi(string accessToken, int[] retrySequence, string accessUrl)
+            : this(accessToken, null, retrySequence, accessUrl, null)
+        {
+        }
+
+        /// <param name="accessToken">The Access Token, representing either a private app's access token, or the long-lived token granted by an OAuth 2.0 flow.</param>
+        /// <param name="rateLimitDelay">The number of milliseconds to wait between each api request. 500ms by default to accomodate SurveyMonkey's default 120/s limit. Set to a lower number if you have been granted a higher rate limit.</param>
+        /// <param name="retrySequence">A sequence of the number of seconds to wait between retries if connectivity issues are encountered. Defaults to 5, 30, 300, then 900 seconds.</param>
+        /// <param name="accessUrl">Use to connect to an api access url other than the default https://api.surveymonkey.com.</param>
+        public SurveyMonkeyApi(string accessToken, int rateLimitDelay, int[] retrySequence, string accessUrl)
+            : this(accessToken, rateLimitDelay, retrySequence, accessUrl, null)
         {
         }

         internal SurveyMonkeyApi(string accessToken, IWebClient webClient)
-            : this(accessToken, 0, null, webClient)
+            : this(accessToken, 0, null, null, webClient)
         {
         }

         internal SurveyMonkeyApi(string accessToken, IWebClient webClient, int rateLimitDelay)
-            : this(accessToken, rateLimitDelay, null, webClient)
+            : this(accessToken, rateLimitDelay, null, null, webClient)
         {
         }

         internal SurveyMonkeyApi(string accessToken, IWebClient webClient, int[] retrySequence)
-            : this(accessToken, null, retrySequence, webClient)
-        {
-        }
-
-        private SurveyMonkeyApi(string accessToken, int? rateLimitDelay, int[] retrySequence, IWebClient webClient)
+            : this(accessToken, null, retrySequence, null, webClient)
+        {
+        }
+
+        private SurveyMonkeyApi(string accessToken, int? rateLimitDelay, int[] retrySequence, string accessUrl, IWebClient webClient)
         {
             _webClient = webClient ?? new LiveWebClient();
             _webClient.Encoding = Encoding.UTF8;
@@ -90,6 +123,15 @@
             {
                 _retrySequence = retrySequence;
             }
+
+            if (accessUrl != null)
+            {
+                if (!accessUrl.StartsWith("http"))
+                {
+                    throw new ArgumentException($"Invalid url {accessUrl} given. Base access url must be a full url, eg \"https://api.eu.surveymonkey.com\"");
+                }
+                _baseAccessUrl = accessUrl;
+            }
         }

         private JToken MakeApiRequest(string endpoint, Verb verb, RequestData data)
@@ -97,7 +139,7 @@
             RateLimit();
             ResetWebClient();

-            var url = "https://api.surveymonkey.com/v3" + endpoint;
+            var url = $"{_baseAccessUrl}/v3{endpoint}";
             _webClient.Headers.Add("Content-Type", "application/json");
             _webClient.Headers.Add("Authorization", "bearer " + _accessToken);
             if (verb == Verb.GET)


bank of England converted to async

bank of England converted to async

--- TIKSN.Finance/ForeignExchange/BankOfEngland.cs
+++ TIKSN.Finance/ForeignExchange/BankOfEngland.cs
@@ -1,208 +1,214 @@
-namespace TIKSN.Finance.ForeignExchange
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace TIKSN.Finance.ForeignExchange
 {
-	public class BankOfEngland : ICurrencyConverter
-	{
-		private const string UrlFormat = "http://www.bankofengland.co.uk/boeapps/iadb/fromshowcolumns.asp?CodeVer=new&xml.x=yes&Datefrom={0}&Dateto={1}&SeriesCodes={2}";
-
-		private System.Collections.Generic.Dictionary<CurrencyPair, string> SeriesCodes;
-
-		public BankOfEngland()
-		{
-			this.SeriesCodes = new System.Collections.Generic.Dictionary<CurrencyPair, string>();
-
-			this.AddSeriesCode("en-AU", "en-US", "XUDLADD");
-			this.AddSeriesCode("en-AU", "en-GB", "XUDLADS");
-
-			this.AddSeriesCode("en-CA", "en-US", "XUDLCDD");
-			this.AddSeriesCode("en-CA", "en-GB", "XUDLCDS");
-
-			this.AddSeriesCode("zh-CN", "en-US", "XUDLBK73");
-
-			this.AddSeriesCode("cs-CZ", "en-US", "XUDLBK27");
-			this.AddSeriesCode("cs-CZ", "de-DE", "XUDLBK26");
-			this.AddSeriesCode("cs-CZ", "en-GB", "XUDLBK25");
-
-			this.AddSeriesCode("da-DK", "en-US", "XUDLDKD");
-			this.AddSeriesCode("da-DK", "en-GB", "XUDLDKS");
-			this.AddSeriesCode("da-DK", "de-DE", "XUDLBK76");
-
-			this.AddSeriesCode("de-DE", "en-US", "XUDLERD");
-			this.AddSeriesCode("de-DE", "en-GB", "XUDLERS");
-
-			this.AddSeriesCode("zh-HK", "en-US", "XUDLHDD");
-			this.AddSeriesCode("zh-HK", "en-GB", "XUDLHDS");
-
-			this.AddSeriesCode("hu-HU", "en-US", "XUDLBK35");
-			this.AddSeriesCode("hu-HU", "de-DE", "XUDLBK34");
-			this.AddSeriesCode("hu-HU", "en-GB", "XUDLBK33");
-
-			this.AddSeriesCode("hi-IN", "en-GB", "XUDLBK97");
-			this.AddSeriesCode("hi-IN", "en-US", "XUDLBK64");
-
-			this.AddSeriesCode("he-IL", "en-GB", "XUDLBK78");
-			this.AddSeriesCode("he-IL", "en-US", "XUDLBK65");
-
-			this.AddSeriesCode("ja-JP", "en-US", "XUDLJYD");
-			this.AddSeriesCode("ja-JP", "en-GB", "XUDLJYS");
-			this.AddSeriesCode("ja-JP", "de-DE", "XUDLBK63");
-			this.AddSeriesCode("de-CH", "de-DE", "XUDLBK68");
-
-			//this.AddSeriesCode("LV", "en-US", "XUDLBK43");
-			//this.AddSeriesCode("LV", "de-DE", "XUDLBK42");
-			//this.AddSeriesCode("LV", "en-GB", "XUDLBK39");
-
-			this.AddSeriesCode("lt-LT", "en-US", "XUDLBK38");
-			this.AddSeriesCode("lt-LT", "de-DE", "XUDLBK37");
-			this.AddSeriesCode("lt-LT", "en-GB", "XUDLBK36");
-
-			this.AddSeriesCode("ms-MY", "en-GB", "XUDLBK83");
-			this.AddSeriesCode("ms-MY", "en-US", "XUDLBK66");
-
-			this.AddSeriesCode("en-NZ", "en-US", "XUDLNDD");
-			this.AddSeriesCode("en-NZ", "en-GB", "XUDLNDS");
-
-			this.AddSeriesCode("nn-NO", "en-US", "XUDLNKD");
-			this.AddSeriesCode("nn-NO", "en-GB", "XUDLNKS");
-
-			this.AddSeriesCode("pl-PL", "en-US", "XUDLBK49");
-			this.AddSeriesCode("pl-PL", "de-DE", "XUDLBK48");
-			this.AddSeriesCode("pl-PL", "en-GB", "XUDLBK47");
-
-			this.AddSeriesCode("ru-RU", "en-GB", "XUDLBK85");
-			this.AddSeriesCode("ru-RU", "en-US", "XUDLBK69");
-
-			this.AddSeriesCode("ar-SA", "en-US", "XUDLSRD");
-			this.AddSeriesCode("ar-SA", "en-GB", "XUDLSRS");
-
-			this.AddSeriesCode("zh-SG", "en-US", "XUDLSGD");
-			this.AddSeriesCode("zh-SG", "en-GB", "XUDLSGS");
-
-			this.AddSeriesCode("af-ZA", "en-US", "XUDLZRD");
-			this.AddSeriesCode("af-ZA", "en-GB", "XUDLZRS");
-
-			this.AddSeriesCode("ko-KR", "en-GB", "XUDLBK93");
-			this.AddSeriesCode("ko-KR", "en-US", "XUDLBK74");
-
-			this.AddSeriesCode("en-GB", "en-US", "XUDLGBD");
-
-			this.AddSeriesCode("se-SE", "en-US", "XUDLSKD");
-			this.AddSeriesCode("se-SE", "en-GB", "XUDLSKS");
-
-			this.AddSeriesCode("de-CH", "en-US", "XUDLSFD");
-			this.AddSeriesCode("de-CH", "en-GB", "XUDLSFS");
-
-			this.AddSeriesCode("zh-TW", "en-US", "XUDLTWD");
-			this.AddSeriesCode("zh-TW", "en-GB", "XUDLTWS");
-
-			this.AddSeriesCode("th-TH", "en-GB", "XUDLBK87");
-			this.AddSeriesCode("th-TH", "en-US", "XUDLBK72");
-
-			this.AddSeriesCode("tr-TR", "en-GB", "XUDLBK95");
-			this.AddSeriesCode("tr-TR", "en-US", "XUDLBK75");
-
-			this.AddSeriesCode("en-US", "en-GB", "XUDLUSS");
-
-			//this.AddSeriesCode("pt-BR", "en-US", "XUDLB8KL");
-
-			this.AddSeriesCode("zh-CN", "en-GB", "XUDLBK89");
-		}
-
-		public Money ConvertCurrency(Money BaseMoney, CurrencyInfo CounterCurrency, System.DateTime asOn)
-		{
-			CurrencyPair pair = new CurrencyPair(BaseMoney.Currency, CounterCurrency);
-
-			decimal rate = this.GetExchangeRate(pair, asOn);
-
-			return new Money(CounterCurrency, BaseMoney.Amount * rate);
-		}
-
-		public System.Collections.Generic.IEnumerable<CurrencyPair> GetCurrencyPairs(System.DateTime asOn)
-		{
-			var Pairs = new System.Collections.Generic.List<CurrencyPair>();
-
-			foreach (var pair in this.SeriesCodes.Keys)
-			{
-				decimal rate = GetExchangeRate(pair, asOn);
-
-				if (rate != decimal.Zero)
-				{
-					Pairs.Add(pair);
-				}
-			}
-
-			return Pairs;
-		}
-
-		public decimal GetExchangeRate(CurrencyPair Pair, System.DateTime asOn)
-		{
-			if (asOn > System.DateTime.Now)
-				throw new System.ArgumentException("Exchange rate forecasting are not supported.");
-
-			string SerieCode;
-
-			try
-			{
-				SerieCode = this.SeriesCodes[Pair];
-			}
-			catch (System.Collections.Generic.KeyNotFoundException)
-			{
-				throw new System.ArgumentException("Currency pair not supported.");
-			}
-
-			string RequestUrl = string.Format(UrlFormat, ToInternalDataFormat(asOn.AddMonths(-1)), ToInternalDataFormat(asOn), SerieCode);
-
-			System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(RequestUrl);
-
-			System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)System.Threading.Tasks.Task.Factory.FromAsync<System.Net.WebResponse>(request.BeginGetResponse, request.EndGetResponse, null).Result;
-
-			System.Xml.Linq.XDocument xdoc = System.Xml.Linq.XDocument.Load(response.GetResponseStream());
-
-			System.DateTime Date = System.DateTime.MinValue;
-			decimal ReverseRate = 0m;
-
-			foreach (var item in xdoc.Element("{http://www.gesmes.org/xml/2002-08-01}Envelope").Element("{http://www.bankofengland.co.uk/boeapps/iadb/agg_series}Cube").Elements("{http://www.bankofengland.co.uk/boeapps/iadb/agg_series}Cube"))
-			{
-				var time = item.Attribute("TIME");
-				var EstimatedRate = item.Attribute("OBS_VALUE");
-
-				if (time != null && EstimatedRate != null)
-				{
-					int Year = int.Parse(time.Value.Substring(0, 4));
-					int Month = int.Parse(time.Value.Substring(5, 2));
-					int Day = int.Parse(time.Value.Substring(8));
-
-					System.DateTime ItemTime = new System.DateTime(Year, Month, Day);
-
-					if (ItemTime > Date)
-					{
-						ReverseRate = decimal.Parse(EstimatedRate.Value, System.Globalization.CultureInfo.InvariantCulture);
-						Date = ItemTime;
-					}
-				}
-			}
-
-			if (ReverseRate == decimal.Zero)
-				return decimal.Zero;
-			else
-				return decimal.One / ReverseRate;
-		}
-
-		private static string ToInternalDataFormat(System.DateTime DT)
-		{
-			return DT.ToString("dd/MMM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
-		}
-
-		private void AddSeriesCode(string BaseCountryCode, string CounterCountryCode, string SerieCode)
-		{
-			System.Globalization.RegionInfo BaseCountry = new System.Globalization.RegionInfo(BaseCountryCode);
-			System.Globalization.RegionInfo CounterCountry = new System.Globalization.RegionInfo(CounterCountryCode);
-
-			CurrencyInfo BaseCurrency = new CurrencyInfo(BaseCountry);
-			CurrencyInfo CounterCurrency = new CurrencyInfo(CounterCountry);
-
-			CurrencyPair pair = new CurrencyPair(BaseCurrency, CounterCurrency);
-
-			this.SeriesCodes.Add(pair, SerieCode);
-		}
-	}
+    public class BankOfEngland : ICurrencyConverter
+    {
+        private const string UrlFormat = "http://www.bankofengland.co.uk/boeapps/iadb/fromshowcolumns.asp?CodeVer=new&xml.x=yes&Datefrom={0}&Dateto={1}&SeriesCodes={2}";
+
+        private System.Collections.Generic.Dictionary<CurrencyPair, string> SeriesCodes;
+
+        public BankOfEngland()
+        {
+            this.SeriesCodes = new Dictionary<CurrencyPair, string>();
+
+            this.AddSeriesCode("en-AU", "en-US", "XUDLADD");
+            this.AddSeriesCode("en-AU", "en-GB", "XUDLADS");
+
+            this.AddSeriesCode("en-CA", "en-US", "XUDLCDD");
+            this.AddSeriesCode("en-CA", "en-GB", "XUDLCDS");
+
+            this.AddSeriesCode("zh-CN", "en-US", "XUDLBK73");
+
+            this.AddSeriesCode("cs-CZ", "en-US", "XUDLBK27");
+            this.AddSeriesCode("cs-CZ", "de-DE", "XUDLBK26");
+            this.AddSeriesCode("cs-CZ", "en-GB", "XUDLBK25");
+
+            this.AddSeriesCode("da-DK", "en-US", "XUDLDKD");
+            this.AddSeriesCode("da-DK", "en-GB", "XUDLDKS");
+            this.AddSeriesCode("da-DK", "de-DE", "XUDLBK76");
+
+            this.AddSeriesCode("de-DE", "en-US", "XUDLERD");
+            this.AddSeriesCode("de-DE", "en-GB", "XUDLERS");
+
+            this.AddSeriesCode("zh-HK", "en-US", "XUDLHDD");
+            this.AddSeriesCode("zh-HK", "en-GB", "XUDLHDS");
+
+            this.AddSeriesCode("hu-HU", "en-US", "XUDLBK35");
+            this.AddSeriesCode("hu-HU", "de-DE", "XUDLBK34");
+            this.AddSeriesCode("hu-HU", "en-GB", "XUDLBK33");
+
+            this.AddSeriesCode("hi-IN", "en-GB", "XUDLBK97");
+            this.AddSeriesCode("hi-IN", "en-US", "XUDLBK64");
+
+            this.AddSeriesCode("he-IL", "en-GB", "XUDLBK78");
+            this.AddSeriesCode("he-IL", "en-US", "XUDLBK65");
+
+            this.AddSeriesCode("ja-JP", "en-US", "XUDLJYD");
+            this.AddSeriesCode("ja-JP", "en-GB", "XUDLJYS");
+            this.AddSeriesCode("ja-JP", "de-DE", "XUDLBK63");
+            this.AddSeriesCode("de-CH", "de-DE", "XUDLBK68");
+
+            //this.AddSeriesCode("LV", "en-US", "XUDLBK43");
+            //this.AddSeriesCode("LV", "de-DE", "XUDLBK42");
+            //this.AddSeriesCode("LV", "en-GB", "XUDLBK39");
+
+            this.AddSeriesCode("lt-LT", "en-US", "XUDLBK38");
+            this.AddSeriesCode("lt-LT", "de-DE", "XUDLBK37");
+            this.AddSeriesCode("lt-LT", "en-GB", "XUDLBK36");
+
+            this.AddSeriesCode("ms-MY", "en-GB", "XUDLBK83");
+            this.AddSeriesCode("ms-MY", "en-US", "XUDLBK66");
+
+            this.AddSeriesCode("en-NZ", "en-US", "XUDLNDD");
+            this.AddSeriesCode("en-NZ", "en-GB", "XUDLNDS");
+
+            this.AddSeriesCode("nn-NO", "en-US", "XUDLNKD");
+            this.AddSeriesCode("nn-NO", "en-GB", "XUDLNKS");
+
+            this.AddSeriesCode("pl-PL", "en-US", "XUDLBK49");
+            this.AddSeriesCode("pl-PL", "de-DE", "XUDLBK48");
+            this.AddSeriesCode("pl-PL", "en-GB", "XUDLBK47");
+
+            this.AddSeriesCode("ru-RU", "en-GB", "XUDLBK85");
+            this.AddSeriesCode("ru-RU", "en-US", "XUDLBK69");
+
+            this.AddSeriesCode("ar-SA", "en-US", "XUDLSRD");
+            this.AddSeriesCode("ar-SA", "en-GB", "XUDLSRS");
+
+            this.AddSeriesCode("zh-SG", "en-US", "XUDLSGD");
+            this.AddSeriesCode("zh-SG", "en-GB", "XUDLSGS");
+
+            this.AddSeriesCode("af-ZA", "en-US", "XUDLZRD");
+            this.AddSeriesCode("af-ZA", "en-GB", "XUDLZRS");
+
+            this.AddSeriesCode("ko-KR", "en-GB", "XUDLBK93");
+            this.AddSeriesCode("ko-KR", "en-US", "XUDLBK74");
+
+            this.AddSeriesCode("en-GB", "en-US", "XUDLGBD");
+
+            this.AddSeriesCode("se-SE", "en-US", "XUDLSKD");
+            this.AddSeriesCode("se-SE", "en-GB", "XUDLSKS");
+
+            this.AddSeriesCode("de-CH", "en-US", "XUDLSFD");
+            this.AddSeriesCode("de-CH", "en-GB", "XUDLSFS");
+
+            this.AddSeriesCode("zh-TW", "en-US", "XUDLTWD");
+            this.AddSeriesCode("zh-TW", "en-GB", "XUDLTWS");
+
+            this.AddSeriesCode("th-TH", "en-GB", "XUDLBK87");
+            this.AddSeriesCode("th-TH", "en-US", "XUDLBK72");
+
+            this.AddSeriesCode("tr-TR", "en-GB", "XUDLBK95");
+            this.AddSeriesCode("tr-TR", "en-US", "XUDLBK75");
+
+            this.AddSeriesCode("en-US", "en-GB", "XUDLUSS");
+
+            //this.AddSeriesCode("pt-BR", "en-US", "XUDLB8KL");
+
+            this.AddSeriesCode("zh-CN", "en-GB", "XUDLBK89");
+        }
+
+        private static string ToInternalDataFormat(DateTimeOffset DT)
+        {
+            return DT.ToString("dd/MMM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
+        }
+
+        private void AddSeriesCode(string BaseCountryCode, string CounterCountryCode, string SerieCode)
+        {
+            System.Globalization.RegionInfo BaseCountry = new System.Globalization.RegionInfo(BaseCountryCode);
+            System.Globalization.RegionInfo CounterCountry = new System.Globalization.RegionInfo(CounterCountryCode);
+
+            CurrencyInfo BaseCurrency = new CurrencyInfo(BaseCountry);
+            CurrencyInfo CounterCurrency = new CurrencyInfo(CounterCountry);
+
+            CurrencyPair pair = new CurrencyPair(BaseCurrency, CounterCurrency);
+
+            this.SeriesCodes.Add(pair, SerieCode);
+        }
+
+        public async Task<Money> ConvertCurrencyAsync(Money BaseMoney, CurrencyInfo CounterCurrency, DateTimeOffset asOn)
+        {
+            CurrencyPair pair = new CurrencyPair(BaseMoney.Currency, CounterCurrency);
+
+            decimal rate = await this.GetExchangeRateAsync(pair, asOn);
+
+            return new Money(CounterCurrency, BaseMoney.Amount * rate);
+        }
+
+        public async Task<IEnumerable<CurrencyPair>> GetCurrencyPairsAsync(DateTimeOffset asOn)
+        {
+            var pairs = new List<CurrencyPair>();
+
+            foreach (var pair in this.SeriesCodes.Keys)
+            {
+                decimal rate = await GetExchangeRateAsync(pair, asOn);
+
+                if (rate != decimal.Zero)
+                {
+                    pairs.Add(pair);
+                }
+            }
+
+            return pairs;
+        }
+
+        public async Task<decimal> GetExchangeRateAsync(CurrencyPair Pair, DateTimeOffset asOn)
+        {
+            if (asOn > DateTimeOffset.Now)
+                throw new ArgumentException("Exchange rate forecasting are not supported.");
+
+            string SerieCode;
+
+            try
+            {
+                SerieCode = this.SeriesCodes[Pair];
+            }
+            catch (KeyNotFoundException)
+            {
+                throw new ArgumentException("Currency pair not supported.");
+            }
+
+            string RequestUrl = string.Format(UrlFormat, ToInternalDataFormat(asOn.AddMonths(-1)), ToInternalDataFormat(asOn), SerieCode);
+
+            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(RequestUrl);
+
+            HttpWebResponse response = (HttpWebResponse)await Task.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null);
+
+            var xdoc = XDocument.Load(response.GetResponseStream());
+
+            var date = DateTimeOffset.MinValue;
+            decimal reverseRate = decimal.Zero;
+
+            foreach (var item in xdoc.Element("{http://www.gesmes.org/xml/2002-08-01}Envelope").Element("{http://www.bankofengland.co.uk/boeapps/iadb/agg_series}Cube").Elements("{http://www.bankofengland.co.uk/boeapps/iadb/agg_series}Cube"))
+            {
+                var time = item.Attribute("TIME");
+                var EstimatedRate = item.Attribute("OBS_VALUE");
+
+                if (time != null && EstimatedRate != null)
+                {
+                    int Year = int.Parse(time.Value.Substring(0, 4));
+                    int Month = int.Parse(time.Value.Substring(5, 2));
+                    int Day = int.Parse(time.Value.Substring(8));
+
+                    var itemTime = new DateTimeOffset(Year, Month, Day, 0, 0, 0, TimeSpan.Zero);
+
+                    if (itemTime > date)
+                    {
+                        reverseRate = decimal.Parse(EstimatedRate.Value, System.Globalization.CultureInfo.InvariantCulture);
+                        date = itemTime;
+                    }
+                }
+            }
+
+            if (reverseRate == decimal.Zero)
+                return decimal.Zero;
+            else
+                return decimal.One / reverseRate;
+        }
+    }
 }


Update SitemapPageTests.cs

Update SitemapPageTests.cs

--- TIKSN.UnitTests.Shared/Web/SitemapPageTests.cs
+++ TIKSN.UnitTests.Shared/Web/SitemapPageTests.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using Xunit;

 namespace TIKSN.Web.Tests
@@ -8,7 +8,7 @@
         [Fact]
         public void Equality001()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
             Sitemap.Page p2 = null;

             Assert.False(null == p1);
@@ -18,8 +18,8 @@
         [Fact]
         public void Equals001()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
-            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
+            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);

             Assert.True(p1.Equals(p1));
             Assert.True(p1.Equals(p2));
@@ -33,8 +33,8 @@
         [Fact]
         public void Equals002()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
-            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
+            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2);

             Assert.True(p1.Equals(p1));
             Assert.True(p1.Equals(p2));
@@ -48,8 +48,8 @@
         [Fact]
         public void Equals003()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
-            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/sitemap.aspx"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
+            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/sitemap.aspx"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);

             Assert.True(p1.Equals(p1));
             Assert.False(p1.Equals(p2));
@@ -63,7 +63,7 @@
         [Fact]
         public void Equals004()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);

             Assert.False(p1.Equals(null));
             Assert.False(p1 == null);
@@ -73,7 +73,7 @@
         [Fact]
         public void Equals005()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);

             System.Collections.Generic.HashSet<Sitemap.Page> pages = new System.Collections.Generic.HashSet<Sitemap.Page>();

@@ -84,8 +84,8 @@
         [Fact]
         public void Equals007()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
-            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
+            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2);

             System.Collections.Generic.HashSet<Sitemap.Page> pages = new System.Collections.Generic.HashSet<Sitemap.Page>();

@@ -96,7 +96,7 @@
         [Fact]
         public void Equals008()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);

             System.Collections.Generic.List<Sitemap.Page> pages = new System.Collections.Generic.List<Sitemap.Page>();

@@ -112,8 +112,8 @@
         [Fact]
         public void Equals009()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
-            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
+            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2);

             System.Collections.Generic.List<Sitemap.Page> pages = new System.Collections.Generic.List<Sitemap.Page>();

@@ -129,7 +129,7 @@
         [Fact]
         public void Equals010()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);

             System.Collections.Generic.Dictionary<Sitemap.Page, int> pages = new System.Collections.Generic.Dictionary<Sitemap.Page, int>();

@@ -145,8 +145,8 @@
         [Fact]
         public void Equals011()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
-            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
+            Sitemap.Page p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2);

             System.Collections.Generic.Dictionary<Sitemap.Page, int> pages = new System.Collections.Generic.Dictionary<Sitemap.Page, int>();

@@ -162,7 +162,7 @@
         [Fact]
         public void Equals012()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
             object p2 = null;

             Assert.False(p1.Equals(p2));
@@ -171,7 +171,7 @@
         [Fact]
         public void Equals013()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
             Sitemap.Page p2 = p1;

             Assert.True(p1.Equals(p2));
@@ -180,7 +180,7 @@
         [Fact]
         public void Equals014()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
             Sitemap s1 = new Sitemap();

             Assert.False(p1.Equals(s1));
@@ -189,8 +189,8 @@
         [Fact]
         public void Equals015()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
-            object p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
+            object p2 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now.AddDays(10d), Sitemap.Page.Frequency.Monthly, 0.2);

             Assert.True(p1.Equals(p2));
         }
@@ -198,7 +198,7 @@
         [Fact]
         public void Equals016()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
             object p2 = p1;

             Assert.True(p1.Equals(p2));
@@ -207,7 +207,7 @@
         [Fact]
         public void Inequality001()
         {
-            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m);
+            Sitemap.Page p1 = new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, 0.5);
             Sitemap.Page p2 = null;

             Assert.True(null != p1);
@@ -224,7 +224,7 @@
         public void Page002()
         {
             Assert.Throws<ArgumentNullException>(
-                () => new Sitemap.Page(null, DateTime.Now, Sitemap.Page.Frequency.Always, 0.5m));
+                () => new Sitemap.Page(null, DateTime.Now, Sitemap.Page.Frequency.Always, 0.5));
         }

         [Fact]
@@ -244,7 +244,7 @@
             Assert.Throws<ArgumentOutOfRangeException>(
                 () =>
                     new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now,
-                        Sitemap.Page.Frequency.Always, 1.5m));
+                        Sitemap.Page.Frequency.Always, 1.5));
         }

         [Fact]
@@ -252,7 +252,7 @@
         {
             Assert.Throws<ArgumentOutOfRangeException>(
                 () =>
-                    new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, -0.5m));
+                    new Sitemap.Page(new System.Uri("http://www.microsoft.com/"), DateTime.Now, Sitemap.Page.Frequency.Always, -0.5));
         }
     }
-}+}


Change types to match interface.

Change types to match interface.

--- TestCOMServer/TestCOMServer/COMTestDispatch.cs
+++ TestCOMServer/TestCOMServer/COMTestDispatch.cs
@@ -176,7 +176,7 @@
     [ComVisible(true),
         Guid("6485B1EF-D780-4834-A4FE-1EBB51746CA3"),
         InterfaceType(ComInterfaceType.InterfaceIsDual)]
-    public interface ICOMTestObject
+    public interface ICOMEchoTestObject
     {
         sbyte EchoInt8(sbyte value);
         byte EchoUInt8(byte value);
@@ -194,25 +194,52 @@
     [ComVisible(true),
         Guid("865B85C5-0334-4AC6-9EF6-AACEC8FC5E86"),
         ClassInterface(ClassInterfaceType.AutoDual),
-        ComSourceInterfaces(typeof(ICOMTestObject))]
-    public class COMTestObjectType : ICOMTestObject
+        ComSourceInterfaces(typeof(ICOMEchoTestObject))]
+    public class COMEchoTestObject : ICOMEchoTestObject
     {
         public string EchoString(string value)
         {
             return value;
         }

-        public Int16 EchoInt16(Int16 value)
-        {
-            return value;
-        }
-
-        public Int32 EchoInt32(Int32 value)
-        {
-            return value;
-        }
-
-        public Int64 EchoInt64(Int64 value)
+
+        public sbyte EchoInt8(sbyte value)
+        {
+            return value;
+        }
+
+
+        public byte EchoUInt8(byte value)
+        {
+            return value;
+        }
+
+        public short EchoInt16(short value)
+        {
+            return value;
+        }
+
+        public ushort EchoUInt16(ushort value)
+        {
+            return value;
+        }
+
+        public int EchoInt32(int value)
+        {
+            return value;
+        }
+
+        public uint EchoUInt32(uint value)
+        {
+            return value;
+        }
+
+        public long EchoInt64(long value)
+        {
+            return value;
+        }
+
+        public ulong EchoUInt64(ulong value)
         {
             return value;
         }


Put the scratch and warehouse directories up on WASB in the Shark test service. This gets CTAS to work.

--- TestServices/ElectricBlobs/Shark/WorkerRole.cs
+++ TestServices/ElectricBlobs/Shark/WorkerRole.cs
@@ -19,7 +19,11 @@
 	{
 		protected override ImmutableDictionary<string, string> GetHadoopConfigProperties()
 		{
-			return WasbConfiguration.GetWasbConfigKeys();
+			var rootFs = String.Format("wasb://shark@{0}.blob.core.windows.net",
+					WasbConfiguration.ReadWasbAccountsFile().First());
+			return WasbConfiguration.GetWasbConfigKeys()
+				.Add("hive.exec.scratchdir", rootFs + "/scratch")
+				.Add("hive.metastore.warehouse.dir", rootFs + "/warehouse");
 		}
 	}
 }


renaming TileFetch test method.

renaming TileFetch test method.

--- Tests/Mapsui.Tests/Fetcher/TileFetcherTests.cs
+++ Tests/Mapsui.Tests/Fetcher/TileFetcherTests.cs
@@ -11,7 +11,7 @@
     public class TileFetcherTests
     {
         [Test]
-        public void TestFetch()
+        public void TileFetcherShouldBehaveProperlyWithFailingTests()
         {
             // Arrange
             var schema = new GlobalSphericalMercator();


Install our own exception handler for Rx

--- UI/WPF/UI.WPF.Launcher/LauncherBootstrapper.cs
+++ UI/WPF/UI.WPF.Launcher/LauncherBootstrapper.cs
@@ -7,6 +7,8 @@
 using System.Diagnostics;
 using System.IO.Abstractions;
 using System.Linq;
+using System.Reactive;
+using System.Reactive.Concurrency;
 using System.Reflection;
 using System.Windows;
 using System.Windows.Threading;
@@ -158,6 +160,20 @@

         protected override void OnStartup(object sender, StartupEventArgs e)
         {
+            RxApp.DefaultExceptionHandler = Observer.Create<Exception>(ex =>
+            {
+                if (Debugger.IsAttached)
+                {
+                    Debugger.Break();
+                }
+
+                RxApp.MainThreadScheduler.Schedule(() =>
+                {
+                    // Just rethrow the exception in the UI thread so our exception handler can handle it
+                    throw ex;
+                });
+            });
+
             InitializeLogging();

             this.Log().Info("Starting application");


Fixes: 29114, 28830

Fixes: 29114, 28830

[TFS Changeset #78973]

--- umbraco/presentation/umbraco/webservices/legacyAjaxCalls.asmx.cs
+++ umbraco/presentation/umbraco/webservices/legacyAjaxCalls.asmx.cs
@@ -72,13 +72,17 @@
                 switch (nodeType)
                 {
                     case "media":
-                        new Media(intNodeID).delete();
+                    case "mediaRecycleBin":
+                        new Media(intNodeID).delete(true);
                         break;
                     case "content":
+                    case "contentRecycleBin":
                         new Document(intNodeID).delete(true);
                         break;
-                }
-                new Document(intNodeID).delete(true);
+                    default:
+                        new Document(intNodeID).delete(true);
+                        break;
+                }
             }
             else
             {


S-60568 - I Love JIRA!! NOT, lets try adding a header

--- VersionOne.JiraConnector/Rest/JiraRestProxy.cs
+++ VersionOne.JiraConnector/Rest/JiraRestProxy.cs
@@ -203,6 +203,8 @@
             };
             request.AddUrlSegment("issueIdOrKey", issueKey);

+	        request.AddHeader("Authorization", "Basic YWRtaW46VDBmejVlQjRyTXV4");
+
             dynamic body = new ExpandoObject();
             ((IDictionary<string, object>)body).Add("transition", new { id = action });
             if (assignee != null)


Update WalletWasabi/Extensions/RPCClientExtensions.cs

Co-authored-by: Dávid Molnár <6d607974c44f675e0e525d39b2684f7b117c5263@gmail.com>

--- WalletWasabi/Extensions/RPCClientExtensions.cs
+++ WalletWasabi/Extensions/RPCClientExtensions.cs
@@ -79,7 +79,7 @@

 				return RpcStatus.Responsive(bci.Headers, bci.Blocks, pi.Length);
 			}
-			catch (Exception ex) when (ex is not OperationCanceledException && ex is not TaskCanceledException && ex is not TimeoutException)
+			catch (Exception ex) when (ex is not OperationCanceledException && ex is not TimeoutException)
 			{
 				Logger.LogTrace(ex);
 				return RpcStatus.Unresponsive;


check for metadata name

check for metadata name

--- Zone.Campaign.Sync.Common/Services/Uploader.cs
+++ Zone.Campaign.Sync.Common/Services/Uploader.cs
@@ -88,6 +88,11 @@
                     Log.WarnFormat("No schema found in {0}.", i);
                     return template;
                 }
+                else if (template.Metadata.Name == null)
+                {
+                    Log.WarnFormat("No name found in {0}.", i);
+                    return template;
+                }

                 // TODO: I think maybe this should be set by the mapping, not the file extension.
                 var templateTransformer = _templateTransformerFactory.GetTransformer(fileExtension);
@@ -95,7 +100,7 @@
                 template.Code = templateTransformer.Transform(template.Code, workingDirectory);

                 return template;
-            }).Where(i => i != null && i.Metadata != null && i.Metadata.Schema != null)
+            }).Where(i => i != null && i.Metadata != null && i.Metadata.Schema != null && i.Metadata.Name != null)
               .ToArray();

             if (settings.TestMode)


nunit expected exceptions

nunit expected exceptions

--- testing/nunit/SampleTests.cs
+++ testing/nunit/SampleTests.cs
@@ -3,6 +3,9 @@
 // Copyright (c) 2014.
 // </copyright>
 // -----------------------------------------------------------------------
+
+using System;
+
 namespace nunit.example
 {
     using System.Diagnostics;
@@ -52,5 +55,22 @@
             var product = new Product("Bean", 15.5m);
             Assert.That(product.Name, Is.EqualTo("Bean"));
         }
+
+        [Test]
+        public void asserting_for_an_exception()
+        {
+            Assert.Throws<NullReferenceException>(() =>
+            {
+                object foo = null;
+                foo.ToString();
+            });
+        }
+
+        [Test, ExpectedException(typeof(NullReferenceException))]
+        public void asserting_for_an_exception_using_an_attribute()
+        {
+            object foo = null;
+            foo.ToString();
+        }
     }
 }


Add default mapping of cell,work and home phone number if PhoneTypes are missing when syncing from CardDAV server to avoid loss of telephone numbers.

--- CalDavSynchronizer/Implementation/Contacts/ContactEntityMapper.cs
+++ CalDavSynchronizer/Implementation/Contacts/ContactEntityMapper.cs
@@ -27,6 +27,7 @@
 using log4net;
 using System.Reflection;
 using System.IO;
+using System.Linq;
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using Exception = System.Exception;
@@ -734,6 +735,22 @@
       target.PrimaryTelephoneNumber = string.Empty;
       target.MobileTelephoneNumber = string.Empty;

+      // if no PhoneTypes are set (e.g. Yandex drops the types)
+      // assume a default ordering of cell,work,home to avoid data loss of the first 3 numbers
+
+      if (source.Phones.Count >= 1 && source.Phones.All (p => p.PhoneType == vCardPhoneTypes.Default))
+      {
+        source.Phones[0].PhoneType = vCardPhoneTypes.Cellular;
+        if (source.Phones.Count >= 2)
+        {
+          source.Phones[1].PhoneType = vCardPhoneTypes.Work;
+          if (source.Phones.Count >= 3)
+          {
+            source.Phones[2].PhoneType = vCardPhoneTypes.Home;
+          }
+        }
+      }
+
       foreach (var phoneNumber in source.Phones)
       {
         string sourceNumber = _configuration.FixPhoneNumberFormat ?


Fixed json issue with large strings.

Fixed json issue with large strings.

Reset escaped to 0 for large strings, to avoid moving more objects to LOH.

--- Code/Core/Revenj.Serialization/Json/Converters/StringConverter.cs
+++ Code/Core/Revenj.Serialization/Json/Converters/StringConverter.cs
@@ -67,8 +67,13 @@
 			else
 			{
 				sw.Write('"');
-				if (escaped != 0 && value.Length < 85000)
-					sw.Write(value.Substring(0, escaped));
+				if (escaped != 0)
+				{
+					if (value.Length < 85000 || escaped < 85000 && (value.Length - escaped) < 85000)
+						sw.Write(value.Substring(0, escaped));
+					else
+						escaped = 0;
+				}
 			}
 			char c;
 			for (int i = escaped; i < value.Length; i++)


Fixed incorrect folder path creation.

Fixed incorrect folder path creation.

--- Core/OfficeDevPnP.Core/AppModelExtensions/FileFolderExtensions.cs
+++ Core/OfficeDevPnP.Core/AppModelExtensions/FileFolderExtensions.cs
@@ -382,9 +382,10 @@
             web.Context.ExecuteQueryRetry();

             List containingList = null;
+            var searchFldUrl = folderServerRelativeUrl.EndsWith("/") ? folderServerRelativeUrl : folderServerRelativeUrl + "/";
             foreach (var list in listCollection)
             {
-                if (folderServerRelativeUrl.StartsWith(list.RootFolder.ServerRelativeUrl, StringComparison.InvariantCultureIgnoreCase))
+                if (searchFldUrl.StartsWith(list.RootFolder.ServerRelativeUrl + "/", StringComparison.InvariantCultureIgnoreCase))
                 {
                     containingList = list;
                     break;


EnumerationList review

EnumerationList review

--- Framework.Core/Theraot/Collections/Specialized/EnumerationList.cs
+++ Framework.Core/Theraot/Collections/Specialized/EnumerationList.cs
@@ -1,4 +1,7 @@
 // Needed for NET30
+
+#pragma warning disable CA2208 // Instantiate argument exceptions correctly
+// ReSharper disable PossibleMultipleEnumeration

 using System;
 using System.Collections;


Fix a long-standing silly bug. Vertical and Horizontal were reversed

--- renderdocui/Controls/DoubleClickSplitter.cs
+++ renderdocui/Controls/DoubleClickSplitter.cs
@@ -106,9 +106,9 @@
                     SplitterDistance = Panel1MinSize;
                 else if (m_Collapsed && !Panel1Collapse)
                 {
-                    if(Orientation == Orientation.Vertical)
+                    if (Orientation == Orientation.Horizontal)
                         SplitterDistance = Height - Panel2MinSize;
-                    else if(Orientation == Orientation.Horizontal)
+                    else if(Orientation == Orientation.Vertical)
                         SplitterDistance = Width - Panel2MinSize;
                 }
             }


优化大宴群雄活动，未能领取奖励的bug

优化大宴群雄活动，未能领取奖励的bug

--- com.lover.astd.common/logic/ActivityMgr.cs
+++ com.lover.astd.common/logic/ActivityMgr.cs
@@ -9525,6 +9525,14 @@
                 {
                     this.consumeXiqi(protocol, logger);
                 }
+                List<ProgressState> progressstate_list = XmlHelper.GetClassList<ProgressState>(cmdResult.SelectNodes("/results/progressstate"));
+                if (progressstate_list.Count > 0)
+                {
+                    foreach (ProgressState current in progressstate_list)
+                    {
+                        this.getBanquetReward(protocol, logger, current);
+                    }
+                }
                 return goldcost;
             }
         }


Code cleanup

Code cleanup

--- isc.onec.adapter/V8Service.cs
+++ isc.onec.adapter/V8Service.cs
@@ -83,14 +83,11 @@

 		internal Response set(Request target, string property, Request value)
 		{
-			object rcw = Find(target);
-			object argument;
-			argument = marshall(value);
-			adapter.set(rcw, property, argument);
-
-			Response response = new Response();
-
-			return response;
+			object rcw = this.Find(target);
+			object argument = this.Marshal(value);
+			this.adapter.set(rcw, property, argument);
+
+			return new Response();
 		}
 		internal Response get(Request target, string property)
 		{
@@ -99,13 +96,16 @@

 			return this.Unmarshal(value);
 		}
-		internal Response invoke(Request target, string method, Request[] args)
-		{
-			object rcw = Find(target);
-			object[] arguments = build(args);
-			object value = adapter.invoke(rcw, method, arguments);
-
-			return this.Unmarshal(value);
+
+		internal Response invoke(Request target, string method, Request[] args) {
+			object rcw = this.Find(target);
+			object[] arguments = new object[args.Length];
+			for (int i = 0; i < args.Length; i++) {
+				arguments[i] = this.Marshal(args[i]);
+			}
+			object returnValue = this.adapter.invoke(rcw, method, arguments);
+
+			return this.Unmarshal(returnValue);
 		}

 		internal Response free(Request request)
@@ -170,7 +170,7 @@
 			return new Response(Response.Type.DATA, reply);
 		}

-		private object marshall(Request value) {
+		private object Marshal(Request value) {
 			switch (value.RequestType) {
 			case Request.Type.OBJECT:
 				return this.Find(value);
@@ -178,6 +178,9 @@
 			case Request.Type.NUMBER:
 				return value.Value;
 			default:
+				/*
+				 * CONTEXT
+				 */
 				return null;
 			}
 		}
@@ -193,15 +196,6 @@
 			return new Response(Response.Type.DATA, value);
 		}

-		private object[] build(Request[] args)
-		{
-			object[] result = new object[args.Length];
-			for (int i = 0; i < args.Length; i++) {
-				result[i] = marshall(args[i]);
-			}
-			return result;
-		}
-
 		private object Find(Request request) {
 			if (request.RequestType == Request.Type.DATA || request.RequestType == Request.Type.NUMBER) {
 				throw new ArgumentException("Expecting either an OBJECT or a CONTEXT request: " + request);


little cleaning up

little cleaning up

--- OfflineMedia.Business/Framework/Repositories/AktualizeArticles.cs
+++ OfflineMedia.Business/Framework/Repositories/AktualizeArticles.cs
@@ -54,7 +54,7 @@
         {
             try
             {
-                TimerHelper.Instance.Stop("Inside Method...", this);
+                TimerHelper.Instance.Stop("ActualizeArticles starting...", this);
                 if (_actualizeActive)
                 {
                     _actualizeRequested = true;
@@ -63,6 +63,7 @@
                 _actualizeActive = true;

                 TimerHelper.Instance.Stop("Creating Feed Tasks", this);
+
                 //Get Total Number of feeds
                 _newFeedModels = new List<FeedModel>();
                 foreach (var sourceModel in _sources)
@@ -95,8 +96,7 @@
                 {
                     for (int i = 0; i < ConcurrentThreads && i < feedCount; i++)
                     {
-                        var tsk = AktualizeFeedsTask();
-                        _actualizeFeedsTasks.Add(tsk);
+                        _actualizeFeedsTasks.Add(AktualizeFeedsTask());
                     }
                 }

@@ -109,8 +109,7 @@
                 await FeedToDatabase(true);

                 TimerHelper.Instance.Stop("Get additional articles from Database", this);
-
-
+
                 _aktualizeArticleModels = _repoArticles.Where(a => a.State == ArticleState.New).OrderByDescending(a => a.PublicationTime).ToList();

                 //add missing models from database
@@ -129,6 +128,7 @@
                 _progressService.HideIndeterminateProgress(IndeterminateProgressKey.FeedSaveToDatabase);

                 _newAktualizeArticleModels.Clear();
+
                 var newArticlesCount = _aktualizeArticleModels.Count;
                 _progressService.InitializePercentageProgress("Artikel werden heruntergeladen...", newArticlesCount);
                 if (newArticlesCount > 0)
@@ -140,16 +140,14 @@
                     {
                         for (int i = 0; i < ConcurrentThreads && i < newArticlesCount; i++)
                         {
-                            var tsk = AktualizeArticlesTask();
-                            _aktualizeArticlesTasks.Add(tsk);
+                            _aktualizeArticlesTasks.Add(AktualizeArticlesTask());
                         }
                     }

                     TimerHelper.Instance.Stop("Waiting for Tasks", this);
                     Task.WaitAll(_aktualizeArticlesTasks.ToArray());
-
-                    TimerHelper.Instance.Stop("Finished", this);
-                }
+                }
+                TimerHelper.Instance.Stop("Finished", this);

                 _progressService.HidePercentageProgress();
                 _progressService.ShowDecentInformationMessage("Aktualisierung abgeschlossen", TimeSpan.FromSeconds(3));


fix a typo "osNpcCreated" to "osNpcCreate" in OSSL threat level check

--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2085,7 +2085,7 @@

         public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard)
         {
-            CheckThreatLevel(ThreatLevel.High, "osNpcCreated");
+            CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
             return NpcCreate(firstname, lastname, position, notecard, false);
         }


Fix a bit more hammering of the messaging server, was creating too many timer events that were firing for the same region.

--- OpenSim/Services/MessagingService/AsyncMessageRequesterService.cs
+++ OpenSim/Services/MessagingService/AsyncMessageRequesterService.cs
@@ -25,6 +25,7 @@

         protected List<IScene> m_scenes = new List<IScene>();
         protected volatile bool m_locked = false;
+        protected Timer m_timer = null;

         #endregion

@@ -50,11 +51,14 @@

             m_scenes.Add(scene);

-            //Start the request timer
-            Timer timer = new Timer();
-            timer.Elapsed += requestAsyncMessages;
-            timer.Interval = 60 * 1000; //60 secs
-            timer.Start();
+            if (m_timer == null)
+            {
+                m_timer = new Timer();
+                //Start the request timer
+                m_timer.Elapsed += requestAsyncMessages;
+                m_timer.Interval = 60 * 1000; //60 secs
+                m_timer.Start();
+            }
         }

         public void RemoveRegion(Scene scene)


Add Width and Height variable

Add Width and Height variable

Add Width and Height variable

--- QueueDataGraphic/QueueDataGraphic/CSharpFiles/QueueDataGraphic.cs
+++ QueueDataGraphic/QueueDataGraphic/CSharpFiles/QueueDataGraphic.cs
@@ -19,6 +19,16 @@
 	class QueueDataGraphic                                                      //	QueueDataGraphic class, QueueDataGraphic類別
 	{                                                                           //	QueueDataGraphic class start, 進入QueueDataGraphic類別
 		private List<DataQueue> DataQueueList;                                  //	DataQueueList object, DataQueueList物件
+
+		/// <summary>
+		/// Width is the width of Graph
+		/// </summary>
+		int Width;                                                              //	Width variable, Width變數
+
+		/// <summary>
+		/// Height is the height of Graph
+		/// </summary>
+		int Height;																//	Height variable, Height變數

 		/// <summary>
 		/// QueueDataGraphic constructor, QueueDataGraphic建構子


VB & C# Custom expression editors with intellisense

--- RehostedDesigner/VbExpressionEditor/VbExpressionEditorInstance.cs
+++ RehostedDesigner/VbExpressionEditor/VbExpressionEditorInstance.cs
@@ -4,6 +4,7 @@
 using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp;
 using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.VisualBasic;
 using RehostedWorkflowDesigner.Helpers;
 using System;
 using System.Activities.Presentation.Model;
@@ -40,17 +41,31 @@
             {
                 try
                 {
-                    string startString = @"using System; using System.Collections.Generic; using System.Text;
-                                            namespace SomeNamespace { public class NotAProgram { private void SomeMethod() { "
-                                            + "var blah = ";
-                    string endString = " ; } } }";
+                    string startString = @"
+Imports System
+Imports System.Collections.Generic
+Imports System.Text
+
+Namespace SomeNamespace
+
+Public Class NotAProgram
+Private Sub SomeMethod()
+"
++ "var blah = ";
+
+         string endString = @"
+
+        End Sub
+    End Class
+End Namespace
+";
                     string codeString = startString + this.Text.Substring(0, this.CaretOffset) + endString;

-                    var tree = CSharpSyntaxTree.ParseText(codeString);
-
-                    var root = (CompilationUnitSyntax)tree.GetRoot();
-
-                    var compilation = CSharpCompilation.Create("CustomIntellisense")
+                    var tree = VisualBasicSyntaxTree.ParseText(codeString);
+
+                    var root = (Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax)tree.GetRoot();
+
+                    var compilation = VisualBasicCompilation.Create("CustomIntellisense")
                                                .AddReferences(MetadataReference.CreateFromFile(typeof(object).Assembly.Location))
                                                .AddSyntaxTrees(tree);


Improved Stalker playing algorithm

Improved Stalker playing algorithm

--- SantaseEngine/Source/AI/Santase.AI.StalkerPlayer/StalkerPlayer.cs
+++ SantaseEngine/Source/AI/Santase.AI.StalkerPlayer/StalkerPlayer.cs
@@ -72,16 +72,44 @@
             {
                 var enemyCard = context.FirstPlayedCard;
                 int enemyCardPriority = this.GetCardPriority(enemyCard);
-
-                var card = this.PlayerActionValidator
-                    .GetPossibleCardsToPlay(context, this.Cards)
-                    .OrderBy(c => c.GetValue())
-                    .FirstOrDefault(c => c.Suit != context.TrumpCard.Suit);
-
-                if (card == null)
-                {
-                    card = this.PlayerActionValidator.GetPossibleCardsToPlay(context, this.Cards).FirstOrDefault();
-                }
+                var possibleCards = this.PlayerActionValidator.GetPossibleCardsToPlay(context, this.Cards);
+                var trumpSuit = context.TrumpCard.Suit;
+                // Use trump to take high card
+                if (enemyCardPriority == 2 && enemyCard.Suit != trumpSuit && possibleCards.Any(c => c.Suit == trumpSuit))
+                {
+                    // TODO: Refactor this to achieve HQC
+                    var trump =
+                       possibleCards.Where(c => c.Suit == context.TrumpCard.Suit)
+                            .OrderBy(this.GetCardPriority)
+                            .FirstOrDefault();
+                    return this.PlayCard(trump);
+                }
+
+                if (possibleCards.Any(c => c.Suit == enemyCard.Suit && c.GetValue() > enemyCard.GetValue()))
+                {
+                    // TODO: Refactor this to achieve HQC
+                    var higherCard =
+                        possibleCards.Where(c => c.Suit == enemyCard.Suit).OrderBy(c => c.GetValue()).LastOrDefault();
+
+                    return this.PlayCard(higherCard);
+                }
+
+                Card card;
+                card = possibleCards.Where(c => c.Suit != trumpSuit).OrderBy(c => c.GetValue()).FirstOrDefault();
+                if (context.State.ShouldObserveRules)
+                {
+                    card = this.ChooseCardToPlay(this.allCards, context, possibleCards);
+                }
+
+                //var card = this.PlayerActionValidator
+                //    .GetPossibleCardsToPlay(context, this.Cards)
+                //    .OrderBy(c => c.GetValue())
+                //    .FirstOrDefault(c => c.Suit != context.TrumpCard.Suit);
+
+                //if (card == null)
+                //{
+                //    card = this.PlayerActionValidator.GetPossibleCardsToPlay(context, this.Cards).FirstOrDefault();
+                //}

                 return this.PlayCard(card);
             }
@@ -210,15 +238,8 @@
             }
             else if (currentGameState == GameStates.TwoCardsLeftRoundState)
             {
-                int priority = this.GetCardPriority(context.TrumpCard);
-                if (priority > 0)
-                {
-                    cardToPlay = this.Cards.Where(g => g.Suit != context.TrumpCard.Suit).OrderBy(x => x.GetValue()).First();
-                }
-                else
-                {
-                    //// TODO Not Implemented
-                }
+                cardToPlay =
+                    this.Cards.Where(c => c.Suit != context.TrumpCard.Suit).OrderBy(c => c.GetValue()).FirstOrDefault();
             }
             else if (currentGameState == GameStates.MoreThanTwoCardsLeftRoundState)
             {
@@ -588,10 +609,10 @@
                 int suit = (int)card.Suit;
                 availableSuits[suit]++;
             }
-
+
             for (int i = 0; i < suitsPriorities.Length; i++)
             {
-                if ((int)trumpSuit != i || availableSuits[i] == 0)
+                if ((int)trumpSuit == i || availableSuits[i] == 0)
                 {
                     continue;
                 }
@@ -604,13 +625,23 @@
             }

             // Select the cards from the best suit
-            var cardsFromBestSuit = stalkerCards.Where(card => card.Suit == (CardSuit)highestPrioritySuit).ToList();
+            var cardsFromBestSuit = stalkerCards.Where(card => card.Suit == (CardSuit)highestPrioritySuit).OrderBy(this.GetCardPriority).ToList();
+            var cardsFromTrump = stalkerCards.Where(card => card.Suit == trumpSuit).OrderBy(this.GetCardPriority).ToList();
+

             // Sort cards by its priority
-            var cardsToChooseFrom = cardsFromBestSuit.OrderBy(this.GetCardPriority);
+            var cardsToChooseFrom  = new List<Card>();
+            if (cardsFromBestSuit.Count != 0)
+            {
+                cardsToChooseFrom = cardsFromBestSuit;
+            }
+            else
+            {
+                cardsToChooseFrom = cardsFromTrump;
+            }

             // THIS NUMBER WILL AFFECT THE DECISION OF THE STALKER
-            if (priorityValue < 2)
+            if (priorityValue < 1)
             {
                 return cardsToChooseFrom.LastOrDefault();
             }


ScadaComm: show StayConnected TCP channel property

--- ScadaComm/ScadaComm/ScadaCommCommon/Channels/CommTcpClientView.cs
+++ ScadaComm/ScadaComm/ScadaCommCommon/Channels/CommTcpClientView.cs
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Mikhail Shiryaev
+ * Copyright 2020 Mikhail Shiryaev
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
  *
  * Author   : Mikhail Shiryaev
  * Created  : 2015
- * Modified : 2017
+ * Modified : 2020
  */

 using Scada.Comm.Channels.UI;
@@ -116,9 +116,9 @@
         {
             CommTcpClientLogic.Settings defSett = new CommTcpClientLogic.Settings();
             return BuildPropsInfo(commCnlParams,
-                new string[] { "Host", "TcpPort", "ReconnectAfter", "Behavior", "ConnMode" },
-                new object[] { defSett.Host, defSett.TcpPort, defSett.ReconnectAfter, defSett.Behavior,
-                    defSett.ConnMode });
+                new string[] { "Host", "TcpPort", "ReconnectAfter", "StayConnected", "Behavior", "ConnMode" },
+                new object[] { defSett.Host, defSett.TcpPort, defSett.ReconnectAfter, defSett.StayConnected,
+                    defSett.Behavior, defSett.ConnMode });
         }
     }
 }


Synchrophasor: Added process call in a unsign expresssion.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS07]$/openpdc/Synchrophasor/Current Version;C57721

--- Source/Libraries/Adapters/HistorianAdapters/LocalOutputAdapter.cs
+++ Source/Libraries/Adapters/HistorianAdapters/LocalOutputAdapter.cs
@@ -787,11 +787,12 @@
                 psi.UseShellExecute = false;
                 psi.Arguments = parameters;

-                Process shell = new Process();
-                shell.StartInfo = psi;
-                shell.Start();
-                shell.WaitForExit(5000);
-                shell.Close();
+                using (Process shell = new Process())
+                {
+                    shell.StartInfo = psi;
+                    shell.Start();
+                    shell.WaitForExit(5000);
+                }
             }
         }


Update Source/Libraries/openXDA.Nodes/Types/DataPusher/DataPusherNode.cs

Co-authored-by: Stephen C. Wills <6e690a6576e01cdb9a9715cfd3e6df766c93f1c7@gridprotectionalliance.org>

--- Source/Libraries/openXDA.Nodes/Types/DataPusher/DataPusherNode.cs
+++ Source/Libraries/openXDA.Nodes/Types/DataPusher/DataPusherNode.cs
@@ -1,5 +1,5 @@
 //******************************************************************************************************
-//  FilePrunerNode.cs - Gbtc
+//  DataPusherNode.cs - Gbtc
 //
 //  Copyright © 2021, Grid Protection Alliance.  All Rights Reserved.
 //


Repiared Enque to track tail. Works meow

--- StackingQues/StackandQuePalindrome/StackandQuePalindrome/queue.cs
+++ StackingQues/StackandQuePalindrome/StackandQuePalindrome/queue.cs
@@ -37,7 +37,7 @@
                 }
                 else
                 {
-                    return "Get Rekd (Not an Palindrome)";
+                    return "Get Rekd (Not an Palindrome)";
                 }
             }
             return "You win! (Is an Palindrome)";


Add integrationtests Finally<T> & TaskOf<T>()

--- tests/integration/setup.cake
+++ tests/integration/setup.cake
@@ -86,6 +86,55 @@
     Assert.False(data.Initialized);
 });

+TaskOf<ScriptContext>("Can-Access-Typed-Data-Task")
+    .Description("Very typed task")
+    .WithCriteria(static (context, data) => true)
+    .Does(static (context, data) => context.Information("Initialized: {0}.", data.Initialized))
+    .Does(static async (context, data) => await System.Threading.Tasks.Task.CompletedTask)
+    .DoesForEach(
+        static (data, context) => new [] { data.Initialized },
+        static (data, item, context) => context.Information("Initialized: {0}.", data.Initialized)
+    )
+    .DoesForEach(
+        new [] { true, false },
+        static (data, item, context) => context.Information("Initialized: {0}.", data.Initialized)
+    );
+
+
+Task("Can-Access-Typed-Data-Task-Of")
+    .Of<ScriptContext>()
+    .Description("Very typed task")
+    .WithCriteria(static (context, data) => true)
+    .Does(static (context, data) => context.Information("Initialized: {0}.", data.Initialized))
+    .Does(static async (context, data) => await System.Threading.Tasks.Task.CompletedTask)
+    .DoesForEach(
+        static (data, context) => new [] { data.Initialized },
+        static (data, item, context) => context.Information("Initialized: {0}.", data.Initialized)
+    )
+    .DoesForEach(
+        new [] { true, false },
+        static (data, item, context) => context.Information("Initialized: {0}.", data.Initialized)
+    );
+
+Task("Can-Access-Typed-Data-Finally")
+    .Does<ScriptContext>(data =>
+{
+})
+.Finally<ScriptContext>(
+    (context, data) => Assert.True(data.Initialized)
+);
+
+Task("Can-Access-Typed-Data-Finally-Async")
+    .Does<ScriptContext>(async data =>
+{
+    await System.Threading.Tasks.Task.Delay(0);
+}).Finally<ScriptContext>(
+    async (context, data) => {
+        Assert.True(data.Initialized);
+        await System.Threading.Tasks.Task.Delay(0);
+    }
+);
+
 //////////////////////////////////////////////////
 // TARGETS
 //////////////////////////////////////////////////
@@ -96,4 +145,8 @@
     .IsDependentOn("Can-Access-Typed-Data-With-Context")
     .IsDependentOn("Can-Access-Typed-Data-With-Context-Async")
     .IsDependentOn("Can-Access-Typed-Data-WithCriteria-True")
-    .IsDependentOn("Can-Access-Typed-Data-WithCriteria-False-Message");+    .IsDependentOn("Can-Access-Typed-Data-WithCriteria-False-Message")
+    .IsDependentOn("Can-Access-Typed-Data-Task")
+    .IsDependentOn("Can-Access-Typed-Data-Task-Of")
+    .IsDependentOn("Can-Access-Typed-Data-Finally")
+    .IsDependentOn("Can-Access-Typed-Data-Finally-Async");


improved yara hit display

improved yara hit display


ChurchManipulator: changed default color to blue

--- TribalWars/Maps/Manipulators/Implementations/Church/ChurchInfo.cs
+++ TribalWars/Maps/Manipulators/Implementations/Church/ChurchInfo.cs
@@ -51,7 +51,7 @@
         /// </summary>
         public static Color DefaultColor
         {
-            get { return Color.Yellow; }
+            get { return Color.Blue; }
         }
         #endregion


Fix module issues with !enablecamerawall

Instead of hiding the bomb by moving it out of view,  instead, turned
off ALL of the main camera culling mask flags, (after saving a copy of
course.)  As soon as bomb ends, or when !disablecamerawall in issued,
the culling mask is restored.

This does mean the screen will be mostly black except for where camera
views exist.

--- TwitchPlaysAssembly/Src/MessageResponders/BombMessageResponder.cs
+++ TwitchPlaysAssembly/Src/MessageResponders/BombMessageResponder.cs
@@ -21,6 +21,7 @@
 	public List<TwitchComponentHandle> ComponentHandles = new List<TwitchComponentHandle>();
 	private int _currentBomb = -1;
 	private Dictionary<int, string> _notesDictionary = new Dictionary<int, string>();
+	private int _cullingMask;

 #pragma warning disable 169
 	private readonly AlarmClock alarmClock;
@@ -88,6 +89,7 @@

 	private void OnEnable()
 	{
+		_cullingMask = Camera.main.cullingMask;
 		Instance = this;
 		BombActive = true;
 		EnableDisableInput();
@@ -209,7 +211,7 @@

 	private void OnDisable()
 	{
-		_hideBombs = false;
+		Camera.main.cullingMask = _cullingMask;
 		BombActive = false;
 		EnableDisableInput();
 		TwitchComponentHandle.ClaimedList.Clear();
@@ -775,14 +777,14 @@
 			case AccessLevel.Admin:
 				if (text.Equals("enablecamerawall", StringComparison.InvariantCultureIgnoreCase) || text.Equals("enablemodulewall", StringComparison.InvariantCultureIgnoreCase))
 				{
+					Camera.main.cullingMask = 0;
 					moduleCameras.EnableWallOfCameras();
-					StartCoroutine(HideBombs());
 				}

 				if (text.Equals("disablecamerawall", StringComparison.InvariantCultureIgnoreCase) || text.Equals("disablemodulewall", StringComparison.InvariantCultureIgnoreCase))
 				{
+					Camera.main.cullingMask = _cullingMask;
 					moduleCameras.DisableWallOfCameras();
-					_hideBombs = false;
 				}
 				goto case AccessLevel.Mod;
 			case AccessLevel.Mod:
@@ -887,34 +889,6 @@
 		if (TwitchPlaySettings.data.BombCustomMessages.ContainsKey(text.ToLowerInvariant()))
 		{
 			IRCConnection.Instance.SendMessage(TwitchPlaySettings.data.BombCustomMessages[text.ToLowerInvariant()]);
-		}
-	}
-
-	private bool _hideBombs = false;
-	private IEnumerator HideBombs()
-	{
-		if (_hideBombs) yield break;
-		_hideBombs = true;
-		Dictionary<Bomb, Vector3> originalBombPositions = new Dictionary<Bomb, Vector3>();
-		foreach (BombCommander commander in BombCommanders)
-		{
-			//Store the original positions of the bombs.
-			originalBombPositions[commander.Bomb] = commander.Bomb.transform.localPosition;
-		}
-		while (_hideBombs)
-		{
-			foreach (BombCommander commander in BombCommanders)
-			{
-				//Required every frame for every bomb with floating holdables attached.
-				commander.Bomb.transform.localPosition = new Vector3(0, -1.25f, 0);
-			}
-			yield return null;
-		}
-		foreach (BombCommander commander in BombCommanders)
-		{
-			//Required for bombs with no floating holdables attached.
-			if (!originalBombPositions.TryGetValue(commander.Bomb, out Vector3 value)) continue;
-			commander.Bomb.transform.localPosition = value;
 		}
 	}


optimisations

optimisations

--- TwitchPlaysAssembly/Src/MessageResponders/BombMessageResponder.cs
+++ TwitchPlaysAssembly/Src/MessageResponders/BombMessageResponder.cs
@@ -479,7 +479,7 @@
 			if (text.Equals("unclaimed", StringComparison.InvariantCultureIgnoreCase))
 			{
 				IEnumerable<string> unclaimed = ComponentHandles.Where(handle => !handle.Claimed && !handle.Solved && GameRoom.Instance.IsCurrentBomb(handle.bombID)).Shuffle().Take(3)
-					.Select(handle => string.Format("{0} ({1})", handle.HeaderText, handle.Code)).ToList();
+					.Select(handle => string.Format($"{handle.HeaderText} ({handle.Code})")).ToList();

 				if (unclaimed.Any()) IRCConnection.Instance.SendMessage("Unclaimed Modules: {0}", unclaimed.Join(", "));
 				else IRCConnection.Instance.SendMessage("There are no more unclaimed modules.");
@@ -512,7 +512,7 @@
 						)).ToList();

 					if (modules.Any()) IRCConnection.Instance.SendMessage("Modules: {0}", modules.Join(", "));
-					else IRCConnection.Instance.SendMessage("Couldn't find any modules containing \"{0}\".", trimmed);
+					else IRCConnection.Instance.SendMessage($"Couldn't find any modules containing \"{trimmed}\".");
 				}

 				return;
@@ -525,15 +525,15 @@
 				{
 					string trimmed = query.Trim();
 					IEnumerable<TwitchComponentHandle> modules = ComponentHandles.Where(handle => handle.HeaderText.ContainsIgnoreCase(trimmed) && GameRoom.Instance.IsCurrentBomb(handle.bombID))
-						.OrderByDescending(handle => handle.HeaderText.EqualsIgnoreCase(trimmed)).ToList();
+						.OrderByDescending(handle => handle.HeaderText.EqualsIgnoreCase(trimmed)).ThenBy(handle => handle.Solved).ToList();
 					IEnumerable<string> playerModules = modules.Where(handle => handle.PlayerName != null).OrderByDescending(handle => handle.HeaderText.EqualsIgnoreCase(trimmed))
-						.Select(handle => string.Format("{0} ({1}) - {2}", handle.HeaderText, handle.Code, "Claimed by " + handle.PlayerName)).ToList();
+						.Select(handle => string.Format($"{handle.HeaderText} ({handle.Code}) - Claimed by {handle.PlayerName}")).ToList();
 					if (modules.Any())
 					{
 						if (playerModules.Any()) IRCConnection.Instance.SendMessage("Modules: {0}", playerModules.Join(", "));
 						else IRCConnection.Instance.SendMessage("None of the specified modules are claimed/have been solved.");
 					}
-					else IRCConnection.Instance.SendMessage("Could not find any modules containing \"{0}\".", trimmed);
+					else IRCConnection.Instance.SendMessage($"Could not find any modules containing \"{trimmed}\".");
 				}
 			}

@@ -547,17 +547,17 @@
 					IEnumerable<TwitchComponentHandle> modules = commanders.SelectMany(x => x.SolvedModules.Where(y => y.Key.ContainsIgnoreCase(trimmed)))
 						.OrderByDescending(x => x.Key.EqualsIgnoreCase(trimmed)).SelectMany(x => x.Value).ToList();
 					IEnumerable<string> playerModules = modules.Where(handle => handle.PlayerName != null)
-						.Select(handle => string.Format("{0} ({1}) - {2}", handle.HeaderText, handle.Code, "Claimed by " + handle.PlayerName)).ToList();
+						.Select(handle => string.Format($"{handle.HeaderText} ({handle.Code}) - Claimed by {handle.PlayerName}", handle.HeaderText, handle.Code, "Claimed by " + handle.PlayerName)).ToList();
 					if (commanders.Any())
 					{
 						if (playerModules.Any()) IRCConnection.Instance.SendMessage("Modules: {0}", playerModules.Join(", "));
 						else IRCConnection.Instance.SendMessage("None of the specified modules have been solved.");
 					}
-					else IRCConnection.Instance.SendMessage("Could not find any modules containing \"{0}\".", trimmed);
-				}
-			}
-
-			if (text.RegexMatch(out match, "^(claim(?:any|van|mod)(?:view)?|viewclaim(?:any|van|mod))"))
+					else IRCConnection.Instance.SendMessage($"Could not find any modules containing \"{trimmed}\".");
+				}
+			}
+
+			if (text.RegexMatch(out match, "^(claim(?:any|van|dmod)(?:view)?|viewclaim(?:any|van|mod))"))
 			{
 				var vanilla = match.Groups[1].Value.Contains("van");
 				var modded = match.Groups[1].Value.Contains("mod");
@@ -566,8 +566,7 @@

 				var unclaimed = ComponentHandles
 					.Where(handle => (vanilla ? !handle.IsMod : modded ? handle.IsMod : true) && !handle.Claimed && !handle.Solved && !avoid.Contains(handle.HeaderText) && GameRoom.Instance.IsCurrentBomb(handle.bombID))
-					.Shuffle()
-					.FirstOrDefault();
+					.Shuffle().FirstOrDefault();

 				if (unclaimed != null)
 					text = unclaimed.Code + (view ? " claimview" : " claim");
@@ -590,8 +589,7 @@
 				{
 					string trimmed = query.Trim();
 					IEnumerable<string> modules = ComponentHandles.Where(handle => handle.HeaderText.ContainsIgnoreCase(trimmed) && GameRoom.Instance.IsCurrentBomb(handle.bombID) && !handle.Solved && !handle.Claimed)
-						.OrderByDescending(handle => handle.HeaderText.EqualsIgnoreCase(trimmed)).ThenBy(handle => handle.Solved).ThenBy(handle => handle.PlayerName != null)
-						.Select(handle => $"{handle.Code}").ToList();
+						.OrderByDescending(handle => handle.HeaderText.EqualsIgnoreCase(trimmed)).Select(handle => $"{handle.Code}").ToList();
 					if (modules.Any())
 					{
 						if (!validAll) modules = modules.Take(1);
@@ -602,7 +600,7 @@
 							handle.AddToClaimQueue(userNickName, validView);
 						}
 					}
-					else IRCConnection.Instance.SendMessage("Couldn't find any modules containing \"{0}\".", trimmed);
+					else IRCConnection.Instance.SendMessage($"Couldn't find any modules containing \"{trimmed}\".");
 				}
 				return;
 			}
@@ -684,7 +682,7 @@
 					{
 						TwitchComponentHandle handle = ComponentHandles.FirstOrDefault(x => x.Code.Equals(claim));
 						if (handle == null || !GameRoom.Instance.IsCurrentBomb(handle.bombID)) continue;
-						handle.OnMessageReceived(userNickName, userColorCode, string.Format("{0} unclaim", claim));
+						handle.OnMessageReceived(userNickName, userColorCode, string.Format($"{claim} unclaim"));
 					}
 					return;
 				}