started working on proper map move

started working on proper map move

--- tower-of-darkness-xna/tower-of-darkness-xna/tower-of-darkness-xna/Game1.cs
+++ tower-of-darkness-xna/tower-of-darkness-xna/tower-of-darkness-xna/Game1.cs
@@ -27,6 +27,7 @@
         private bool npcText;
         private int xMove = 0; // Zoning
         private int xMove1 = 0; // Scrolling
+        private int yMove = 0;
         private bool isFirstZone;

         private GameState gameState = GameState.Menu;
@@ -134,7 +135,20 @@
             //light = Content.Load<Texture2D>("light2");
             lanternTexture = Content.Load<Texture2D>("lantern");
             character = new Character(characterSpriteSheet, 3, 1, 32, 64, new Vector2(200, 320), light, ambient, ambientColor, lanternTexture, graphics);
-            loadLevel1Content();
+
+            switch (mapName)
+            {
+                case "map1":
+                    loadLevel1Content();
+                    break;
+                case "tower1":
+                    loadTower1Content();
+                    break;
+                default:
+                    loadLevel1Content();
+                    break;
+            }
+
         }

         private void loadCollisionRectangles() {
@@ -187,15 +201,21 @@

         }

-        private void loadLevel1Content() {
+        private void loadTower1Content() {
             nodeList = new List<Scene2DNode>();
-
+            Console.WriteLine("GOING INTO TOWER");
             //map = Content.Load<Map>("test2");

             //Console.WriteLine("Map is: " + map.Height + " tiles high");
             //Console.WriteLine("Map is: " + map.Width + " tiles wide");
             Scene2DNode myKey = new Scene2DNode(keyTexture, new Vector2(475, 320), "key");
             nodeList.Add(myKey);
+
+            xMove = 0;
+            mapView = new Rectangle(0, 960, 784, 480);
+           // mapView = new Rectangle(0, -980, 784, 480);
+            loadCollisionRectangles();
+            loadTransitionRectangles();

             //Test to get every tile data.
             /*
@@ -209,8 +229,34 @@
             */

-            int[] toBeRemoved;//saves index of node(s) to be removed.
-            toBeRemoved = new int[nodeList.Count];
+            //int[] toBeRemoved;//saves index of node(s) to be removed.
+           // toBeRemoved = new int[nodeList.Count];
+        }
+
+        private void loadLevel1Content() {
+            nodeList = new List<Scene2DNode>();
+
+            //map = Content.Load<Map>("test2");
+
+            //Console.WriteLine("Map is: " + map.Height + " tiles high");
+            //Console.WriteLine("Map is: " + map.Width + " tiles wide");
+            Scene2DNode myKey = new Scene2DNode(keyTexture, new Vector2(475, 320), "key");
+            nodeList.Add(myKey);
+            mapView = new Rectangle(0, 0, 784, 480);
+            //Test to get every tile data.
+            /*
+            for (int x = 0; x < map.Width; x++)
+            {
+                for (int y = 0; y < map.Height; y++)
+                {
+                        //Console.WriteLine(x + "---" + y + ": " + map.TileLayers[0].Tiles[x][y].SourceID);
+                }
+            }
+            */
+
+
+           // int[] toBeRemoved;//saves index of node(s) to be removed.
+           // toBeRemoved = new int[nodeList.Count];
         }

         /// <summary>
@@ -255,18 +301,22 @@

             if (character.objectPosition.X >= graphics.GraphicsDevice.Viewport.Bounds.Right) {
                 xMove += 784;
-
-                mapView = new Rectangle(xMove, 0, 784, 480);
+                if (xMove == 2352)
+                    yMove += 960;
+
+                mapView = new Rectangle(xMove, yMove, 784, 480);
                 character.objectPosition.X = graphics.GraphicsDevice.Viewport.Bounds.Left;
                 foreach (Scene2DNode s2dn in nodeList) {
                     s2dn.worldPosition.X += xMove;
                 } foreach (NPC npc in npcs) {
                     npc.objectPosition.X += xMove;
                 } for(int i = 0; i < cRectangles.Count; i++){
-                    cRectangles[i] = new Rectangle(cRectangles[i].X - xMove, cRectangles[i].Y, cRectangles[i].Width, cRectangles[i].Height);
+                    cRectangles[i] = new Rectangle(cRectangles[i].X - xMove, cRectangles[i].Y + yMove, cRectangles[i].Width, cRectangles[i].Height);
                 } for (int i = 0; i < tRectangles.Count; i++) {
-                    tRectangles[i] = new Rectangle(tRectangles[i].X - xMove, tRectangles[i].Y, tRectangles[i].Width, tRectangles[i].Height);
-                }
+                    tRectangles[i] = new Rectangle(tRectangles[i].X - xMove, tRectangles[i].Y + yMove, tRectangles[i].Width, tRectangles[i].Height);
+                }
+
+
             }

             if (xMove > 0)
@@ -330,7 +380,7 @@
                 if (tRectangles[i].Intersects(playerRect)) {
                     Console.WriteLine(map.ObjectLayers["Transition"].MapObjects[i].Name);
                     loadPlayingContent(map.ObjectLayers["Transition"].MapObjects[i].Name);
-                    mapView = new Rectangle(0, 0, 784, 480);
+                    //mapView = new Rectangle(0, 0, 784, 480);
                     //foreach(map.ObjectLayers["Transition"].MapObjects[i].Properties.Values){

                     //}


handle nulls

handle nulls

--- platform/ThreadMailbox.cs
+++ platform/ThreadMailbox.cs
@@ -17,11 +17,21 @@

         public static void PostToMainThread(Action a)
         {
+            if (a == null) {
+                DebugUtil.Log("ThreadMailbox.PostToMainThread: tried to post null action!");
+                return;
+            }
+
             PostToThread(MainThreadName, a);
         }
         public static void PostToThread(string threadName, Action a)
         {
-            lock(Directory) {
+            if (a == null) {
+                DebugUtil.Log("ThreadMailbox.PostToMainThread: tried to post null action!");
+                return;
+            }
+
+            lock (Directory) {
                 Mailbox box = _locked_get_mailbox(threadName);
                 box.PendingActions.Add(a);
             }


Fixing the WNDPROC calling convention to be Winapi

--- sources/Interop/Windows/um/winuser/Desktop/WNDPROC.cs
+++ sources/Interop/Windows/um/winuser/Desktop/WNDPROC.cs
@@ -11,7 +11,7 @@
 namespace TerraFX.Interop.Desktop
 {
     [SuppressUnmanagedCodeSecurity]
-    [UnmanagedFunctionPointer(CallingConvention.ThisCall, BestFitMapping = false, CharSet = CharSet.Unicode, SetLastError = false, ThrowOnUnmappableChar = false)]
+    [UnmanagedFunctionPointer(CallingConvention.Winapi, BestFitMapping = false, CharSet = CharSet.Unicode, SetLastError = false, ThrowOnUnmappableChar = false)]
     [return: NativeTypeName("LRESULT")]
     public /* static */ unsafe delegate nint WNDPROC(
         [In, NativeTypeName("HWND")] IntPtr hWnd,


oops.

oops.

--- samples/PortMidiPlayer.cs
+++ samples/PortMidiPlayer.cs
@@ -14,6 +14,7 @@
 		public PortMidiPlayer (MidiOutput output, SmfMusic music)
 			: base (music)
 		{
+			this.output = output;
 			MessageReceived += delegate (SmfEvent ev) { SendMidiMessage (ev); };
 		}


Return false from IsGrantedAsync if not found given user.

--- src/Abp.Zero/Authorization/Users/AbpUserManager.cs
+++ src/Abp.Zero/Authorization/Users/AbpUserManager.cs
@@ -163,6 +163,12 @@
                 }
             }

+            //User not found
+            if (await FindByIdAsync(userId) == null)
+            {
+                return false;
+            }
+
             //Get cached user permissions
             var cacheItem = await GetUserPermissionCacheItemAsync(userId);


finished the protocol state actor

finished the protocol state actor

--- src/Akka.Remote/Transport/AkkaProtocolTransport.cs
+++ src/Akka.Remote/Transport/AkkaProtocolTransport.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Threading.Tasks;
 using Akka.Actor;
 using Akka.Tools;
@@ -431,15 +432,185 @@
                                     });
                             });

-                    });
+                    })
+                    .With<HeartbeatTimer>(h => @event.StateData.Match()
+                        .With<OutboundUnderlyingAssociated>(ou => nextState = HandleTimers(ou.WrappedHandle)));

                 return nextState;
             });
+
+            When(AssociationState.Open, @event =>
+            {
+                State<AssociationState, ProtocolStateData> nextState = null;
+                @event.FsmEvent.Match()
+                    .With<Disassociated>(d => nextState = Stop(new Failure(d.Info)))
+                    .With<InboundPayload>(ip =>
+                    {
+                        var pdu = DecodePdu(ip.Payload);
+                        pdu.Match()
+                            .With<Disassociate>(d => nextState = Stop(new Failure(d.Reason)))
+                            .With<Heartbeat>(h =>
+                            {
+                                _failureDetector.HeartBeat();
+                                nextState = Stay();
+                            })
+                            .With<Payload>(p => @event.StateData.Match()
+                                .With<AssociatedWaitHandler>(awh =>
+                                {
+                                    var nQueue = new Queue<ByteString>(awh.Queue);
+                                    nQueue.Enqueue(p.Bytes);
+                                    nextState =
+                                        Stay()
+                                            .Using(new AssociatedWaitHandler(awh.HandlerListener, awh.WrappedHandle,
+                                                nQueue));
+                                })
+                                .With<ListenerReady>(lr =>
+                                {
+                                    lr.Listener.Notify(new InboundPayload(p.Bytes));
+                                    nextState = Stay();
+                                })
+                                .Default(msg =>
+                                {
+                                    throw new AkkaProtocolException(
+                                        string.Format("Unhandled message in state Open(InboundPayload) with type {0}",
+                                            msg));
+                                }))
+                            .Default(d => nextState = Stay());
+                    })
+                    .With<HeartbeatTimer>(hrt => @event.StateData.Match()
+                        .With<AssociatedWaitHandler>(awh => nextState = HandleTimers(awh.WrappedHandle))
+                        .With<ListenerReady>(lr => nextState = HandleTimers(lr.WrappedHandle)))
+                    .With<DisassociateUnderlying>(du =>
+                    {
+                        AssociationHandle handle = null;
+                        @event.StateData.Match()
+                            .With<ListenerReady>(lr => handle = lr.WrappedHandle)
+                            .With<AssociatedWaitHandler>(awh => handle = awh.WrappedHandle)
+                            .Default(
+                                msg =>
+                                {
+                                    throw new AkkaProtocolException(
+                                        string.Format(
+                                            "unhandled message in state Open(DisassociateUnderlying) with type {0}", msg));
+
+                                });
+                        SendDisassociate(handle, du.Info);
+                        nextState = Stop();
+                    })
+                    .With<HandleListenerRegistered>(hlr => @event.StateData.Match()
+                        .With<AssociatedWaitHandler>(awh =>
+                        {
+                            foreach (var msg in awh.Queue)
+                                hlr.Listener.Notify(new InboundPayload(msg));
+                            nextState = Stay().Using(new ListenerReady(hlr.Listener, awh.WrappedHandle));
+                        }));
+
+                return nextState;
+            });
+
+            OnTermination(@event => @event.TerminatedState.Match()
+                .With<OutboundUnassociated>(ou => ou.StatusCompletionSource.TrySetException(@event.Reason is Failure
+                    ? new AkkaProtocolException(@event.Reason.ToString())
+                    : new AkkaProtocolException("Transport disassociated before handshake finished")))
+                .With<OutboundUnderlyingAssociated>(oua =>
+                {
+                    Exception associationFailure = null;
+                    @event.Reason.Match()
+                        .With<Failure>(f => f.Cause.Match()
+                            .With<TimeoutReason>(
+                                timeout =>
+                                    associationFailure =
+                                        new AkkaProtocolException("No reponse from remote. Handshake timed out."))
+                            .With<ForbiddenUidReason>(
+                                forbidden =>
+                                    associationFailure =
+                                        new AkkaProtocolException(
+                                            "The remote system has a UID that has been quarantined. Association aborted."))
+                            .With<DisassociateInfo>(info => associationFailure = DisassociateException(info))
+                            .Default(
+                                msg =>
+                                    associationFailure =
+                                        new AkkaProtocolException(
+                                            "Transport disassociated before handshake finished")));
+
+                    oua.StatusCompletionSource.TrySetException(associationFailure);
+                    oua.WrappedHandle.Disassociate();
+                })
+                .With<AssociatedWaitHandler>(awh =>
+                {
+                    Disassociated disassociateNotification = null;
+                    if (@event.Reason is Failure && ((Failure) @event.Reason).Cause is DisassociateInfo)
+                    {
+                        disassociateNotification =
+                            new Disassociated(((Failure) @event.Reason).Cause.AsInstanceOf<DisassociateInfo>());
+                    }
+                    else
+                    {
+                        disassociateNotification = new Disassociated(DisassociateInfo.Unknown);
+                    }
+                    awh.HandlerListener.ContinueWith(result => result.Result.Notify(disassociateNotification),
+                        TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.AttachedToParent);
+                })
+                .With<ListenerReady>(lr =>
+                {
+                    Disassociated disassociateNotification = null;
+                    if (@event.Reason is Failure && ((Failure) @event.Reason).Cause is DisassociateInfo)
+                    {
+                        disassociateNotification =
+                            new Disassociated(((Failure) @event.Reason).Cause.AsInstanceOf<DisassociateInfo>());
+                    }
+                    else
+                    {
+                        disassociateNotification = new Disassociated(DisassociateInfo.Unknown);
+                    }
+                    lr.Listener.Notify(disassociateNotification);
+                    lr.WrappedHandle.Disassociate();
+                })
+                .With<InboundUnassociated>(iu => iu.WrappedHandle.Disassociate()));
+
         }

         #endregion

