Add DLL dependencies without ExportSymbols as BuildOrder dependencies if needed.

--- Sharpmake/Project.Configuration.cs
+++ Sharpmake/Project.Configuration.cs
@@ -3079,6 +3079,14 @@
                                     }
                                 }

+                                if (!dependency.ExportDllSymbols && (isImmediate || hasPublicPathToRoot || !goesThroughDLL))
+                                {
+                                    if (dependencySetting.HasFlag(DependencySetting.LibraryFiles) ||
+                                        dependencySetting.HasFlag(DependencySetting.ForceUsingAssembly) ||
+                                        dependencySetting == DependencySetting.OnlyBuildOrder)
+                                        BuildOrderDependencies.Add(dependency);
+                                }
+
                                 if (dependencySetting.HasFlag(DependencySetting.AdditionalUsingDirectories) ||
                                     dependencySetting.HasFlag(DependencySetting.ForceUsingAssembly))
                                     AdditionalUsingDirectories.Add(dependency.TargetPath);


Removed unneeded TODO task

Removed unneeded TODO task

--- PART/Source/CprBroker/KMD/KmdDataProvider.AS78207.cs
+++ PART/Source/CprBroker/KMD/KmdDataProvider.AS78207.cs
@@ -615,7 +615,7 @@
             }
             #endregion

-            #region Converters
+            #region Converters

             public AttributListeType ToAttributListeType(WS_AS78205.EnglishAS78205Response addressResponse)
             {
@@ -720,14 +720,11 @@
             {
                 return new TilstandListeType()
                 {
-                    //TODO: Fill with orgfaelles:Gyldighed as soon as knowing what that is???
-                    //Gyldighed = null,
-
                     CivilStatus = new CivilStatusType()
-                   {
-                       CivilStatusKode = Utilities.ToPartMaritalStatus(MaritallStatusCode[0]),
-                       TilstandVirkning = TilstandVirkningType.Create(Utilities.ToDateTime(MaritalStatusDate)),
-                   },
+                    {
+                        CivilStatusKode = Utilities.ToPartMaritalStatus(MaritallStatusCode[0]),
+                        TilstandVirkning = TilstandVirkningType.Create(Utilities.ToDateTime(MaritalStatusDate)),
+                    },
                     LivStatus = new LivStatusType
                     {
                         //TODO: Status date may not be the correct field (for example, the status may have changed fromDate 01 to  07 at the date, but the life status is still alive)


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Server/WebSocketSessionManager.cs
+++ websocket-sharp/Server/WebSocketSessionManager.cs
@@ -1129,13 +1129,13 @@
     }

     /// <summary>
-    /// Sends <paramref name="data"/> to the client using the specified session.
+    /// Sends the specified data to the client using the specified session.
     /// </summary>
     /// <param name="data">
-    /// An array of <see cref="byte"/> that represents the binary data to send.
+    /// An array of <see cref="byte"/> that specifies the binary data to send.
     /// </param>
     /// <param name="id">
-    /// A <see cref="string"/> that represents the ID of the session.
+    /// A <see cref="string"/> that specifies the ID of the session.
     /// </param>
     /// <exception cref="ArgumentNullException">
     ///   <para>


[Modify] Throw exception

[Modify] Throw exception

--- websocket-sharp/Server/WebSocketSessionManager.cs
+++ websocket-sharp/Server/WebSocketSessionManager.cs
@@ -1024,8 +1024,12 @@
     public void SendTo (string data, string id)
     {
       IWebSocketSession session;
-      if (TryGetSession (id, out session))
-        session.Context.WebSocket.Send (data);
+      if (!TryGetSession (id, out session)) {
+        var msg = "The session could not be found.";
+        throw new ArgumentException (msg, "id");
+      }
+
+      session.Context.WebSocket.Send (data);
     }

     /// <summary>


Change conversation text file name to use blob name instead.

--- callbot/CallingBot/ConversationTranscibe.cs
+++ callbot/CallingBot/ConversationTranscibe.cs
@@ -41,7 +41,7 @@
             DateTime date = DateTime.Today;
             DateTime dateLogEntry = DateTime.Now;
             // This creates a reference to the append blob we are going to use.
-            fileName = string.Format("{0}{1}", date.ToString("yyyyMMdd"), ".txt");
+            fileName = string.Format("{0}{1}", date.ToString("yyyyMMdd_HHmm"), ".txt");
             appBlob = container.GetAppendBlobReference(fileName);

             // Now we are going to check if todays file exists and if it doesn't we create it.
@@ -71,7 +71,7 @@
             string private_key = ConfigurationManager.AppSettings["RSPassword"];

             RSAPI rs = new RSAPI(user, private_key);
-            string fileTitle = "ConversationLog_" + DateTime.Now.ToString(DatetimeFormat);
+            string fileTitle = "ConversationLog_" + appBlob.Name;

             rs.UploadResource(localfile, fileTitle);
         }


Spelling mistake fix

Spelling mistake fix

--- SimpleFacade/Execution/Executor.cs
+++ SimpleFacade/Execution/Executor.cs
@@ -73,7 +73,7 @@

         protected virtual object UnhandledExecute(object executable)
         {
-            throw new Exception(string.Format("Could not execute:{0}\nEither it dit not implement IExecutable, or no handler was registered (using UsingHandlerFrommAssemblyWithType())", executable));
+            throw new Exception(string.Format("Could not execute:{0}\nEither it dit not implement IExecutable, or no handler implementing IHandle_xxx was registered (using UsingHandlersFromAssemblyWithType())", executable));
         }

     }


Added functions to ScriptAll

Added functions to ScriptAll

--- DbUp.Support.SqlServer.Scripting/DbObjectScripter.cs
+++ DbUp.Support.SqlServer.Scripting/DbObjectScripter.cs
@@ -74,12 +74,19 @@
                     ScriptAllUserDefinedTypes(context);
                 });

+                var functionsScriptTask = Task.Run(() =>
+                {
+                    var context = GetDatabaseContext(true);
+                    this.ScriptAllFunctions(context);
+                });
+
                 Task.WaitAll(
                     tablesScriptTask,
                     viewsScriptTask,
                     storedProceduresScriptTask,
                     synonymsScriptTask,
-                    udtScriptTask
+                    udtScriptTask,
+                    functionsScriptTask
                 );
             }
             catch (Exception ex)


Ignore invalid Slideshow file drops

Ignore invalid Slideshow file drops

--- DesktopWidgets/Widgets/PictureSlideshow/ViewModel.cs
+++ DesktopWidgets/Widgets/PictureSlideshow/ViewModel.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Windows;
 using System.Windows.Input;
@@ -133,8 +134,14 @@
         {
             if (e.Data.GetDataPresent(DataFormats.FileDrop))
             {
-                ImageUrl = ((string[])e.Data.GetData(DataFormats.FileDrop)).FirstOrDefault();
-                IsPaused = true;
+                var imagePath = ((string[])e.Data.GetData(DataFormats.FileDrop))
+                    .Where(path => ImageHelper.IsSupported(Path.GetExtension(path)))
+                    .FirstOrDefault();
+                if (imagePath != null)
+                {
+                    ImageUrl = imagePath;
+                    IsPaused = true;
+                }
             }
         }


