Updated TimeKeeper

Updated TimeKeeper

Has logs and card scanning

--- TimeKeeper.cs
+++ TimeKeeper.cs
@@ -11,7 +11,7 @@
     //This class will take the students time and say if they are on time or not
     class TimeKeeper
     {
-
+
        //this will call the functions below
        //call TimeBracket
     }
@@ -20,26 +20,54 @@
     {
         //this is the time limit a student has before being marked absnt
         //will use TimeLog and SwipeIn
+        //hh:mm is the hour and minute; dd:mm:yy is date, month, and year
+
+        ClassTime = hh:mm/ dd:mm:yy;
+
+        TimeLIMIT = StopWatch;
+
+
+    }
+
+    public class StopWatch{
+        //this starts a timer after the class begins and tells TimeBracket how much time the student was late of absent
+        Period1_Time = 08:10 - 09:25;
+        Period2_Time = 09:30 - 10:45;
+        Period3_Time = 10:50 - 12:00;
+        Period4_Time = 12:05 - 01:15;
+        Period5_Time = 01:20 - 02:45;
+
+        //TimeLimit will check with these times and TimeBracket will send the data to TimeLog
+
+
     }

     public class TimeLog
     {
         //This logs the students into the system when they scan their cards
-        //var TimeIN = StudentID + " arrived at " + mm/dd/yy/hh:mm;
+        var TimeIN;
+        var TimeLATE;
+        var TimeABSENT;
+
+        if(TimeLATE > TimeIN){
+            Console.WriteLine = StudentID + "is late to class by" + hh:mm;
+        }

-        //var TimeLATE{
-
+        else if(TimeABSENT > TimeLIMIT){
+            Console.WriteLine = StudentID + "is absent from class on" + mm:dd:yy;
+        }

-        //}
+        else{
+            Console.WriteLine = StudentID + "is on time for class";
+        }

     }

-    public enum SwipeIn
+    public enum ScanIn
     {
         //extends to the scanning feature Charlie is working on
-        //TimeIN;
-        //TimeLATE;
-        //TimeABSENT;
+        TimeIN;
+        TimeLATE;
+        TimeABSENT;
     }
-
 }


Add array-like functionality

Add array-like functionality

Emulates a C pointer by allowing access with [] operator. Use the 'Count' property to get the number of elements

--- Src/WHampson.BFT/Pointer.cs
+++ Src/WHampson.BFT/Pointer.cs
@@ -120,14 +120,56 @@
         /// <param name="addr">
         /// The memory location of the data being pointed to.
         /// </param>
-        public Pointer(IntPtr addr)
+        public Pointer(IntPtr addr) : this(addr, 1)
+        {
+        }
+
+        public Pointer(IntPtr addr, int count)
         {
             if (addr == IntPtr.Zero)
             {
                 throw new ArgumentException("Null pointer not allowed.");
             }

+            if (count < 1)
+            {
+                throw new ArgumentException("Count must be a positive integer.");
+            }
+
             Address = addr;
+            Count = count;
+        }
+
+        public T this[int i]
+        {
+            get
+            {
+                if (i < 0 || i > Count - 1)
+                {
+                    string msg = "Index was outside the bounds of the array.";
+                    throw new IndexOutOfRangeException(msg);
+                }
+
+                int siz = Marshal.SizeOf(typeof(T));
+                IntPtr valAddr = Address + (i * siz);
+
+                return Dereference(valAddr);
+            }
+
+            set
+            {
+                if (i < 0 || i > Count - 1)
+                {
+                    string msg = "Index was outside the bounds of the array.";
+                    throw new IndexOutOfRangeException(msg);
+                }
+
+                int siz = Marshal.SizeOf(typeof(T));
+                IntPtr valAddr = Address + (i * siz);
+
+                byte[] data = value.GetBytes();
+                Marshal.Copy(data, 0, valAddr, data.Length);
+            }
         }

         /// <summary>
@@ -138,6 +180,11 @@
             get;
         }

+        public int Count
+        {
+            get;
+        }
+
         /// <summary>
         /// Gets or sets the data that this pointer points to.
         /// </summary>
@@ -145,15 +192,17 @@
         {
             get
             {
-                // Create instance of T using data at address
-                return Dereference(Address);
+                //// Create instance of T using data at address
+                //return Dereference(Address);
+                return this[0];
             }

             set
             {
-                // Get bytes of new value, copy bytes to address
-                byte[] data = value.GetBytes();
-                Marshal.Copy(data, 0, Address, data.Length);
+                //// Get bytes of new value, copy bytes to address
+                //byte[] data = value.GetBytes();
+                //Marshal.Copy(data, 0, Address, data.Length);
+                this[0] = value;
             }
         }


top view is alert,browser not pross backKey press

--- cordova-wp8/wp8/template/cordovalib/CordovaView.xaml.cs
+++ cordova-wp8/wp8/template/cordovalib/CordovaView.xaml.cs
@@ -374,7 +374,21 @@

         void page_BackKeyPress(object sender, CancelEventArgs e)
         {
-
+            PhoneApplicationPage page = sender as PhoneApplicationPage;
+            if (page != null)
+            {
+                Grid layoutRoot = page.FindName("LayoutRoot") as Grid;
+                if (layoutRoot.Children.Count > 0)
+                {
+                    string type = layoutRoot.Children[layoutRoot.Children.Count - 1].ToString();
+
+                    if (type.Contains("NotificationBox"))
+                    {
+                        //top View is alert! do nothing
+                        return;
+                    }
+                }
+            }
             if (OverrideBackButton)
             {
                 try


Fixed the build

Fixed the build

--- MailKit/MessageThreader.cs
+++ MailKit/MessageThreader.cs
@@ -108,7 +108,7 @@
 				get { return Message != null ? Message.InternalDate : Children[0].InternalDate; }
 			}

-			public uint Size {
+			public uint? Size {
 				get { return Message != null ? Message.Size : Children[0].Size; }
 			}


* Minor fixes.

* Minor fixes.

--- csharp/XSData.cs
+++ csharp/XSData.cs
@@ -172,7 +172,7 @@
 	    sym = tab.FindSym(optname);
 	    gen.WriteLine("        {0},", sym == null ? -1 : sym.n);
 	}
-	gen.WriteLine(" };");
+	gen.WriteLine("    };");
     }

     void WriteInitialization() {
@@ -200,7 +200,7 @@
 	OpenGen(true); /* pdt */
 	CopyFramePart("/*---- Begin ----*/");
 	gen.Close();
-	OpenGen(true);
+	OpenGen(false);
 	gen.WriteLine("// THIS FILE IS GENERATED BY CocoXml AUTOMATICALLY, DO NOT EDIT IT MANUALLY.");
 	CopyFramePart("/*---- Namespace ----*/");
 	if (tab.nsName != null && tab.nsName.Length > 0)


Update BehaviorCollection.cs

Update BehaviorCollection.cs

--- src/Avalonia.Xaml.Interactivity/BehaviorCollection.cs
+++ src/Avalonia.Xaml.Interactivity/BehaviorCollection.cs
@@ -50,7 +50,6 @@
                 "An instance of a behavior cannot be attached to more than one object at a time.");
         }

-        Debug.Assert(associatedObject is { }, "The previous checks should keep us from ever setting null here.");
         AssociatedObject = associatedObject;

         foreach (var item in this)
@@ -165,7 +164,6 @@
                 break;

             default:
-                Debug.Assert(false, "Unsupported collection operation attempted.");
                 break;
         }
 #if DEBUG
@@ -210,7 +208,5 @@
                 }
             }
         }
-
-        Debug.Assert(isValid, "Referential integrity of the collection has been compromised.");
     }
 }


Changing equality for string

Changing equality for string

--- src/CloseEnoughEquality/Impl/ClassEqualityComparer.cs
+++ src/CloseEnoughEquality/Impl/ClassEqualityComparer.cs
@@ -45,9 +45,9 @@
                 return false;
             }

