# UI Improvement for Logistics: - Transport Order Dispatches View

--- Web/Areas/Logistics/Views/Delivery/Dispatches.cshtml
+++ Web/Areas/Logistics/Views/Delivery/Dispatches.cshtml
@@ -5,120 +5,137 @@

 @{
     ViewBag.Title = "Dispatches";
-    Layout = "~/Views/Shared/_MainLayout.cshtml";
-
+    //Layout = "~/Views/Shared/_MainLayout.cshtml";
+    Layout = "~/Views/Shared/NewTheme _MainLayout.cshtml";
+    ViewBag.PageTitle = Html.Translate("Transport Order Dispatches");
+    ViewBag.PageTitleDescription = "";
+
 }
-
-
-
-
-
-
@Html.Translate("Transport Order Dispatches")

-

-

-

-

-

-                            @Html.LabelFor(model => model.TransportOrderNo)
-

-

-                            @Html.TextBoxFor(model => model.TransportOrderNo, new { Disabled = true })
-

-

+
+
+

+

+

+

+

+                     @Html.Translate("Transport Order Header")

-

-

-

-                            @Html.LabelFor(model => model.Transporter)
-

-

-                            @Html.TextBoxFor(model => model.Transporter, new { Disabled = true })
-

-

+

+
+

+

-

-

-

-

-                            @Html.LabelFor(model => model.ContractNumber)
-

-

-                            @Html.TextBoxFor(model => model.ContractNumber, new { Disabled = true })
-

-

-

-

-

-

-                            @Html.LabelFor(model => model.OrderDateET)
-

-

-                            @Html.TextBoxFor(model => model.OrderDateET, new { Disabled = true })
-

-
-

-

-

-

-

-

-

-                            @Html.LabelFor(model => model.RequestedDispatchDateET, new { @class = "cats-date-pref" })
-

-

-                            @Html.TextBoxFor(model => model.RequestedDispatchDateET, new { Disabled = true })
-

-

-

-

-

-

-                            @Html.LabelFor(model => model.OrderExpiryDateET, new { @class = "cats-date-pref" })
-

-

-                            @Html.TextBoxFor(model => model.OrderExpiryDateET, new { Disabled = true })
-

-
-

-

-

-

-

-

-

-                            @Html.LabelFor(model => model.StartDate, new { @class = "cats-date-pref" })
-

-

-                            @Html.TextBoxFor(model => model.StartDate, new { Disabled = true })
-

-

-

-

-

-

-                            @Html.LabelFor(model => model.EndDate, new { @class = "cats-date-pref" })
-

-

-                            @Html.TextBoxFor(model => model.EndDate, new { Disabled = true })
+

+

+

+

+

+

+                                    @Html.LabelFor(model => model.TransportOrderNo)
+

+

+                                    @Html.TextBoxFor(model => model.TransportOrderNo, new { Disabled = true, @class = "form-control" })
+

+

+

+

+

+

+                                    @Html.LabelFor(model => model.Transporter)
+

+

+                                    @Html.TextBoxFor(model => model.Transporter, new { Disabled = true, @class = "form-control" })
+

+

+

+

+

+

+

+

+                                    @Html.LabelFor(model => model.ContractNumber)
+

+

+                                    @Html.TextBoxFor(model => model.ContractNumber, new { Disabled = true, @class = "form-control" })
+

+

+

+

+

+

+                                    @Html.LabelFor(model => model.OrderDateET)
+

+

+                                    @Html.TextBoxFor(model => model.OrderDateET, new { Disabled = true, @class = "form-control" })
+

+
+

+

+

+

+

+

+

+                                    @Html.LabelFor(model => model.RequestedDispatchDateET, new { @class = "cats-date-pref" })
+

+

+                                    @Html.TextBoxFor(model => model.RequestedDispatchDateET, new { Disabled = true, @class = "form-control" })
+

+

+

+

+

+

+                                    @Html.LabelFor(model => model.OrderExpiryDateET, new { @class = "cats-date-pref" })
+

+

+                                    @Html.TextBoxFor(model => model.OrderExpiryDateET, new { Disabled = true, @class = "form-control" })
+

+
+

+

+

+

+

+

+

+                                    @Html.LabelFor(model => model.StartDate, new { @class = "cats-date-pref" })
+

+

+                                    @Html.TextBoxFor(model => model.StartDate, new { Disabled = true, @class = "form-control" })
+

+

+

+

+

+

+                                    @Html.LabelFor(model => model.EndDate, new { @class = "cats-date-pref" })
+

+

+                                    @Html.TextBoxFor(model => model.EndDate, new { Disabled = true, @class = "form-control" })
+

+

@@ -126,9 +143,13 @@

-

-

-

+

+

+
@Html.Translate("Transport Order Details")

+

+
+

+

                         @Html.Translate("Dispatch Waiting Receiving Note")

@@ -140,592 +161,448 @@

-

-

-

-

-

-

-
-                                        <colgroup><col><col><col><col><col><col><col><col><col><col></colgroup>
-

-

-
-                                                    GIN
-
-
-                                                    Requisition No
-
-
-                                                    Program
-
-
-
-                                                    Zone
-
-
-                                                    Woreda
-
-
-
-                                                    FDP
-
-
-                                                    Bid Number
-
-
-                                                    Plate No. Prime
-
-
-                                                    Plate No. Trailer
-
-
-                                                    Received By (Driver Name)
-
-
-                                                    Dispatched Date
-
-
-                                                    Created Date
-
-
-

-

-

-

-

-

-
>
-                                    <colgroup><col><col><col><col><col><col><col><col><col><col></colgroup>
-

-

-
-

-                                                        Search    : <input type="search" data-ng-model="search"/>
-

-
-

-

-
-                                                    GIN
-
-
-                                                    Requisition No
-
-
-                                                    Program
-
-
-                                                    Zone
-
-
-                                                    Woreda
-
-
-                                                    FDP
-
-
-                                                    Bid Number
-
-
-                                                    Plate No. Prime
-
-
-                                                    Plate No. Trailer
-
-
-                                                    Received By (Driver Name)
-
-
-                                                    Dispatched Date
-
-
-                                                    Created Date
-
-
-
-
-

-

-

-

-
-

-

-                                            {{item.GIN}}
-                                            {{item.RequisitionNo}}
-                                            {{item.Program}}
-                                            {{item.Zone}}
-                                            {{item.Woreda}}
-                                            {{item.FDP}}
-                                            {{item.BidNumber}}
-                                            {{item.PlateNo_Prime}}
-                                            {{item.PlateNo_Trailer}}
-                                            {{item.DriverName}}
-                                            {{item.DispatchDatePref}}
-                                            {{item.CreatedDatePref}}
-
-                                                Reject
-
-
-