Added AppSettings helper to common library

--- DewCommonControlsLibrary/DewCommonControlsLibrary.cs
+++ DewCommonControlsLibrary/DewCommonControlsLibrary.cs
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using Windows.Storage;
 using Windows.UI;
 using Windows.UI.Xaml;
 using Windows.UI.Xaml.Data;
@@ -11,7 +12,138 @@

 namespace DewCommonControlsLibrary
 {
-
+    namespace AppSettingsHelper
+    {
+        /// <summary>
+        /// Helper for AppSettings
+        /// </summary>
+        class AppSettings
+        {
+            /// <summary>
+            /// Set the local setting with the containskey control.
+            /// </summary>
+            /// <param name="name">The key name</param>
+            /// <param name="val">the value casted in object</param>
+            /// <param name="create">true = if not exists new key is create, else throw an exception</param>
+            /// <exception cref="InvalidOperationException"></exception>
+            public static void SetAppSettingsLocal(string name, object val, bool create = false)
+            {
+                if (ApplicationData.Current.LocalSettings.Values.ContainsKey(name))
+                    ApplicationData.Current.LocalSettings.Values[name] = val;
+                else
+                {
+                    if (create)
+                    {
+                        AppSettings.DefineAppSettingsLocal(name, val);
+                    }
+                    else
+                        throw new InvalidOperationException("Access without key definition");
+
+                }
+
+            }
+            /// <summary>
+            /// Get a local setting with containskey control.
+            /// </summary>
+            /// <param name="name">The key name</param>
+            /// <returns>Object of setting, null if not exist</returns>
+            public static object GetAppSettingsLocal(string name)
+            {
+                object Result = null;
+                if (ApplicationData.Current.LocalSettings.Values.ContainsKey(name))
+                    Result = ApplicationData.Current.LocalSettings.Values[name];
+                return Result;
+            }
+            /// <summary>
+            /// Create a new local setting
+            /// </summary>
+            /// <param name="name">The key name</param>
+            /// <param name="val">The value in object</param>
+            public static void DefineAppSettingsLocal(string name, object val)
+            {
+                ApplicationData.Current.LocalSettings.Values.Add(name, val);
+            }
+            /// <summary>
+            /// Check if a key exists
+            /// </summary>
+            /// <param name="name"></param>
+            /// <returns></returns>
+            public static bool AppSettingsLocalExists(string name)
+            {
+                return ApplicationData.Current.LocalSettings.Values.ContainsKey(name);
+            }
+            /// <summary>
+            /// Remove a local setting
+            /// </summary>
+            /// <param name="name">key</param>
+            public static void AppSettingsRemove(string name)
+            {
+                ApplicationData.Current.LocalSettings.Values.Remove(name);
+            }
+
+            /// <summary>
+            /// Set the local setting with the containskey control.
+            /// </summary>
+            /// <param name="name">The key name</param>
+            /// <param name="val">the value casted in object</param>
+            /// <param name="create">true = if not exists new key is create, else throw an exception</param>
+            /// <exception cref="InvalidOperationException"></exception>
+            public static void SetAppSettingsRoam(string name, object val, bool create = false)
+            {
+                if (ApplicationData.Current.RoamingSettings.Values.ContainsKey(name))
+                    ApplicationData.Current.RoamingSettings.Values[name] = val;
+                else
+                {
+                    if (create)
+                    {
+                        AppSettings.DefineAppSettingsRoam(name, val);
+                    }
+                    else
+                        throw new InvalidOperationException("Access without key definition");
+
+                }
+
+            }
+            /// <summary>
+            /// Get a local setting with containskey control.
+            /// </summary>
+            /// <param name="name">The key name</param>
+            /// <returns>Object of setting, null if not exist</returns>
+            public static object GetAppSettingsRoam(string name)
+            {
+                object Result = null;
+                if (ApplicationData.Current.RoamingSettings.Values.ContainsKey(name))
+                    Result = ApplicationData.Current.RoamingSettings.Values[name];
+                return Result;
+            }
+            /// <summary>
+            /// Create a new local setting
+            /// </summary>
+            /// <param name="name">The key name</param>
+            /// <param name="val">The value in object</param>
+            public static void DefineAppSettingsRoam(string name, object val)
+            {
+                ApplicationData.Current.RoamingSettings.Values.Add(name, val);
+            }
+            /// <summary>
+            /// Check if a key exists
+            /// </summary>
+            /// <param name="name"></param>
+            /// <returns></returns>
+            public static bool AppSettingsRoamExists(string name)
+            {
+                return ApplicationData.Current.LocalSettings.Values.ContainsKey(name);
+            }
+            /// <summary>
+            /// Remove a local setting
+            /// </summary>
+            /// <param name="name">key</param>
+            public static void AppSettingsRemoveRoam(string name)
+            {
+                ApplicationData.Current.RoamingSettings.Values.Remove(name);
+            }
+        }
+    }
     namespace DewCommonControlsLibraryConverters
     {
         /// <summary>


Commented SensitivityLevel

Commented SensitivityLevel

--- Digipost.Api.Client.Domain/Enums/SensitivityLevel.cs
+++ Digipost.Api.Client.Domain/Enums/SensitivityLevel.cs
@@ -4,14 +4,26 @@

 namespace Digipost.Api.Client.Domain.Enums
 {
+    /// <summary>
+    /// Defines sensitivity levels for a message.
+    /// </summary>
     [Serializable]
     [GeneratedCode("xsd", "4.0.30319.33440")]
     [XmlType(TypeName = "sensitivity-level", Namespace = "http://api.digipost.no/schema/v6")]
     public enum SensitivityLevel
     {
+        /// <summary>
+        /// Default. Non sensitive message. Metadata about the message, like the sender and subject,
+        /// will be revealed in user notifications (eg. email and SMS), and can also be seen when logged in at a
+        /// security level below the one specified for the message.
+        /// </summary>
         [XmlEnum("NORMAL")]
         Normal,

+        /// <summary>
+        /// Sensitive message. Metadata about the message, like the sender and subject, will be hidden
+        /// until logged in at the appropriate security level specified for the message.
+        /// </summary>
         [XmlEnum("SENSITIVE")]
         Sensitive
     }


Create and Update complete. Update and Delete TODO

--- DocumentDbTestRunner/DocumentDbTestRunner/Program.cs
+++ DocumentDbTestRunner/DocumentDbTestRunner/Program.cs
@@ -1,8 +1,13 @@
 using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
 using System.Net;
 using System.Threading.Tasks;
 using Microsoft.Azure.Documents;
 using Microsoft.Azure.Documents.Client;
+using Microsoft.Azure.Documents.Linq;
+using Newtonsoft.Json;

 namespace DocumentDbTestRunner
 {
@@ -10,18 +15,33 @@
     {
         private const string EndpointUri = "";
         private const string AuthKeyOrResourceToken = "";
-        private const string DatabaseName = "DocumentDbTestRunner";
-        private const string CollectionName = "Test";
+        private const string DatabaseId = "DocumentDbTestRunner";
+        private const string CollectionId = "Test";
+
+        private static DocumentClient client;
+
+        private class Post
+        {
+            [JsonProperty(PropertyName = "id")]
+            public string Title { get; set; }
+            public string Category { get; set; }
+            public List<string> Tags { get; set; }
+            public DateTime PublishDate { get; set; }
+        }

         private static void Main(string[] args)
         {
             AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
+
+            client = new DocumentClient(new Uri(EndpointUri), AuthKeyOrResourceToken);

             Console.WriteLine("DocumentDB Test Runner");
             Console.WriteLine("1 - Create Database");
             Console.WriteLine("2 - Create Collection");
             Console.WriteLine("3 - Create Document");
             Console.WriteLine("4 - Read Document");
+            Console.WriteLine("5 - Query Documents Synchronously");
+            Console.WriteLine("6 - Query Documents Asynchronously");

             Console.WriteLine("0 - Clean And Exit");

@@ -31,45 +51,155 @@
                 switch (readLine)
                 {
                     case "1":
-                        CreateDatabase().GetAwaiter().GetResult();
+                        CreateDatabase().Wait();
+                        break;
+                    case "2":
+                        CreateContainer().Wait();
+                        break;
+                    case "3":
+                        CreateDocument().Wait();
+                        break;
+                    case "4":
+                        ReadSingleDocument().Wait();
+                        break;
+                    case "5":
+                        QueryDocuments();
+                        break;
+                    case "6":
+                        QueryDocumentsAsync().Wait();
                         break;
                     case "0":
+                        Cleanup().Wait();
                         return;
                 }
+                Console.WriteLine("Complete");
+                Console.Write("Next: ");
                 readLine = Console.ReadLine();
             }
         }

         private static async Task CreateDatabase()
         {
-            using (var client = new DocumentClient(new Uri(EndpointUri), AuthKeyOrResourceToken))
-            {
-                try
-                {
-                    var response = await client.ReadDatabaseAsync(UriFactory.CreateDatabaseUri(DatabaseName));
-                    Console.WriteLine("Database exists");
-                }
-                catch (DocumentClientException exception)
-                {
-                    if (exception.StatusCode == HttpStatusCode.NotFound)
+            try
+            {
+                await client.ReadDatabaseAsync(UriFactory.CreateDatabaseUri(DatabaseId));
+                Console.WriteLine("Database exists");
+            }
+            catch (DocumentClientException exception)
+            {
+                if (exception.StatusCode == HttpStatusCode.NotFound)
+                {
+                    await client.CreateDatabaseAsync(new Database { Id = DatabaseId });
+                    Console.WriteLine("Database created");
+                }
+                else
+                {
+                    throw;
+                }
+            }
+        }
+
+        private static async Task CreateContainer()
+        {
+            try
+            {
+                await client.ReadDocumentCollectionAsync(UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId));
+                Console.WriteLine("Collection exists");
+            }
+            catch (DocumentClientException exception)
+            {
+                if (exception.StatusCode == HttpStatusCode.NotFound)
+                {
+                    await
+                        client.CreateDocumentCollectionAsync(UriFactory.CreateDatabaseUri(DatabaseId),
+                            new DocumentCollection { Id = CollectionId });
+                    Console.WriteLine("Collection created");
+                }
+                else
+                {
+                    throw;
+                }
+            }
+        }
+
+        private static async Task CreateDocument()
+        {
+            await
+                client.CreateDocumentAsync(UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId),
+                    new Post
                     {
-                        ResourceResponse<Database> response = await client.CreateDatabaseAsync(new Database {Id = DatabaseName});
-                        Console.WriteLine("Database created");
-                    }
-                    else
-                    {
-                        throw;
-                    }
-                }
-            }
+                        Title = "Getting Started with the Azure DocumentDB .NET SDK",
+                        Category = "Azure",
+                        Tags = new List<string> { "Azure", "DocumentDB", "NoSQL" },
+                        PublishDate = new DateTime(2016, 7, 5)
+                    });
+        }
+
+        private static async Task ReadSingleDocument()
+        {
+            var stopwatch = Stopwatch.StartNew();
+
+            var response = await client.ReadDocumentAsync(UriFactory.CreateDocumentUri(DatabaseId, CollectionId,
+                "Getting Started with the Azure DocumentDB .NET SDK"));
+
+            var post = JsonConvert.DeserializeObject<Post>(response.Resource.ToString());
+
+            stopwatch.Stop();
+            Console.WriteLine($"Completed in {stopwatch.ElapsedMilliseconds}ms");
+
+            if (post?.Title != null)
+            {
+                Console.WriteLine("Read document successfully");
+            }
+        }
+
+        private static void QueryDocuments()
+        {
+            var stopwatch = Stopwatch.StartNew();
+
+            IQueryable<Post> queryable =
+                client.CreateDocumentQuery<Post>(UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId))
+                    .Where(x => x.Category == "Azure");
+
+            List<Post> posts = queryable.ToList();
+
+            stopwatch.Stop();
+            Console.WriteLine($"Completed in {stopwatch.ElapsedMilliseconds}ms");
+
+            foreach (var post in posts)
+            {
+                Console.WriteLine(post.Title);
+            }
+        }
+
+        private static async Task QueryDocumentsAsync()
+        {
+            var stopwatch = Stopwatch.StartNew();
+
+            string continuationToken = null;
+
+            do
+            {
+                var queryable = client.CreateDocumentQuery<Post>(UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId), new FeedOptions { MaxItemCount = 1, RequestContinuation = continuationToken})
+                      .Where(x => x.Category == "Azure").AsDocumentQuery();
+
+                var feedResponse = await queryable.ExecuteNextAsync<Post>();
+                continuationToken = feedResponse.ResponseContinuation;
+
+                foreach (var post in feedResponse.ToList())
+                {
+                    Console.WriteLine(post.Title);
+                }
+
+            } while (continuationToken != null);
+
+            stopwatch.Stop();
+            Console.WriteLine($"Completed in {stopwatch.ElapsedMilliseconds}ms");
         }

         private static async Task Cleanup()
         {
-            using (var client = new DocumentClient(new Uri(EndpointUri), AuthKeyOrResourceToken))
-            {
-                await client.DeleteDatabaseAsync(UriFactory.CreateDatabaseUri(DatabaseName));
-            }
+            await client.DeleteDatabaseAsync(UriFactory.CreateDatabaseUri(DatabaseId));
         }

         private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e)