-            for(int i = 0; i < _visitedObjects.Count; i++)
-            {
-                if(ReferenceEquals( _visitedObjects[i], left))
+            for (int i = 0; i < _visitedObjects.Count; i++)
+            {
+                if (ReferenceEquals(_visitedObjects[i], left))
                 {
                     return true;
                 }
@@ -152,7 +152,7 @@

                 if (rightProperty == null)
                 {
-                    if (!ignoreMissing &&  _configuration.GenerateDiscrepancy)
+                    if (!ignoreMissing && _configuration.GenerateDiscrepancy)
                     {
                         _configuration.AddMissingPropertyDiscrepancy(_configuration.CurrentPath);
                     }
@@ -167,32 +167,18 @@
                     var leftValue = leftProperty.GetValue();
                     var rightValue = rightProperty.GetValue();

-                    if (leftValue != null)
-                    {
-                        if (rightValue != null)
-                        {
-                            var wrapper = _configuration.GetEqualityWrapper(leftValue.GetType(), leftProperty);
-
-                            var localValue = wrapper.Equals(leftValue, rightValue, leftProperty);
-
-                            if (!localValue)
-                            {
-                                returnValue = false;
-
-                                if (!wrapper.GeneratesDiscrepancy && _configuration.GenerateDiscrepancy)
-                                {
-                                    _configuration.AddDiscrepancy(leftValue, rightValue);
-                                }
-                            }
-                        }
-                        else if (_configuration.GenerateDiscrepancy)
+                    var wrapper = _configuration.GetEqualityWrapper(leftProperty.PropertyType, leftProperty);
+
+                    var localValue = wrapper.Equals(leftValue, rightValue, leftProperty);
+
+                    if (!localValue)
+                    {
+                        returnValue = false;
+
+                        if (!wrapper.GeneratesDiscrepancy && _configuration.GenerateDiscrepancy)
                         {
                             _configuration.AddDiscrepancy(leftValue, rightValue);
                         }
-                    }
-                    else if (rightValue != null && _configuration.GenerateDiscrepancy)
-                    {
-                        _configuration.AddDiscrepancy(leftValue, rightValue);
                     }
                 }

@@ -258,7 +244,7 @@

                 return false;
             }
-
+
             bool returnValue = true;

             for (int i = 0; i < leftReadOnly.Count; i++)
@@ -272,29 +258,29 @@
                 var wrapper = _configuration.GetEqualityWrapper(leftValue.GetType(), leftProperty);
                 bool found = false;

-                for(int j = 0; j < rightList.Count; j++)
+                for (int j = 0; j < rightList.Count; j++)
                 {
                     var rightValue = rightList[j];

                     if (leftValue != null)
                     {
                         if (rightValue != null)
-                        {
+                        {
                             var localValue = wrapper.Equals(leftValue, rightValue, leftProperty);

-                            if(localValue)
+                            if (localValue)
                             {
                                 rightList.RemoveAt(j);
                                 found = true;
-                                break;
+                                break;
                             }
                         }
                     }
-                    else if(rightValue == null)
+                    else if (rightValue == null)
                     {
                         found = true;
                         break;
-                    }
+                    }
                 }

                 _configuration.GenerateDiscrepancy = true;
@@ -322,7 +308,7 @@

         private bool IsEnumerableType(Type type)
         {
-            if(type.IsArray)
+            if (type.IsArray)
             {
                 return true;
             }
@@ -357,15 +343,15 @@
                 }
             }

-            foreach(var field in propertiesObject.GetType().GetRuntimeFields())
-            {
-                if(!field.IsPublic || field.IsStatic)
+            foreach (var field in propertiesObject.GetType().GetRuntimeFields())
+            {
+                if (!field.IsPublic || field.IsStatic)
                 {
                     continue;
                 }

                 var wrapper = new FieldInfoWrapper(field, propertiesObject);
-
+
                 if (!_configuration.ShouldSkipProperty(wrapper))
                 {
                     returnList.Add(wrapper);


Changing type from int to long for transactionId

--- src/CompaniesHouse/Response/Charges/InsolvencyCase.cs
+++ src/CompaniesHouse/Response/Charges/InsolvencyCase.cs
@@ -11,6 +11,6 @@
         public InsolvencyCaseLinks Links { get; set; }

         [JsonProperty("transaction_id")]
-        public string TransactionId { get; set; }
+        public long? TransactionId { get; set; }
     }
 }


Code cleanup.

Code cleanup.

--- src/CssOptimizer/CssOptimizer.Domain/CssStylesheet.cs
+++ src/CssOptimizer/CssOptimizer.Domain/CssStylesheet.cs
@@ -1,7 +1,5 @@
 using System;
-using System.Collections.Concurrent;
 using System.Collections.Generic;
-using System.Diagnostics;
 using System.Linq;
 using System.Text.RegularExpressions;
 using CssOptimizer.Domain.Utils;


unused debug stuff

unused debug stuff

--- TCC.Core/PacketInspector.cs
+++ TCC.Core/PacketInspector.cs
@@ -5,8 +5,10 @@
 using System.Linq;
 using System.Text;
 using TCC.Parsing;
+using TCC.ViewModels;
 using Tera;
 using Tera.Game;
+using Tera.PacketLog;

 namespace TCC
 {
@@ -153,7 +155,38 @@

         public static void Analyze(Message msg)
         {
-
+            return;
+            if (msg.Direction == MessageDirection.ClientToServer) return;
+            var r = new TeraMessageReader(msg, PacketProcessor.OpCodeNamer, PacketProcessor.Version, PacketProcessor.SystemMessageNamer);
+            Debug.WriteLine("OpCode: " + msg.OpCode + " [" + msg.Data.Count + "]");
+            Debug.WriteLine(r.ReadUInt32());
+            Debug.WriteLine(r.ReadUInt32());
+            Debug.WriteLine(r.ReadUInt32());
+            Debug.WriteLine(r.ReadUInt32());
+
+            //try
+            //{
+            //    Debug.WriteLine("id: " + r.ReadUInt64());
+            //    Debug.WriteLine("unk1: " + r.ReadInt32());
+            //    Debug.WriteLine("skill: " + r.ReadUInt32());
+            //    Debug.WriteLine("x1: " + r.ReadSingle());
+            //    Debug.WriteLine("y1: " + r.ReadSingle());
+            //    Debug.WriteLine("z1: " + r.ReadSingle());
+            //    Debug.WriteLine("x2: " + r.ReadSingle());
+            //    Debug.WriteLine("y2: " + r.ReadSingle());
+            //    Debug.WriteLine("z2: " + r.ReadSingle());
+            //    Debug.WriteLine("unk2: " + r.ReadByte());
+            //    Debug.WriteLine("spd: " + r.ReadSingle());
+            //    Debug.WriteLine("src: " + r.ReadUInt64());
+            //    Debug.WriteLine("model: " + r.ReadUInt32());
+            //    Debug.WriteLine("unk4: " + r.ReadUInt32());
+            //    Debug.WriteLine("unk5: " + r.ReadUInt32());
+            //    Debug.WriteLine("");
+            //}
+            //catch (Exception e)
+            //{
+            //    //ignore
+            //}
         }
         private static Dictionary<string, int> FixedSizePackets = new Dictionary<string, int>
         {


refactor MQ log message

refactor MQ log message

--- src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
+++ src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.Text;
 using System.Threading;
-using System.Threading.Tasks;
 using RabbitMQ.Client;
 using RabbitMQ.Client.Events;

@@ -32,7 +31,7 @@

         public event EventHandler<MessageContext> OnMessageReceived;

-        public event EventHandler<string> OnError;
+        public event EventHandler<LogMessageEventArgs> OnLog;

         public void Subscribe(IEnumerable<string> topics)
         {
@@ -47,9 +46,17 @@
             var consumer = new EventingBasicConsumer(_channel);
             consumer.Received += OnConsumerReceived;
             consumer.Shutdown += OnConsumerShutdown;
+            consumer.Registered += OnConsumerRegistered;
+            consumer.Unregistered += OnConsumerUnregistered;
+            consumer.ConsumerCancelled += OnConsumerConsumerCancelled;
+
             _channel.BasicConsume(_queueName, false, consumer);
+
             while (true)
-                Task.Delay(timeout, cancellationToken).GetAwaiter().GetResult();
+            {
+                cancellationToken.ThrowIfCancellationRequested();
+                cancellationToken.WaitHandle.WaitOne(timeout);
+            }
         }

         public void Commit()
@@ -69,9 +76,9 @@

         private void InitClient()
         {
-            var connection = _connectionChannelPool.GetConnection();
+            var _connection = _connectionChannelPool.GetConnection();

-            _channel = connection.CreateModel();
+            _channel = _connection.CreateModel();

             _channel.ExchangeDeclare(
                 _exchageName,
@@ -82,6 +89,38 @@
                 { "x-message-ttl", _rabbitMQOptions.QueueMessageExpires }
             };
             _channel.QueueDeclare(_queueName, true, false, false, arguments);
+        }
+
+        #region events
+
+        private void OnConsumerConsumerCancelled(object sender, ConsumerEventArgs e)
+        {
+            var args = new LogMessageEventArgs
+            {
+                LogType =  MqLogType.ConsumerCancelled,
+                Reason = e.ConsumerTag
+            };
+            OnLog?.Invoke(sender, args);
+        }
+
+        private void OnConsumerUnregistered(object sender, ConsumerEventArgs e)
+        {
+            var args = new LogMessageEventArgs
+            {
+                LogType = MqLogType.ConsumerUnregistered,
+                Reason = e.ConsumerTag
+            };
+            OnLog?.Invoke(sender, args);
+        }
+
+        private void OnConsumerRegistered(object sender, ConsumerEventArgs e)
+        {
+            var args = new LogMessageEventArgs
+            {
+                LogType = MqLogType.ConsumerRegistered,
+                Reason = e.ConsumerTag
+            };
+            OnLog?.Invoke(sender, args);
         }

         private void OnConsumerReceived(object sender, BasicDeliverEventArgs e)
@@ -98,7 +137,14 @@

         private void OnConsumerShutdown(object sender, ShutdownEventArgs e)
         {
-            OnError?.Invoke(sender, e.Cause?.ToString());
+            var args = new LogMessageEventArgs
+            {
+                LogType = MqLogType.ConsumerShutdown,
+                Reason = e.ToString()
+            };
+            OnLog?.Invoke(sender, args);
         }
+
+        #endregion
     }
 }


Fix GetRepositoryRemote

Fix GetRepositoryRemote

--- TGS.ControlPanel/Program.cs
+++ TGS.ControlPanel/Program.cs
@@ -115,6 +115,11 @@
 			}

 			//Assume standard gh format: [(git)|(https)]://github.com/owner/repo(.git)[0-1]
+			//Yes use .git twice in case it was weird
+			var toRemove = new string[] { ".git", "/", ".git" };
+			foreach (string item in toRemove)
+				if (remote.EndsWith(item))
+					remote = remote.Substring(0, remote.LastIndexOf(item));
 			var splits = remote.Split('/');
 			name = splits[splits.Length - 1];
 			owner = splits[splits.Length - 2].Split('.')[0];


Fixed: Issue FixedVersion (thanks AverkievKA)

--- Api/Types/Issue.cs
+++ Api/Types/Issue.cs
@@ -315,7 +315,7 @@
             writer.WriteIdIfNotNull(Tracker, "tracker_id");
             writer.WriteIdIfNotNull(AssignedTo, "assigned_to_id");
             writer.WriteIdIfNotNull(ParentIssue, "parent_issue_id");
-            writer.WriteIdIfNotNull(FixedVersion, "fixed_version");
+            writer.WriteIdIfNotNull(FixedVersion, "fixed_version_id");
             writer.WriteIfNotDefaultOrNull(EstimatedHours, "estimated_hours");
             if (StartDate != null)
                 writer.WriteElementString("start_date", StartDate.Value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));


Work to remove buffer copies.

Work to remove buffer copies.

--- src/DtronixMessageQueue/TcpSocket/TcpSocketSession.cs
+++ src/DtronixMessageQueue/TcpSocket/TcpSocketSession.cs
@@ -147,8 +147,11 @@

         private MemoryQueueStream _negotiationStream;

-        private MemoryQueueStream _receiveBlocks;
-        private MemoryQueueStream _sendBlocks;
+        private byte[] _sendBuffer = new byte[16];
+        private int _sendBufferLength = 0;
+
+        private byte[] _receiveBuffer = new byte[16];
+        private int _receiveBufferLength = 0;

         private RSACng _rsa;

@@ -170,8 +173,6 @@
             Id = Guid.NewGuid();
             CurrentState = State.Closed;
             _negotiationStream = new MemoryQueueStream();
-            _receiveBlocks = new MemoryQueueStream();
-            _sendBlocks = new MemoryQueueStream();
         }

         /// <summary>
@@ -417,6 +418,56 @@
             }
         }

+
+        private int TransformDataBuffer(
+            byte[] bufferSource,
+            int offsetSource,
+            int lengthSource,
+            byte[] bufferDest,
+            int offsetDest,
+
+            byte[] transformBuffer,
+            ref int transformBufferLength,
+            ICryptoTransform transformer)
+        {
+            int transformLength = 0;
+            if (transformBufferLength > 0)
+            {
+                int bufferTaken = Math.Min(lengthSource, 16 - transformBufferLength);
+                Buffer.BlockCopy(bufferSource, offsetSource, transformBuffer, transformBufferLength, bufferTaken);
+                transformBufferLength += bufferTaken;
+                offsetSource += bufferTaken;
+                lengthSource -= bufferTaken;
+            }
+
+            if (transformBufferLength == 16)
+            {
+                transformLength += 16;
+                transformer.TransformBlock(transformBuffer, 0, transformBufferLength, bufferDest, offsetDest);
+                transformBufferLength = 0;
+            }
+            else if (lengthSource == 0)
+            {
+                return 0;
+            }
+
+
+            int blockTransformLength = lengthSource / 16 * 16;
+            int transformRemain = lengthSource - blockTransformLength;
+
+            transformLength += transformer.TransformBlock(bufferSource, offsetSource, blockTransformLength, bufferDest,
+                offsetDest + transformBufferLength);
+
+
+            if (transformRemain > 0)
+            {
+                Buffer.BlockCopy(bufferSource, offsetSource + blockTransformLength, transformBuffer, 0, transformRemain);
+                transformBufferLength = transformRemain;
+            }
+
+            return transformLength;
+        }
+
         /// <summary>
         /// Sends raw bytes to the socket.  Blocks until data is sent to the underlying system to send.
         /// </summary>