+        #region Actor methods
+
+        protected override void PostStop()
+        {
+            CancelTimer("heartbeat-timer");
+            base.PostStop(); //pass to OnTermination
+        }
+
+        #endregion
+
         #region Internal protocol messaging methods
+
+        private Exception DisassociateException(DisassociateInfo info)
+        {
+            switch (info)
+            {
+                case DisassociateInfo.Shutdown:
+                    return new AkkaProtocolException("The remote system refused the association because it is shutting down.");
+                case DisassociateInfo.Quarantined:
+                    return new AkkaProtocolException("The remote system has quarantined this system. No further associations to the remote systems are possible until this system is restarted.");
+                case DisassociateInfo.Unknown:
+                default:
+                    return new AkkaProtocolException("The remote system explicitly disassociated (reason unknown).");
+            }
+        }
+
+        private State<AssociationState, ProtocolStateData> HandleTimers(AssociationHandle wrappedHandle)
+        {
+            if (_failureDetector.IsAvailable)
+            {
+                SendHeartBeat(wrappedHandle);
+                return Stay();
+            }
+            else
+            {
+                SendDisassociate(wrappedHandle, DisassociateInfo.Unknown);
+                return Stop(new Failure(new TimeoutReason()));
+            }
+        }

         private void ListenForListenerRegistration(TaskCompletionSource<IHandleEventListener> readHandlerSource)
         {
@@ -512,6 +683,18 @@
             }
         }

+        private void SendHeartBeat(AssociationHandle wrappedHandle)
+        {
+            try
+            {
+                wrappedHandle.Write(_codec.ConstructHeartbeat());
+            }
+            catch (Exception ex)
+            {
+                throw new AkkaProtocolException("Error writing HEARTBEAT to transport", ex);
+            }
+        }
+
         #endregion

         #region Static methods


[*] Correção no tratamento do retorno no provedor ISSe.

--- src/ACBr.Net.NFSe/Providers/ISSe/ISSeServiceClient.cs
+++ src/ACBr.Net.NFSe/Providers/ISSe/ISSeServiceClient.cs
@@ -166,7 +166,7 @@
         {
             var element = xmlDocument.ElementAnyNs("Fault");
             if (element == null)
-                return xmlDocument.ElementAnyNs("return")?.Value;
+                return xmlDocument.Root.ElementAnyNs("return")?.Value;

             var exMessage = $"{element.ElementAnyNs("faultcode").GetValue<string>()} - {element.ElementAnyNs("faultstring").GetValue<string>()}";
             throw new ACBrDFeCommunicationException(exMessage);


Fixes crash when searching for users by email address

--- AllReadyApp/Web-App/AllReady/Areas/Admin/Controllers/SiteAdminController.cs
+++ AllReadyApp/Web-App/AllReady/Areas/Admin/Controllers/SiteAdminController.cs
@@ -36,6 +36,13 @@
         {
             // Get the user and the UserType claim
             var user = await _userManager.FindByEmailAsync(model.Email);
+            if (user == null)
+            {
+                ModelState.AddModelError("Email", "No users matching this email address");
+                return View();
+            }
+
+            //TODO: Simplify this logic
             var claims = await _userManager.GetClaimsAsync(user);
             if (claims.Count <= 0)
             {


update in code

update in code

--- Applications/Appleseed.Base.Alerts.Console/Appleseed.Base.Alerts/Program.cs
+++ Applications/Appleseed.Base.Alerts.Console/Appleseed.Base.Alerts/Program.cs
@@ -76,7 +76,7 @@
         static string MailSubject = System.Configuration.ConfigurationManager.AppSettings["MailSubject"];
         static string MailHeaderText = System.Configuration.ConfigurationManager.AppSettings["MailHeaderText"];
         static string SiteSearchLink = System.Configuration.ConfigurationManager.AppSettings["SiteSearchLink"];
-        static string TestLinkText = System.Configuration.ConfigurationManager.AppSettings["TestLinkText"];
+        static string TestLinkText = System.Configuration.ConfigurationManager.AppSettings["SearchLinkText"];

         static IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString);


add error standard

add error standard

--- Applications/Appleseed.Base.Alerts.Console/Appleseed.Base.Alerts/Program.cs
+++ Applications/Appleseed.Base.Alerts.Console/Appleseed.Base.Alerts/Program.cs
@@ -96,7 +96,7 @@
                         catch (Exception ex)
                         {
                             // log exception
-                            Console.WriteLine("An error occured sending an email for " + ua.email);
+                            Console.WriteLine("Error : An error occured sending an email for " + ua.email);
                             Console.WriteLine("\nReason : " + ex.Message);
                             error = true;
                         }


Serialize Sprites

Serialize Sprites

Allow Sprites to be serialized.

--- Assets/Plugins/whydoidoit.com/Serialization/UnitySerializationExtensions.cs
+++ Assets/Plugins/whydoidoit.com/Serialization/UnitySerializationExtensions.cs
@@ -463,6 +463,7 @@
 [Serializer(typeof(TextAsset))]
 [SubTypeSerializer(typeof(Mesh))]
 [Serializer(typeof(AnimationClip))]
+[Serializer(typeof(Sprite))]
 public class SerializeAssetReference : SerializerExtensionBase<object> {
     public static SerializeAssetReference instance = new SerializeAssetReference();


unit tests updated for billing descriptor change on request models

--- Checkout.ApiClient.Tests/TestHelper.cs
+++ Checkout.ApiClient.Tests/TestHelper.cs
@@ -176,6 +176,7 @@
                  CustomerIp = "82.23.168.254",
                  Description = RandomData.String,
                  Value = RandomData.GetNumber(50, 500).ToString(),
+                 Descriptor = new BillingDescriptor { Name = "Amigo ltd.", City = "London" },
                  Products = GetProducts(),
                  ShippingDetails = GetAddress(),
                  Metadata = new Dictionary<string, string>() { { "extraInformation", RandomData.CompanyName } },
@@ -198,7 +199,7 @@
                     CustomerId = customerId,
                     Email = customerEmail,
                     AutoCapture = "N",
-                    AutoCapTime = 10,
+                    AutoCapTime = 0,
                     Currency = "Usd",
                     TrackId = "TRK12345",
                     TransactionIndicator="1",
@@ -206,6 +207,7 @@
                     Description = RandomData.String,
                     Value = RandomData.GetNumber(50, 500).ToString(),
                     Card = GetCardCreateModel(),
+                    Descriptor =new BillingDescriptor { Name = "Amigo ltd.", City = "London" },
                     Products = GetProducts(),
                     ShippingDetails = GetAddress(),
                     Metadata = new Dictionary<string, string>() { { "extraInformation", RandomData.CompanyName } },
@@ -270,7 +272,8 @@
                     Value = RandomData.GetNumber(50, 500).ToString(),
                     Products = GetProducts(),
                     ShippingDetails = GetAddress(),
-                    Metadata = new Dictionary<string, string>() { { "extraInformation", RandomData.CompanyName } }
+                    Metadata = new Dictionary<string, string>() { { "extraInformation", RandomData.CompanyName } },
+                    Descriptor = new BillingDescriptor { Name = "Amigo ltd.", City = "London" }
                 };
         }

@@ -285,7 +288,8 @@
                 AutoCapTime = 10,
                 Currency = "Usd",
                 Description = RandomData.String,
-                Value = RandomData.GetNumber(50, 500).ToString()
+                Value = RandomData.GetNumber(50, 500).ToString(),
+                Descriptor = new BillingDescriptor { Name = "Amigo ltd.", City = "London" }
             };
         }


Implemented an array of writeable readonly-fields to replace the check in SetFileProperties

--- Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectFiles.cs
+++ Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectFiles.cs
@@ -22,6 +22,8 @@
 {
     internal class ObjectFiles : ObjectHandlerBase
     {
+        private readonly string[] WriteableReadOnlyFields = new string[] { "publishingpagelayout", "contenttypeid" };
+
         public override string Name
         {
             get { return "Files"; }
@@ -192,17 +194,14 @@
                 {
                     var propertyName = kvp.Key;
                     var propertyValue = kvp.Value;
-
-                    var fieldValues = file.ListItemAllFields.FieldValues;
+
                     var targetField = parentList.Fields.GetByInternalNameOrTitle(propertyName);
                     targetField.EnsureProperties(f => f.TypeAsString, f => f.ReadOnlyField);

                     // Changed by PaoloPia because there are fields like PublishingPageLayout
                     // which are marked as read-only, but have to be overwritten while uploading
                     // a publishing page file and which in reality can still be written
-                    if (!targetField.ReadOnlyField ||
-                        propertyName.Equals("PublishingPageLayout", StringComparison.InvariantCultureIgnoreCase) ||
-                        propertyName.Equals("ContentTypeId", StringComparison.InvariantCultureIgnoreCase))
+                    if (!targetField.ReadOnlyField || WriteableReadOnlyFields.Contains(propertyName.ToLower()))
                     {
                         switch (propertyName.ToUpperInvariant())
                         {


BL-6124 Change whole book layout

BL-6124 Change whole book layout

* this 3rd commit does the actual change to the book

--- src/BloomExe/web/controllers/AddOrChangePageApi.cs
+++ src/BloomExe/web/controllers/AddOrChangePageApi.cs
@@ -60,10 +60,25 @@
 			if (templatePage != null)
 			{
 				var pageToChange = _pageSelection.CurrentSelection;
-				pageToChange.Book.UpdatePageToTemplateAndUpdateLineage(pageToChange, templatePage);
+				if (changeWholeBook)
+					ChangeSimilarPagesInEntireBook(pageToChange, templatePage);
+				else
+					pageToChange.Book.UpdatePageToTemplateAndUpdateLineage(pageToChange, templatePage);

 				_pageRefreshEvent.Raise(PageRefreshEvent.SaveBehavior.JustRedisplay);
 				request.PostSucceeded();
+			}
+		}
+
+		private static void ChangeSimilarPagesInEntireBook(IPage currentSelectedPage, IPage newTemplatePage)
+		{
+			var book = currentSelectedPage.Book;
+			var ancestorPageId = currentSelectedPage.IdOfFirstAncestor;
+			foreach (var page in book.GetPages())
+			{
+				if (page.IsXMatter || page.IdOfFirstAncestor != ancestorPageId)
+					continue;
+				book.UpdatePageToTemplateAndUpdateLineage(page, newTemplatePage, false);
 			}
 		}


proper message for incompatible method arguments

git-svn-id: c3b8989232654601f1acea7403f771adaaa44a81@694 2c1201b4-01cd-e047-a400-b836ae1fbc61

--- src/Boo.Lang.Compiler/Steps/ProcessMethodBodies.cs
+++ src/Boo.Lang.Compiler/Steps/ProcessMethodBodies.cs
@@ -2560,7 +2560,7 @@
 			ICallableType delegateType = type as ICallableType;
 			if (null != delegateType)
 			{
-				if (CheckParameters(node.Target, delegateType, node.Arguments))
+				if (CheckParameters(node.Target, delegateType, delegateType, node.Arguments))
 				{
 					IMethod invoke = ResolveMethod(delegateType, "Invoke");
 					node.Target = CreateMemberReference(node.Target, invoke);
@@ -3050,20 +3050,20 @@

 		bool CheckParameters(Node sourceNode, IMethod method, ExpressionCollection args)
 		{
-			return CheckParameters(sourceNode, method.CallableType, args);
-		}
-
-		bool CheckParameters(Node sourceNode, ICallableType method, ExpressionCollection args)
+			return CheckParameters(sourceNode, method, method.CallableType, args);
+		}
+
+		bool CheckParameters(Node sourceNode, IEntity sourceEntity, ICallableType method, ExpressionCollection args)
 		{
 			if (method.GetSignature().Parameters.Length != args.Count)
 			{
-				Error(CompilerErrorFactory.MethodArgumentCount(sourceNode, method.Name, args.Count));
+				Error(CompilerErrorFactory.MethodArgumentCount(sourceNode, sourceEntity.Name, args.Count));
 				return false;
 			}

 			if (!CheckParameterTypes(method, args))
 			{
-				Error(CompilerErrorFactory.MethodSignature(sourceNode, method.ToString(), GetSignature(args)));
+				Error(CompilerErrorFactory.MethodSignature(sourceNode, sourceEntity.ToString(), GetSignature(args)));
 			}
 			return true;
 		}


BOO-723

BOO-723

git-svn-id: fcce7d6ce0ac15bf24f68871b5145d46fc068279@2223 2c1201b4-01cd-e047-a400-b836ae1fbc61

--- src/Boo.Lang.Compiler/Steps/ProcessMethodBodies.cs
+++ src/Boo.Lang.Compiler/Steps/ProcessMethodBodies.cs
@@ -215,10 +215,7 @@

 		override public void OnModule(Module module)
 		{
-			if (WasVisited(module))
-			{
-				return;
-			}
+			if (WasVisited(module)) return;
 			MarkVisited(module);

 			EnterNamespace((INamespace)TypeSystemServices.GetEntity(module));
@@ -231,14 +228,25 @@

 		override public void OnInterfaceDefinition(InterfaceDefinition node)
 		{
-			if (WasVisited(node))
-			{
-				return;
-			}
+			if (WasVisited(node)) return;
 			MarkVisited(node);

-			InternalInterface tag = (InternalInterface)GetEntity(node);
-			EnterNamespace(tag);
+			VisitTypeDefinition(node);
+		}
+
+		private void VisitBaseTypes(TypeDefinition node)
+		{
+			foreach (TypeReference typeRef in node.BaseTypes)
+			{
+				EnsureRelatedNodeWasVisited(typeRef, typeRef.Entity);
+			}
+		}
+
+		private void VisitTypeDefinition(TypeDefinition node)
+		{
+			INamespace ns = (INamespace)GetEntity(node);
+			EnterNamespace(ns);
+			VisitBaseTypes(node);
 			Visit(node.Attributes);
 			Visit(node.Members);
 			LeaveNamespace();
@@ -246,18 +254,10 @@

 		override public void OnClassDefinition(ClassDefinition node)
 		{
-			if (WasVisited(node))
-			{
-				return;
-			}
+			if (WasVisited(node)) return;
 			MarkVisited(node);

-			InternalClass entity = (InternalClass)GetEntity(node);
-			EnterNamespace(entity);
-			Visit(node.Attributes);
-			Visit(node.Members);
-			LeaveNamespace();
-
+			VisitTypeDefinition(node);
 			ProcessFieldInitializers(node);
 		}

@@ -4823,57 +4823,78 @@
 		override protected void EnsureRelatedNodeWasVisited(Node sourceNode, IEntity entity)
 		{
 			IInternalEntity internalInfo = entity as IInternalEntity;
-			if (null != internalInfo)
-			{
-				Node node = internalInfo.Node;
-				switch (node.NodeType)
-				{
-					case NodeType.Property:
-					case NodeType.Field:
-					{
-						IMember memberEntity = (IMember)entity;
-						if (EntityType.Property == entity.EntityType
-							|| TypeSystemServices.IsUnknown(memberEntity.Type))
-						{
-							VisitMemberForTypeResolution(node);
-							AssertTypeIsKnown(sourceNode, memberEntity, memberEntity.Type);
-						}
-						break;
-					}
-
-					case NodeType.Method:
-					{
-						IMethod methodEntity = (IMethod)entity;
+			if (null == internalInfo)
+			{
+				ITypedEntity typedEntity = entity as ITypedEntity;
+				if (null == typedEntity) return;
+
+				internalInfo = typedEntity.Type as IInternalEntity;
+				if (null == internalInfo) return;
+			}
+
+			Node node = internalInfo.Node;
+			switch (node.NodeType)
+			{
+				case NodeType.Property:
+				case NodeType.Field:
+				{
+					IMember memberEntity = (IMember)entity;
+					if (EntityType.Property == entity.EntityType
+						|| TypeSystemServices.IsUnknown(memberEntity.Type))
+					{
+						VisitMemberForTypeResolution(node);
+						AssertTypeIsKnown(sourceNode, memberEntity, memberEntity.Type);
+					}
+					break;
+				}
+
+				case NodeType.Method:
+				{
+					IMethod methodEntity = (IMethod)entity;
+					if (TypeSystemServices.IsUnknown(methodEntity.ReturnType))
+					{
+						// try to preprocess the method to resolve its return type
+						Method method = (Method)node;
+						PreProcessMethod(method);
 						if (TypeSystemServices.IsUnknown(methodEntity.ReturnType))
 						{
-							// try to preprocess the method to resolve its return type
-							Method method = (Method)node;
-							PreProcessMethod(method);
-							if (TypeSystemServices.IsUnknown(methodEntity.ReturnType))
-							{
-								// still unknown?
-								VisitMemberForTypeResolution(node);
-								AssertTypeIsKnown(sourceNode, methodEntity, methodEntity.ReturnType);
-							}
+							// still unknown?
+							VisitMemberForTypeResolution(node);
+							AssertTypeIsKnown(sourceNode, methodEntity, methodEntity.ReturnType);
 						}
-						break;
-					}
-					case NodeType.ClassDefinition:
-					case NodeType.StructDefinition:
-					case NodeType.InterfaceDefinition:
-					{
-						if (WasVisited(node)) break;
-
-						//visit dependent attributes such as EnumeratorItemType
-						foreach(Attribute att in ((TypeDefinition)node).Attributes)
-						{
-							VisitMemberForTypeResolution(att);
-						}
-						break;
-					}
-				}
-			}
-		}
+					}
+					break;
+				}
+				case NodeType.ClassDefinition:
+				case NodeType.StructDefinition:
+				case NodeType.InterfaceDefinition:
+				{
+					if (WasVisited(node)) break;
+					VisitInParentNamespace(node);
+					//visit dependent attributes such as EnumeratorItemType
+					//foreach (Attribute att in ((TypeDefinition)node).Attributes)
+					{
+						//VisitMemberForTypeResolution(att);
+					}
+					break;
+				}
+			}
+		}
+
+		private void VisitInParentNamespace(Node node)
+		{
+			INamespace saved = NameResolutionService.CurrentNamespace;
+			try
+			{
+				NameResolutionService.EnterNamespace((INamespace)node.ParentNode.Entity);
+				Visit(node);
+			}
+			finally
+			{
+				NameResolutionService.Restore(saved);
+			}
+		}
+

 		private void AssertTypeIsKnown(Node sourceNode, IEntity sourceEntity, IType type)
 		{


Fix: Replace NaN values with 0s in various beatmap fields

Closes #104

--- osu!StreamCompanion/Code/Core/SqliteConnector.cs
+++ osu!StreamCompanion/Code/Core/SqliteConnector.cs
@@ -235,7 +235,6 @@

         public void EndMassStoring()
         {
-
             _transation.Commit();
             _transation.Dispose();
             _transation = null;
@@ -266,6 +265,13 @@
         }
         public void StoreBeatmap(Beatmap beatmap)
         {
+            if (float.IsNaN(beatmap.ApproachRate))
+                beatmap.ApproachRate = 0;
+            if (float.IsNaN(beatmap.CircleSize))
+                beatmap.CircleSize = 0;
+            if (float.IsNaN(beatmap.OverallDifficulty))
+                beatmap.OverallDifficulty = 0;
+
             string sql;
             if (beatmap.MapId != 0)
                 sql =
@@ -287,9 +293,6 @@
             FillBeatmapParameters(beatmap);
             _insertSql.ExecuteNonQuery();
         }
-
-
-

         private void FillBeatmapParameters(Beatmap beatmap)
         {


Fixed lifting type to a nullable type in a ConditionalExpression

--- src/Boo.Lang.Compiler/Steps/ProcessMethodBodies.cs
+++ src/Boo.Lang.Compiler/Steps/ProcessMethodBodies.cs
@@ -2522,6 +2522,16 @@
 		{
 			var trueType = GetExpressionType(node.TrueValue);
 			var falseType = GetExpressionType(node.FalseValue);
+            if (TypeSystemServices.IsNullable(trueType) && !TypeSystemServices.IsNullable(falseType))
+            {
+                node.FalseValue = CreateNullableInstantiation(node.FalseValue, trueType);
+                Visit(node.FalseValue);
+            }
+            if (!TypeSystemServices.IsNullable(trueType) && TypeSystemServices.IsNullable(falseType))
+            {
+                node.TrueValue = CreateNullableInstantiation(node.TrueValue, falseType);
+                Visit(node.TrueValue);
+            }
 			BindExpressionType(node, GetMostGenericType(trueType, falseType));
 		}


Use TestCase to better see test results

Use TestCase to better see test results

--- osu.Framework.Tests/Graphics/TextureAtlasTest.cs
+++ osu.Framework.Tests/Graphics/TextureAtlasTest.cs
@@ -11,6 +11,28 @@
     [TestFixture]
     public class TextureAtlasTest
     {
+        [TestCase(0, 0)]
+        [TestCase(1, 1)]
+        [TestCase(984, 20)]
+        [TestCase(985, 20)]
+        [TestCase(1020, 20)]
+        [TestCase(1024, 20)]
+        [TestCase(1025, 20)]
+        [TestCase(20, 984)]
+        [TestCase(20, 985)]
+        [TestCase(20, 1020)]
+        [TestCase(20, 1024)]
+        [TestCase(20, 1500)]
+        [TestCase(985, 985)]
+        [TestCase(1020, 985)]
+        [TestCase(1500, 985)]
+        [TestCase(1020, 1020)]
+        [TestCase(1500, 1500)]
+        public void TestAtlasAdd(int width, int height)
+        {
+            Assert.DoesNotThrow(() => testWithSize(width, height));
+        }
+
         private void testWithSize(int width, int height)
         {
             TextureAtlas atlas = new TextureAtlas(1024, 1024);
@@ -33,22 +55,5 @@
                     message: $"Returned texture is null, but should have fit: {width}x{height}");
             }
         }
-
-        [Test]
-        public void TestAtlasAdd()
-        {
-            var testSizes = new[]
-            {
-                (0, 0), (1, 1), (984, 20), (985, 20), (1020, 20), (1024, 20), (1025, 20),
-                (20, 984), (20, 985), (20, 1020), (20, 1024), (20, 1500),
-                (985, 985), (1020, 985), (1500, 985),
-                (1020, 1020), (1500, 1500)
-            };
-
-            foreach (var size in testSizes)
-            {
-                Assert.DoesNotThrow(() => testWithSize(size.Item1, size.Item2), $"Size {size.Item1}x{size.Item2} has thrown an exception");
-            }
-        }
     }
 }


IfTrue now passes the object under test to the action.

--- Clifton.Extensions/ExtensionMethods.cs
+++ Clifton.Extensions/ExtensionMethods.cs
@@ -42,11 +42,11 @@

 		// If the test returns true, execute the action.
 		// Works with objects, not value types.
-		public static void IfTrue<T>(this T obj, Func<T, bool> test, Action action)
+		public static void IfTrue<T>(this T obj, Func<T, bool> test, Action<T> action)
 		{
 			if (test(obj))
 			{
-				action();
+				action(obj);
 			}
 		}


added left chat playstream event on disconnect.

--- GameServerSource/Assets/Contexts/ChatServer/Mediators/ChatServerListener.cs
+++ GameServerSource/Assets/Contexts/ChatServer/Mediators/ChatServerListener.cs
@@ -1,7 +1,10 @@
 using System;
 using UnityEngine;
 using System.Collections;
+using System.Collections.Generic;
+using PlayFab.ServerModels;
 using strange.extensions.mediation.impl;
+using UnityEditor.VersionControl;
 using UnityEngine.Networking;
 using UnityEngine.Networking.NetworkSystem;

@@ -13,6 +16,7 @@
     [Inject] public JoinChannelSignal JoinChannelSignal { get; set; }
     [Inject] public UnityNetworkingData UnityNetworkingData { get; set; }
     [Inject] public ClientDisconnectedSignal ClientDisconnectedSignal { get; set; }
+    [Inject] public WritePlayerEventSignal WritePlayerEventSignal { get; set; }

     public override void OnRegister()
     {
@@ -102,6 +106,15 @@
             {
                 channel.Members.Remove(member);
                 Debug.Log("Member found in channel "  + channel.ChannelId + ", Removing User.");
+                WritePlayerEventSignal.Dispatch(new WriteServerPlayerEventRequest()
+                {
+                    EventName = "PlayerLeftChat",
+                    PlayFabId = member.MemberId,
+                    Body = new Dictionary<string, object>()
+                    {
+                        {"ChannelId", channel.ChannelId}
+                    }
+                });
             }

             if (channel.Members.Count == 0 && channel.IsInviteOnly)


Improve HelpText for validate verb option -o

--- src/Arkivverket.Arkade.CLI/Options/ValidateOptions.cs
+++ src/Arkivverket.Arkade.CLI/Options/ValidateOptions.cs
@@ -14,7 +14,7 @@
         public string Format { get; set; }

         [Option('o', "output-directory",
-            HelpText = "Directory to place Arkade output files. Only applicable if -i/--item is a directory.",
+            HelpText = "Directory to place Arkade output files. Required if -i/--item is a directory.",
             Required = false)]
         public string OutputDirectory { get; set; }


Tidy up cpde

Tidy up cpde

--- src/BuildIt.Media.UWP/BaseCortanaBackgroundTask.cs
+++ src/BuildIt.Media.UWP/BaseCortanaBackgroundTask.cs
@@ -75,62 +75,23 @@
             var xmlns = XNamespace.Get("http://www.w3.org/XML/1998/namespace");
             //get current user location
             var currentLocation = CultureInfo.CurrentCulture.Name.ToLower();
+            //get CommandSet which match currentLocation
             var commandSet = (from c in xml.Descendants()
                 where ns.GetName("CommandSet") == c.Name
                                   where c.Attribute(xmlns.GetName("lang")).Value == currentLocation
                                   select c);
+            //get all command in a list
             var commandList = (from c in commandSet.Descendants()
                 where ns.GetName("Command") == c.Name
                 select c).ToList();

-            //var commandTitle = (from c in xml.Declaration)
             await Task.Yield();
             var destinationContentTiles = commandList.Take(4).Select(command => new VoiceCommandContentTile
             {
-                ContentTileType = VoiceCommandContentTileType.TitleWith68x92IconAndText,
+                ContentTileType = VoiceCommandContentTileType.TitleOnly,
                 AppLaunchArgument = command.Attribute("Name").Value,
-                Title = command.Element(ns.GetName("Example")).Value,
-                Image = storageFile
+                Title = command.Element(ns.GetName("Example")).Value
             }).ToList();
-
-            //var play = new VoiceCommandContentTile
-            //{
-            //    ContentTileType = VoiceCommandContentTileType.TitleWith68x68IconAndText,
-            //    Title = "play",
-            //    Image = storageFile,
-            //    AppLaunchArgument = "buildit_play"
-            //};
-            //var pause = new VoiceCommandContentTile
-            //{
-            //    ContentTileType = VoiceCommandContentTileType.TitleWith68x68IconAndText,
-            //    Title = "pause",
-            //    Image = storageFile,
-            //    AppLaunchArgument = "buildit_pause"
-            //};
-            //var forward = new VoiceCommandContentTile
-            //{
-            //    ContentTileType = VoiceCommandContentTileType.TitleWith68x68IconAndText,
-            //    Title = "forward",
-            //    Image = storageFile,
-            //    AppLaunchArgument = "buildit_forward"
-            //};
-            //var back = new VoiceCommandContentTile
-            //{
-            //    ContentTileType = VoiceCommandContentTileType.TitleWith68x68IconAndText,
-            //    Title = "back",
-            //    Image = storageFile,
-            //    AppLaunchArgument = "buildit_back"
-            //};
-
-
-            //destinationContentTiles.Add(pause);
-            //destinationContentTiles.Add(play);
-            //destinationContentTiles.Add(forward);
-            //destinationContentTiles.Add(back);
-            //destinationContentTiles.Add(volumeup);
-            //destinationContentTiles.Add(volumedown);
-            //destinationContentTiles.Add(mute);
-            //destinationContentTiles.Add(unmute);

             await
                 voiceServiceConnection.ReportSuccessAsync(VoiceCommandResponse.CreateResponse(userMessage,


Don't throw if MIDI input cannot be initialized (eg. missing asound)

--- osu.Framework/Input/Handlers/MidiInputHandler.cs
+++ osu.Framework/Input/Handlers/MidiInputHandler.cs
@@ -1,6 +1,7 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

+using System;
 using System.Collections.Generic;
 using System.Linq;
 using Commons.Music.Midi;
@@ -22,6 +23,16 @@

         public override bool Initialize(GameHost host)
         {
+            // Try to initialize. This can throw on Linux if asound cannot be found.
+            try {
+                var unused = MidiAccessManager.Default.Inputs.ToList();
+            } catch (Exception e) {
+                Logger.Error(e, RuntimeInfo.OS == RuntimeInfo.Platform.Linux
+                    ? "Couldn't list input devices, is libasound2-dev installed?"
+                    : "Couldn't list input devices.");
+                return false;
+            }
+
             Enabled.BindValueChanged(e =>
             {
                 if (e.NewValue)


More tests.

More tests.

--- Gu.Roslyn.Asserts.Analyzers.Tests/GURA01NameShouldMatchParameter/CodeFix.cs
+++ Gu.Roslyn.Asserts.Analyzers.Tests/GURA01NameShouldMatchParameter/CodeFix.cs
@@ -97,7 +97,7 @@
         }

         [Test]
-        public static void WhenOneParam()
+        public static void RoslynAssertValidOneParam()
         {
             var before = @"
 namespace N
@@ -133,6 +133,102 @@
         {
             var code = ""class C { }"";
             RoslynAssert.Valid(Analyzer, code);
+        }
+    }
+}";
+            var expectedDiagnostic = ExpectedDiagnostic.WithMessage("Name of 'wrong' should be 'code'.");
+            RoslynAssert.CodeFix(Analyzer, Fix, expectedDiagnostic, new[] { Code.PlaceholderAnalyzer, before }, after);
+        }
+
+        [Test]
+        public static void RoslynAssertValidFieldAndLocal()
+        {
+            var before = @"
+namespace N
+{
+    using Gu.Roslyn.Asserts;
+    using NUnit.Framework;
+
+    public static class C
+    {
+        private static readonly PlaceholderAnalyzer Analyzer = new PlaceholderAnalyzer();
+
+        const string C1 = ""class C1 { }"";
+
+        [Test]
+        public static void M()
+        {
+            var wrong = ""class C { }"";
+            RoslynAssert.Valid(Analyzer, C1, ↓wrong);
+        }
+    }
+}";
+
+            var after = @"
+namespace N
+{
+    using Gu.Roslyn.Asserts;
+    using NUnit.Framework;
+
+    public static class C
+    {
+        private static readonly PlaceholderAnalyzer Analyzer = new PlaceholderAnalyzer();
+
+        const string C1 = ""class C1 { }"";
+
+        [Test]
+        public static void M()
+        {
+            var code = ""class C { }"";
+            RoslynAssert.Valid(Analyzer, C1, code);
+        }
+    }
+}";
+            var expectedDiagnostic = ExpectedDiagnostic.WithMessage("Name of 'wrong' should be 'code'.");
+            RoslynAssert.CodeFix(Analyzer, Fix, expectedDiagnostic, new[] { Code.PlaceholderAnalyzer, before }, after);
+        }
+
+        [Test]
+        public static void RoslynAssertValidLocalAndField()
+        {
+            var before = @"
+namespace N
+{
+    using Gu.Roslyn.Asserts;
+    using NUnit.Framework;
+
+    public static class C
+    {
+        private static readonly PlaceholderAnalyzer Analyzer = new PlaceholderAnalyzer();
+
+        const string C1 = ""class C1 { }"";
+
+        [Test]
+        public static void M()
+        {
+            var wrong = ""class C { }"";
+            RoslynAssert.Valid(Analyzer, ↓wrong, C1);
+        }
+    }
+}";
+
+            var after = @"
+namespace N
+{
+    using Gu.Roslyn.Asserts;
+    using NUnit.Framework;
+
+    public static class C
+    {
+        private static readonly PlaceholderAnalyzer Analyzer = new PlaceholderAnalyzer();
+
+        const string C1 = ""class C1 { }"";
+
+        [Test]
+        public static void M()
+        {
+            var code = ""class C { }"";
+            RoslynAssert.Valid(Analyzer, code, C1);
         }
     }
 }";


Add failing coverage for conversion not altering original beatmap

--- osu.Game/Tests/Beatmaps/BeatmapConversionTest.cs
+++ osu.Game/Tests/Beatmaps/BeatmapConversionTest.cs
@@ -14,6 +14,7 @@
 using osu.Game.Beatmaps;
 using osu.Game.Beatmaps.Formats;
 using osu.Game.IO;
+using osu.Game.IO.Serialization;
 using osu.Game.Rulesets;
 using osu.Game.Rulesets.Mods;
 using osu.Game.Rulesets.Objects;
@@ -109,6 +110,8 @@
         {
             var beatmap = GetBeatmap(name);

+            string beforeConversion = beatmap.Serialize();
+
             var converterResult = new Dictionary<HitObject, IEnumerable<HitObject>>();

             var working = new ConversionWorkingBeatmap(beatmap)
@@ -121,6 +124,10 @@
             };

             working.GetPlayableBeatmap(CreateRuleset().RulesetInfo, mods);
+
+            string afterConversion = beatmap.Serialize();
+
+            Assert.AreEqual(beforeConversion, afterConversion, "Conversion altered original beatmap");

             return new ConvertResult
             {


Fixed assembly loader not being able to find assembly in package with multiple target framework monikers.

--- src/AssemblyLoader.cs
+++ src/AssemblyLoader.cs
@@ -774,8 +774,19 @@
         {
             IEnumerable<PhysicalPackageAssemblyReference> files = package.AssemblyReferences.OfType<PhysicalPackageAssemblyReference>();
             IEnumerable<PhysicalPackageAssemblyReference> compatibleFiles;
-            if (!VersionUtility.TryGetCompatibleItems(ExecutingFrameworkName, files, out compatibleFiles))
-                compatibleFiles = files;
+            // Try from most specific to least specific target framework
+            var result = default(string);
+            if (VersionUtility.TryGetCompatibleItems(ExecutingFrameworkName, files, out compatibleFiles))
+                result = FindAssemblyFile(assemblyName, compatibleFiles);
+            if (result == null && VersionUtility.TryGetCompatibleItems(VersionUtility.DefaultTargetFramework, files, out compatibleFiles))
+                result = FindAssemblyFile(assemblyName, compatibleFiles);
+            if (result == null)
+                result = FindAssemblyFile(assemblyName, files);
+            return result;
+        }
+
+        private static string FindAssemblyFile(string assemblyName, IEnumerable<PhysicalPackageAssemblyReference> compatibleFiles)
+        {
             return compatibleFiles.FirstOrDefault(f => Path.GetFileNameWithoutExtension(f.Name) == assemblyName)?.SourcePath;
         }


Remove unnecessary variables.

Remove unnecessary variables.

--- src/CompetitionPlatform/Views/Blog/BlogList.cshtml
+++ src/CompetitionPlatform/Views/Blog/BlogList.cshtml
@@ -2,40 +2,6 @@

 @{
     ViewData["Title"] = "Blog";
-
-    string blogCategoryFilter = ViewBag.BlogCategoryFilter;
-
-    var allFilter = "";
-    var newsFilter = "";
-    var resultsFilter = "";
-    var winnersFilter = "";
-    var successFilter = "";
-    var videosFilter = "";
-
-    switch (blogCategoryFilter)
-    {
-        case "All":
-            allFilter = "list_group__item--active";
-            break;
-        case "News":
-            newsFilter = "list_group__item--active";
-            allFilter = "";
-            break;
-        case "Results":
-            resultsFilter = "list_group__item--active";
-            break;
-        case "Winners":
-            winnersFilter = "list_group__item--active";
-            break;
-        case "Successstories":
-            successFilter = "list_group__item--active";
-            break;
-        case "Videos":
-            videosFilter = "list_group__item--active";
-            break;
-        case default(string):
-            allFilter = "list_group__item--active";
-            break;
     }
 }

@@ -56,12 +22,12 @@

Categories

-
All

-
News

-
Results

-
Winners

-
Success stories

-
Videos

+
All

+
News

+
Results

+
Winners

+
Success stories

+
Videos


Update BoxDecorator.cs

Update BoxDecorator.cs

--- src/Core2D/Editor/Tools/Decorators/BoxDecorator.cs
+++ src/Core2D/Editor/Tools/Decorators/BoxDecorator.cs
@@ -168,6 +168,30 @@
         }

         /// <inheritdoc/>
+        public override bool IsDirty()
+        {
+            var isDirty = base.IsDirty();
+
+            foreach (var handle in _handles)
+            {
+                isDirty |= handle.IsDirty();
+            }
+
+            return isDirty;
+        }
+
+        /// <inheritdoc/>
+        public override void Invalidate()
+        {
+            base.Invalidate();
+
+            foreach (var handle in _handles)
+            {
+                handle.Invalidate();
+            }
+        }
+
+        /// <inheritdoc/>
         public virtual void DrawShape(object dc, IShapeRenderer renderer, double dx, double dy)
         {
             if (_isVisible)


Use a list rather than a fixed-size array.

--- src/Dapper.FluentMap/Utils/DictionaryExtensions.cs
+++ src/Dapper.FluentMap/Utils/DictionaryExtensions.cs
@@ -12,7 +12,7 @@
             }
             else
             {
-                dict.Add(key, new[] { value });
+                dict.Add(key, new List<TValue> { value });
             }
         }
     }


support git init, add, commit

support git init, add, commit

--- src/FilterLists.Agent/ListArchiver/CaptureLists.cs
+++ src/FilterLists.Agent/ListArchiver/CaptureLists.cs
@@ -18,6 +18,7 @@

         public class Handler : AsyncRequestHandler<Command>
         {
+            private const string GitRepoDirectory = @"archives";
             private readonly IFilterListsApiClient _apiClient;
             private readonly IMediator _mediator;

@@ -29,19 +30,9 @@

             protected override async Task Handle(Command request, CancellationToken cancellationToken)
             {
-                const string workingDirectoryPath = @"archives";
-
                 var lists = await GetListInfo();
                 await _mediator.Send(new DownloadLists.Command(lists), cancellationToken);
-
-
-                using (var repo = new Repository(workingDirectoryPath))
-                {
-                    Commands.Stage(repo, "*");
-                    var author = new Signature("James", "@jugglingnutcase", DateTime.UtcNow);
-                    var committer = author;
-                    var commit = repo.Commit("Here's a commit i made!", author, committer);
-                }
+                CommitDownloadedLists();
             }

             private async Task<IEnumerable<ListInfo>> GetListInfo()
@@ -49,6 +40,19 @@
                 var listsRequest = new RestRequest("lists");
                 return await _apiClient.ExecuteAsync<IEnumerable<ListInfo>>(listsRequest);
             }
+
+            private static void CommitDownloadedLists()
+            {
+                if (!Repository.IsValid(GitRepoDirectory))
+                    Repository.Init(GitRepoDirectory);
+                using (var repo = new Repository(GitRepoDirectory))
+                {
+                    Commands.Stage(repo, "*");
+                    var utcNow = DateTime.UtcNow;
+                    var signature = new Signature("FilterLists.Agent", "@filterlists.com", utcNow);
+                    repo.Commit(utcNow.ToShortDateString() + " FilterLists archive by FilterLists.Agent", signature, signature);
+                }
+            }
         }
     }
 }


#611 add CapturedMultipartContent constructors

--- src/Flurl.Http/Content/CapturedMultipartContent.cs
+++ src/Flurl.Http/Content/CapturedMultipartContent.cs
@@ -28,6 +28,25 @@
 		/// </summary>
 		/// <param name="settings">The FlurlHttpSettings used to serialize each content part. (Defaults to FlurlHttp.GlobalSettings.)</param>
 		public CapturedMultipartContent(FlurlHttpSettings settings = null) : base("form-data") {
+			_settings = settings ?? FlurlHttp.GlobalSettings;
+		}
+
+		/// <summary>
+		/// Initializes a new instance of the <see cref="CapturedMultipartContent"/> class.
+		/// </summary>
+		/// <param name="subtype">The subtype of the multipart content.</param>
+		/// <param name="settings">The FlurlHttpSettings used to serialize each content part. (Defaults to FlurlHttp.GlobalSettings.)</param>
+		public CapturedMultipartContent(string subtype, FlurlHttpSettings settings = null) : base(subtype) {
+			_settings = settings ?? FlurlHttp.GlobalSettings;
+		}
+
+		/// <summary>
+		/// Initializes a new instance of the <see cref="CapturedMultipartContent"/> class.
+		/// </summary>
+		/// <param name="subtype">The subtype of the multipart content.</param>
+		/// <param name="boundary">The boundary string for the multipart content.</param>
+		/// <param name="settings">The FlurlHttpSettings used to serialize each content part. (Defaults to FlurlHttp.GlobalSettings.)</param>
+		public CapturedMultipartContent(string subtype, string boundary, FlurlHttpSettings settings = null) : base(subtype, boundary) {
 			_settings = settings ?? FlurlHttp.GlobalSettings;
 		}


Added better support for static methods in the C++/CLI header backend.

--- src/Generator/Generators/CLI/CLIHeadersTemplate.cs
+++ src/Generator/Generators/CLI/CLIHeadersTemplate.cs
@@ -243,14 +243,25 @@
         public void GenerateClassMethods(Class @class)
         {
             PushIndent();
+
+            var staticMethods = new List<Method>();
             foreach (var method in @class.Methods)
             {
                 if (CheckIgnoreMethod(@class, method))
                     continue;

-                GenerateDeclarationCommon(method);
+                if (method.IsStatic)
+                {
+                    staticMethods.Add(method);
+                    continue;
+                }
+
                 GenerateMethod(method);
             }
+
+            foreach(var method in staticMethods)
+                GenerateMethod(method);
+
             PopIndent();
         }

@@ -309,6 +320,9 @@

             GenerateDeclarationCommon(method);

+            if (method.IsStatic)
+                Write("static ");
+
             if (method.Kind == CXXMethodKind.Constructor || method.Kind == CXXMethodKind.Destructor)
                 Write("{0}(", SafeIdentifier(method.Name));
             else
@@ -351,7 +365,8 @@
             if (function.Ignore) return;
             GenerateDeclarationCommon(function);

-            Write("static {0} {1}(", function.ReturnType, SafeIdentifier(function.Name));
+            var retType = function.ReturnType.ToString();
+            Write("static {0} {1}(", retType, SafeIdentifier(function.Name));

             for (int i = 0; i < function.Parameters.Count; ++i)
             {


Add xmldoc comments for BindingPathUtilities

--- src/GitHub.Exports/Helpers/BindingPathUtilities.cs
+++ src/GitHub.Exports/Helpers/BindingPathUtilities.cs
@@ -8,10 +8,40 @@

 namespace GitHub.Helpers
 {
+    /// <summary>
+    /// This a workaround for extensions that define a ProvideBindingPath attribute and
+    /// install for AllUsers.
+    /// </summary>
+    /// <remarks>
+    /// Extensions that are installed for AllUsers, will also be installed for all
+    /// instances of Visual Studio - including the experimental (Exp) instance which
+    /// is used in development. This isn't a problem so long as all features that
+    /// exist in the AllUsers extension, also exist in the extension that is being
+    /// developed.
+    ///
+    /// When an extension uses the ProvideBindingPath attribute, the binding path for
+    /// the AllUsers extension gets installed at the same time as the one in development.
+    /// This doesn't matter when an assembly is strong named and is loaded using its
+    /// full name (including version number). When an assembly is loaded using its
+    /// simple name, assemblies from the AllUsers extension can end up loaded at the
+    /// same time as the extension being developed. This can happen when an assembly
+    /// is loaded from XAML or an .imagemanifest.
+    ///
+    /// This is a workaround for that issue. The <see cref="RationalizeBindingPaths(string, List{string})"/>
+    /// method will check to see if a reference assembly could be loaded from an alternative
+    /// binding path. It will remove any alternative paths that is finds so that XAML or
+    /// .imagemanifest won't end up loading the wrong assembly.
+    /// </remarks>
     public static class BindingPathUtilities
     {
         static readonly ILogger log = LogManager.ForContext(typeof(BindingPathUtilities));

+        /// <summary>
+        /// Remove alternative binding path that might have been installed by an AllUsers extension.
+        /// </summary>
+        /// <param name="assemblyLocation">A reference assembly that has been loaded from the correct path.</param>
+        /// <param name="bindingPaths">A list of binding paths to rationalize (only used when testing)</param>
+        /// <returns>True if assembly hasn't been loaded from an alternative path.</returns>
         public static bool RationalizeBindingPaths(string assemblyLocation, List<string> bindingPaths = null)
         {
             bindingPaths = bindingPaths ?? FindBindingPaths();
@@ -39,6 +69,11 @@
             return !isAlreadyLoaded;
         }

+        /// <summary>
+        /// Check to see if an assembly is already in memory.
+        /// </summary>
+        /// <param name="assemblyLocation">The assembly to look for.</param>
+        /// <returns>True if assembly has already been loaded.</returns>
         public static bool IsAssemblyLoaded(string assemblyLocation)
         {
             var prefix = Path.GetFileNameWithoutExtension(assemblyLocation) + ",";
@@ -48,6 +83,10 @@
                 .Any();
         }

+        /// <summary>
+        /// Use reflection to find Visual Studio's list of binding paths.
+        /// </summary>
+        /// <returns>A live list of binding paths or an empty list if not running in Visual Studio.</returns>
         public static List<string> FindBindingPaths()
         {
             var manager = AppDomain.CurrentDomain.DomainManager;


Added constructor for DataValidationResult from exception.

--- src/Kephas.Data/Validation/DataValidationResult.cs
+++ src/Kephas.Data/Validation/DataValidationResult.cs
@@ -9,6 +9,7 @@

 namespace Kephas.Data.Validation
 {
+    using System;
     using System.Collections;
     using System.Collections.Generic;

@@ -54,13 +55,27 @@
         /// by adding a new item with the provided parameters.
         /// </summary>
         /// <param name="message">The message.</param>
-        /// <param name="memberName">(Optional) name of the member.</param>
-        /// <param name="severity">(Optional) the severity.</param>
+        /// <param name="memberName">The name of the member.</param>
+        /// <param name="severity">The severity.</param>
         public DataValidationResult(string message, string memberName = null, DataValidationSeverity severity = DataValidationSeverity.Error)
         {
             Requires.NotNull(message, nameof(message));

             this.Add(message, memberName, severity);
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="DataValidationResult"/> class
+        /// by adding a new item with the provided parameters.
+        /// </summary>
+        /// <param name="exception">The exception.</param>
+        /// <param name="memberName">The name of the member.</param>
+        /// <param name="severity">The severity.</param>
+        public DataValidationResult(Exception exception, string memberName = null, DataValidationSeverity severity = DataValidationSeverity.Error)
+        {
+            Requires.NotNull(exception, nameof(exception));
+
+            this.Add(exception.Message, memberName, severity);
         }

         /// <summary>


BREAKING: Lucene.Net.Support.IO: Marked SafeTextWriterWrapper internal

--- src/Lucene.Net/Support/IO/SafeTextWriterWrapper.cs
+++ src/Lucene.Net/Support/IO/SafeTextWriterWrapper.cs
@@ -10,21 +10,21 @@
 namespace Lucene.Net.Support.IO
 {
     /*
-	 * Licensed to the Apache Software Foundation (ASF) under one or more
-	 * contributor license agreements.  See the NOTICE file distributed with
-	 * this work for additional information regarding copyright ownership.
-	 * The ASF licenses this file to You under the Apache License, Version 2.0
-	 * (the "License"); you may not use this file except in compliance with
-	 * the License.  You may obtain a copy of the License at
-	 *
-	 *     http://www.apache.org/licenses/LICENSE-2.0
-	 *
-	 * Unless required by applicable law or agreed to in writing, software
-	 * distributed under the License is distributed on an "AS IS" BASIS,
-	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	 * See the License for the specific language governing permissions and
-	 * limitations under the License.
-	 */
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */

     /// <summary>
     /// Decorates a <see cref="TextWriter"/> instance and
@@ -41,19 +41,14 @@
     /// non-disposable object can continue to make calls to the <see cref="TextWriter"/> without raising
     /// exceptions (it is presumed that the <see cref="TextWriter"/> functionality is optional).
     /// </summary>
-    public class SafeTextWriterWrapper : TextWriter
+    internal class SafeTextWriterWrapper : TextWriter
     {
         private readonly TextWriter textWriter;
         private bool isDisposed = false;

         public SafeTextWriterWrapper(TextWriter textWriter)
         {
-            if (textWriter == null)
-            {
-                throw new ArgumentNullException("textWriter");
-            }
-
-            this.textWriter = textWriter;
+            this.textWriter = textWriter ?? throw new ArgumentNullException(nameof(textWriter));
         }

         public override Encoding Encoding
@@ -206,13 +201,13 @@
             Run(() => textWriter.Write(value));
         }

-        [CLSCompliant(false)]
+        //[CLSCompliant(false)]
         public override void Write(uint value)
         {
             Run(() => textWriter.Write(value));
         }

-        [CLSCompliant(false)]
+        //[CLSCompliant(false)]
         public override void Write(ulong value)
         {
             Run(() => textWriter.Write(value));
@@ -313,13 +308,13 @@
             Run(() => textWriter.WriteLine(value));
         }

-        [CLSCompliant(false)]
+        //[CLSCompliant(false)]
         public override void WriteLine(uint value)
         {
             Run(() => textWriter.WriteLine(value));
         }

-        [CLSCompliant(false)]
+        //[CLSCompliant(false)]
         public override void WriteLine(ulong value)
         {
             Run(() => textWriter.WriteLine(value));


Fix issues#13. Add image cache.

Fix issues#13. Add image cache.

--- Wox/ImagePathConverter.cs
+++ Wox/ImagePathConverter.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using System.Drawing;
 using System.Globalization;
 using System.IO;
@@ -11,43 +12,57 @@
 {
     public class ImagePathConverter : IMultiValueConverter
     {
+        private static Dictionary<string, object> imageCache = new Dictionary<string, object>();
+
         private static ImageSource GetIcon(string fileName)
         {
             Icon icon = Icon.ExtractAssociatedIcon(fileName);
-            return System.Windows.Interop.Imaging.CreateBitmapSourceFromHIcon(
-                icon.Handle,
-                new Int32Rect(0, 0, icon.Width, icon.Height),
-                BitmapSizeOptions.FromEmptyOptions());
+            if (icon != null)
+            {
+                return System.Windows.Interop.Imaging.CreateBitmapSourceFromHIcon(icon.Handle, new Int32Rect(0, 0, icon.Width, icon.Height), BitmapSizeOptions.FromEmptyOptions());
+            }
+
+            return null;
         }

         public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
         {
+            object img = null;
             if (values[0] == null) return null;

             string path = values[0].ToString();
             string pluginDirectory = values[1].ToString();
+            string fullPath = Path.Combine(pluginDirectory, path);
+            if (imageCache.ContainsKey(fullPath))
+            {
+                return imageCache[fullPath];
+            }

             string resolvedPath = string.Empty;
             if (!string.IsNullOrEmpty(path) && path.Contains(":\\") && File.Exists(path))
             {
                 resolvedPath = path;
             }
-            else if (!string.IsNullOrEmpty(path) && File.Exists(Path.Combine(pluginDirectory,path)))
+            else if (!string.IsNullOrEmpty(path) && File.Exists(fullPath))
             {
-                resolvedPath = Path.Combine(pluginDirectory, path);
+                resolvedPath = fullPath;
             }

             if (resolvedPath.ToLower().EndsWith(".exe") || resolvedPath.ToLower().EndsWith(".lnk"))
             {
-                return GetIcon(resolvedPath);
+                img = GetIcon(resolvedPath);
+            }
+            else if (!string.IsNullOrEmpty(resolvedPath) && File.Exists(resolvedPath))
+            {
+                img  = new BitmapImage(new Uri(resolvedPath));
             }

-            if (!string.IsNullOrEmpty(resolvedPath) && File.Exists(resolvedPath))
+            if (img != null)
             {
-                return new BitmapImage(new Uri(resolvedPath));
+                imageCache.Add(fullPath, img);
             }

-            return null;
+            return img;
         }

         public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)


Increasing further

Increasing further

--- src/Merchello.Web/Pluggable/CustomerContextBase.cs
+++ src/Merchello.Web/Pluggable/CustomerContextBase.cs
@@ -590,7 +590,7 @@
             this._umbracoContext.HttpContext.Response.Cookies.Add(cookie);

             this._cache.RequestCache.GetCacheItem(CustomerCookieName, () => this.ContextData);
-            this._cache.RuntimeCache.GetCacheItem(CacheKeys.CustomerCacheKey(customer.Key), () => customer, TimeSpan.FromMinutes(15), true);
+            this._cache.RuntimeCache.GetCacheItem(CacheKeys.CustomerCacheKey(customer.Key), () => customer, TimeSpan.FromMinutes(20), true);
         }
     }
 }


Fix comment typo

Fix comment typo

--- src/Miningcore/Blockchain/Ethereum/EthereumPool.cs
+++ src/Miningcore/Blockchain/Ethereum/EthereumPool.cs
@@ -38,7 +38,7 @@
     private EthereumJobManager manager;
     private EthereumCoinTemplate coin;

-    #region // Protcol V2 handlers - https://github.com/nicehash/Specifications/blob/master/EthereumStratum_NiceHash_v1.0.0.txt
+    #region // Protocol V2 handlers - https://github.com/nicehash/Specifications/blob/master/EthereumStratum_NiceHash_v1.0.0.txt

     private async Task OnSubscribeAsync(StratumConnection connection, Timestamped<JsonRpcRequest> tsRequest)
     {
@@ -232,9 +232,9 @@
         await connection.NotifyAsync(EthereumStratumMethods.MiningNotify, parameters);
     }

-    #endregion // Protcol V2 handlers
-
-    #region // Protcol V1 handlers - https://github.com/sammy007/open-ethereum-pool/blob/master/docs/STRATUM.md
+    #endregion // Protocol V2 handlers
+
+    #region // Protocol V1 handlers - https://github.com/sammy007/open-ethereum-pool/blob/master/docs/STRATUM.md

     private async Task OnSubmitLoginAsync(StratumConnection connection, Timestamped<JsonRpcRequest> tsRequest)
     {
@@ -332,7 +332,7 @@
         await connection.RespondAsync(parameters, requestId);
     }

-    #endregion // Protcol V1 handlers
+    #endregion // Protocol V1 handlers

     #region Overrides


Fixed PerformanceHelper for executing test in parallel

--- Objectivity.Test.Automation.Common/Helpers/PrintPerformanceResultsHelper.cs
+++ Objectivity.Test.Automation.Common/Helpers/PrintPerformanceResultsHelper.cs
@@ -41,7 +41,7 @@
         public static void PrintPercentiles90DurationMillisecondsinTeamcity(PerformanceHelper measures)
         {
             var groupedDurations = measures.AllGroupedDurationsMilliseconds.Select(v =>
-                "##teamcity[testStarted name='" + v.StepName + "." + v.Browser + ".Percentile90Line']\n" +
+                "\n##teamcity[testStarted name='" + v.StepName + "." + v.Browser + ".Percentile90Line']\n" +
                 "##teamcity[testFinished name='" + v.StepName + "." + v.Browser + ".Percentile90Line' duration='" +
                 v.Percentile90 + "']\n" +
                 v.StepName + " " + v.Browser + " Percentile90Line: " + v.Percentile90)
@@ -61,7 +61,7 @@
         public static void PrintAverageDurationMillisecondsInTeamcity(PerformanceHelper measures)
         {
             var groupedDurations = measures.AllGroupedDurationsMilliseconds.Select(v =>
-                "##teamcity[testStarted name='" + v.StepName + "." + v.Browser + ".Average']\n" +
+                "\n##teamcity[testStarted name='" + v.StepName + "." + v.Browser + ".Average']\n" +
                 "##teamcity[testFinished name='" + v.StepName + "." + v.Browser + ".Average' duration='" +
                 v.AverageDuration + "']\n" +
                 v.StepName + " " + v.Browser + " Average: " + v.AverageDuration + "\n")


Call attachment cleanup when an agent crosses out

--- OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -446,6 +446,8 @@
                 // Now let's make it officially a child agent
                 sp.MakeChildAgent();

+                sp.Scene.CleanDroppedAttachments();
+
                 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone

                 if (NeedsClosing(oldRegionX, newRegionX, oldRegionY, newRegionY, reg))


minor: shortern warning messages in EntityTransferModule when UpdateAgent() fails

--- OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -832,8 +832,8 @@
                 }

                 m_log.WarnFormat(
-                    "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}.  Keeping avatar in source region.",
-                    sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
+                    "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1}.  Keeping avatar in {2}",
+                    sp.Name, finalDestination.RegionName, sp.Scene.Name);

                 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
                 return;
@@ -1056,8 +1056,8 @@
                 }

                 m_log.WarnFormat(
-                    "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}.  Keeping avatar in source region.",
-                    sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
+                    "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1}.  Keeping avatar in {2}",
+                    sp.Name, finalDestination.RegionName, sp.Scene.Name);

                 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
                 return;


minor: eliminate unused UUID in xmlrpc GroupsMessagingModule.ProcessMessageFromGroupSession()

--- OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -431,8 +431,6 @@
                         // Add them to the session for now, and Invite them
                         m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID);

-                        UUID toAgentID = new UUID(msg.toAgentID);
-
                         GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null);
                         if (groupInfo != null)
                         {


add quota to configuration

add quota to configuration

--- PenguinUpload/src/PenguinUpload/Configuration/PenguinUploadConfiguration.cs
+++ PenguinUpload/src/PenguinUpload/Configuration/PenguinUploadConfiguration.cs
@@ -1,4 +1,5 @@
-using Newtonsoft.Json;
+using System;
+using Newtonsoft.Json;

 namespace PenguinUpload.Configuration
 {
@@ -15,5 +16,11 @@

         [JsonProperty("admins")]
         public string[] Administrators { get; set; } = new string[0];
+
+        /// <summary>
+        /// Max file storage quota (in bytes)
+        /// </summary>
+        [JsonProperty("defaultQuota")]
+        public int DefaultQuota { get; set; } = 1 << 30; // (1 GiB NOT 1 GB [see GIBIBYTES])
     }
 }


Fixed change in particle color stops

Fixed change in particle color stops

--- Project-Aurora/Project-Aurora/Settings/Layers/SimpleParticleLayerHandler.cs
+++ Project-Aurora/Project-Aurora/Settings/Layers/SimpleParticleLayerHandler.cs
@@ -302,9 +302,9 @@
                 } },
                 { "Rain", p => {
                     p._SpawnLocation = ParticleSpawnLocations.TopEdge;
-                    p._ParticleColorStops = new List<(Color color, float offset)> {
-                        (Color.Cyan, 0f),
-                        (Color.Cyan, 1f)
+                    p._ParticleColorStops = new ColorStopCollection {
+                        { 0f, Color.Cyan },
+                        { 1f, Color.Cyan }
                     };
                     p._MinSpawnTime = .1f; p._MaxSpawnTime = .2f;
                     p._MinSpawnAmount = 1; p._MaxSpawnAmount = 2;


Commented failed test because of bug with REST API

--- Sdl.Community.GroupShareKit.Tests.Integration/Clients/ProjectClientTests.cs
+++ Sdl.Community.GroupShareKit.Tests.Integration/Clients/ProjectClientTests.cs
@@ -123,19 +123,20 @@

             Assert.Equal(actualProject.ProjectId, project.ProjectId);
         }
-
-        [Fact]
-        public async Task GetProjectLanguageStatistics()
-        {
-            var groupShareClient = await Helper.GetGroupShareClient();
-
-            var projects = await groupShareClient.Project.GetAllProjects();
-            var project = projects.Items.FirstOrDefault();
-
-            var response = await groupShareClient.Project.GetProjectLanguageStatistics(project.ProjectId);
-
-            Assert.Equal(response.Keys.First(), "en-US");
-        }
+        // test fails because of a bug that has to be fixed in the REST API
+
+        //[Fact]
+        //public async Task GetProjectLanguageStatistics()
+        //{
+        //    var groupShareClient = await Helper.GetGroupShareClient();
+
+        //    var projects = await groupShareClient.Project.GetAllProjects();
+        //    var project = projects.Items.FirstOrDefault();
+
+        //    var response = await groupShareClient.Project.GetProjectLanguageStatistics(project.ProjectId);
+
+        //    Assert.Equal(response.Keys.First(), "en-US");
+        //}

         [Fact]
         public async Task GetProjectFileStatistics()


Add tests for deserializing a TraktDevice.

--- Source/Tests/TraktApiSharp.Tests/Services/TraktSerializationServiceTests.cs
+++ Source/Tests/TraktApiSharp.Tests/Services/TraktSerializationServiceTests.cs
@@ -110,5 +110,29 @@
             act = () => TraktSerializationService.Deserialize(string.Empty);
             act.ShouldThrow<ArgumentException>();
         }
+
+        [TestMethod]
+        public void TestTraktSerializationServiceDeserializeTraktDevice()
+        {
+            var device = TraktSerializationService.Deserialize(DEVICE_JSON);
+
+            device.Should().NotBeNull();
+            device.UserCode.Should().Be(DEVICE.UserCode);
+            device.DeviceCode.Should().Be(DEVICE.DeviceCode);
+            device.VerificationUrl.Should().Be(DEVICE.VerificationUrl);
+            device.ExpiresInSeconds.Should().Be(DEVICE.ExpiresInSeconds);
+            device.IntervalInSeconds.Should().Be(DEVICE.IntervalInSeconds);
+            device.Created.Should().Be(DEVICE.Created);
+        }
+
+        [TestMethod]
+        public void TestTraktSerializationServiceDeserializeTraktDeviceArgumentExceptions()
+        {
+            Action act = () => TraktSerializationService.Deserialize(null);
+            act.ShouldThrow<ArgumentException>();
+
+            act = () => TraktSerializationService.Deserialize(string.Empty);
+            act.ShouldThrow<ArgumentException>();
+        }
     }
 }


Fixed typo in test name.

Fixed typo in test name.

--- StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1202UnitTests.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1202UnitTests.cs
@@ -960,7 +960,7 @@
         /// </summary>
         /// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
         [Fact]
-        public async Task Issue150RegressionAsync()
+        public async Task Issue1507RegressionAsync()
         {
             string testCode = @"public class OuterType
 {


Fixed unit tests

Fixed unit tests

--- Tests/DbLocalizationProvider.Tests/JsonConverterTests/JsonConverterTests.cs
+++ Tests/DbLocalizationProvider.Tests/JsonConverterTests/JsonConverterTests.cs
@@ -78,7 +78,7 @@

             var sut = new JsonConverter();

-            var resourcesAsJson = sut.Convert(resources, "en", true, false);
+            var resourcesAsJson = sut.Convert(resources, "en", CultureInfo.InvariantCulture, true, false);

             Assert.Equal("this is english", resourcesAsJson["This"]["Is"]["Resource"]["Key"]);

@@ -115,7 +115,7 @@
             };
             var sut = new Json.JsonConverter();

-            var resourcesAsJson = sut.Convert(resources, "en", false, false);
+            var resourcesAsJson = sut.Convert(resources, "en", CultureInfo.InvariantCulture, false, false);

             Assert.Equal(0, resourcesAsJson.Count);
         }
@@ -177,7 +177,7 @@
                 }
             };

-            var resourcesAsJson = sut.Convert(resources, "en", true, false);
+            var resourcesAsJson = sut.Convert(resources, "en", CultureInfo.InvariantCulture, true, false);

             Assert.Equal("this is english", resourcesAsJson["This"]["Is"]["Resource"]["Key"]);
         }
@@ -239,7 +239,7 @@
                 }
             };

-            var resourcesAsJson = sut.Convert(resources, "en", true, false);
+            var resourcesAsJson = sut.Convert(resources, "en", CultureInfo.InvariantCulture, true, false);

             Assert.Equal("this is english", resourcesAsJson["This"]["Is"]["Resource"]["Key"]);
         }