Enable infinity in MakeDoubleResult (#1080)

Looking around I think this change should be related to the issue #985
Since double.NegativeInfinity and double.PositiveInfinity are valid results from the solvers and SMath.Math.Numeric.TDouble(result) can't handle these values directly, this patch allows the users to see  ∞ / -∞ as results on the canvas

--- wrappers/SMath/coolprop_wrapper/coolpropPlugin.cs
+++ wrappers/SMath/coolprop_wrapper/coolpropPlugin.cs
@@ -59,6 +59,25 @@

     public static Term[] MakeDoubleResult(double result, SMath.Math.Symbolic.MItem unit)
     {
+        // override ResultIsAboveMaxAllowedPositiveNumber exception for +/- infinity results
+        if (double.IsInfinity(result))
+        {
+          List<Term> xTerms = new List<Term>();
+
+          xTerms.Add(new Term(Symbols.Infinity, TermType.Operand, 0));
+
+          if (result == double.NegativeInfinity)
+              xTerms.Add(new Term(Operators.Subtraction, TermType.Operator, 1));
+
+          if (unit != 1)
+          {
+              xTerms.AddRange(unit.ToTerms());
+              xTerms.Add(new Term(Operators.Multiplication, TermType.Operator, 2));
+          }
+
+         return xTerms.ToArray();
+      }
+
       var d = new SMath.Math.Numeric.TDouble(result);
       d.Units = unit;
       return d.ToTerms();


Mapeado registros filhos do bloco 1

Mapeado registros filhos do bloco 1

--- SpedBr/SpedBr.SpedFiscal/Bloco1.cs
+++ SpedBr/SpedBr.SpedFiscal/Bloco1.cs
@@ -1,5 +1,6 @@
 using SpedBr.Common;
 using System;
+using System.Collections.Generic;

 namespace SpedBr.SpedFiscal
 {
@@ -8,6 +9,9 @@
     /// </summary>
     public class Bloco1
     {
+        public Registro1001 Reg1001 { get; set; }
+        public Registro1990 Reg1990 { get; set; }
+
         /// <summary>
         ///     REGISTRO 1001: ABERTURA DO BLOCO 1
         /// </summary>
@@ -31,6 +35,18 @@
             /// </remarks>
             [SpedCampos(2, "IND_MOV", "N", 1, 0, true)]
             public IndMovimento IndMov { get; set; }
+
+            public Registro1010 Reg1010 { get; set; }
+            public List<Registro1100> Reg1100s { get; set; }
+            public List<Registro1300> Reg1300s { get; set; }
+            public List<Registro1350> Reg1350s { get; set; }
+            public List<Registro1390> Reg1390s { get; set; }
+            public List<Registro1400> Reg1400s { get; set; }
+            public List<Registro1500> Reg1500s { get; set; }
+            public List<Registro1600> Reg1600s { get; set; }
+            public List<Registro1700> Reg1700s { get; set; }
+            public Registro1800 Reg1800  { get; set; }
+            public List<Registro1900> Reg1900s { get; set; }
         }

         /// <summary>
@@ -103,7 +119,7 @@
             ///     Reg 1800 – A empresa prestou serviços de transporte aéreo de cargas e de passageiros: S - Sim; N - Não
             /// </summary>
             [SpedCampos(10, "IND_AER", "LE", 1, 0, true)]
-            public SimOuNao IndAer { get; set; }
+            public SimOuNao IndAer { get; set; }
         }

         /// <summary>
@@ -184,6 +200,8 @@
             /// </summary>
             [SpedCampos(12, "PAIS", "N", 3, 0, true)]
             public int Pais { get; set; }
+
+            public List<Registro1105> Reg1105s { get; set; }
         }

         /// <summary>
@@ -234,6 +252,8 @@
             /// </summary>
             [SpedCampos(7, "COD_ITEM", "C", 60, 0, true)]
             public string CodItem { get; set; }
+
+            public List<Registro1110> Reg1110s { get; set; }
         }

         /// <summary>