-

-

-

-

-

-

-

-

-

-

-                                        <colgroup><col><col><col><col><col><col><col><col><col><col></colgroup>
-

-

-
-                                                    GIN
-
-
-                                                    Requisition No
-
-
-                                                    Program
-
-
-                                                    Zone
-
-
-                                                    Woreda
-
-
-                                                    FDP
-
-
-                                                    Bid Number
-
-
-                                                    Plate No. Prime
-
-
-                                                    Plate No. Trailer
-
-
-                                                    Received By (Driver Name)
-
-
-                                                    Dispatched Date
-
-
-                                                    Created
-
-

-

-

-

-

-

-

-                                    <colgroup><col><col><col><col><col><col><col><col><col><col></colgroup>
-
-

-

-
-
-

-                                       Search    : <input type="search" data-ng-model="searchT2"/>
-
-

-
-

-

-
-                                                    GIN
-
-
-                                                    Requisition No
-
-
-                                                    Program
-
-
-                                                    Zone
-
-
-                                                    Woreda
-
-
-                                                    FDP
-
-
-                                                    Bid Number
-
-
-                                                    Plate No. Prime
-
-
-                                                    Plate No. Trailer
-
-
-                                                    Received By (Driver Name)
-
-
-                                                    Dispatched Date
-
-
-                                                    Created Date
-
-

-

-
-

-

-
-

-

-
-                                                {{item.GIN}}
-
-                                            {{item.RequisitionNo}}
-                                            {{item.Program}}
-                                            {{item.Zone}}
-                                            {{item.Woreda}}
-                                            {{item.FDP}}
-                                            {{item.BidNumber}}
-                                            {{item.PlateNo_Prime}}
-                                            {{item.PlateNo_Trailer}}
-                                            {{item.DriverName}}
-                                            {{item.DispatchDatePref}}
-                                            {{item.CreatedDatePref}}
-

-

-

-

-

-

-

-

-

-

-

-                                        <colgroup><col><col><col><col><col><col><col><col><col><col></colgroup>
-

-

-
-                                                    GIN
-
-
-                                                    Requisition No
-
-
-                                                    Program
-
-
-                                                    Zone
-
-
-                                                    Woreda
-
-
-
-                                                    FDP
-
-
-                                                    Bid Number
-
-
-                                                    Plate No. Prime
-
-
-                                                    Plate No. Trailer
-
-
-                                                    Received By (Driver Name)
-
-
-                                                    Dispatched Date
-
-
-                                                    Created Date
-
-

-

-

-

-

-

-

-                                    <colgroup><col><col><col><col><col><col><col><col><col><col></colgroup>
-

-

-
-

-                                       Search    : <input type="search" data-ng-model="searchT3"/>
-
-

-
-

-
-
-
-                                                    GIN
-
-
-                                                    Requisition No
-
-
-                                                    Program
-
-
-                                                    Zone
-
-
-                                                    Woreda
-
-
-
-                                                    FDP
-
-
-                                                    Bid Number
-
-
-                                                    Plate No. Prime
-
-
-                                                    Plate No. Trailer
-
-
-                                                    Received By (Driver Name)
-
-
-                                                    Dispatched Date
-
-
-                                                    Created Date
-
-

-

-
-

-                                        @*
*@
-

-
-

-

-
-                                                {{item.InvoiceNo}}
-
-                                            {{item.RequisitionNo}}
-                                            {{item.Program}}
-                                            {{item.Zone}}
-                                            {{item.Woreda}}
-                                            {{item.FDP}}
-                                            {{item.BidNumber}}
-                                            {{item.PlateNoPrimary}}
-                                            {{item.PlateNoTrailler}}
-                                            {{item.DriverName}}
-                                            {{item.DispatchDatePref}}
-                                            {{item.CreatedDatePref}}
-

-

-

-

-

-

-
+
+

+

+

+

+

+

+

+                                    <input class="form-control input-md" type="search" data-ng-model="search" placeholder="Enter GIN Number" />
+                                    @Html.Translate("Search GRN No"):
+

+

+

+

+

+

+

+
+                                            GIN
+
+
+                                            Requisition No
+
+
+                                            Program
+
+
+                                            Zone
+
+
+                                            Woreda
+
+
+                                            FDP
+
+
+                                            Bid Number
+
+
+                                            Plate No. Prime
+
+
+                                            Plate No. Trailer
+
+
+                                            Received By (Driver Name)
+
+
+                                            Dispatched Date
+
+
+                                            Created Date
+
+
+
+
+

+

+

+

+
+

+

+                                        {{item.GIN}}
+                                        {{item.RequisitionNo}}
+                                        {{item.Program}}
+                                        {{item.Zone}}
+                                        {{item.Woreda}}
+                                        {{item.FDP}}
+                                        {{item.BidNumber}}
+                                        {{item.PlateNo_Prime}}
+                                        {{item.PlateNo_Trailer}}
+                                        {{item.DriverName}}
+                                        {{item.DispatchDatePref}}
+                                        {{item.CreatedDatePref}}
+
+                                        Reject
+
+

+

+

+

+

+

+

+

+

+

+                                    <input class="form-control input-md" type="search" data-ng-model="searchT2" placeholder="Enter GIN Number" />
+                                    @Html.Translate("Search GRN No"):
+

+

+

+

+

+

+

+
+                                            GIN
+
+
+                                            Requisition No
+
+
+                                            Program
+
+
+                                            Zone
+
+
+                                            Woreda
+
+
+                                            FDP
+
+
+                                            Bid Number
+
+
+                                            Plate No. Prime
+
+
+                                            Plate No. Trailer
+
+
+                                            Received By (Driver Name)
+
+
+                                            Dispatched Date
+
+
+                                            Created Date
+
+

+

+
+

+

+
+

+

+
+                                            {{item.GIN}}
+
+                                        {{item.RequisitionNo}}
+                                        {{item.Program}}
+                                        {{item.Zone}}
+                                        {{item.Woreda}}
+                                        {{item.FDP}}
+                                        {{item.BidNumber}}
+                                        {{item.PlateNo_Prime}}
+                                        {{item.PlateNo_Trailer}}
+                                        {{item.DriverName}}
+                                        {{item.DispatchDatePref}}
+                                        {{item.CreatedDatePref}}
+

+

+

+

+

+

+

+

+

+

+