@@ -269,7 +269,7 @@
                 }
             };

-            var resourcesAsJson = sut.Convert(resources, "no", true, false);
+            var resourcesAsJson = sut.Convert(resources, "no", CultureInfo.InvariantCulture, true, false);

             Assert.Equal("this is norsk", resourcesAsJson["This"]["Is"]["Resource"]["Key"]);
         }
@@ -299,7 +299,7 @@
                 }
             };

-            var resourcesAsJson = sut.Convert(resources, "en", true, true);
+            var resourcesAsJson = sut.Convert(resources, "en", CultureInfo.InvariantCulture, true, true);

             Assert.Equal("this is english", resourcesAsJson["this"]["is"]["theResource"]["key"]);
         }


Add force solve handler to Complicated Wires

--- TwitchPlaysAssembly/Src/ComponentSolvers/Vanilla/VennWireComponentSolver.cs
+++ TwitchPlaysAssembly/Src/ComponentSolvers/Vanilla/VennWireComponentSolver.cs
@@ -2,6 +2,7 @@
 using System;
 using System.Collections;
 using System.Text.RegularExpressions;
+using Assets.Scripts.Rules;

 public class VennWireComponentSolver : ComponentSolver
 {
@@ -42,5 +43,17 @@
         }
     }

-    private VennSnippableWire[] _wires = null;
+	protected override IEnumerator ForcedSolveIEnumerator()
+	{
+		yield return null;
+		VennWireComponent vwc = ((VennWireComponent) BombComponent);
+		VennWireRuleSet ruleSet = RuleManager.Instance.VennWireRuleSet;
+		foreach (VennSnippableWire wire in _wires)
+		{
+			if (ruleSet.ShouldWireBeSnipped(vwc, wire.WireIndex, false) && !wire.Snipped)
+				yield return DoInteractionClick(wire);
+		}
+	}
+
+	private VennSnippableWire[] _wires = null;
 }