@@ -352,6 +372,8 @@
             /// </summary>
             [SpedCampos(7, "SLD_CRED_FIM", "N", 0, 2, true)]
             public decimal SldCredFim { get; set; }
+
+            public List<Registro1210> Reg1210s { get; set; }
         }

         /// <summary>
@@ -464,6 +486,8 @@
             /// </summary>
             [SpedCampos(11, "FECH_FISICO", "N", 0, 3, true)]
             public decimal FechFisico { get; set; }
+
+            public List<Registro1310> Reg1310s { get; set; }
         }

         /// <summary>
@@ -532,6 +556,8 @@
             /// </summary>
             [SpedCampos(10, "FECH_FISICO", "N", 0, 3, true)]
             public decimal FechFisico { get; set; }
+
+            public List<Registro1320> Reg1320s { get; set; }
         }

         /// <summary>
@@ -644,6 +670,9 @@
             /// </summary>
             [SpedCampos(5, "TIPO_MEDICAO", "C", 1, 0, true)]
             public string TipoMedicao { get; set; }
+
+            public List<Registro1360> Reg1360s { get; set; }
+            public List<Registro1360> Reg1370s { get; set; }
         }

         /// <summary>
@@ -722,6 +751,8 @@
             /// </summary>
             [SpedCampos(2, "COD_PROD", "N", 2, 0, true)]
             public int CodProd { get; set; }
+
+            public List<Registro1391> Reg1391s { get; set; }
         }

         /// <summary>
@@ -1058,6 +1089,8 @@
             /// </summary>
             [SpedCampos(27, "COD_GRUPO_TENSAO", "C", 2, 0, false)]
             public int CodGrupoTensao { get; set; }
+
+            public List<Registro1510> Reg1510s { get; set; }
         }

         /// <summary>
@@ -1292,6 +1325,8 @@
             /// </summary>
             [SpedCampos(8, "NUM_AUT", "N", 60, 0, true)]
             public string NumAut { get; set; }
+
+            public List<Registro1710> Reg1710s { get; set; }
         }

         /// <summary>
@@ -1420,6 +1455,8 @@
             /// </summary>
             [SpedCampos(3, "DESCR_COMPL_OUT_APUR", "C", 1024, 0, true)]
             public string DescrComplOutApur { get; set; }
+
+            public List<Registro1910> Reg1910s { get; set; }
         }

         /// <summary>
@@ -1446,6 +1483,8 @@
             /// </summary>
             [SpedCampos(3, "DT_FIN", "N", 8, 0, true)]
             public DateTime DtFin { get; set; }
+
+            public Registro1920 Reg1920 { get; set; }
         }

         /// <summary>
@@ -1532,6 +1571,10 @@
             /// </summary>
             [SpedCampos(13, "DEB_ESP_OA", "N", 0, 2, true)]
             public decimal DebEspOa { get; set; }
+
+            public List<Registro1921> Reg1921s { get; set; }
+            public List<Registro1925> Reg1925s { get; set; }
+            public List<Registro1926> Reg1926s { get; set; }
         }

         /// <summary>
@@ -1564,6 +1607,9 @@
             /// </summary>
             [SpedCampos(4, "VL_AJ_APUR", "N", 0, 2, true)]
             public decimal VlAjApur { get; set; }
+
+            public List<Registro1922> Reg1922s { get; set; }
+            public List<Registro1923> Reg1923s { get; set; }
         }

         /// <summary>


refactoring

refactoring

--- PartPreviewWindow/View3D/Gui3D/HeightValueDisplay.cs
+++ PartPreviewWindow/View3D/Gui3D/HeightValueDisplay.cs
@@ -105,7 +105,7 @@
 						Vector2 pointerBottom = new Vector2(startLineGroundPos.x + HorizontalLineLength / 2, yGround);
 						Vector2 pointerTop = new Vector2(startLineSelectionPos.x + HorizontalLineLength / 2, ySelection);

-						InteractionVolume.DrawMeasureLine(drawEvent.graphics2D, pointerBottom, pointerTop, RGBA_Bytes.Black, InteractionVolume.LineArrows.End);
+						InteractionVolume.DrawMeasureLine(drawEvent.graphics2D, pointerBottom, pointerTop, RGBA_Bytes.Black, LineArrows.End);
 					}
 				}
 			}