+                                    <input class="form-control input-md" type="search" data-ng-model="searchT3" placeholder="Enter GIN Number" />
+                                    @Html.Translate("Search GRN No"):
+

+

+

+

+

+

+

+
+                                            GIN
+
+
+                                            Requisition No
+
+
+                                            Program
+
+
+                                            Zone
+
+
+                                            Woreda
+
+
+
+                                            FDP
+
+
+                                            Bid Number
+
+
+                                            Plate No. Prime
+
+
+                                            Plate No. Trailer
+
+
+                                            Received By (Driver Name)
+
+
+                                            Dispatched Date
+
+
+                                            Created Date
+
+

+

+
+

+                                    @*
*@
+

+
+

+

+
+                                            {{item.InvoiceNo}}
+
+                                        {{item.RequisitionNo}}
+                                        {{item.Program}}
+                                        {{item.Zone}}
+                                        {{item.Woreda}}
+                                        {{item.FDP}}
+                                        {{item.BidNumber}}
+                                        {{item.PlateNoPrimary}}
+                                        {{item.PlateNoTrailler}}
+                                        {{item.DriverName}}
+                                        {{item.DispatchDatePref}}
+                                        {{item.CreatedDatePref}}
+

+

+

+

+

+

+

-
-

-

-
Edit Goods Receiving Note (GRN)

+
+

+
+

+

+

+

+                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
+
@Html.Translate("Edit Goods Receiving Note (GRN)")

+

+

+

+

+

+

+

+                                            Ref No
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.RefNo}}" name="DistributionViewModel.RefNo" id="DistributionViewModel_RefNo" data-ng-model="GRNDetail.RefNo" />
+

+

+

+
+

+

+

+                                            GIN
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.InvoiceNo}}" name="DistributionViewModel.GIN" id="DistributionViewModel_GIN" data-ng-model="GRNDetail.InvoiceNo" disabled="disabled" />
+

+

+

+

+

+

+

+

+                                            Receiving Number
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.ReceivingNumber}}" name="DistributionViewModel.ReceivingNumber" id="DistributionViewModel_ReceivingNumber" data-ng-model="GRNDetail.ReceivingNumber">
+

+

+

+
+

+

+

+                                            Way Bill No.
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.WayBillNo}}" name="DistributionViewModel.WaybillNo" id="DistributionViewModel_WaybillNo" data-ng-model="GRNDetail.WayBillNo">
+

+

+

+

+

+

+

+

+                                            Received By
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.ReceivedBy}}" name="DistributionViewModel.ReceivedBy" id="DistributionViewModel_ReceivedBy" data-ng-model="GRNDetail.ReceivedBy">
+

+

+

+
+

+

+

+                                            Received Date
+

+

+                                            <input class="form-control cats-datepicker2" type="text" value="{{GRNDetail.ReceivedDate}}" name="DistributionViewModel.ReceivedDate" id="DistributionViewModel_ReceivedDate" data-ng-model="GRNDetail.ReceivedDate" id="datepicker">
+

+

+

+

+

+

+

+

+                                            Delivery By
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.DeliveryBy}}" name="DistributionViewModel.DeliveryBy" id="DistributionViewModel_DeliveryBy" data-ng-model="GRNDetail.DeliveryBy" disabled="disabled">
+

+

+

+
+

+

+

+                                            Delivery Date
+

+

+                                            <input class="form-control cats-datepicker2" type="text" value="{{GRNDetail.DeliveryDate}}" name="DistributionViewModel.DeliveryDate" id="DistributionViewModel_DeliveryDate" data-ng-model="GRNDetail.DeliveryDate" id="datepicker">
+

+

+

+

+

+

+

+

+                                            Commodity
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.Commodity}}" name="DistributionViewModel.Commodity" id="DistributionViewModel_Commodity" data-ng-model="GRNDetail.Commodity" disabled="disabled">
+

+

+

+
+

+

+

+                                            Sent Qty.
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.SentQuantity}}" name="DistributionViewModel.SentQuantity" id="DistributionViewModel_SentQuantity" data-ng-model="GRNDetail.SentQuantity" disabled="disabled">
+

+

+

+

+

+

+

+

+                                            Received Qty.
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.ReceivedQuantity}}" name="DistributionViewModel.ReceivedQuantity" id="DistributionViewModel_ReceivedQuantity" data-ng-model="GRNDetail.ReceivedQuantity">
+

+

+

+
+

+

+

+                                            Diffrence Qty.
+

+

+                                            {{GRNDetail.SentQuantity - GRNDetail.ReceivedQuantity}}
+

+

+

+

+

+

+

+

+                                            Unit
+

+

+                                            <input class="form-control" type="text" value="{{GRNDetail.Unit}}" name="DistributionViewModel.Unit" id="DistributionViewModel_Unit" data-ng-model="GRNDetail.Unit" disabled="disabled">
+

+

+

+
+

+

+

+                                            Document Received Date
+

+

+                                            <input class="form-control cats-datepicker2" type="text" value="{{GRNDetail.DocumentReceivedDate}}" name="DistributionViewModel.DocumentReceivedDate" id="DistributionViewModel_DocumentReceivedDate" data-ng-model="GRNDetail.DocumentReceivedDate" id="datepicker">
+

+

+

+

+                            @*

+

+

+

+                                            <button class="btn btn-large btn-primary btnEditGRN" ng-click="editGRN()">Save</button>
+

+

+
*@
+

+

+

+

+                        <button type="button" class="btn default" data-dismiss="modal">Close</button>
+                        <button class="btn green btnEditGRN" ng-click="editGRN()">Save changes</button>
+

-
-

-

-

-

-                                Ref No
-

-

-                                <input type="text" value="{{GRNDetail.RefNo}}" name="DistributionViewModel.RefNo" id="DistributionViewModel_RefNo" data-ng-model="GRNDetail.RefNo" />
-

-

-

-

-
-

-

-

-

-                                GIN
-

-

-                                <input type="text" value="{{GRNDetail.InvoiceNo}}" name="DistributionViewModel.GIN" id="DistributionViewModel_GIN" data-ng-model="GRNDetail.InvoiceNo" disabled="disabled"/>
-

-

-

-

-

-

-

-

-                                Receiving Number
-
-

-

-                                <input type="text" value="{{GRNDetail.ReceivingNumber}}" name="DistributionViewModel.ReceivingNumber" id="DistributionViewModel_ReceivingNumber" data-ng-model="GRNDetail.ReceivingNumber">
-

-

-

-

-

-

-

-

-                                Way Bill No.
-

-