Fixed issue #3.  Dispose data reader.

Fixed issue #3.  Dispose data reader.

--- src/Catnap/Session.cs
+++ src/Catnap/Session.cs
@@ -145,15 +145,17 @@
         {
             GuardNotDisposed();
             command.GuardArgumentNull("command");
-            var reader = command.ExecuteReader();
-            while (reader.Read())
-            {
-                var row = new Dictionary<string, object>();
-                for (var i = 0; i < reader.FieldCount; i++)
+            using (var reader = command.ExecuteReader())
+            {
+                while (reader.Read())
                 {
-                    row.Add(reader.GetName(i), reader[i]);
+                    var row = new Dictionary<string, object>();
+                    for (var i = 0; i < reader.FieldCount; i++)
+                    {
+                        row.Add(reader.GetName(i), reader[i]);
+                    }
+                    yield return row;
                 }
-                yield return row;
             }
         }


JimEvans: Workaround to the fix for issue 288. r8081 fixes the remote server to return UTF-8 (issue 288). However, the server now returns a string with trailing null characters, so we have to strip them for the JSON parser to be able to make sense of the response.

git-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@8087 07704840-8298-11de-bf8c-fd130f914ac9

--- remote/client/src/csharp/webdriver-remote/HttpCommandExecutor.cs
+++ remote/client/src/csharp/webdriver-remote/HttpCommandExecutor.cs
@@ -98,6 +98,12 @@
             System.IO.StreamReader responseStreamReader = new System.IO.StreamReader(responseStream, Encoding.UTF8);
             string responseString = responseStreamReader.ReadToEnd();
             responseStreamReader.Close();
+            // The response string from the Java remote server has trailing null
+            // characters. This is due to the fix for issue 288.
+            if (responseString.IndexOf('\0') >= 0)
+            {
+                responseString = responseString.Substring(0, responseString.IndexOf('\0'));
+            }
             return responseString;
         }