Updated copyright and version to 1.0.2

Updated copyright and version to 1.0.2

--- SqlData/Properties/AssemblyInfo.cs
+++ SqlData/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("SqlData")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
+[assembly: AssemblyCopyright("Copyright ©  2015")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.0.2")]
+[assembly: AssemblyFileVersion("1.0.2")]


fix exception handling

fix exception handling

--- TCC.Core/GlobalExceptionHandler.cs
+++ TCC.Core/GlobalExceptionHandler.cs
@@ -25,14 +25,14 @@
     {
         public static async void HandleGlobalException(object sender, UnhandledExceptionEventArgs e)
         {
+            FocusManager.Dispose();
             await HandleGlobalExceptionImpl(e);
         }

-        [Conditional("RELEASE")]
         private static async Task HandleGlobalExceptionImpl(UnhandledExceptionEventArgs e)
         {
             var ex = (Exception)e.ExceptionObject;
-            var js = await App.BaseDispatcher.InvokeAsync(() => BuildJsonDump(ex)).Result;
+            var js = BuildJsonDump(ex);//await App.BaseDispatcher.InvokeAsync(() => BuildJsonDump(ex));
             DumpCrashToFile(js, ex);
             await UploadCrashDump(js);

@@ -49,8 +49,6 @@
                 TccMessageBox.Show("TCC",
                     "An error occured and TCC will now close. Report this issue to the developer attaching crash.log from TCC folder.",
                     MessageBoxButton.OK, MessageBoxImage.Error);
-
-                //try { new Thread(() => UploadCrashDump(ex)).Start(); } catch { /*ignored*/ }
             }

             App.ReleaseMutex();
@@ -95,7 +93,7 @@

             return fullSb.ToString();
         }
-        private static async Task<JObject> BuildJsonDump(Exception ex)
+        private static /*async*/ /*Task<JObject>*/ JObject BuildJsonDump(Exception ex)
         {
             var ret = new JObject
             {
@@ -107,8 +105,7 @@
                 { "exception_source", new JValue(ex.Source)},
                 { "stack_trace", new JValue(ex.StackTrace)},
                 { "full_exception", new JValue(FormatFullException(ex))},
-                { "thread_traces", await GetThreadTraces() },
-                { "inner_exception", ex.InnerException != null ? BuildInnerExceptionJObject(ex.InnerException) : null },
+                { "thread_traces", GetThreadTraces() },
                 { "game_version", new JValue(PacketAnalyzer.Factory == null ? 0 : PacketAnalyzer.Factory.ReleaseVersion)},
                 { "region", new JValue(Game.Server != null ? Game.Server.Region : "")},
                 { "server_id", new JValue(Game.Server != null ? Game.Server.ServerId.ToString() : "")},
@@ -143,31 +140,43 @@
                     }
                 }
             };
+            if (ex.InnerException != null)
+            {
+
+                var innEx =BuildInnerExceptionJObject(ex.InnerException);
+                ret["inner_exception"] = innEx;
+            }
+
             if (ex is PacketParseException ppe)
             {
                 ret.Add("packet_opcode_name", new JValue(ppe.OpcodeName));
-                ret.Add("packet_data", new JValue(ppe.Data.ToStringEx()));
+                ret.Add("packet_data", new JValue(ppe.RawData.ToStringEx()));
             }
             return ret;
         }

         private static JObject BuildInnerExceptionJObject(Exception ex)
         {
-            return new JObject
-            {
-                { "exception", new JValue(ex.Message)},
-                { "exception_type", new JValue(ex.GetType().FullName)},
-                { "exception_source", new JValue(ex.Source)},
-                { "stack_trace", new JValue(ex.StackTrace)},
-                //{ "stack_trace", new JValue(new StackTrace().ToString())}, //just for test
-                { "inner_exception", ex.InnerException != null ? new JValue(BuildInnerExceptionJObject(ex.InnerException)) : new JValue("undefined") },
-            };
+            var ret = new JObject();
+            ret["exception"] = new JValue(ex.Message);
+            ret["exception_type"] = new JValue(ex.GetType().FullName);
+            ret["exception_source"] = new JValue(ex.Source);
+            ret["stack_trace"] = new JValue(ex.StackTrace);
+            if (ex.InnerException != null)
+            {
+                var innEx = BuildInnerExceptionJObject(ex.InnerException);
+                ret["inner_exception"] = innEx;
+            }
+            return ret;
         }

 #pragma warning disable 618
-        private static async Task<JObject> GetThreadTraces()
-        {
-            return await Task.Factory.StartNew(() =>
+        private static JObject /*Task<JObject>*/ GetThreadTraces()
+        {
+            //return await Task.Factory.StartNew(() =>
+            //{
+            //});
+            return App.BaseDispatcher.InvokeAsync(() =>
             {
                 var ret = new JObject();

@@ -185,38 +194,12 @@
                 PacketAnalyzer.AnalysisThread.Resume();

                 return ret;
-            });
+            }).Result;
         }
 #pragma warning restore 618

-        private static async void DumpCrashToFile(Exception ex)
-        {
-            //if (ex is TaskCanceledException tce)
-            //{
-            //    // TODO
-            //}
-            var sb = new StringBuilder();
-            var js = await BuildJsonDump(ex);
-            sb.AppendLine($"id: {js["id"]}");
-            sb.AppendLine($"tcc_hash: {js["tcc_hash"]}");
-            sb.AppendLine($"game_version: {js["game_version"]}");
-            sb.AppendLine($"region: {js["region"]}");
-            sb.AppendLine($"server_id: {js["server_id"]}");
-            sb.AppendLine($"settings_summary: {js["settings_summary"]}");
-            sb.AppendLine($"stats: {js["stats"]}");
-            sb.AppendLine($"exception: {js["exception_type"]} {js["exception"]}");
-            sb.AppendLine($"{js["full_exception"].ToString().Replace("\\n", "\n")}");
-            if (ex is PacketParseException)
-            {
-                sb.AppendLine($"opcode: {js["packet_opcode_name"]}");
-                sb.AppendLine($"data: {js["packet_data"]}");
-            }
-            sb.AppendLine($"threads");
-            sb.AppendLine($"{js["thread_traces"]}");
-            Log.F(sb.ToString(), "crash.log");
-        }
-        private static async void DumpCrashToFile(JObject js, Exception ex)
+        private static void DumpCrashToFile(JObject js, Exception ex)
         {
             var sb = new StringBuilder();
             sb.AppendLine($"id: {js["id"]}");


fixed make selection dropdown problem..."Select Make" is now visible again.

--- PrinterControls/PrinterConnections/PrinterChooser.cs
+++ PrinterControls/PrinterConnections/PrinterChooser.cs
@@ -73,10 +73,12 @@
                 }

             }
-            if (ManufacturerDropList.CountVisibleChildren() == 1)
+
+            if (ManufacturerDropList.MenuItems.Count == 1)
             {
-                ManufacturerDropList.SelectedIndex = 0;
+               ManufacturerDropList.SelectedIndex = 0;
             }
+
             AddChild(ManufacturerDropList);

             HAnchor = HAnchor.FitToChildren;


prevent complete failure if user doesn't have access to a single project in TFS