-                                <input type="text" value="{{GRNDetail.WayBillNo}}" name="DistributionViewModel.WaybillNo" id="DistributionViewModel_WaybillNo" data-ng-model="GRNDetail.WayBillNo">
-

-

-

-

-

-

-

-

-                                Received By
-

-

-                                <input type="text" value="{{GRNDetail.ReceivedBy}}" name="DistributionViewModel.ReceivedBy" id="DistributionViewModel_ReceivedBy" data-ng-model="GRNDetail.ReceivedBy">
-

-

-

-

-

-

-

-

-                                Received Date
-

-

-                                <input class="cats-datepicker2" type="text" value="{{GRNDetail.ReceivedDate}}" name="DistributionViewModel.ReceivedDate" id="DistributionViewModel_ReceivedDate" data-ng-model="GRNDetail.ReceivedDate" id="datepicker">
-

-

-

-

-

-

-

-

-                                Delivery By
-

-

-                                <input type="text" value="{{GRNDetail.DeliveryBy}}" name="DistributionViewModel.DeliveryBy" id="DistributionViewModel_DeliveryBy" data-ng-model="GRNDetail.DeliveryBy" disabled="disabled">
-

-

-

-

-

-

-

-

-                                Delivery Date
-

-

-                                <input class="cats-datepicker2" type="text" value="{{GRNDetail.DeliveryDate}}" name="DistributionViewModel.DeliveryDate" id="DistributionViewModel_DeliveryDate" data-ng-model="GRNDetail.DeliveryDate" id="datepicker">
-

-

-

-

-

-

-

-

-                                Commodity
-

-

-                                <input type="text" value="{{GRNDetail.Commodity}}" name="DistributionViewModel.Commodity" id="DistributionViewModel_Commodity" data-ng-model="GRNDetail.Commodity" disabled="disabled">
-

-

-

-

-

-

-

-

-                                Sent Qty.
-

-

-                                <input type="text" value="{{GRNDetail.SentQuantity}}" name="DistributionViewModel.SentQuantity" id="DistributionViewModel_SentQuantity" data-ng-model="GRNDetail.SentQuantity" disabled="disabled">
-

-

-

-

-

-

-

-

-                                Received Qty.
-

-

-                                <input type="text" value="{{GRNDetail.ReceivedQuantity}}" name="DistributionViewModel.ReceivedQuantity" id="DistributionViewModel_ReceivedQuantity" data-ng-model="GRNDetail.ReceivedQuantity">
-

-

-

-

-

-

-

-

-                                Diffrence Qty.
-

-

-                               {{GRNDetail.SentQuantity - GRNDetail.ReceivedQuantity}}
-

-

-

-

-
-

-

-

-

-                                Unit
-

-

-                                <input type="text" value="{{GRNDetail.Unit}}" name="DistributionViewModel.Unit" id="DistributionViewModel_Unit" data-ng-model="GRNDetail.Unit" disabled="disabled">
-

-

-

-

-

-

-

-

-                                Document Received Date
-

-

-                                <input class="cats-datepicker2" type="text" value="{{GRNDetail.DocumentReceivedDate}}" name="DistributionViewModel.DocumentReceivedDate" id="DistributionViewModel_DocumentReceivedDate" data-ng-model="GRNDetail.DocumentReceivedDate" id="datepicker">
-

-

-

-

-

-

-

-

-                            <button class="btn btn-large btn-primary btnEditGRN" ng-click="editGRN()">Save</button>
-

-

-

+

-
+

-
-
-
+
+

+

+
+

@@ -994,10 +873,10 @@
     //        return false;
     //    });

-
+
     //});
 </script>

-

+


Adds some more tests for variable declaration.

--- ProjectHekate.Grammar.Tests/THekateScriptVisitor.cs
+++ ProjectHekate.Grammar.Tests/THekateScriptVisitor.cs
@@ -83,6 +83,39 @@
                 result.Code[1].Should().Be(1.35f);
                 result.Code[2].Should().Be((byte)Instruction.SetVariable);
                 result.Code[3].Should().Be(0);
+            }
+
+            [TestMethod]
+            public void ShouldThrowExceptionWhenVariableNameConflictsWithExistingSymbol()
+            {
+                // Setup: dummy data
+                const string expression = @"var someIdentifier = 6;";
+
+                var scope = new CodeScope();
+                scope.AddSymbol("someIdentifier", SymbolType.Numerical);
+                SetUpGetCurrentScope(scope);
+
+                // Act+Verify
+                Subject.Invoking(hsv => hsv.VisitVariableDeclaration(GetFirstContext<HekateParser.VariableDeclarationContext>(expression))
+                    .Generate(MockVirtualMachine, MockScopeManager))
+                    .ShouldThrow<ArgumentException>();
+            }
+
+            [TestMethod]
+            public void ShouldThrowExceptionWhenVariableNameConflictsWithGlobalSymbol()
+            {
+                // Setup: dummy data
+                const string expression = "var someIdentifier = 1.35";
+
+                SetUpGetCurrentScope(new CodeScope());
+                Mocker.GetMock<IVirtualMachine>()
+                    .Setup(igsc => igsc.HasGlobalSymbolDefined("someIdentifier"))
+                    .Returns(true);
+
+                // Act+Verify
+                Subject.Invoking(hsv => hsv.VisitVariableDeclaration(GetFirstContext<HekateParser.VariableDeclarationContext>(expression))
+                    .Generate(MockVirtualMachine, MockScopeManager))
+                    .ShouldThrow<ArgumentException>();
             }
         }


SimpleContainerException didn't have deserialization ctor

--- _Src/Container/Interface/SimpleContainerException.cs
+++ _Src/Container/Interface/SimpleContainerException.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Runtime.Serialization;

 namespace SimpleContainer.Interface
 {
@@ -13,5 +14,9 @@
 		public SimpleContainerException(string message, Exception innerException) : base(message, innerException)
 		{
 		}
+
+		protected SimpleContainerException(SerializationInfo info, StreamingContext context) : base(info, context)
+		{
+		}
 	}
 }


C#: Reenable disabled test on OSX

C#: Reenable disabled test on OSX