@@ -427,57 +478,86 @@
         {
             if (Socket == null || Socket.Connected == false)
                 return;
-            bool multiWrite = false;
-
-            do
-            {
-                _writeSemaphore.Wait(-1);
-
-                if (_encryptor != null)
-                {
-                    if (!multiWrite)
-                        _sendBlocks.Write(buffer, offset, length);
-
-                    int transformBlockLength = Math.Max(Config.SendAndReceiveBufferSize, (int) _sendBlocks.Length) /
-                                               16 * 16;
-
-                    var rawBuffer = new byte[transformBlockLength];
-
-                    _sendBlocks.Read(rawBuffer, 0, rawBuffer.Length);
-
-                    length = _encryptor.TransformBlock(rawBuffer, offset, rawBuffer.Length, _sendArgs.Buffer,
-                        _sendArgs.Offset);
-
-                    /*
-                    if (transformed < length)
-                    {
-                        var finalBuffer = _encryptor.TransformFinalBlock(buffer, offset + transformBlockLength, excess);
-                        Buffer.BlockCopy(finalBuffer, 0, _sendArgs.Buffer, _sendArgs.Offset + transformed,
-                            finalBuffer.Length);
-
-                        // Update to the correct legnth.
-                        length = transformed + finalBuffer.Length;
-                    }*/
-                }
-                else
-                    Buffer.BlockCopy(buffer, offset, _sendArgs.Buffer, _sendArgs.Offset, length);
-
-                // Update the buffer length.
-                _sendArgs.SetBuffer(_sendArgs.Offset, length);
-
-                try
-                {
-                    if (Socket.SendAsync(_sendArgs) == false)
-                    {
-                        IoCompleted(this, _sendArgs);
-                    }
-                }
-                catch (ObjectDisposedException)
-                {
-                    Close(CloseReason.SocketError);
-                }
-                multiWrite = true;
-            } while (_sendBlocks.Length >= 16);
+
+            _writeSemaphore.Wait(-1);
+            int sendLength;
+
+            if (_encryptor != null)
+            {
+
+                sendLength = TransformDataBuffer(buffer, offset, length, _sendArgs.Buffer, _sendArgs.Offset, _sendBuffer,
+                    ref _sendBufferLength, _encryptor);
+                if (sendLength == 0)
+                {
+                    // If the packet was small, the message could have gone completely into the send buffer.
+                    _writeSemaphore.Release();
+                    return;
+                }
+
+
+
+                /*
+
+
+                //_sendBlocks.Write(buffer, offset, length);
+                if (_sendBufferLength > 0)
+                {
+                    int sendBufferTaken = Math.Min(length, 16 - _sendBufferLength);
+                    Buffer.BlockCopy(buffer, offset, _sendBuffer, _sendBufferLength, sendBufferTaken);
+                    _sendBufferLength += sendBufferTaken;
+                    offset += sendBufferTaken;
+                    length -= sendBufferTaken;
+                }
+
+                if (_sendBufferLength == 16)
+                {
+                    sendLength += 16;
+                    _encryptor.TransformBlock(_sendBuffer, 0, _sendBufferLength, _sendArgs.Buffer, _sendArgs.Offset);
+                    _sendBufferLength = 0;
+                }
+                else if (length == 0)
+                {
+                    // If the packet was small, the message could have gone completely into the send buffer.
+                    _writeSemaphore.Release();
+                    return;
+                }
+
+
+                int transformLength = length / 16 * 16;
+                int transformRemain = length - transformLength;
+
+                _encryptor.TransformBlock(buffer, offset, transformLength, _sendArgs.Buffer,
+                    _sendArgs.Offset + _sendBufferLength);
+
+
+                if (transformRemain > 0)
+                {
+                    Buffer.BlockCopy(buffer, offset + transformLength, _sendBuffer, 0, transformRemain);
+                    _sendBufferLength = transformRemain;
+                }
+                */
+            }
+            else
+            {
+                Buffer.BlockCopy(buffer, offset, _sendArgs.Buffer, _sendArgs.Offset, length);
+                sendLength = length;
+            }
+
+            // Update the buffer length.
+            _sendArgs.SetBuffer(_sendArgs.Offset, sendLength);
+
+            try
+            {
+                if (Socket.SendAsync(_sendArgs) == false)
+                {
+                    IoCompleted(this, _sendArgs);
+                }
+            }
+            catch (ObjectDisposedException)
+            {
+                Close(CloseReason.SocketError);
+            }
+
         }

@@ -523,15 +603,11 @@

                 if (_decryptor != null)
                 {
-                    _receiveBlocks.Write(buffer);
-
-                    // Read out exactly the amount required.
-                    int transformBlockLength = (int)_receiveBlocks.Length / 16 * 16;
-                    var encryptedBytes = new byte[transformBlockLength];
-                    var decryptedBytes = new byte[transformBlockLength];
-                    _receiveBlocks.Read(encryptedBytes, 0, encryptedBytes.Length);
-
-                    var transformed = _decryptor.TransformBlock(encryptedBytes, 0, transformBlockLength, decryptedBytes, 0);
+
+
+
+
+
                 }

                 if (CurrentState == State.Securing)


Mark old API methods in Game as obsolete

--- PlayerRank/Game.cs
+++ PlayerRank/Game.cs
@@ -7,19 +7,7 @@
     public class Game
     {
         private readonly Dictionary<string, Points> m_Scores = new Dictionary<string, Points>();
-
-        public void AddResult(string name, double score)
-        {
-            if (m_Scores.ContainsKey(name))
-            {
-                m_Scores[name] = new Points(score);
-            }
-            else
-            {
-                m_Scores.Add(name, new Points(score));
-            }
-        }
-
+
         public void AddResult(string name, Points points)
         {
             if (m_Scores.ContainsKey(name))
@@ -41,5 +29,20 @@
             }
             return oldResults;
         }
+
+        /// Obsolete V1 API
+
+        [Obsolete("Please use AddResult(string, Points) instead")]
+        public void AddResult(string name, double score)
+        {
+            if (m_Scores.ContainsKey(name))
+            {
+                m_Scores[name] = new Points(score);
+            }
+            else
+            {
+                m_Scores.Add(name, new Points(score));
+            }
+        }
     }
 }


Use `using` for disposable objects (#715)

--- src/DurableTask.Core/Serializing/JsonDataConverter.cs
+++ src/DurableTask.Core/Serializing/JsonDataConverter.cs
@@ -76,14 +76,14 @@
             }

             var sb = new StringBuilder(0x100);
-            var textWriter = new StringWriter(sb, CultureInfo.InvariantCulture);
+            using (var textWriter = new StringWriter(sb, CultureInfo.InvariantCulture))
             using (var writer = new JsonTextWriter(textWriter))
             {
                 writer.Formatting = (formatted ? Formatting.Indented : Formatting.None);
                 this.serializer.Serialize(writer, value);
+
+                return textWriter.ToString();
             }
-
-            return textWriter.ToString();
         }

         /// <summary>
@@ -99,9 +99,11 @@
                 return null;
             }

-            var reader = new StringReader(data);
-
-            return this.serializer.Deserialize(new JsonTextReader(reader), objectType);
+            using (var reader = new StringReader(data))
+            using (var jsonTextReader = new JsonTextReader(reader))
+            {
+                return this.serializer.Deserialize(jsonTextReader, objectType);
+            }
         }
     }
 }


MapView: call 'CreateButtons' in constructor

* this makes sure that the buttons are always available
  and avoids NullReferenceExceptions (fixing #1282)

(cherry picked from commit f3c7e64b7215d3eb701a8d0a5e3cbd9138868129)

--- Mapsui.UI.Forms/MapView.cs
+++ Mapsui.UI.Forms/MapView.cs
@@ -91,6 +91,8 @@
             _pictZoomOut = new SKSvg().Load(Utilities.EmbeddedResourceLoader.Load("Images.ZoomOut.svg", typeof(MapView)));
             _pictNorthing = new SKSvg().Load(Utilities.EmbeddedResourceLoader.Load("Images.RotationZero.svg", typeof(MapView)));

+            CreateButtons();
+
             _pins.CollectionChanged += HandlerPinsOnCollectionChanged;
             _drawable.CollectionChanged += HandlerDrawablesOnCollectionChanged;


add Crash_ObjectAddBadKey, Crash_ObjectAddBadValue methods

--- TestCore/TestBtreeObject.cs
+++ TestCore/TestBtreeObject.cs
@@ -151,6 +151,22 @@
         {
             Setup();
             Assert.IsFalse (objCol1.IsSynchronized);
+        }
+
+        [TestMethod]
+        [ExpectedException (typeof (ArgumentException))]
+        public void Crash_ObjectAddBadKey()
+        {
+            Setup();
+            objCol2.Add (23, 45);
+        }
+
+        [TestMethod]
+        [ExpectedException (typeof (ArgumentException))]
+        public void Crash_ObjectAddBadValue()
+        {
+            Setup();
+            objCol2.Add ("razz", "matazz");
         }

         [TestMethod]


[CHG] added missing properties (Status, Company, AccountChar) and associated enums (AccountStatus, SubAccountType)

--- TextmagicRest/Model/User.cs
+++ TextmagicRest/Model/User.cs
@@ -1,7 +1,21 @@
 using System;
+using RestSharp.Deserializers;

 namespace TextmagicRest.Model
 {
+    public enum AccountStatus
+    {
+        Active = 'A',
+        Trial = 'T'
+    }
+
+    public enum SubAccountType
+    {
+        ParentUser = 'P',
+        AdministratorSubAccount = 'A',
+        RegularUser = 'U'
+    }
+
     /// <summary>
     /// User account representation class
     /// </summary>
@@ -32,10 +46,27 @@
         /// </summary>
         public virtual string Name { get { return FirstName + " " + LastName; } }

+        [DeserializeAs(Name = "status")]
+        public char StatusChar { get; set; }
+        /// <summary>
+        /// Current Account Status
+        /// </summary>
+        [DeserializeAs(Name = "fake-unused-name")]
+        public AccountStatus Status
+        {
+            get { return (AccountStatus)StatusChar; }
+            set { StatusChar = value.ToString()[0]; }
+        }
+
         /// <summary>
         /// Account balance, in account currency
         /// </summary>
         public double Balance { get; set; }
+
+        /// <summary>
+        /// Account Company
+        /// </summary>
+        public string Company { get; set; }

         /// <summary>
         /// Account currency
@@ -46,5 +77,18 @@
         /// Account timezone
         /// </summary>
         public Timezone Timezone { get; set; }
+
+        [DeserializeAs(Name = "subaccountType")]
+        public char AccountChar { get; set; }
+        /// <summary>
+        /// Type of Account
+        /// </summary>
+        [DeserializeAs(Name = "fake-unused-name")]
+        public SubAccountType SubaccountType
+        {
+            get { return (SubAccountType)AccountChar; }
+            set { AccountChar = value.ToString()[0]; }
+        }
+
     }
 }


Added logging.

Added logging.

--- src/GitHub.App/ViewModels/PullRequestListViewModel.cs
+++ src/GitHub.App/ViewModels/PullRequestListViewModel.cs
@@ -6,7 +6,6 @@
 using System.Reactive.Linq;
 using System.Windows.Input;
 using System.Windows.Media.Imaging;
-using System.Windows.Threading;
 using GitHub.App;
 using GitHub.Collections;
 using GitHub.Exports;
@@ -14,6 +13,7 @@
 using GitHub.Services;
 using GitHub.Settings;
 using GitHub.UI;
+using NLog;
 using NullGuard;
 using ReactiveUI;