--- TfsMonitor.Api/Work/WorkMonitor.cs
+++ TfsMonitor.Api/Work/WorkMonitor.cs
@@ -118,73 +118,87 @@
 			List<WorkItem> result = new List<WorkItem>();
 			foreach (Project project in workItemStore.Projects.Cast<Project>().Where(p => !ProjectRegexExists || ProjectRegex.IsMatch(p.Name)))
 			{
-				FindCurrentIteration(css, project.Uri.ToString(), currentIterations);
-
-
-				Dictionary<string, string> parameters = new Dictionary<string, string>();
-
-				parameters.Add("Project", project.Name);
-				Iteration iteration = currentIterations.Where(i => i.Project == project.Name).SingleOrDefault();
-				string iterationPath = iteration.Path;
-				if (iterationPath != null)
+				try
 				{
-					parameters.Add("IterationPath", iterationPath);
-
-					WorkItemCollection queryResults = workItemStore.Query(
-					   @"Select Id, Title, System.TeamProject, State, [Assigned To]
+					FindCurrentIteration(css, project.Uri.ToString(), currentIterations);
+
+					Dictionary<string, string> parameters = new Dictionary<string, string>();
+
+					parameters.Add("Project", project.Name);
+					Iteration iteration = currentIterations.Where(i => i.Project == project.Name).SingleOrDefault();
+					string iterationPath = iteration.Path;
+					if (iterationPath != null)
+					{
+						parameters.Add("IterationPath", iterationPath);
+
+						WorkItemCollection queryResults = workItemStore.Query(
+						   @"Select Id, Title, System.TeamProject, State, [Assigned To]
 						From WorkItems
 						Where
 						[Work Item Type] in ('Bug' , 'Product Backlog Item')
 						and State <> 'Done' and State <> 'Closed' and State <> 'Removed'
 						and System.TeamProject = @Project and System.IterationPath = @IterationPath",
-							parameters
-					   );
-
-					foreach (Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem workItem in queryResults)
-					{
-						//TODO this is really slow. ALl the queries should be combined into one, with dataprocessing on the
-						//performed here to figure all this stuff out
-						Dictionary<Activity, double> workRemaining = new Dictionary<Activity, double>();
-						foreach (WorkItemLink link in workItem.WorkItemLinks)
+								parameters
+						   );
+
+						foreach (Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem workItem in queryResults)
 						{
-							if (link.LinkTypeEnd.Name == "Child")
+							//TODO this is really slow. ALl the queries should be combined into one, with dataprocessing on the
+							//performed here to figure all this stuff out
+							Dictionary<Activity, double> workRemaining = new Dictionary<Activity, double>();
+							foreach (WorkItemLink link in workItem.WorkItemLinks)
 							{
-								var item = workItemStore.GetWorkItem(link.TargetId);
-								var value = item.Fields["Remaining Work"].Value;
-								if (value != null)
+								if (link.LinkTypeEnd.Name == "Child")
 								{
-									//if activity is empty, set to None
-									Activity activity = Activity.None;
-									Enum.TryParse<Activity>(item.Fields["Activity"].Value.ToString(), true, out activity);
-
-									if (!workRemaining.ContainsKey(activity))
+									var item = workItemStore.GetWorkItem(link.TargetId);
+									var value = item.Fields["Remaining Work"].Value;
+									if (value != null)
 									{
-										workRemaining.Add(activity, 0);
+										//if activity is empty, set to None
+										Activity activity = Activity.None;
+										Enum.TryParse<Activity>(item.Fields["Activity"].Value.ToString(), true, out activity);
+
+										if (!workRemaining.ContainsKey(activity))
+										{
+											workRemaining.Add(activity, 0);
+										}
+										workRemaining[activity] += double.Parse(value.ToString());
 									}
-									workRemaining[activity] += double.Parse(value.ToString());
+
 								}
-
 							}
+							result.Add(new WorkItem()
+							{
+								Title = workItem.Title,
+								Type = workItem.Type.Name,
+								Project = workItem.Project.Name,
+								WorkItemID = workItem.Id,
+								State = workItem.State,
+								Assignee = workItem.Fields["Assigned To"].Value.ToString(),
+								DueDate = iteration.EndDate,
+								Iteration = iterationPath.Split(' ', '\\').Last(), //the last word or last component in path
+								WorkRemaining = workRemaining
+							});
+
+
 						}
-						result.Add(new WorkItem()
-						{
-							Title = workItem.Title,
-							Type = workItem.Type.Name,
-							Project = workItem.Project.Name,
-							WorkItemID = workItem.Id,
-							State = workItem.State,
-							Assignee = workItem.Fields["Assigned To"].Value.ToString(),
-							DueDate = iteration.EndDate,
-							Iteration = iterationPath.Split(' ', '\\').Last(), //the last word or last component in path
-							WorkRemaining = workRemaining
-						});
-
-					}
+
+					}
+				}
+				catch (Exception ex)
+				{
+					//swallow security exceptions - if the current user doesn't have access to the requested project, just
+					//don't show it. Continue to show other projects the user has access to.
+					if (!(ex is System.Security.SecurityException))
+					{
+						throw;
+					}
+
 				}
 			}

 			return result;
-		}
-
+
+		}
 	}
 }


Added `bool ReadMessage(out NetIncomingMessage message)`

Added `bool ReadMessage(out NetIncomingMessage message)` for simplifying cases like this:

NetIncomingMessage msg;
while ((msg = NetClient.ReadMessage()) != null) { }

**into this**:

NetIncomingMessage msg;
while (NetClient.ReadMessage(out msg)) { }

--- Lidgren.Network/NetPeer.cs
+++ Lidgren.Network/NetPeer.cs
@@ -215,6 +215,17 @@
 			}
 			return retval;
 		}
+
+        	/// <summary>
+	        /// Reads a pending message from any connection, if any.
+	        /// Returns true if message was read, otherwise false.
+	        /// </summary>
+	        /// <returns>True, if message was read.</returns>
+	        public bool ReadMessage(out NetIncomingMessage message)
+	        {
+	            message = ReadMessage();
+	            return message != null;
+	        }

 		/// <summary>
 		/// Read a pending message from any connection, if any


Fix code to discount reward value over time