--- csharp/extractor/Semmle.Extraction.Tests/Layout.cs
+++ csharp/extractor/Semmle.Extraction.Tests/Layout.cs
@@ -45,10 +45,14 @@
             Directory.SetCurrentDirectory(tmpDir);
             if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
             {
-                // `Directory.SetCurrentDirectory()` doesn't seem to work on macOS,
-                // so disable this test on macOS, for now
+                // `Directory.SetCurrentDirectory()` seems to slightly change the path on macOS,
+                // so adjusting it:
                 Assert.NotEqual(Directory.GetCurrentDirectory(), tmpDir);
-                return;
+                tmpDir = "/private" + tmpDir;
+                // Remove trailing slash:
+                Assert.Equal('/', tmpDir[tmpDir.Length - 1]);
+                tmpDir = tmpDir.Substring(0, tmpDir.Length - 1);
+                Assert.Equal(Directory.GetCurrentDirectory(), tmpDir);
             }
             var f1 = project!.GetTrapPath(Logger, new TransformedPathStub("foo.cs"), TrapWriter.CompressionMode.Gzip);
             var g1 = TrapWriter.NestPaths(Logger, tmpDir, "foo.cs.trap.gz");


Reorder tests

Reorder tests

--- adhoc/Google.Cloud.MetadataTesting/Program.cs
+++ adhoc/Google.Cloud.MetadataTesting/Program.cs
@@ -27,9 +27,9 @@
     {
         static void Main(string[] args)
         {
+            Test(MakeLanguageRequest);
+            Test(ShowPlatform);
             Test(ShowRunningOnComputeEngine);
-            Test(ShowPlatform);
-            Test(MakeLanguageRequest);
         }

         static void Test(Func<string> function)


Clean up and document DokanError.

Clean up and document DokanError.

--- DokanNet/DokanError.cs
+++ DokanNet/DokanError.cs
@@ -1,29 +1,82 @@
 namespace DokanNet
 {
-    public enum DokanError : int
-    {
-        // From WinError.h -> http://msdn.microsoft.com/en-us/library/ms819773.aspx
-        ErrorFileNotFound = -2, // MessageText: The system cannot find the file specified.
-        ErrorPathNotFound = -3, // MessageText: The system cannot find the path specified.
-        ErrorAccessDenied = -5, // MessageText: Access is denied.
-        ErrorSharingViolation = -32,
-        ErrorFileExists = -80,
-        ErrorDiskFull = -112, // There is not enough space on the disk.
-        ErrorInvalidName = -123,
-        ErrorDirNotEmpty = -145, // MessageText: The directory is not empty.
+	public enum DokanError
+	{
+		/// <summary>
+		/// The operation completed successfully.
+		/// </summary>
+		Success = 0,

-        ErrorAlreadyExists = -183,
-        // MessageText: Cannot create a file when that file already exists.
+		/// <summary>
+		/// Incorrect function.
+		/// </summary>
+		Error = -1,
+
+		/// <summary>
+		/// The system cannot find the file specified.
+		/// </summary>
+		FileNotFound = -2,

-        ErrorExceptionInService = -1064,
-        //  An exception occurred in the service when handling thecontrol request.
-        ErrorSuccess = 0,
-        ErrorError = -1,
-        ErrorNotImplemented = -120,
+		/// <summary>
+		/// The system cannot find the path specified.
+		/// </summary>
+		PathNotFound = -3,

-        ErrorPrivilegeNotHeld = -1314,
-        ErrorNotReady         =         -21,
-        Undefined = int.MaxValue
+		/// <summary>
+		/// Access is denied.
+		/// </summary>
+		AccessDenied = -5,

-    }
+		/// <summary>
+		/// The device is not ready.
+		/// </summary>
+		NotReady = -21,
+
+		/// <summary>
+		/// The process cannot access the file because it is being used by another process.
+		/// </summary>
+		SharingViolation = -32,
+
+		/// <summary>
+		/// The file exists.
+		/// </summary>
+		FileExists = -80,
+
+		/// <summary>
+		/// There is not enough space on the disk.
+		/// </summary>
+		DiskFull = -112,
+
+		/// <summary>
+		/// This function is not supported on this system.
+		/// </summary>
+		NotImplemented = -120,
+
+		/// <summary>
+		/// The filename, directory name, or volume label syntax is incorrect.
+		/// </summary>
+		InvalidName = -123,
+
+		/// <summary>
+		/// The directory is not empty.
+		/// </summary>
+		DirNotEmpty = -145,
+
+		/// <summary>
+		/// Cannot create a file when that file already exists.
+		/// </summary>
+		AlreadyExists = -183,
+
+		/// <summary>
+		/// An exception occurred in the service when handling the control request.
+		/// </summary>
+		ExceptionInService = -1064,
+
+		/// <summary>
+		/// A required privilege is not held by the client.
+		/// </summary>
+		PrivilegeNotHeld = -1314,
+
+		Undefined = int.MaxValue
+	}
 }


more reading optimizations

more reading optimizations

--- DotNetDBF/DBFReader.cs
+++ DotNetDBF/DBFReader.cs
@@ -309,13 +309,13 @@
                                     _header.FieldArray[i].FieldLength
                                     ];
                                 _dataInputStream.Read(t_float, 0, t_float.Length);
-                                t_float = Utils.trimLeftSpaces(t_float);
                                 String tParsed = CharEncoding.GetString(t_float);