@@ -23,6 +23,8 @@
     [PartCreationPolicy(CreationPolicy.NonShared)]
     public class PullRequestListViewModel : BaseViewModel, IPullRequestListViewModel, IDisposable
     {
+        static readonly Logger log = LogManager.GetCurrentClassLogger();
+
         readonly ReactiveCommand<object> openPullRequestCommand;
         readonly IRepositoryHost repositoryHost;
         readonly ILocalRepositoryModel repository;
@@ -109,12 +111,13 @@
                 .ObserveOn(RxApp.MainThreadScheduler)
                 .Catch<System.Reactive.Unit, Octokit.AuthorizationException>(ex =>
                 {
-                    // TODO: Do some decent logging here
+                    log.Info("Received AuthorizationException reading pull requests", ex);
                     return repositoryHost.LogOut();
                 })
                 .Catch<System.Reactive.Unit, Exception>(ex =>
                 {
                     // Occurs on network error, when the repository was deleted on GitHub etc.
+                    log.Info("Received Exception reading pull requests", ex);
                     return Observable.Empty<System.Reactive.Unit>();
                 })
                 .Subscribe(_ =>


Clean up connection manager

Clean up connection manager

--- src/GitHub.VisualStudio/Services/ConnectionManager.cs
+++ src/GitHub.VisualStudio/Services/ConnectionManager.cs
@@ -45,7 +45,6 @@

             LoadConnectionsFromCache();

-            // TODO: Load list of known connections from cache
             Connections.CollectionChanged += RefreshConnections;
         }

@@ -73,18 +72,14 @@

         void RefreshConnections(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
         {
-            // TODO: save list of known connections to cache
             SaveConnectionsToCache();
         }

         void LoadConnectionsFromCache()
         {
             if (!operatingSystem.File.Exists(cachePath))
-            {
-                // FAKE!
-                Connections.Add(new Connection(HostAddress.GitHubDotComHostAddress, "shana"));
                 return;
-            }
+
             string data = operatingSystem.File.ReadAllText(cachePath, Encoding.UTF8);

             CacheData cacheData;


default cultures constant

default cultures constant

--- src/GrafGenerator.ResxLocalize/ResxLocalizeCommand.cs
+++ src/GrafGenerator.ResxLocalize/ResxLocalizeCommand.cs
@@ -10,6 +10,7 @@
     public class ResxLocalizeCommand : PSCmdlet
     {
         private JArray _jsonInput;
+        private readonly string[] _defaultCultures = new[] {"ar-AE", "cs-CZ", "el-GR", "es-CL", "kk-KZ", "ky-KG", "ru-RU", "uk-UA"};

         #region Parameters

@@ -57,7 +58,7 @@

             if (TargetCultures == null || TargetCultures.Length == 0)
             {
-                TargetCultures = new[] {"ar-AE", "cs-CZ", "el-GR", "es-CL", "kk-KZ", "ky-KG", "ru-RU", "uk-UA"};
+                TargetCultures = _defaultCultures;
             }

             SourceCulture = CultureInfo.CreateSpecificCulture(SourceCulture).Name;


Removed unnecessary layers

Removed unnecessary layers

--- src/Mages.Core/Runtime/Functions/StandardFunctions.cs
+++ src/Mages.Core/Runtime/Functions/StandardFunctions.cs
@@ -10,7 +10,7 @@
         /// <summary>
         /// Wraps the Math.Sqrt function.
         /// </summary>
-        public static readonly Function Sqrt = (new ArithmeticFunction(x => Math.Sqrt(x))).Invoke;
+        public static readonly Function Sqrt = (new ArithmeticFunction(Math.Sqrt)).Invoke;

         /// <summary>
         /// Contains the factorial function.
@@ -50,27 +50,27 @@
         /// <summary>
         /// Wraps the Math.Ceiling function.
         /// </summary>
-        public static readonly Function Ceil = (new ArithmeticFunction(x => Math.Ceiling(x))).Invoke;
+        public static readonly Function Ceil = (new ArithmeticFunction(Math.Ceiling)).Invoke;

         /// <summary>
         /// Wraps the Math.Floor function.
         /// </summary>
-        public static readonly Function Floor = (new ArithmeticFunction(x => Math.Floor(x))).Invoke;
+        public static readonly Function Floor = (new ArithmeticFunction(Math.Floor)).Invoke;

         /// <summary>
         /// Wraps the Math.Round function.
         /// </summary>
-        public static readonly Function Round = (new ArithmeticFunction(x => Math.Round(x))).Invoke;
+        public static readonly Function Round = (new ArithmeticFunction(Math.Round)).Invoke;

         /// <summary>
         /// Wraps the Math.Exp function.
         /// </summary>
-        public static readonly Function Exp = (new ArithmeticFunction(x => Math.Exp(x))).Invoke;
+        public static readonly Function Exp = (new ArithmeticFunction(Math.Exp)).Invoke;

         /// <summary>
         /// Wraps the Math.Log function.
         /// </summary>
-        public static readonly Function Log = (new ArithmeticFunction(x => Math.Log(x))).Invoke;
+        public static readonly Function Log = (new ArithmeticFunction(Math.Log)).Invoke;

         /// <summary>
         /// Contains the add operator.


[Markdig.Xaml] Use Section instead of Paragraph for quote blocks.

--- src/Markdig.Xaml/Renderers/Xaml/QuoteBlockRenderer.cs
+++ src/Markdig.Xaml/Renderers/Xaml/QuoteBlockRenderer.cs
@@ -17,9 +17,9 @@
             renderer.EnsureLine();

             // TODO: apply quote block styling
-            renderer.Write("<Paragraph>");
+            renderer.Write("<Section>");
             renderer.WriteChildren(obj);
-            renderer.WriteLine("</Paragraph>");
+            renderer.WriteLine("</Section>");
         }
     }
 }


Add prototype function for missing plug InitOrdinalCasingPage

--- source/Cosmos.Core_Plugs/Interop/GlobalizationImpl.cs
+++ source/Cosmos.Core_Plugs/Interop/GlobalizationImpl.cs
@@ -29,7 +29,7 @@
             throw new NotImplementedException();
         }
         [PlugMethod(Signature = "System_Void__Interop_Globalization_InitOrdinalCasingPage_System_Int32__System_Char__")]
-        public static void InitOrdinalCasingPage()
+        public static unsafe void InitOrdinalCasingPage(int pageNumber, char* pTarget)
         {
             throw new NotImplementedException();
         }


도형이 잘못된 도형인지 체크하는 로직 추가

도형이 잘못된 도형인지 체크하는 로직 추가

--- GCS.Math/Geometry.cs
+++ GCS.Math/Geometry.cs
@@ -8,6 +8,13 @@
         #region GetIntersects
         public static Vector2[] GetIntersects(ILine line1, ILine line2)
         {
+            try
+            {
+                ThrowIfInvalidShape(line1);
+                ThrowIfInvalidShape(line2);
+            }
+            catch { throw; }
+
             if (Grad(line1) == Grad(line2))
             {
                 if (Yint(line1) == Yint(line2))
@@ -21,6 +28,13 @@

         public static Vector2[] GetIntersects(ISegment seg1, ISegment seg2)
         {
+            try
+            {
+                ThrowIfInvalidShape(seg1);
+                ThrowIfInvalidShape(seg2);
+            }
+            catch { throw; }
+
             if (Grad(seg1) == Grad(seg2))
             {
                 if (Yint(seg1) == Yint(seg2))
@@ -53,6 +67,16 @@
         {
             throw new WorkWoorimException();
         }
+
+        public static void ThrowIfInvalidShape(ILineLike shape)
+        {
+            if (shape.Point1 == shape.Point2) throw new InvalidShapeException();
+        }
+
+        public static void ThrowIfInvalidShape(ICircle shape)
+        {
+            if (shape.Center == shape.Another) throw new InvalidShapeException();
+        }

         public static float Grad(ILineLike line)
             => (float)((line.Point2.Y - line.Point1.Y) / (line.Point2.X - line.Point1.X));


Windows: The application called an interface that was marshalled for a different thread.

--- source/FFImageLoading.Windows/Work/ImageLoaderTask.cs
+++ source/FFImageLoading.Windows/Work/ImageLoaderTask.cs
@@ -126,9 +126,14 @@
                 if (IsCancelled)
                     return CacheResult.NotFound; // not sure what to return in that case

+                int pixelWidth = 0;
+                int pixelHeight = 0;
+
                 await MainThreadDispatcher.PostAsync(() =>
                 {
                     _doWithImage(value, true);
+                    pixelWidth = value.PixelWidth;
+                    pixelHeight = value.PixelHeight;
                 }).ConfigureAwait(false);

                 if (IsCancelled)
@@ -137,7 +142,7 @@
                 Completed = true;

                 if (Parameters.OnSuccess != null)
-                    Parameters.OnSuccess(new ImageSize(value.PixelWidth, value.PixelHeight), LoadingResult.MemoryCache);
+                    Parameters.OnSuccess(new ImageSize(pixelWidth, pixelHeight), LoadingResult.MemoryCache);

                 return CacheResult.Found; // found and loaded from cache
             }


Rename OutcomeCreateGuidePost to OutcomeCreatedGuidePost.

--- src/Money.UI/Views/Navigation/ApplicationNavigator.cs
+++ src/Money.UI/Views/Navigation/ApplicationNavigator.cs
@@ -59,7 +59,7 @@

             if (isOutcome)
             {
-                OutcomeCreateGuidePost dialog = new OutcomeCreateGuidePost();
+                OutcomeCreatedGuidePost dialog = new OutcomeCreatedGuidePost();
                 dialog.ShowAsync();
             }
         }


Fix: PartyMembers now properly inherits from BaseTable

--- src/MysticChronicles.Engine/DB/Tables/PartyMembers.cs
+++ src/MysticChronicles.Engine/DB/Tables/PartyMembers.cs
@@ -1,6 +1,6 @@
 namespace MysticChronicles.Engine.DB.Tables
 {
-    public class PartyMembers
+    public class PartyMembers : BaseTable
     {
         public int GameID { get; set; }


SqlException: add useful data to the custom log

--- StackExchange.Exceptional/ErrorStore.cs
+++ StackExchange.Exceptional/ErrorStore.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
+using System.Data.SqlClient;
 using System.Diagnostics;
 using System.Linq;
 using System.Text.RegularExpressions;
@@ -582,8 +583,7 @@
                 var exCursor = ex;
                 while (exCursor != null)
                 {
-                    if (exCursor.Data.Contains("SQL"))
-                        error.SQL = exCursor.Data["SQL"] as string;
+                    AddErrorData(error, exCursor);
                     exCursor = exCursor.InnerException;
                 }

@@ -632,6 +632,20 @@
             }
         }

+        private static void AddErrorData(Error error, Exception exception)
+        {
+            if (exception.Data.Contains("SQL"))
+                error.SQL = exception.Data["SQL"] as string;
+
+            var se = exception as SqlException;
+            if (se != null)
+            {
+                error.CustomData["SQL-Server"] = se.Server;
+                error.CustomData["SQL-ErrorNumber"] = se.Number.ToString();
+                error.CustomData["SQL-LineNumber"] = se.LineNumber.ToString();
+            }
+        }
+
         /// <summary>
         /// Returns true if t is of className, or descendent from className
         /// </summary>


Add debug symbols to library based on codegen

--- JniBridge.bee.cs
+++ JniBridge.bee.cs
@@ -147,7 +147,7 @@
         foreach (var toolchain in androidToolchains)
         {
             var androidConfig = new NativeProgramConfiguration(codegen, toolchain, false);
-            var np = SetupJniBridgeStaticLib(generatedFilesAndroid, androidConfig, GetAndroidStaticLibParams(toolchain), androidZip);
+            var np = SetupJniBridgeStaticLib(generatedFilesAndroid, androidConfig, GetAndroidStaticLibParams(toolchain, codegen), androidZip);
             nativePrograms.Add(np);
         }
         var headers = SetupJniBridgeHeaders(generatedFilesAndroid, "android");
@@ -335,17 +335,18 @@
         public Action<NativeProgram> specialConfiguration;
     }

-    static StaticLibParams GetAndroidStaticLibParams(ToolChain toolchain)
-    {
+    static StaticLibParams GetAndroidStaticLibParams(ToolChain toolchain, CodeGen codegen)
+    {
+        var debugMode = codegen == CodeGen.Release ? DebugMode.None : DebugMode.IncludeDebugSymbols;
         Action<NativeProgram> specConfig =  (toolchain.Architecture is ARMv7Architecture)
             ? (np) =>
             {
                 np.CompilerSettingsForAndroid().Add(c => c.WithThumb(true));
-                np.CompilerSettingsForAndroid().Add(c => c.WithDebugMode(DebugMode.None));
+                np.CompilerSettingsForAndroid().Add(c => c.WithDebugMode(debugMode));
             }
             : (np) =>
             {
-                np.CompilerSettingsForAndroid().Add(c => c.WithDebugMode(DebugMode.None));
+                np.CompilerSettingsForAndroid().Add(c => c.WithDebugMode(debugMode));
             };
         return new StaticLibParams()
         {


Bound checks caret position update

Bound checks caret position update

--- src/RoslynPad.RoslynEditor/AvalonEditTextContainer.cs
+++ src/RoslynPad.RoslynEditor/AvalonEditTextContainer.cs
@@ -71,7 +71,12 @@
             finally
             {
                 _updatding = false;
-                _editor.CaretOffset = caret + offset;
+                var carretOffset = caret + offset;
+                if (carretOffset < 0)
+                    carretOffset = 0;
+                if (carretOffset > newText.Length)
+                    carretOffset = newText.Length;
+                _editor.CaretOffset = carretOffset;
                 _editor.Document.EndUpdate();
             }
         }


同步SDKv7.0.0.5更新

--- SunSync/SunSync/SyncSettingPage.xaml.cs
+++ SunSync/SunSync/SyncSettingPage.xaml.cs
@@ -483,7 +483,8 @@
             this.syncSetting.UploadFromCDN = this.RadioButtonFromCDN.IsChecked.Value;

             // 根据ZoneID完成相应配置
-            Qiniu.Common.Config.ConfigZone(targetZoneId);
+            Config.ConfigZone(targetZoneId);
+            Config.UploadFromCDN = this.syncSetting.UploadFromCDN;

             return true;
         }


ask retry if failed to save settings

ask retry if failed to save settings

--- TCC.Core/Settings/JsonSettingsWriter.cs
+++ TCC.Core/Settings/JsonSettingsWriter.cs
@@ -1,5 +1,8 @@
-using System.IO;
+using System;
+using System.IO;
+using System.Windows;
 using Newtonsoft.Json;
+using TCC.Windows;

 namespace TCC.Settings
 {
@@ -15,7 +18,15 @@
             var savePath = SettingsContainer.SettingsOverride == ""
                 ? Path.Combine(App.BasePath, FileName)
                 : SettingsContainer.SettingsOverride;
-            File.WriteAllText(savePath, json);
+            try
+            {
+                File.WriteAllText(savePath, json);
+            }
+            catch (IOException ex)
+            {
+                var res = TccMessageBox.Show("TCC", $"Failed to save settings: {ex.Message}\nTry again?", MessageBoxButton.YesNo);
+                if(res == MessageBoxResult.Yes) Save();
+            }
         }
     }
 }