--- environment/Assets/Scripts/CrossMazeTask1.cs
+++ environment/Assets/Scripts/CrossMazeTask1.cs
@@ -1,55 +1,71 @@
 using UnityEngine;

 public class CrossMazeTask1 : Task {
-	public override string Name() { return "Cross Maze Task 1"; }
+    float rewardValue = 2.0F;

-	public override void Initialize(int success, int failure) {
-		// 仕様「S地点は3ヶ所あり、ランダムにスタート地点が決定する」を実現する
+    public override string Name() { return "Cross Maze Task 1"; }

-		int phase = (int)(Random.value * 3);
-		float x = 0.0f;
-		float y = 1.12f;
-		float z = 0.5f;
+    public override void Initialize(int success, int failure) {
+        // 仕様「S地点は3ヶ所あり、ランダムにスタート地点が決定する」を実現する

-		float rx = 0.0f;
-		float ry = 0.0f;
-		float rz = 0.0f;
-		Quaternion rotation = Quaternion.identity;
+        int phase = (int)(Random.value * 3);
+        float x = 0.0f;
+        float y = 1.12f;
+        float z = 0.5f;
+
+        float rx = 0.0f;
+        float ry = 0.0f;
+        float rz = 0.0f;
+        Quaternion rotation = Quaternion.identity;

-		switch(phase) {
-		case 0:
-			// 南端からスタート {0, 0, 0}
-			break;
-		case 1:
-			// 東端からスタート {0, 0, 0}
-			x = 12.0f;
-			z = 12.5f;
-			ry = -90.0f;
-			break;
-		case 2:
-			// 西端からスタート {0, 0, 0}
-			x = -12.0f;
-			z = 12.5f;
-			ry = 90.0f;
-			break;
-		default:
-			break;
-		}
+        switch(phase) {
+            case 0:
+                // 南端からスタート {0, 0, 0}
+                break;
+            case 1:
+                // 東端からスタート {0, 0, 0}
+                x = 12.0f;
+                z = 12.5f;
+                ry = -90.0f;
+                break;
+            case 2:
+                // 西端からスタート {0, 0, 0}
+                x = -12.0f;
+                z = 12.5f;
+                ry = 90.0f;
+                break;
+            default:
+                break;
+        }

-		agent.transform.position = new Vector3(x, y, z);
-		rotation.eulerAngles = new Vector3 (rx, ry, rz);
-		agent.transform.rotation = rotation;
-	}
+        agent.transform.position = new Vector3(x, y, z);
+        rotation.eulerAngles = new Vector3 (rx, ry, rz);
+        agent.transform.rotation = rotation;
+    }

-	public override bool Success() {
-		return rewardCount > 0;
-	}
+    public override bool Success() {
+        return rewardCount > 0;
+    }

-	public override bool Failure() {
-		return Reward.Get() < -1.8F;
-	}
+    public override bool Failure() {
+        return Reward.Get() < -1.8F;
+    }

-	public override bool Done(int success, int failure) {
-		return (success - failure) > 21;
-	}
+    public override bool Done(int success, int failure) {
+        return (success - failure) > 21;
+    }
+
+    protected override void OnRewardCollision() {
+        rewardCount += 1;
+        Debug.Log(rewardValue);
+        Reward.Add(rewardValue);
+    }
+
+    void FixedUpdate() {
+        Punishment();
+        rewardValue -= 0.002F;
+        if(rewardValue < 0.0F) {
+            rewardValue = 0.0F;
+        }
+    }
 }


Fix cache definition shared item max date for zero time component values.

--- EPPlus/Table/PivotTable/ExcelPivotCacheDefinition.cs
+++ EPPlus/Table/PivotTable/ExcelPivotCacheDefinition.cs
@@ -1043,15 +1043,12 @@
 					{
 						cacheField.SharedItems.ContainsDate = hasDate;
 						cacheField.SharedItems.MinDate = minDate;
-						if (maxDate == null && minDate != null)
-						{
-							// If the min date value is a date with no time component and there is only one shared item,
-							// Excel sets the max date to the next day. Otherwise, max date is set to min date.
-							if (minDate.Value.TimeOfDay.TotalMilliseconds == 0)
-								maxDate = minDate.Value.AddDays(1);
-							else
-								maxDate = minDate;
-						}
+						if (maxDate == null)
+							maxDate = minDate;
+
+						// If the max date value is a date with no time component (midnight), Excel sets the max date to the next day.
+						if (maxDate != null && maxDate.Value.TimeOfDay.TotalMilliseconds == 0)
+							maxDate = maxDate.Value.AddDays(1);
 						cacheField.SharedItems.MaxDate = maxDate;
 					}


Added IntelliTest stub for SwitchAndFor

Added IntelliTest stub for SwitchAndFor

--- Examples/SEViz.Demos/SEViz.Demos.Tests/SimpleTest.cs
+++ Examples/SEViz.Demos/SEViz.Demos.Tests/SimpleTest.cs
@@ -96,6 +96,36 @@

         }

+
+
+        /// <summary>Test stub for SwitchAndFor(Int32, Boolean, Int32)</summary>
+
+        [SEViz]
+
+        [PexMethod]
+
+        public int SwitchAndForTest(
+
+            [PexAssumeUnderTest]Simple target,
+
+            int type,
+
+            bool b,
+
+            int bound
+
+        )
+
+        {
+
+            int result = target.SwitchAndFor(type, b, bound);
+
+            return result;
+
+            // TODO: add assertions to method SimpleTest.SwitchAndForTest(Simple, Int32, Boolean, Int32)
+
+        }
+
     }

 }


增加 WebTest

增加 WebTest

--- WebTest/App_Code/WebServiceTest.cs
+++ WebTest/App_Code/WebServiceTest.cs
@@ -36,12 +36,19 @@
     public void ContentService()
     {

-      WebServices.RegisterService( new TestContentService(), VirtualPathUtility.GetDirectory( testContentPath ) );
+      var provider = new TestContentService();
+
+      WebServices.RegisterService( , VirtualPathUtility.GetDirectory( testContentPath ) );
       var result = HtmlProviders.LoadContent( testContentPath );

       Assert.AreEqual( result.Content, testContent, "测试内容提供程序失败" );

+      Assert.AreEqual( result.Provider, provider, "内容结果中的提供程序错误" );
+      Assert.AreEqual( result.VirtualPath, testContentPath, "内容结果中的虚拟路径错误" );
+
     }
+
+

     private const string testContentPath = "~/test/content/1.html";


AstGenerator: quoted text can only be single line Remove faulty namespace declaration Skip unexpected comment on document level Check if end of document is reached

--- XamlCSS/CssParsing/AstGenerator.cs
+++ XamlCSS/CssParsing/AstGenerator.cs
@@ -258,6 +258,8 @@
                 Error(e.Message, e.Tokens);

                 SkipUntilLineEnd();
+
+                oldCurrentNode.Parent.RemoveChild(oldCurrentNode);

                 currentNode = oldCurrentNode;
             }
@@ -350,6 +352,10 @@
                             else if (nextToken.Type == CssTokenType.Asterisk)
                             {
                                 SkipInlineCommentText();
+                            }
+                            else
+                            {
+                                SkipUntilLineEnd();
                             }
                             break;
                         case CssTokenType.At:
@@ -814,7 +820,7 @@
                         }
                         catch (AstGenerationException e)
                         {
-                            Error(e.Message, GetTokens(styleDeclarationStartToken, currentToken));
+                            Error(e.Message, GetTokens(styleDeclarationStartToken, ReachedEnd ? tokens[tokens.Count - 1] : currentToken));

                             SkipUntilLineEnd(CssTokenType.Semicolon, CssTokenType.BraceClose, CssTokenType.At);

@@ -843,6 +849,8 @@
                 currentNode = old;
             }
         }