-
-                                if (t_float.Length > 0
-                                    && !tParsed.Contains(DBFFieldType.Unknown))
-                                {
-                                    recordObjects[i] = Double.Parse(tParsed,NumberStyles.Float);
+                                var tLast = tParsed.Substring(tParsed.Length - 1);
+                                if (tParsed.Length > 0
+                                    && tLast != " "
+                                    && tLast != DBFFieldType.Unknown)
+                                {
+                                    recordObjects[i] = Double.Parse(tParsed, NumberStyles.Float | NumberStyles.AllowLeadingWhite);
                                 }
                                 else
                                 {
@@ -340,13 +340,14 @@
                                 _dataInputStream.Read(t_numeric,
                                                      0,
                                                      t_numeric.Length);
-                                t_numeric = Utils.trimLeftSpaces(t_numeric);
                                 string tParsed =
                                     CharEncoding.GetString(t_numeric);
-                                if (t_numeric.Length > 0
-                                    && !tParsed.Contains(DBFFieldType.Unknown))
-                                {
-                                    recordObjects[i] = Decimal.Parse(tParsed, NumberStyles.Float);
+                                var tLast = tParsed.Substring(tParsed.Length - 1);
+                                if (tParsed.Length > 0
+                                    && tLast != " "
+                                    && tLast != DBFFieldType.Unknown)
+                                {
+                                    recordObjects[i] = Decimal.Parse(tParsed, NumberStyles.Float | NumberStyles.AllowLeadingWhite);
                                 }
                                 else
                                 {


fixed form build bug

fixed form build bug


Fix rows in export not being marked as added when they are. (#37)

--- SjoslagetBackend/Services/ExportToExcelGenerator.cs
+++ SjoslagetBackend/Services/ExportToExcelGenerator.cs
@@ -145,8 +145,11 @@
 			SetCell(sheet, row, 6, nationality.ToUpperInvariant(), nameof(BookingPax.Nationality), isCreated, changes);
 			SetCell(sheet, row, 7, reference, null, isCreated, changes);

-			if(_updatedSince.HasValue && (isCreated || changes.Any(IsExportedField)))
-				SetCell(sheet, row, 8, isCreated ? "Ny" : "Ändrad", null, true, null);
+			if(_updatedSince.HasValue && (isCreated || changes.Any(c => IsExportedField(c) || IsAddedPax(c))))
+			{
+				bool isNew = isCreated || changes.Any(IsAddedPax);
+				SetCell(sheet, row, 8, isNew ? "Ny" : "Ändrad", null, true, null);
+			}
 		}

 		void CreateRowForRemovedPax(Worksheet sheet, int row, int cabinNo, string cabinTypeName, string reference)
@@ -278,6 +281,8 @@
 			}
 		}

+		static bool IsAddedPax(string fieldName) => BookingChange.Added.Equals(fieldName);
+
 		static bool IsExportedField(string fieldName) => ExportedFields.Contains(fieldName);

 		static void SetCell(Worksheet sheet, int row, int col, string content, string fieldName, bool mustHighlight, string[] changedFields)


Fix, eventhandler was added periodically causing an application hang when the recording device was changed after running for a long time.

--- Source/ChromeCast.Desktop.AudioStreamer/MainForm.cs
+++ Source/ChromeCast.Desktop.AudioStreamer/MainForm.cs
@@ -32,6 +32,7 @@
         private Size windowSize;
         private StringBuilder log = new StringBuilder();
         private string recordingDeviceID;
+        private bool eventHandlerAdded;

         public MainForm(IApplicationLogic applicationLogicIn, IDevices devicesIn, ILoopbackRecorder loopbackRecorderIn, ILogger loggerIn)
         {
@@ -427,7 +428,11 @@
                 recordingDeviceID = null;
             }

-            cmbRecordingDevice.SelectedIndexChanged += CmbRecordingDevice_SelectedIndexChanged;
+            if (!eventHandlerAdded)
+            {
+                cmbRecordingDevice.SelectedIndexChanged += CmbRecordingDevice_SelectedIndexChanged;
+                eventHandlerAdded = true;
+            }
         }

         public void GetRecordingDevice()


WPF: Fix exception in TableLayoutHandler when size is too small. Fixes #67

--- Source/Eto.Platform.Wpf/Forms/TableLayoutHandler.cs
+++ Source/Eto.Platform.Wpf/Forms/TableLayoutHandler.cs
@@ -11,17 +11,17 @@
 {
 	public class TableLayoutHandler : WpfLayout<swc.Grid, TableLayout>, ITableLayout
 	{
-		Eto.Drawing.Size spacing;
-		bool[] columnScale;
-		bool lastColumnScale;
-		bool[] rowScale;
+		Eto.Drawing.Size spacing;
+		bool[] columnScale;
+		bool lastColumnScale;
+		bool[] rowScale;
 		bool lastRowScale;

 		public void CreateControl (int cols, int rows)
-		{
-			columnScale = new bool[cols];
-			rowScale = new bool[rows];
-			lastColumnScale = true;
+		{
+			columnScale = new bool[cols];
+			rowScale = new bool[rows];
+			lastColumnScale = true;
 			lastRowScale = true;
 			Control = new swc.Grid {
 				SnapsToDevicePixels = true
@@ -47,14 +47,14 @@
 				var max = Control.ColumnDefinitions[x].ActualWidth;
 				foreach (var child in ColumnControls (x)) {
 					if (!double.IsNaN(child.Width))
-						child.Width = max - child.Margin.Left - child.Margin.Right;
+						child.Width = Math.Max(0, max - child.Margin.Left - child.Margin.Right);
 				}
 			}
 			for (int y = 0; y < Control.RowDefinitions.Count; y++) {
 				var max = Control.RowDefinitions[y].ActualHeight;
 				foreach (var child in RowControls (y)) {
 					if (!double.IsNaN (child.Height))
-						child.Height = max - child.Margin.Top - child.Margin.Bottom;
+						child.Height = Math.Max(0, max - child.Margin.Top - child.Margin.Bottom);
 				}
 			}
 		}
@@ -90,58 +90,58 @@
 				var y = swc.Grid.GetRow (child);
 				SetMargins (child, x, y);
 			}
-		}
-
-		sw.GridLength GetColumnWidth (int column)
-		{
-			var scale = columnScale[column];
-			if (column == columnScale.Length - 1)
-				scale |= lastColumnScale;
-			return new System.Windows.GridLength (1, scale ? sw.GridUnitType.Star : sw.GridUnitType.Auto);
-		}
-
-		sw.GridLength GetRowHeight (int row)
-		{
-			var scale = rowScale[row];
-			if (row == rowScale.Length - 1)
-				scale |= lastRowScale;
-			return new System.Windows.GridLength (1, scale ? sw.GridUnitType.Star : sw.GridUnitType.Auto);
-		}
-
-		public void SetColumnScale (int column, bool scale)
-		{
-			columnScale[column] = scale;
-			var lastScale = columnScale.Length == 1 || columnScale.Take (columnScale.Length - 1).All (r => !r);
-			Control.ColumnDefinitions[column].Width = GetColumnWidth (column);
-			if (lastScale != lastColumnScale)
-			{
-				lastColumnScale = lastScale;
-				Control.ColumnDefinitions[columnScale.Length - 1].Width = GetColumnWidth (columnScale.Length - 1);
-			}
-			SetSizes ();
-		}
-
-		public bool GetColumnScale (int column)
-		{
-			return columnScale[column];
-		}
-
-		public void SetRowScale (int row, bool scale)
-		{
-			rowScale[row] = scale;
-			var lastScale = rowScale.Length == 1 || rowScale.Take (rowScale.Length - 1).All (r => !r);
-			Control.RowDefinitions[row].Height = GetRowHeight (row);
-			if (lastScale != lastRowScale)
-			{
-				lastRowScale = lastScale;
-				Control.RowDefinitions[rowScale.Length - 1].Height = GetRowHeight (rowScale.Length - 1);
-			}
-			SetSizes ();
-		}
-
-		public bool GetRowScale (int row)
-		{
-			return rowScale[row];
+		}
+
+		sw.GridLength GetColumnWidth (int column)
+		{
+			var scale = columnScale[column];
+			if (column == columnScale.Length - 1)
+				scale |= lastColumnScale;
+			return new System.Windows.GridLength (1, scale ? sw.GridUnitType.Star : sw.GridUnitType.Auto);
+		}
+
+		sw.GridLength GetRowHeight (int row)
+		{
+			var scale = rowScale[row];
+			if (row == rowScale.Length - 1)
+				scale |= lastRowScale;
+			return new System.Windows.GridLength (1, scale ? sw.GridUnitType.Star : sw.GridUnitType.Auto);
+		}
+
+		public void SetColumnScale (int column, bool scale)
+		{
+			columnScale[column] = scale;
+			var lastScale = columnScale.Length == 1 || columnScale.Take (columnScale.Length - 1).All (r => !r);
+			Control.ColumnDefinitions[column].Width = GetColumnWidth (column);
+			if (lastScale != lastColumnScale)
+			{
+				lastColumnScale = lastScale;
+				Control.ColumnDefinitions[columnScale.Length - 1].Width = GetColumnWidth (columnScale.Length - 1);
+			}
+			SetSizes ();
+		}
+
+		public bool GetColumnScale (int column)
+		{
+			return columnScale[column];
+		}
+
+		public void SetRowScale (int row, bool scale)
+		{
+			rowScale[row] = scale;
+			var lastScale = rowScale.Length == 1 || rowScale.Take (rowScale.Length - 1).All (r => !r);
+			Control.RowDefinitions[row].Height = GetRowHeight (row);
+			if (lastScale != lastRowScale)
+			{
+				lastRowScale = lastScale;
+				Control.RowDefinitions[rowScale.Length - 1].Height = GetRowHeight (rowScale.Length - 1);
+			}
+			SetSizes ();
+		}
+
+		public bool GetRowScale (int row)
+		{
+			return rowScale[row];
 		}

 		public Eto.Drawing.Size Spacing


HelixViewport3D: removed unused assertion from OnApplyTemplate

--- Source/HelixToolkit.Wpf/Controls/HelixViewport3D.cs
+++ Source/HelixToolkit.Wpf/Controls/HelixViewport3D.cs
@@ -2305,9 +2305,6 @@
                 }
             }