Fixed missing code

Fixed missing code

Accidentally removed when updating for 0.7.3

--- src/Nuterra/Maritaria/CheatBlocks/ModuleGodMode.cs
+++ src/Nuterra/Maritaria/CheatBlocks/ModuleGodMode.cs
@@ -4,6 +4,12 @@
 {
 	public sealed class ModuleGodMode : Module
 	{
+		private void OnPool()
+		{
+			block.AttachEvent += OnAttach;
+			block.DetachEvent += OnDetach;
+		}
+
 		private void OnSpawn()
 		{
 		}


Do not ever collect activations of memory storage grains.

--- src/OrleansProviders/Storage/MemoryStorageGrain.cs
+++ src/OrleansProviders/Storage/MemoryStorageGrain.cs
@@ -21,6 +21,7 @@
 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

+using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;

@@ -42,6 +43,7 @@
         public override Task OnActivateAsync()
         {
             grainStore = new Dictionary<string, GrainStateStore>();
+            base.DelayDeactivation(TimeSpan.FromDays(10 * 365)); // Delay Deactivation for MemoryStorageGrain virtually indefinitely.
             return TaskDone.Done;
         }


prettify the output

prettify the output

--- src/Compat/Program.cs
+++ src/Compat/Program.cs
@@ -23,8 +23,10 @@
             }

             // control verbosity
+            bool quiet = false;
             if (args[0] == "--quiet" || args[0] == "-q")
             {
+                quiet = true;
                 logger.Level = Logger.LogLevel.WARNING;
                 args = args.Skip(1).ToArray();
             }
@@ -71,32 +73,33 @@
             IDictionary<string, AssemblyDefinition> cache = customResolver.Cache;

             // print assembly name
-            logger.Info("The assembly in question:");
-            logger.Info("{0}", module.Assembly.FullName);
+            logger.Info("{0}\n", module.Assembly.FullName);
+
+            // print assembly references (buildtime)
+            if (module.AssemblyReferences.Count > 0)
+            {
+                logger.Info("Assembly references:", module.Assembly.Name.Name);
+                foreach (AssemblyNameReference reference in module.AssemblyReferences)
+                {
+                    logger.Info("  {0}", reference.FullName);
+                }
+            }
+            logger.Info("");

             // print cached assembly names (i.e. runtime references)
             if (args.Length > 1)
             {
-                logger.Info("Reference assembly(s):");
+                logger.Info("Cached assemblies:");
                 foreach (var assembly in args.Skip(1))
                 {
-                    logger.Info(AssemblyDefinition.ReadAssembly(assembly).FullName);
+                    logger.Info("  {0}", AssemblyDefinition.ReadAssembly(assembly).FullName);
                 }
             }
             else // no reference assemblies. Grab the skipping rope
             {
-                logger.Warning("No reference assemblies specified (i.e. empty resolution cache)");
-            }
-
-            // print assembly references (buildtime)
-            if (module.AssemblyReferences.Count > 0)
-            {
-              logger.Info("{0} has the following assembly reference(s):", module.Assembly.Name.Name);
-              foreach (AssemblyNameReference reference in module.AssemblyReferences)
-              {
-                  logger.Info(reference.FullName);
-              }
-            }
+                logger.Warning("Empty resolution cache (no reference assemblies specified");
+            }
+            logger.Info("");

             // global failure tracker
             bool failure = false;