+
+        private bool ReachedEnd => currentIndex >= tokens.Count;

         private void ReadEnterOrExitAction()
         {
@@ -1234,6 +1242,11 @@

         private void SkipIfFound(CssTokenType type)
         {
+            if (currentIndex >= tokens.Count)
+            {
+                throw new AstGenerationException($"Checked for token-type '{type}' but end of style was reached!", GetTokens(tokens[tokens.Count - 1], tokens[tokens.Count - 1]));
+            }
+
             if (currentToken.Type == type)
             {
                 currentIndex++;
@@ -1315,10 +1328,18 @@
             }
         }

-        private void ReadSingleQuoteText(bool goToParent = true)
-        {
+        private void ReadSingleQuoteText(bool goToParent = true, bool supportMultipleLines = false)
+        {
+            var startToken = currentToken;
             do
             {
+                if (!supportMultipleLines &&
+                    tokens[currentIndex].Type == CssTokenType.Whitespace &&
+                    tokens[currentIndex].Text == "\n")
+                {
+                    throw new AstGenerationException("Quoted text doesn't support multiple lines!", GetTokens(startToken, currentToken));
+                }
+
                 if (tokens[currentIndex].Type == CssTokenType.Backslash)
                 {
                     currentIndex++;
@@ -1341,10 +1362,18 @@
             } while (currentIndex < tokens.Count);
         }

-        private void ReadDoubleQuoteText(bool goToParent = true)
-        {
+        private void ReadDoubleQuoteText(bool goToParent = true, bool supportMultipleLines = false)
+        {
+            var startToken = currentToken;
             do
             {
+                if (!supportMultipleLines &&
+                    tokens[currentIndex].Type == CssTokenType.Whitespace &&
+                    tokens[currentIndex].Text == "\n")
+                {
+                    throw new AstGenerationException("Quoted text doesn't support multiple lines!", GetTokens(startToken, currentToken));
+                }
+
                 if (tokens[currentIndex].Type == CssTokenType.Backslash)
                 {
                     currentIndex++;


Fix PlainTextFormat to emit an implicit paragraph around the content (required by WPF)

--- Xwt/Xwt.Formats/PlainTextFormat.cs
+++ Xwt/Xwt.Formats/PlainTextFormat.cs
@@ -9,8 +9,11 @@
 	{
 		public override void Parse (Stream input, IRichTextBuffer buffer)
 		{
-			using (var reader = new StreamReader (input))
+			using (var reader = new StreamReader (input)) {
+				buffer.EmitStartParagraph (0);
 				buffer.EmitText (reader.ReadToEnd (), RichTextInlineStyle.Normal);
+				buffer.EmitEndParagraph ();
+			}
 		}
 	}
 }


have nonce as a variable on the object so it can be set if we desire that

--- YubicoDotNetClient/YubicoClient.cs
+++ YubicoDotNetClient/YubicoClient.cs
@@ -53,6 +53,7 @@
         private String clientId;
         private byte[] apiKey = null;
         private String sync;
+        private String nonce;

         private String[] apiUrls = {
                                        "https://api.yubico.com/wsapi/2.0/verify",
@@ -109,6 +110,15 @@
         }

         /// <summary>
+        /// Set the nonce to be used for the next requests. If this is unset a random nonce will be used.
+        /// </summary>
+        /// <param name="nonce">nonce to be used for the next request</param>
+        public void setNonce(String nonce)
+        {
+            this.nonce = nonce;
+        }
+
+        /// <summary>
         /// Do verification of OTP
         /// </summary>
         /// <param name="otp">The OTP from a YubiKey in modhex</param>
@@ -121,7 +131,11 @@
                 throw new FormatException("otp format is invalid");
             }

-            String nonce = generateNonce();
+            if (nonce == null)
+            {
+                nonce = generateNonce();
+            }
+
             SortedDictionary<String, String> queryMap = new SortedDictionary<String, String>();
             queryMap.Add("id", clientId);
             queryMap.Add("nonce", nonce);
@@ -199,6 +213,9 @@
                     throw new YubicoValidationFailure("OTP in request and response does not match, man in the middle?");
                 }
             }
+
+            // set nonce to null so we will generate a new one for the next request
+            nonce = null;
             return response;
         }


'refactoring database'

'refactoring database'

--- paraquick-qbxml/Requests/ICustomer.cs
+++ paraquick-qbxml/Requests/ICustomer.cs
@@ -11,6 +11,7 @@
         string Name { get; set; }
         string FirstName { get; set; }
         string LastName { get; set; }
+        string CompanyName { get; set; }
         BillAddress BillAddress { get; set; }
         string Phone { get; set; }
         string Email { get; set; }


Clarify encryption.

Clarify encryption.

--- Sensus.Shared/DataStores/Local/FileLocalDataStore.cs
+++ Sensus.Shared/DataStores/Local/FileLocalDataStore.cs
@@ -196,13 +196,14 @@
         }

         /// <summary>
-        /// Whether or not to apply asymmetric-key encryption to data. If this is enabled, then you must provide a public encryption
-        /// key to <see cref="Protocol.AsymmetricEncryptionPublicKey"/>. You can generate a public encryption key following the instructions
-        /// provided for <see cref="Protocol.AsymmetricEncryptionPublicKey"/>. Note that data are not encrypted immediately. They are first
-        /// written to a compressed file on the device where they live unencrypted for a period of time.
+        /// Whether or not to apply asymmetric-key encryption to data. If this is enabled, then you must either provide a public encryption
+        /// key to <see cref="Protocol.AsymmetricEncryptionPublicKey"/> or use an [authentication server](xref:authentication_servers).
+        /// You can generate a public encryption key following the instructions provided for
+        /// <see cref="Protocol.AsymmetricEncryptionPublicKey"/>. Note that data are not encrypted immediately. They are first
+        /// written to disk on the device where they live unencrypted for a period of time.
         /// </summary>
         /// <value><c>true</c> to encrypt; otherwise, <c>false</c>.</value>
-        [OnOffUiProperty("Encrypt (must set public encryption key on protocol in order to use):", true, 6)]
+        [OnOffUiProperty("Encrypt:", true, 6)]
         public bool Encrypt
         {
             get


fix DynamicViewEntity constructor

fix DynamicViewEntity constructor

--- Signum.Engine.Extensions/Dynamic/DynamicViewLogic.cs
+++ Signum.Engine.Extensions/Dynamic/DynamicViewLogic.cs
@@ -42,7 +42,7 @@
                 {
                     Construct = (_) => new DynamicViewEntity() {
                         Locals = "{\r\n" +
-                        "  const forceUpdate = modules.Hooks.useForceUpdate(0);\r\n" +
+                        "  const forceUpdate = modules.Hooks.useForceUpdate();\r\n" +
                         "  return { forceUpdate };\r\n" +
                         "}",
                     },


Correcion test IU

Correcion test IU

--- Signum.Web.Extensions.Selenium/SeleniumExtensions.cs
+++ Signum.Web.Extensions.Selenium/SeleniumExtensions.cs
@@ -191,6 +191,13 @@
             selenium.Click(EntityMenuOptionLocator(menuId, optionId));
         }

+        public static bool EntityMenuOptionEnabled(this ISelenium selenium, string menuId, string optionId)
+        {
+            string locator = EntityMenuOptionLocator(menuId, optionId);
+            Assert.IsTrue(selenium.IsElementPresent(locator));
+            return !selenium.IsElementPresent("{0}.sf-disabled".Formato(locator));
+        }
+
         public static string ValidationSummarySelector(string prefix)
         {
             return "jq=#{0}sfGlobalValidationSummary".Formato(prefix);