-            Debug.Assert(
-                this.coordinateView != null, string.Format("{0} is missing from the template.", PartCoordinateView));
-
             // update the coordinateview camera
             this.OnCameraChanged();


Unambiguous blocks grouped in UnorderedChoice

--- cs/src/markdom.cs/Grammar/MarkdomGrammar.cs
+++ cs/src/markdom.cs/Grammar/MarkdomGrammar.cs
@@ -187,13 +187,14 @@
 				Sequence(
 					Reference(() => BlankLines),
 					ChoiceOrdered<IBlockNode>(
-						Reference(() => Heading),
-						Reference(() => ReferenceBlock),
-						Reference(() => Blockquote),
-						Reference(() => UnorderedList),
-						Reference(() => Table),
-						Reference(() => OrderedList),
-						Reference(() => ExpressionBlock),
+						ChoiceUnordered<IBlockNode>(
+							Reference(() => Heading),
+							Reference(() => ReferenceBlock),
+							Reference(() => Blockquote),
+							Reference(() => Table),
+							Reference(() => UnorderedList),
+							Reference(() => OrderedList),
+							Reference(() => ExpressionBlock)),
 						Reference(() => Paragraph)),
 					Reference(() => BlankLines),
 					match => match.Product.Of2));


Implement SetUp method

Implement SetUp method

--- StressMeasurementSystem.Tests/Models/ContactTest.cs
+++ StressMeasurementSystem.Tests/Models/ContactTest.cs
@@ -1,14 +1,53 @@
 using NUnit.Framework;