closes #105

closes #105

--- TIKSN.Core/Data/EntityRepositoryBase.cs
+++ TIKSN.Core/Data/EntityRepositoryBase.cs
@@ -65,14 +65,12 @@
 			return Task.FromResult<object>(null);
 		}

-		protected async Task<IEnumerable<T>> SearchAsync(Func<DbSet<T>, IQueryable<T>> filter, CancellationToken cancellationToken = default(CancellationToken))
+		protected async Task<IEnumerable<TResult>> SearchAsync<TResult>(Func<DbSet<T>, IQueryable<TResult>> filter, CancellationToken cancellationToken = default(CancellationToken))
 		{
 			var tableDataSet = dbContext.Set<T>();
 			var query = filter(tableDataSet);

-			IEnumerable<T> matchedEntities = await query.ToListAsync(cancellationToken);
-
-			return matchedEntities;
+			return await query.ToListAsync(cancellationToken);
 		}
 	}
 }


Tests for Read_CharArrayTest reading more than necessary (#40521)

* Tests for Read_CharArrayTest reading more than necessary

* Update src/System.IO/tests/BinaryReader/BinaryReaderTests.cs

Co-Authored-By: Stephen Toub <94274d0b635748ad8df96c0fc4f19e1ecd3f67e2@microsoft.com>

--- src/System.IO/tests/BinaryReader/BinaryReaderTests.cs
+++ src/System.IO/tests/BinaryReader/BinaryReaderTests.cs
@@ -126,7 +126,7 @@

                 using (var reader = new BinaryReader(str, new NegEncoding()))
                 {
-                    AssertExtensions.Throws<ArgumentOutOfRangeException>("charsRemaining", () => reader.Read(new char[10], 0, 10));
+                    Assert.ThrowsAny<ArgumentException>(() => reader.Read(new char[10], 0, 10));
                 }
             }
         }
@@ -187,5 +187,46 @@
                 }
             }
         }
+
+        // ChunkingStream returns less than requested
+        private sealed class ChunkingStream : MemoryStream
+        {
+            public override int Read(byte[] buffer, int offset, int count)
+            {
+                return base.Read(buffer, offset, count > 10 ? count - 3 : count);
+            }
+
+            public override int Read(Span<byte> destination)
+            {
+                return base.Read(destination.Length > 10 ? destination.Slice(0, destination.Length - 3) : destination);
+            }
+        }
+
+        [Theory]
+        [InlineData(false)]
+        [InlineData(true)]
+        public void ReadChars_OverReads(bool unicodeEncoding)
+        {
+            Encoding encoding = unicodeEncoding ? Encoding.Unicode : Encoding.UTF8;
+
+            char[] data1 = "hello world \ud83d\ude03!".ToCharArray(); // 14 code points, 15 chars in UTF-16, 17 bytes in UTF-8
+            uint data2 = 0xABCDEF01;
+
+            using (Stream stream = new ChunkingStream())
+            {
+                using (BinaryWriter writer = new BinaryWriter(stream, encoding, leaveOpen: true))
+                {
+                    writer.Write(data1);
+                    writer.Write(data2);
+                }
+
+                stream.Seek(0, SeekOrigin.Begin);
+                using (BinaryReader reader = new BinaryReader(stream, encoding, leaveOpen: true))
+                {
+                    Assert.Equal(data1, reader.ReadChars(data1.Length));
+                    Assert.Equal(data2, reader.ReadUInt32());
+                }
+            }
+        }
     }
 }


Attribute IsList shal be ised if the type is a LIst<type>.

--- Asap2/Asap2File.cs
+++ Asap2/Asap2File.cs
@@ -327,7 +327,7 @@
         public decimal LowerLimit;
         [Element(8, IsArgument = true, Comment = " UpperLimit     ")]
         public decimal UpperLimit;
-        [Element(9)]
+        [Element(9, IsList = true)]
         public List<ANNOTATION> annotation = new List<ANNOTATION>();
         [Element(10)]
         public ARRAY_SIZE array_size;
@@ -1120,7 +1120,7 @@
         public string GroupName;
         [Element(2, IsString = true, Comment   = " GroupLongIdentifier ")]
         public string GroupLongIdentifier;
-        [Element(3)]
+        [Element(3, IsList = true)]
         public List<ANNOTATION> annotation = new List<ANNOTATION>();
         [Element(4)]
         public FUNCTION_LIST function_list;