@@ -106,12 +109,12 @@
             // iterate over all the TYPES
             foreach (TypeDefinition type in types)
             {
-                logger.Info("CLASS {0}", type.FullName);
+                Pretty.Class("{0}", type.FullName);

                 // iterate over all the METHODS that have a method body
                 foreach (MethodDefinition method in type.Methods)
                 {
-                    logger.Info("METHOD {0}", method.FullName);
+                    Pretty.Method("{0}", method.FullName);
                     if (!method.HasBody) // skip if no body
                         continue;

@@ -126,9 +129,8 @@
                             "Found instruction at {0} with code: {1}",
                             instruction.Offset,
                             instruction.OpCode.Code);
-                        logger.Info(
-                            "INSTRUCTION ({0}) {1}",
-                            instruction.Operand.GetType().FullName, instruction.Operand.ToString());
+
+                        string instructionString = instruction.Operand.ToString(); // for sake of consistency

                         // get the scope (the name of the assembly in which the operand is defined)
                         IMetadataScope scope = GetOperandScope(instruction.Operand);
@@ -137,7 +139,8 @@
                             // skip if scope is not in the list of cached reference assemblies
                             if (!cache.ContainsKey(scope.Name))
                             {
-                                logger.Info("Skipping ({0} is not in the list)", scope.Name);
+                                if (!quiet)
+                                    Pretty.Instruction(ResolutionStatus.Skipped, instructionString);
                                 continue;
                             }
                             logger.Debug("{0} is on the list so let's try to resolve it", scope.Name);
@@ -146,10 +149,13 @@
                             // the cached reference assemblies
                             bool success = TryResolve(instruction.Operand);
                             if (success)
-                                logger.Info("Successfully resolved {0}", instruction.Operand.ToString());
+                            {
+                                if (!quiet)
+                                    Pretty.Instruction(ResolutionStatus.Success, instructionString);
+                            }
                             else
                             {
-                                logger.Error("Couldn't resolve {0}", instruction.Operand.ToString());
+                                Pretty.Instruction(ResolutionStatus.Failure, instructionString);
                                 failure = true; // set global failure (non-zero exit code)
                             }
                         }