+using StressMeasurementSystem.Models;
+using System.Collections.Generic;

 namespace StressMeasurementSystem.Tests.Models
 {
     [TestFixture]
     public class ContactTest
     {
+        #region Fields
+
+        private Contact _contact;
+        private Contact.NameInfo _name;
+        private Contact.OrganizationInfo _organization;
+        private List<Contact.PhoneInfo> _phoneNumbers;
+        private List<Contact.EmailInfo> _emailAddresses;
+
+        #endregion
+
         [SetUp]
         public void SetUp()
         {
-            //TODO: Implement
+            _name = new Contact.NameInfo();
+            _name.First = "John";
+            _name.Last = "Smith";
+
+            _organization = new Contact.OrganizationInfo();
+            _organization.Company = "Smith Co.";
+            _organization.JobTitle = "CEO";
+
+            _phoneNumbers = new List<Contact.PhoneInfo>();
+
+            Contact.PhoneInfo phoneNumberWork = new Contact.PhoneInfo();
+            phoneNumberWork.Number = "(800) 123-4567";
+            phoneNumberWork.T = Contact.PhoneInfo.Type.Work;
+            _phoneNumbers.Add(phoneNumberWork);
+
+            Contact.PhoneInfo phoneNumberMobile = new Contact.PhoneInfo();
+            phoneNumberMobile.Number = "(123) 456-7890";
+            phoneNumberMobile.T = Contact.PhoneInfo.Type.Mobile;
+            _phoneNumbers.Add(phoneNumberMobile);
+
+            _emailAddresses = new List<Contact.EmailInfo>();
+
+            Contact.EmailInfo emailAddressWork = new Contact.EmailInfo();
+            emailAddressWork.Address = new System.Net.Mail.MailAddress("jsmith@smith.com");
+            emailAddressWork.T = Contact.EmailInfo.Type.Work;
+            _emailAddresses.Add(emailAddressWork);
+
+            _contact = new Contact(_name, _organization, _phoneNumbers, _emailAddresses);
         }

         [Test]


Raise a OnDataPortalInitInvoke event before the current principal is loaded into the data portal context. The reason for this is to allow a WPF UI to reset the principal to a valid object before the data portal is invoked.

--- cslacs/Csla/DataPortal/Client/DataPortal.cs
+++ cslacs/Csla/DataPortal/Client/DataPortal.cs
@@ -19,6 +19,13 @@
     #region DataPortal events

     /// <summary>
+    /// Raised by DataPortal before it starts
+    /// setting up to call a server-side
+    /// DataPortal method.
+    /// </summary>
+    public static event Action<System.Object> DataPortalInitInvoke;
+
+    /// <summary>
     /// Raised by DataPortal prior to calling the
     /// requested server-side DataPortal method.
     /// </summary>
@@ -29,6 +36,13 @@
     /// server-side DataPortal method call is complete.
     /// </summary>
     public static event Action<DataPortalEventArgs> DataPortalInvokeComplete;
+
+    private static void OnDataPortalInitInvoke(object e)
+    {
+      Action<System.Object> action = DataPortalInitInvoke;
+      if (action != null)
+        action(e);
+    }

     private static void OnDataPortalInvoke(DataPortalEventArgs e)
     {
@@ -97,6 +111,8 @@

       DataPortalClient.IDataPortalProxy proxy;
       proxy = GetDataPortalProxy(RunLocal(method));
+
+      OnDataPortalInitInvoke(null);

       Server.DataPortalContext dpContext =
         new Csla.Server.DataPortalContext(GetPrincipal(), proxy.IsServerRemote);
@@ -173,6 +189,8 @@

       DataPortalClient.IDataPortalProxy proxy;
       proxy = GetDataPortalProxy(RunLocal(method));
+
+      OnDataPortalInitInvoke(null);

       Server.DataPortalContext dpContext =
         new Server.DataPortalContext(GetPrincipal(),
@@ -312,6 +330,8 @@
       DataPortalClient.IDataPortalProxy proxy;
       proxy = GetDataPortalProxy(RunLocal(method));

+      OnDataPortalInitInvoke(null);
+
       Server.DataPortalContext dpContext =
         new Server.DataPortalContext(GetPrincipal(), proxy.IsServerRemote);

@@ -354,6 +374,8 @@

       DataPortalClient.IDataPortalProxy proxy;
       proxy = GetDataPortalProxy(RunLocal(method));
+
+      OnDataPortalInitInvoke(null);

       Server.DataPortalContext dpContext = new Server.DataPortalContext(GetPrincipal(), proxy.IsServerRemote);


Reformatted code.

Reformatted code.

--- SubtextSolution/UnitTests.Subtext/StubDataReader.cs
+++ SubtextSolution/UnitTests.Subtext/StubDataReader.cs
@@ -52,22 +52,22 @@
 			DateTime testDate = DateTime.Now;
 			StubResultSet resultSet = new StubResultSet("col0", "col1", "col2");
 			resultSet.AddRow(1, "Test", testDate);
-
+
 			StubResultSet anotherResultSet = new StubResultSet("first", "second");
 			anotherResultSet.AddRow((decimal)1.618, "Foo");
 			anotherResultSet.AddRow((decimal)2.718, "Bar");
 			anotherResultSet.AddRow((decimal)3.142, "Baz");
-
+
 			StubDataReader reader = new StubDataReader(resultSet, anotherResultSet);

 			//Advance to first row.
 			Assert.IsTrue(reader.Read(), "Expected data.");
-
+
 			Assert.AreEqual(1, reader["col0"]);
-
+
 			//Advance to second ResultSet.
 			Assert.IsTrue(reader.NextResult(), "Expected next result set");
-
+
 			//Advance to first row.
 			Assert.IsTrue(reader.Read(), "Expected data.");
 			Assert.AreEqual((decimal)1.618, reader["first"]);


Cambio en domino

Cambio en domino


Fix missing argument

Fix missing argument

--- client/BlueMonkey/BlueMonkey.ViewModel.Tests/MainPageViewModelTest.cs
+++ client/BlueMonkey/BlueMonkey.ViewModel.Tests/MainPageViewModelTest.cs
@@ -6,6 +6,7 @@
 using BlueMonkey.ViewModels;
 using Moq;
 using Prism.Navigation;
+using Prism.Services;
 using Xunit;

 namespace BlueMonkey.ViewModel.Tests
@@ -16,7 +17,8 @@
         public void NavigateCommand()
         {
             var navigationService = new Mock<INavigationService>();
-            var actual = new MainPageViewModel(navigationService.Object);
+            var pageDialogService = new Mock<IPageDialogService>();
+            var actual = new MainPageViewModel(navigationService.Object, pageDialogService.Object);

             Assert.NotNull(actual.NavigateCommand);
             Assert.True(actual.NavigateCommand.CanExecute());


Fix broken custom notification location in Settings

Closes #118


Added unit test to make sure the Exif chunk is read in the PNG coder (#218).

--- Tests/Magick.NET.Tests/Shared/Coders/ThePngCoder.cs
+++ Tests/Magick.NET.Tests/Shared/Coders/ThePngCoder.cs
@@ -11,6 +11,7 @@
 // and limitations under the License.

 using System;
+using System.IO;
 using ImageMagick;
 using Microsoft.VisualStudio.TestTools.UnitTesting;

@@ -68,6 +69,32 @@
             }
         }

+        [TestMethod]
+        public void ShouldReadTheExifChunk()
+        {
+            using (IMagickImage input = new MagickImage(MagickColors.YellowGreen, 1, 1))
+            {
+                ExifProfile exifProfile = new ExifProfile();
+                exifProfile.SetValue(ExifTag.ImageUniqueID, "Have a nice day");
+
+                input.AddProfile(exifProfile);
+
+                using (var memoryStream = new MemoryStream())
+                {
+                    input.Write(memoryStream, MagickFormat.Png);
+
+                    memoryStream.Position = 0;
+
+                    using (IMagickImage output = new MagickImage(memoryStream))
+                    {
+                        exifProfile = output.GetExifProfile();
+
+                        Assert.IsNotNull(exifProfile);
+                    }
+                }
+            }
+        }
+
         private void HandleWarning(object sender, WarningEventArgs e)
         {
             Assert.Fail("Warning was raised: " + e.Message);


Manual initialization on surface creation.

--- OpenGL.Net.Xamarin.Android/GLSurfaceView.cs
+++ OpenGL.Net.Xamarin.Android/GLSurfaceView.cs
@@ -248,6 +248,9 @@
 		/// </param>
 		public void SurfaceCreated(ISurfaceHolder holder)
 		{
+			// Problem with static constructors? Ensure manual initialization
+			Egl.Initialize(); Gl.Initialize();
+
 			// Get actual native window handle
 			_NativeWindowHandle = ANativeWindow_fromSurface(JNIEnv.Handle, holder.Surface.Handle);


Suppress CA1062

Suppress CA1062

--- ThScoreFileConverter/Commands/CloseWindowCommand.cs
+++ ThScoreFileConverter/Commands/CloseWindowCommand.cs
@@ -48,8 +48,10 @@
         /// <param name="parameter">A <see cref="Window"/> instance which is closed.</param>
         public void Execute(object parameter)
         {
+#pragma warning disable CA1062 // Validate arguments of public methods
             if (this.CanExecute(parameter))
                 (parameter as Window).Close();
+#pragma warning restore CA1062 // Validate arguments of public methods
         }
     }
 }