Disable ping tests against specific issue (#22279)

Updating ActiveIssue annotations to point to the specific issue that's tracking System.Net.NetworkInformation.Ping not working inside an AppContainer.

Contributes to #19583

--- src/System.Net.Ping/tests/FunctionalTests/PingTest.cs
+++ src/System.Net.Ping/tests/FunctionalTests/PingTest.cs
@@ -81,7 +81,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public async Task SendPingAsyncWithIPAddress()
         {
             IPAddress localIpAddress = await TestSettings.GetLocalIPAddress();
@@ -96,7 +96,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public async Task SendPingAsyncWithIPAddress_AddressAsString()
         {
             IPAddress localIpAddress = await TestSettings.GetLocalIPAddress();
@@ -111,7 +111,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public async Task SendPingAsyncWithIPAddressAndTimeout()
         {
             IPAddress localIpAddress = await TestSettings.GetLocalIPAddress();
@@ -126,7 +126,7 @@
         }

         [PlatformSpecific(TestPlatforms.Windows)]  // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply.
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         [Fact]
         public async Task SendPingAsyncWithIPAddressAndTimeoutAndBuffer()
         {
@@ -171,7 +171,7 @@
         }

         [PlatformSpecific(TestPlatforms.Windows)]  // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply.
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         [Fact]
         public async Task SendPingAsyncWithIPAddressAndTimeoutAndBufferAndPingOptions()
         {
@@ -217,7 +217,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public async Task SendPingAsyncWithHost()
         {
             IPAddress localIpAddress = await TestSettings.GetLocalIPAddress();
@@ -232,7 +232,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public async Task SendPingAsyncWithHostAndTimeout()
         {
             IPAddress localIpAddress = await TestSettings.GetLocalIPAddress();
@@ -247,7 +247,7 @@
         }

         [PlatformSpecific(TestPlatforms.Windows)]  // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply.
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         [Fact]
         public async Task SendPingAsyncWithHostAndTimeoutAndBuffer()
         {
@@ -292,7 +292,7 @@
         }

         [PlatformSpecific(TestPlatforms.Windows)]  // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply.
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         [Fact]
         public async Task SendPingAsyncWithHostAndTimeoutAndBufferAndPingOptions()
         {
@@ -337,7 +337,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public static async Task SendPings_ReuseInstance_Hostname()
         {
             IPAddress localIpAddress = await TestSettings.GetLocalIPAddress();
@@ -354,7 +354,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public static async Task Sends_ReuseInstance_Hostname()
         {
             IPAddress localIpAddress = await TestSettings.GetLocalIPAddress();
@@ -371,7 +371,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public static async Task SendAsyncs_ReuseInstance_Hostname()
         {
             IPAddress localIpAddress = await TestSettings.GetLocalIPAddress();
@@ -423,7 +423,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public static async Task Ping_DisposeAfterSend_Success()
         {
             Ping p = new Ping();
@@ -432,7 +432,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public static void Ping_DisposeMultipletimes_Success()
         {
             Ping p = new Ping();
@@ -441,7 +441,7 @@
         }

         [Fact]
-        [ActiveIssue(20130, TargetFrameworkMonikers.Uap)]
+        [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
         public static void Ping_SendAfterDispose_ThrowsSynchronously()
         {
             Ping p = new Ping();


get days from sunday

get days from sunday

--- Assets/MyScript.cs
+++ Assets/MyScript.cs
@@ -1,6 +1,11 @@
 using UnityEngine;
 using System.Collections;
 using System; // for TimeSpan
+
+/*
+ * v0.1 2015/09/12
+ *   - get days from sunday
+ */

 public class MyScript : MonoBehaviour {

@@ -11,13 +16,14 @@
 	}

 	void Test_weekly() {
-		Debug.Log ("test weekly");
-
 		System.DateTime now = System.DateTime.Now;
 		System.DateTime sunday = getSundayH00M00S00 (now);

-		Debug.Log (now.ToString ());
-		Debug.Log (sunday.ToString ());
+		int daysdiff = now.Subtract (sunday).Days;
+
+		Debug.Log ("now: " + now.ToString ());
+		Debug.Log ("sunday: " + sunday.ToString ());
+		Debug.Log ("days: " + daysdiff);
 	}

 	void Start () {


release

release

--- Terradue.Tep/Properties/AssemblyInfo.cs
+++ Terradue.Tep/Properties/AssemblyInfo.cs
@@ -4,7 +4,7 @@
 @{
     Terradue.Tep Software Package provides with all the functionalities specific to the TEP.

-    \xrefitem sw_version "Versions" "Software Package Version" 1.2.11
+    \xrefitem sw_version "Versions" "Software Package Version" 1.2.12

     \xrefitem sw_link "Links" "Software Package List" [Terradue.Tep](https://git.terradue.com/sugar/Terradue.Tep)

@@ -77,6 +77,6 @@
 [assembly: AssemblyLicenseUrl("")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.2.11")]
-[assembly: AssemblyInformationalVersion("1.2.11")]
+[assembly: AssemblyVersion("1.2.12")]
+[assembly: AssemblyInformationalVersion("1.2.12")]
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]


UAPAOT AppDomain start

UAPAOT AppDomain start

--- src/System.Runtime.Extensions/src/System/AppDomain.cs
+++ src/System.Runtime.Extensions/src/System/AppDomain.cs
@@ -5,6 +5,7 @@
 #pragma warning disable CS0067 // events are declared but not used

 using System;
+using System.Collections.Generic;
 using System.Reflection;
 using System.Runtime.ExceptionServices;
 #if !uapaot
@@ -25,7 +26,6 @@

         public static AppDomain CurrentDomain => s_domain;

-#if !uapaot
         public string BaseDirectory => AppContext.BaseDirectory;

         public string RelativeSearchPath => null;
@@ -35,7 +35,6 @@
             add { AppContext.UnhandledException += value; }
             remove { AppContext.UnhandledException -= value; }
         }
-#endif

         public string DynamicDirectory => null;

@@ -59,7 +58,6 @@

         public event EventHandler DomainUnload;

-#if !uapaot
         public event EventHandler<FirstChanceExceptionEventArgs> FirstChanceException
         {
             add { AppContext.FirstChanceException += value; }
@@ -71,7 +69,6 @@
             add { AppContext.ProcessExit += value; }
             remove { AppContext.ProcessExit -= value; }
         }
-#endif

         public string ApplyPolicy(string assemblyName)
         {
@@ -150,7 +147,6 @@
         public int ExecuteAssemblyByName(string assemblyName, params string[] args) =>
             ExecuteAssembly(Assembly.Load(assemblyName), args);

-#if !uapaot
         public object GetData(string name) => AppContext.GetData(name);

         public void SetData(string name, object data) => AppContext.SetData(name, data);
@@ -160,7 +156,6 @@
             bool result;
             return AppContext.TryGetSwitch(value, out result) ? result : default(bool?);
         }
-#endif

         public bool IsDefaultAppDomain() => true;

@@ -261,6 +256,97 @@
         {
             add { AssemblyLoadContext.ResourceResolve += value; }
             remove { AssemblyLoadContext.ResourceResolve -= value; }
+        }
+#else
+        public Assembly[] GetAssemblies()
+        {
+            List<string> names = new List<string>();
+            List<Assembly> assemblies = new List<Assembly>();
+            List<Assembly> stack = new List<Assembly>();
+
+            stack.Add(Assembly.GetEntryAssembly());
+            names.Add(Assembly.GetEntryAssembly().FullName);
+
+            while (stack.Count > 0)
+            {
+                Assembly assembly = stack[stack.Count - 1];
+                stack.RemoveAt(stack.Count - 1);
+                assemblies.Add(assembly);
+/*
+                foreach (var reference in assembly.GetReferencedAssemblies())
+                {
+                    if (!names.Contains(reference.FullName))
+                    {
+                        stack.Add(reference);
+                        names.Add(reference.FullName);
+                    }
+                }
+*/
+            }
+
+            return assemblies.ToArray();
+        }
+
+        public event AssemblyLoadEventHandler AssemblyLoad
+        {
+            add { throw new PlatformNotSupportedException(); }
+            remove { throw new PlatformNotSupportedException(); }
+        }
+
+        public event ResolveEventHandler AssemblyResolve
+        {
+            add { throw new PlatformNotSupportedException(); }
+            remove { throw new PlatformNotSupportedException(); }
+        }
+
+        public event ResolveEventHandler ReflectionOnlyAssemblyResolve;
+
+        public event ResolveEventHandler TypeResolve
+        {
+            add { throw new PlatformNotSupportedException(); }
+            remove { throw new PlatformNotSupportedException(); }
+        }
+
+        public event ResolveEventHandler ResourceResolve
+        {
+            add { throw new PlatformNotSupportedException(); }
+            remove { throw new PlatformNotSupportedException(); }
+        }
+
+        public delegate void AssemblyLoadEventHandler(object sender, AssemblyLoadEventArgs args);
+        public delegate Assembly ResolveEventHandler(object sender, ResolveEventArgs args);
+
+        public class AssemblyLoadEventArgs : EventArgs
+        {
+            private Assembly _LoadedAssembly;
+
+            public Assembly LoadedAssembly { get { return _LoadedAssembly; } }
+
+            public AssemblyLoadEventArgs(Assembly loadedAssembly)
+            {
+                _LoadedAssembly = loadedAssembly;
+            }
+        }
+
+        public class ResolveEventArgs : EventArgs
+        {
+            private String _Name;
+            private Assembly _RequestingAssembly;
+
+            public String Name { get { return _Name; } }
+
+            public Assembly RequestingAssembly { get { return _RequestingAssembly; } }
+
+            public ResolveEventArgs(String name)
+            {
+                _Name = name;
+            }
+
+            public ResolveEventArgs(String name, Assembly requestingAssembly)
+            {
+                _Name = name;
+                _RequestingAssembly = requestingAssembly;
+            }
         }
 #endif


Improve content sizes

Improve content sizes

--- Tests/Agg.Tests/Agg/WidgetClickTests.cs
+++ Tests/Agg.Tests/Agg/WidgetClickTests.cs
@@ -99,7 +99,7 @@
 			{
 				Width = 50,
 				HAnchor = HAnchor.Stretch,
-				VAnchor = VAnchor.Stretch,
+				VAnchor = VAnchor.Fit | VAnchor.Center,
 				Margin = new BorderDouble(50),
 				Name = "rootClickable",
 				BackgroundColor = RGBA_Bytes.Blue


Fixed BigInteger test failure for uk-UA (#15587)

* Fixed BigInteger test failure for uk-UA

BigInteger string parsing test was faulty for cultures that use 0xA0
as the group separator. The fixed test does not expect an exception
anymore if:
 - The trailing whitespace is 0x20 characters only AND
 - Grouping is allowed (NumberStyles.AllowThousands) AND
 - Currency symbol is allowed and currency group separator is 0xA0 OR
   Currency symbol is not allowed and number group separator is 0xA0

Fix #1642

* Additional inline code documentation

Added comment to FailureNotExpectedForTrailingWhite(NumberStyles, bool)
in System.Numerics.Tests.parseTest explaining the need for/function of
that method.

Fix #1642

--- src/System.Runtime.Numerics/tests/BigInteger/parse.cs
+++ src/System.Runtime.Numerics/tests/BigInteger/parse.cs
@@ -4,63 +4,89 @@

 using System.Collections.Generic;
 using System.Globalization;
+using System.Threading;
 using Xunit;

 namespace System.Numerics.Tests
 {
     public class parseTest
     {
-        private static int s_samples = 10;
-        private static Random s_random = new Random(100);
-
-        [Fact]
+        private readonly static int s_samples = 10;
+        private readonly static Random s_random = new Random(100);
+
+        // Invariant culture is commonly used for (de-)serialization and similar to en-US
+        // Ukrainian (Ukraine) added to catch regressions (issue #1642)
+        // Current cultue to get additional value out of glob/loc test runs
+        public static IEnumerable<object[]> Cultures
+        {
+            get
+            {
+                yield return new object[] { CultureInfo.InvariantCulture };
+                yield return new object[] { new CultureInfo("uk-UA") };
+
+                if (CultureInfo.CurrentCulture.ToString() != "uk-UA")
+                    yield return new object[] { CultureInfo.CurrentCulture };
+            }
+        }
+
+        [Theory]
+        [MemberData(nameof(Cultures))]
         [OuterLoop]
-        [ActiveIssue(1642)]
-        public static void RunParseToStringTests()
-        {
-            byte[] tempByteArray1 = new byte[0];
-
-            //default style
-
-            VerifyDefaultParse(s_random);
-
-            //single NumberStyles
-            VerifyNumberStyles(NumberStyles.None, s_random);
-            VerifyNumberStyles(NumberStyles.AllowLeadingWhite, s_random);
-            VerifyNumberStyles(NumberStyles.AllowTrailingWhite, s_random);
-            VerifyNumberStyles(NumberStyles.AllowLeadingSign, s_random);
-            VerifyNumberStyles(NumberStyles.AllowTrailingSign, s_random);
-            VerifyNumberStyles(NumberStyles.AllowParentheses, s_random);
-            VerifyNumberStyles(NumberStyles.AllowDecimalPoint, s_random);
-            VerifyNumberStyles(NumberStyles.AllowThousands, s_random);
-            VerifyNumberStyles(NumberStyles.AllowExponent, s_random);
-            VerifyNumberStyles(NumberStyles.AllowCurrencySymbol, s_random);
-            VerifyNumberStyles(NumberStyles.AllowHexSpecifier, s_random);
-
-            //composite NumberStyles
-            VerifyNumberStyles(NumberStyles.Integer, s_random);
-            VerifyNumberStyles(NumberStyles.HexNumber, s_random);
-            VerifyNumberStyles(NumberStyles.Number, s_random);
-            VerifyNumberStyles(NumberStyles.Float, s_random);
-            VerifyNumberStyles(NumberStyles.Currency, s_random);
-            VerifyNumberStyles(NumberStyles.Any, s_random);
-
-            //invalid number style
-            // ******InvalidNumberStyles
-            NumberStyles invalid = (NumberStyles)0x7c00;
-            Assert.Throws<ArgumentException>(() =>
-            {
-                BigInteger.Parse("1", invalid).ToString("d");
-            });
-            Assert.Throws<ArgumentException>(() =>
-            {
-                BigInteger junk;
-                BigInteger.TryParse("1", invalid, null, out junk);
-                Assert.Equal(junk.ToString("d"), "1");
-            });
-
-            //FormatProvider tests
-            RunFormatProviderParseStrings();
+        public static void RunParseToStringTests(CultureInfo culture)
+        {
+            CultureInfo originalCulture = Thread.CurrentThread.CurrentCulture;
+
+            try
+            {
+                byte[] tempByteArray1 = new byte[0];
+
+                Thread.CurrentThread.CurrentCulture = culture;
+
+                //default style
+                VerifyDefaultParse(s_random);
+
+                //single NumberStyles
+                VerifyNumberStyles(NumberStyles.None, s_random);
+                VerifyNumberStyles(NumberStyles.AllowLeadingWhite, s_random);
+                VerifyNumberStyles(NumberStyles.AllowTrailingWhite, s_random);
+                VerifyNumberStyles(NumberStyles.AllowLeadingSign, s_random);
+                VerifyNumberStyles(NumberStyles.AllowTrailingSign, s_random);
+                VerifyNumberStyles(NumberStyles.AllowParentheses, s_random);
+                VerifyNumberStyles(NumberStyles.AllowDecimalPoint, s_random);
+                VerifyNumberStyles(NumberStyles.AllowThousands, s_random);
+                VerifyNumberStyles(NumberStyles.AllowExponent, s_random);
+                VerifyNumberStyles(NumberStyles.AllowCurrencySymbol, s_random);
+                VerifyNumberStyles(NumberStyles.AllowHexSpecifier, s_random);
+
+                //composite NumberStyles
+                VerifyNumberStyles(NumberStyles.Integer, s_random);
+                VerifyNumberStyles(NumberStyles.HexNumber, s_random);
+                VerifyNumberStyles(NumberStyles.Number, s_random);
+                VerifyNumberStyles(NumberStyles.Float, s_random);
+                VerifyNumberStyles(NumberStyles.Currency, s_random);
+                VerifyNumberStyles(NumberStyles.Any, s_random);
+
+                //invalid number style
+                // ******InvalidNumberStyles
+                NumberStyles invalid = (NumberStyles)0x7c00;
+                Assert.Throws<ArgumentException>(() =>
+                {
+                    BigInteger.Parse("1", invalid).ToString("d");
+                });
+                Assert.Throws<ArgumentException>(() =>
+                {
+                    BigInteger junk;
+                    BigInteger.TryParse("1", invalid, null, out junk);
+                    Assert.Equal(junk.ToString("d"), "1");
+                });
+
+                //FormatProvider tests
+                RunFormatProviderParseStrings();
+            }
+            finally
+            {
+                Thread.CurrentThread.CurrentCulture = originalCulture;
+            }
         }

         private static void RunFormatProviderParseStrings()
@@ -241,12 +267,12 @@
             // Trailing White
             for (int i = 0; i < s_samples; i++)
             {
-                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u0009\u0009\u0009", ns, ((ns & NumberStyles.AllowTrailingWhite) != 0));
-                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u000A\u000A\u000A", ns, ((ns & NumberStyles.AllowTrailingWhite) != 0));
-                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u000B\u000B\u000B", ns, ((ns & NumberStyles.AllowTrailingWhite) != 0));
-                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u000C\u000C\u000C", ns, ((ns & NumberStyles.AllowTrailingWhite) != 0));
-                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u000D\u000D\u000D", ns, ((ns & NumberStyles.AllowTrailingWhite) != 0));
-                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u0020\u0020\u0020", ns, ((ns & NumberStyles.AllowTrailingWhite) != 0));
+                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u0009\u0009\u0009", ns, FailureNotExpectedForTrailingWhite(ns, false));
+                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u000A\u000A\u000A", ns, FailureNotExpectedForTrailingWhite(ns, false));
+                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u000B\u000B\u000B", ns, FailureNotExpectedForTrailingWhite(ns, false));
+                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u000C\u000C\u000C", ns, FailureNotExpectedForTrailingWhite(ns, false));
+                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u000D\u000D\u000D", ns, FailureNotExpectedForTrailingWhite(ns, false));
+                VerifyParseToString(GetDigitSequence(1, 100, random) + "\u0020\u0020\u0020", ns, FailureNotExpectedForTrailingWhite(ns, true));
             }

             // Leading Sign
@@ -694,6 +720,31 @@
             return nfi;
         }

+        // We need to account for cultures like fr-FR and uk-UA that use the no-break space (NBSP, 0xA0)
+        // character as the group separator. Because NBSP cannot be (easily) entered by the end user we
+        // accept regular spaces (SP, 0x20) as group separators for those cultures which means that
+        // trailing SP characters will be interpreted as group separators rather than whitespace.
+        //
+        // See also System.Globalization.FormatProvider+Number.MatchChars(char*, char*)
+        private static bool FailureNotExpectedForTrailingWhite(NumberStyles ns, bool spaceOnlyTrail)
+        {
+            if (spaceOnlyTrail && (ns & NumberStyles.AllowThousands) != 0)
+            {
+                if ((ns & NumberStyles.AllowCurrencySymbol) != 0)
+                {
+                    if (CultureInfo.CurrentCulture.NumberFormat.CurrencyGroupSeparator == "\u00A0")
+                        return true;
+                }
+                else
+                {
+                    if (CultureInfo.CurrentCulture.NumberFormat.NumberGroupSeparator == "\u00A0")
+                        return true;
+                }
+            }
+
+            return (ns & NumberStyles.AllowTrailingWhite) != 0;
+        }
+
         public static void Eval(BigInteger x, String expected)
         {
             bool IsPos = (x >= 0);


Test static version of ContinueAsync method.

--- Tests/Data/Models/TimeEntryModelTest.cs
+++ Tests/Data/Models/TimeEntryModelTest.cs
@@ -534,5 +534,67 @@
             Assert.AreEqual (new DateTime (2013, 10, 1, 10, 12, 0, DateTimeKind.Utc), entry.StartTime);
             Assert.AreEqual (new DateTime (2013, 10, 1, 11, 12, 0, DateTimeKind.Utc), entry.StopTime);
         }
+
+        [Test]
+        public void TestStaticContinueStartStop ()
+        {
+            RunAsync (async delegate {
+                var parent = new TimeEntryModel () {
+                    User = user,
+                    StartTime = new DateTime (2013, 1, 2, 3, 4, 5, DateTimeKind.Utc),
+                    StopTime = new DateTime (2013, 1, 2, 5, 4, 3, DateTimeKind.Utc),
+                };
+                await parent.StoreAsync ();
+
+                var entry = await TimeEntryModel.ContinueTimeEntryDataAsync (parent.Data);
+                Assert.NotNull (entry);
+                Assert.AreNotSame (parent.Data, entry);
+                Assert.AreNotEqual (parent.Data.Id, entry.Id);
+                Assert.IsNull (entry.StopTime);
+                Assert.AreEqual (TimeEntryState.Running, entry.State);
+            });
+        }
+
+        [Test]
+        public void TestStaticContinueDurationOtherDay ()
+        {
+            RunAsync (async delegate {
+                var parent = new TimeEntryModel () {
+                    User = user,
+                    StartTime = new DateTime (2013, 1, 2, 3, 4, 5, DateTimeKind.Utc),
+                    StopTime = new DateTime (2013, 1, 2, 5, 4, 3, DateTimeKind.Utc),
+                    DurationOnly = true,
+                };
+                await parent.StoreAsync ();
+
+                var entry = await TimeEntryModel.ContinueTimeEntryDataAsync (parent.Data);
+                Assert.NotNull (entry);
+                Assert.AreNotSame (parent.Data, entry);
+                Assert.AreNotEqual (parent.Data.Id, entry.Id);
+                Assert.IsNull (entry.StopTime);
+                Assert.AreEqual (TimeEntryState.Running, entry.State);
+            });
+        }
+
+        [Test]
+        public void TestStaticContinueDurationSameDay ()
+        {
+            RunAsync (async delegate {
+                var startTime = Time.Now.Date.AddHours (1);
+                var stopTime = startTime + TimeSpan.FromHours (2);
+                var parent = new TimeEntryModel () {
+                    User = user,
+                    StartTime = startTime,
+                    StopTime = stopTime,
+                    DurationOnly = true,
+                };
+                await parent.StoreAsync ();
+
+                var entry = await TimeEntryModel.ContinueTimeEntryDataAsync (parent.Data);
+                Assert.AreSame (parent.Data, entry);
+                Assert.IsNull (entry.StopTime);
+                Assert.AreEqual (TimeEntryState.Running, entry.State);
+            });
+        }
     }
 }


Remove broken step

Remove broken step

--- osu.Framework.Tests/Visual/UserInterface/TestSceneScreenStack.cs
+++ osu.Framework.Tests/Visual/UserInterface/TestSceneScreenStack.cs
@@ -234,7 +234,6 @@
             AddUntilStep("base became current again", () => baseScreen.IsCurrentScreen());

             AddAssert("screen1 not current", () => !screen1.IsCurrentScreen());
-            AddAssert("screen1 exited", () => screen1.ExitedTo == baseScreen);
             AddAssert("screen1 was not added to hierarchy", () => !screen1.IsLoaded);

             AddStep("push fast", () => baseScreen.Push(screen2 = new TestScreen()));


Enable short hex color code format

Enable short hex color code format

--- ViewModels/ClipViewModel.cs
+++ ViewModels/ClipViewModel.cs
@@ -152,7 +152,12 @@
             get
             {
                 // Matches #xxx, #xxxx, #xxxxxx, #xxxxxxxx, rgba(x, x, x, x.x), rgb(x, x, x).
-                return Regex.IsMatch(Clip.Content, @"#([0-9A-F]{3,8})", RegexOptions.IgnoreCase) || Regex.IsMatch(Clip.Content, @"rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)", RegexOptions.IgnoreCase);
+                // If the string has 3-8 characters (without surrounding whitespace) and only has hex characters
+                // it will also be interpreted as a color. Many editors only don't select the # on a double-click
+                // or Shift+Ctrl+Arrow press.
+                return Regex.IsMatch(Clip.Content, @"#([0-9A-F]{3,8})", RegexOptions.IgnoreCase)
+                    || Regex.IsMatch(Clip.Content, @"^\s*([0-9A-F]{3,8})\s*$", RegexOptions.IgnoreCase)
+                    || Regex.IsMatch(Clip.Content, @"rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)", RegexOptions.IgnoreCase);
             }
         }

@@ -234,6 +239,23 @@
                 }
             }

+            var secondaryHexMatch = Regex.Match(Clip.Content, @"^\s*([0-9A-F]{3,8})\s*$", RegexOptions.IgnoreCase);
+
+            if (secondaryHexMatch.Success)
+            {
+                var group = secondaryHexMatch.Groups[1];
+
+                // Fails for colors codes of length 5 and 7.
+                try
+                {
+                    return (Color)ColorConverter.ConvertFromString("#" + group.Value);
+                }
+                catch (FormatException)
+                {
+                    return new Color();
+                }
+            }
+
             var rgbaMatch = Regex.Match(Clip.Content, @"rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)", RegexOptions.IgnoreCase);

             if (rgbaMatch.Success)


Simplify 16x16 tiles/sector clipping

Simplify 16x16 tiles/sector clipping

--- WLEditor/LevelPictureBox.cs
+++ WLEditor/LevelPictureBox.cs
@@ -1,6 +1,5 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 using System.Windows.Forms;
@@ -39,10 +38,7 @@
 				using (Graphics g = Graphics.FromImage(levelTiles.Bitmap))
 				{
 					//draw tiles to cache
-					foreach (Point point in sectorsToDraw)
-					{
-						DrawTiles(point.X, point.Y, redBrush, g, e.ClipRectangle, ShowColliders);
-					}
+					DrawTiles(redBrush, g, e.ClipRectangle, ShowColliders);

 					//draw tiles from cache
 					e.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
@@ -52,7 +48,7 @@
 					//sector objects (enemies, powerups)
 					if(ShowObjects)
 					{
-						DrawSectorObjects(font, format, e, enemyBrush);
+						DrawObjects(font, format, e, enemyBrush);

 						//wario position
 						int index = Level.warioRightFacing ? 0 : 1;
@@ -99,31 +95,27 @@
 			}
 		}

-		void DrawTiles(int x, int y, Brush brush, Graphics g, Rectangle clipRectangle, bool viewColliders)
+		void DrawTiles(Brush brush, Graphics g, Rectangle clipRectangle, bool viewColliders)
 		{
-			for(int j = y * 16 ; j < (y + 1) * 16 ; j++)
-			{
-				for(int i = x * 16 ; i < (x + 1) * 16 ; i++)
-				{
-					Rectangle destRect = new Rectangle(i * 16 * zoom, j * 16 * zoom, 16 * zoom, 16 * zoom);
-
-					if(destRect.IntersectsWith(clipRectangle))
-					{
-						if(!invalidTiles[i + j * 256])
-						{
-							invalidTiles[i + j * 256] = true;
-							DrawTileToBitmap(i, j);
-
-							if(viewColliders)
+			clipRectangle = GetClipRectangle(clipRectangle, 16 * zoom);
+
+			for(int j = clipRectangle.Top ; j < clipRectangle.Bottom ; j++)
+			{
+				for(int i = clipRectangle.Left ; i < clipRectangle.Right ; i++)
+				{
+					if(!invalidTiles[i + j * 256])
+					{
+						invalidTiles[i + j * 256] = true;
+						DrawTileToBitmap(i, j);
+
+						if(viewColliders)
+						{
+							byte tileIndex = Level.levelData[i + j * 256 + 0x1000];
+							if(Level.IsCollidable(Level.SwitchTile(tileIndex, SwitchMode)))
 							{
-								byte tileIndex = Level.levelData[i + j * 256 + 0x1000];
-								if(Level.IsCollidable(Level.SwitchTile(tileIndex, SwitchMode)))
-								{
-									g.FillRectangle(brush, new Rectangle(destRect.X / zoom, destRect.Y / zoom, destRect.Width / zoom, destRect.Height / zoom));
-								}
-							}
-						}
-
+								g.FillRectangle(brush, new Rectangle(i * 16, j * 16, 16, 16));
+							}
+						}
 					}
 				}
 			}
@@ -141,7 +133,7 @@
 			}
 		}

-		void DrawSectorObjects(Font font, StringFormat format, PaintEventArgs e, Brush brush)
+		void DrawObjects(Font font, StringFormat format, PaintEventArgs e, Brush brush)
 		{
 			for(int j = 0 ; j < 32 ; j++)
 			{
@@ -234,22 +226,25 @@
 		}

 		List<Point> GetVisibleSectors(Rectangle clipRectangle)
-		{
-			List<Point> sectors = new List<Point>();
-
-			for(int y = 0 ; y < 2 ; y++)
-			{
-				for(int x = 0 ; x < 16 ; x++)
-				{
-					Rectangle destRect = new Rectangle(x * 256 * zoom, y * 256 * zoom, 256 * zoom, 256 * zoom);
-					if(destRect.IntersectsWith(clipRectangle))
-					{
-						sectors.Add(new Point(x, y));
-					}
+		{
+			clipRectangle = GetClipRectangle(clipRectangle, 256 * zoom);
+			List<Point> sectors = new List<Point>(clipRectangle.Width * clipRectangle.Height);
+			for(int y = clipRectangle.Top ; y < clipRectangle.Bottom ; y++)
+			{
+				for(int x = clipRectangle.Left ; x < clipRectangle.Right ; x++)
+				{
+					sectors.Add(new Point(x, y));
 				}
 			}

 			return sectors;
+		}
+
+		Rectangle GetClipRectangle(Rectangle clipRectangle, int size)
+		{
+			Point start = new Point(clipRectangle.Left / size, clipRectangle.Top / size);
+			Point end = new Point((clipRectangle.Right - 1) / size + 1, (clipRectangle.Bottom - 1) / size + 1);
+			return new Rectangle(start.X, start.Y, end.X - start.X, end.Y - start.Y);
 		}

 		string GetWarpName(int sectorTarget)
@@ -278,7 +273,7 @@
 		{
 			Region r = new Region(new Rectangle((tileIndex % 256) * 16 * zoom, (tileIndex / 256) * 16 * zoom, 16 * zoom, 16 * zoom));
 			invalidTiles[tileIndex] = false;
-            Invalidate(r);
+			Invalidate(r);
 		}

 		public void InvalidateObject(int tileIndex, int currentObject, int previousObject)


Revert "Revert "Base directory for Avalonia""

--- WalletWasabi.Gui/Program.cs
+++ WalletWasabi.Gui/Program.cs
@@ -21,12 +21,12 @@
 			StatusBarViewModel statusBar = null;
 			try
 			{
+				Platform.BaseDirectory = Path.Combine(Global.DataDir, "Gui");
 				BuildAvaloniaApp().BeforeStarting(async builder =>
 				{
 					try
 					{
 						MainWindowViewModel.Instance = new MainWindowViewModel();
-
 						Logger.InitializeDefaults(Path.Combine(Global.DataDir, "Logs.txt"));

 						var configFilePath = Path.Combine(Global.DataDir, "Config.json");


Don't allow actually selecting "Add Coin"

--- MultiMiner.Win/MainForm.cs
+++ MultiMiner.Win/MainForm.cs
@@ -72,21 +72,6 @@

         }

-        private void deviceGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e)
-        {
-            if (e.RowIndex >= 0)
-            {
-                if (e.ColumnIndex == coinColumn.Index)
-                {
-                    string value = (string)deviceGridView.CurrentCell.EditedFormattedValue;
-                    if (value.Equals("Add Coin"))
-                    {
-                        ConfigureCoins();
-                    }
-                }
-            }
-        }
-
         private void ConfigureCoins()
         {
             CoinsForm coinsForm = new CoinsForm(configurations);
@@ -97,25 +82,35 @@
                 LoadCoinConfigurations();
         }

-        private void deviceGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
-        {
-
-        }
-
+        private bool configuringCoins = false;
+
         private void deviceGridView_CurrentCellDirtyStateChanged(object sender, EventArgs e)
         {
             if (deviceGridView.CurrentCell.RowIndex >= 0)
             {
                 if (deviceGridView.CurrentCell.ColumnIndex == coinColumn.Index)
                 {
-                    deviceGridView.CommitEdit(DataGridViewDataErrorContexts.Commit);
+                    string value = (string)deviceGridView.CurrentCell.EditedFormattedValue;
+                    if (value.Equals("Add Coin"))
+                    {
+                        if (!configuringCoins)
+                        {
+                            configuringCoins = true;
+                            try
+                            {
+                                deviceGridView.CancelEdit();
+                                ConfigureCoins();
+                            }
+                            finally
+                            {
+                                configuringCoins = false;
+                            }
+                        }
+                    }
+
+                    //deviceGridView.CommitEdit(DataGridViewDataErrorContexts.Commit);
                 }
             }
         }
-
-        private void panel1_Paint(object sender, PaintEventArgs e)
-        {
-
-        }
     }
 }


Detect no miners installed - prompt & install cgminer

--- MultiMiner.Win/MainForm.cs
+++ MultiMiner.Win/MainForm.cs
@@ -10,6 +10,7 @@
 using System.Net.Sockets;
 using System.ComponentModel;
 using System.Diagnostics;
+using System.Text.RegularExpressions;

 namespace MultiMiner.Win
 {
@@ -58,11 +59,67 @@
             if (applicationConfiguration.DetectDisownedMiners)
                 CheckForDisownedMiners();

+            CheckAndDownloadMiners();
+
             RefreshDevices();

             if (devices.Count > 0)
                 deviceGridView.CurrentCell = deviceGridView.Rows[0].Cells[coinColumn.Index];

+        }
+
+        private void CheckAndDownloadMiners()
+        {
+            if (Environment.OSVersion.Platform != PlatformID.Unix)
+            {
+                bool hasMiners = HasMinersInstalled();
+
+                if (!hasMiners)
+                {
+                    DialogResult messageBoxResult = MessageBox.Show("You have no miners installed. Would you like to download and install cgminer?", "No Miners Installed", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+                    if (messageBoxResult == System.Windows.Forms.DialogResult.Yes)
+                    {
+                        InstallCgminer();
+                        engineConfiguration.XgminerConfiguration.MinerBackend = MinerBackend.Cgminer;
+                        engineConfiguration.SaveMinerConfiguration();
+                    }
+                }
+            }
+        }
+
+        private const string cgminerDomain = "ck.kolivas.org";
+
+        private static void InstallCgminer()
+        {
+            ProgressForm progressForm = new ProgressForm("Downloading and installing cgminer from " + cgminerDomain);
+            progressForm.Show();
+            Application.DoEvents();
+            try
+            {
+                string destinationFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Miners\cgminer\");
+                Miner.InstallMiner(MinerBackend.Cgminer, destinationFolder);
+            }
+            finally
+            {
+                progressForm.Close();
+            }
+        }
+
+        private static bool HasMinersInstalled()
+        {
+            bool hasMiners = false;
+
+            hasMiners = MinerIsInstalled(XgminerConfiguration.CgminerName);
+            if (!hasMiners)
+                hasMiners = MinerIsInstalled(XgminerConfiguration.BfgminerName);
+
+            return hasMiners;
+        }
+
+        private static bool MinerIsInstalled(string minerName)
+        {
+            string path = string.Format(@"Miners\{0}\{0}.exe", minerName);
+            return File.Exists(path);
         }

         private void CheckForDisownedMiners()


added datatype mapping for 'decimal'.

added datatype mapping for 'decimal'.

--- NMG.Core/DataTypeMapper.cs
+++ NMG.Core/DataTypeMapper.cs
@@ -10,60 +10,60 @@
                 dataType == "TIMESTAMP WITH TIME ZONE" || dataType == "TIMESTAMP WITH LOCAL TIME ZONE" ||
                 dataType == "smalldatetime")
             {
-                return typeof (DateTime);
+                return typeof(DateTime);
             }
             if (dataType == "NUMBER" || dataType == "nchar" || dataType == "LONG" || dataType == "bigint")
             {
-                return typeof (long);
+                return typeof(long);
             }
             if (dataType == "int" || dataType == "INTERVAL YEAR TO MONTH" || dataType == "BINARY_INTEGER")
             {
-                return typeof (int);
+                return typeof(int);
             }
             if (dataType == "BINARY_DOUBLE" || dataType == "float")
             {
-                return typeof (double);
+                return typeof(double);
             }
             if (dataType == "BINARY_FLOAT" || dataType == "FLOAT")
             {
-                return typeof (float);
+                return typeof(float);
             }
             if (dataType == "BLOB" || dataType == "BFILE *" || dataType == "LONG RAW" || dataType == "binary" ||
                 dataType == "image" || dataType == "timestamp" || dataType == "varbinary")
             {
-                return typeof (byte[]);
+                return typeof(byte[]);
             }
             if (dataType == "INTERVAL DAY TO SECOND")
             {
-                return typeof (TimeSpan);
+                return typeof(TimeSpan);
             }
             if (dataType == "bit")
             {
-                return typeof (Boolean);
+                return typeof(Boolean);
             }
-            if (dataType == "decimal" || dataType == "money" || dataType == "smallmoney")
+            if (dataType == "decimal" || dataType == "money" || dataType == "smallmoney" || dataType == "numeric")
             {
-                return typeof (decimal);
+                return typeof(decimal);
             }
             if (dataType == "real")
             {
-                return typeof (Single);
+                return typeof(Single);
             }
             if (dataType == "smallint")
             {
-                return typeof (Int16);
+                return typeof(Int16);
             }
             if (dataType == "uniqueidentifier")
             {
-                return typeof (Guid);
+                return typeof(Guid);
             }
             if (dataType == "tinyint")
             {
-                return typeof (Byte);
+                return typeof(Byte);
             }

             // CHAR, CLOB, NCLOB, NCHAR, XMLType, VARCHAR2, nchar, ntext
-            return typeof (string);
+            return typeof(string);
         }
     }
 }


[050dev] Don't want the toolchain option collection

--- packages/Clang/3.1/Scripts/CCompilerOptionCollectionDelegates.cs
+++ packages/Clang/3.1/Scripts/CCompilerOptionCollectionDelegates.cs
@@ -6,9 +6,11 @@
 {
     public partial class CCompilerOptionCollection
     {
+#if false
         private static void ToolchainOptionCollectionCommandLineProcessor(object sender, Opus.Core.StringArray commandLineBuilder, Opus.Core.Option option, Opus.Core.Target target)
         {
         }
+#endif
         private static void DefinesCommandLineProcessor(object sender, Opus.Core.StringArray commandLineBuilder, Opus.Core.Option option, Opus.Core.Target target)
         {
         }
@@ -53,7 +55,9 @@
         }
         protected override void SetDelegates(Opus.Core.DependencyNode node)
         {
+#if false
             this["ToolchainOptionCollection"].PrivateData = new PrivateData(ToolchainOptionCollectionCommandLineProcessor);
+#endif
             this["Defines"].PrivateData = new PrivateData(DefinesCommandLineProcessor);
             this["IncludePaths"].PrivateData = new PrivateData(IncludePathsCommandLineProcessor);
             this["SystemIncludePaths"].PrivateData = new PrivateData(SystemIncludePathsCommandLineProcessor);


Added url removed space form github ones.

--- Gap/WebhookParser.cs
+++ Gap/WebhookParser.cs
@@ -117,7 +117,7 @@
                     }
                     foreach (var com in d.commits)
                     {
-                        ghmessage += string.Format("[{0}] {1} made a commit {2}\n", d.repository.name, com.author.name, com.message);
+                        ghmessage += string.Format("[{0}] {1} made a commit {2} {3}", d.repository.name, com.author.name, com.message,com.url);
                     }
                 }
             }


Optimize git monitor task handling

Optimize git monitor task handling

--- Wizard/XwtTemplateWizard.cs
+++ Wizard/XwtTemplateWizard.cs
@@ -98,7 +98,8 @@
 					solution.RootFolder.Items.Add (xwt_folder);
 				}

-				monitor.BeginTask ("Configuring Xwt References...", 4);
+				monitor.BeginTask ("Configuring Xwt References...", 3);
+				monitor.BeginTask ("Cloning Xwt into " + xwt_path + "...", 1);

 				if (xwt_proj == null && !Directory.Exists (xwt_path)) {
 					if (createSubmodule && gitRepo != null) {
@@ -121,7 +122,6 @@
 						}

 						monitor.EndTask ();
-						monitor.Step (1);
 						monitor.BeginTask ("Comitting changes...", 1);

 						var commit = git.Commit ();
@@ -129,18 +129,14 @@
 						commit.Call ();

 						monitor.EndTask ();
-						monitor.Step (1);
 					} else {
-						monitor.Step (1);
-						monitor.BeginTask ("Cloning Xwt into " + xwt_path + "...", 1);
-
 						var repo = new GitRepository(xwt_path, "git://github.com/mono/xwt");
 						repo.Checkout (xwt_path, true, monitor);
-
-						monitor.EndTask ();
-						monitor.Step (1);
 					}
 				}
+
+				monitor.EndTask ();
+				monitor.Step (1);

 				monitor.BeginTask ("Adding Xwt Projects to Solution...", 7);

@@ -220,6 +216,7 @@

 				monitor.EndTask ();
+				monitor.Step (1);
 				monitor.BeginTask ("Adding Xwt References...", solution.Items.Count);

 				foreach (var item in solution.Items) {
@@ -269,7 +266,6 @@
 				}

 				monitor.EndTask ();
-				monitor.Step (1);
 				monitor.EndTask ();
 				monitor.ReportSuccess ("Xwt Submodule initialized successfully");