@@ -222,7 +228,7 @@
             // log output
             if (scope != null)
             {
-                logger.Info("Scope is {0}", scope);
+                logger.Debug("Scope is {0}", scope);
             }

             return scope;
@@ -296,7 +302,7 @@
                 logger.Debug("Searching cache for {0}", name.Name);
                 if (cache.TryGetValue(name.Name, out assembly)) // use Name instead of FullName (see below)
                 {
-                    logger.Info("Found {0}", assembly.FullName);
+                    logger.Debug("Found {0}", assembly.FullName);
                     return assembly;
                 }
                 logger.Debug("We don't care about {0}", name.Name);
@@ -343,13 +349,13 @@
           public void Debug(string format, params object[] args)
           {
             if (Level >= LogLevel.DEBUG)
+              Console.WriteLine("DEBUG " + format, args);
+          }
+
+          public void Info(string format, params object[] args)
+          {
+            if (Level >= LogLevel.INFO)
               Console.WriteLine(format, args);
-          }
-
-          public void Info(string format, params object[] args)
-          {
-            if (Level >= LogLevel.INFO)
-              WriteLine(string.Format(format, args), ConsoleColor.DarkCyan);
           }

           public void Warning(string format, params object[] args)
@@ -377,5 +383,49 @@
             }
           }
         }
+
+        enum ResolutionStatus
+        {
+          Success,
+          Failure,
+          Skipped
+        }
+
+        static class Pretty
+        {
+          static public void Class(string format, params object[] args)
+          {
+              WriteColor(format, args, ConsoleColor.Magenta);
+          }
+
+          static public void Method(string format, params object[] args)
+          {
+              WriteColor("  " + format, args, ConsoleColor.DarkCyan);
+          }
+
+          static public void Instruction(ResolutionStatus status, string format, params object[] args)
+          {
+              Console.Write("    ");
+              if (status == ResolutionStatus.Success)
+                  WriteColor("\u2713 " + format, args, ConsoleColor.Green);
+              else if (status == ResolutionStatus.Failure)
+                  WriteColor("\u2717 " + format, args, ConsoleColor.Red);
+              else
+                  WriteColor("\u271D " + format, args, ConsoleColor.Gray);
+          }
+
+          static void WriteColor(string format, object[] args, ConsoleColor color)
+          {
+            Console.ForegroundColor = color;
+            try
+            {
+              Console.WriteLine(format, args);
+            }
+            finally
+            {
+              Console.ResetColor();
+            }
+          }
+        }
     }
 }